@searchcraft/vue-sdk 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -8,7 +8,7 @@
8
8
  void main() {
9
9
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
10
10
  }
11
- `,a=C.createShader(C.VERTEX_SHADER),o=C.createShader(C.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(C.shaderSource(a,r),C.shaderSource(o,s),C.compileShader(a),!C.getShaderParameter(a,C.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+C.getShaderInfoLog(a));if(C.compileShader(o),!C.getShaderParameter(o,C.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+C.getShaderInfoLog(o));var n=C.createProgram();if(!n)throw new Error("Failed to create shader program");if(C.attachShader(n,a),C.attachShader(n,o),C.linkProgram(n),!C.getProgramParameter(n,C.LINK_STATUS))throw new Error("Shader program linking failed: "+C.getProgramInfoLog(n));C.useProgram(n);for(var c=137,u=new Float32Array(4*c),h=2*Math.PI/c,i=0;i<c;i++){var p=i*h;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(Q.width/2),u[4*i+3]=Math.sin(p)*(Q.height/2)}var g=C.createBuffer();C.bindBuffer(C.ARRAY_BUFFER,g),C.bufferData(C.ARRAY_BUFFER,u,C.STATIC_DRAW);var k=C.getAttribLocation(n,"position");C.enableVertexAttribArray(k),C.vertexAttribPointer(k,2,C.FLOAT,!1,0,0),C.viewport(0,0,Q.width,Q.height),C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT),C.drawArrays(C.LINES,0,2*c);var b=new Uint8ClampedArray(Q.width*Q.height*4);return C.readPixels(0,0,Q.width,Q.height,C.RGBA,C.UNSIGNED_BYTE,b),new ImageData(b,Q.width,Q.height)}catch{return new ImageData(1,1)}finally{C&&(C.bindBuffer(C.ARRAY_BUFFER,null),C.useProgram(null),C.viewport(0,0,C.drawingBufferWidth,C.drawingBufferHeight),C.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Nt(Br(e,Q.width,Q.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var xe=function(e,t,r,s){for(var a=(r-t)/s,o=0,n=0;n<s;n++)o+=e(t+(n+.5)*a);return o*a};le("math",function(){return pe(void 0,void 0,void 0,function(){return me(this,function(e){return[2,{acos:Math.acos(.5),asin:xe(Math.asin,-1,1,97),atan:xe(Math.atan,-1,1,97),cos:xe(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:xe(Math.sin,-Math.PI,Math.PI,97),sinh:xe(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:xe(Math.tan,0,2*Math.PI,97),tanh:xe(Math.tanh,-9/7,7/9,97)}]})})});const wn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Le=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=wn[r[e]&63];return t};class zt{constructor(t){A(this,"config"),this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class Rn extends zt{async getAds(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,s=await(await fetch(r,{method:"GET"})).json(),a=s.product_ads.map(n=>({id:Le(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:n})),o=s.text_ads.map(n=>({id:Le(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:n}));return a.concat(o)}async onAdContainerViewed(t){var r;const s=t.adClientResponseItem;(r=s.admAd)!=null&&r.impression_url&&fetch(s.admAd.impression_url)}}class xn extends zt{async getAds(t){return[]}}const En=1e3;class Pn extends zt{constructor(t){super(t),A(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var s;if((((s=r.data.hits)==null?void 0:s.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(En)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const Tn=600;class $n{constructor(t,r,s){A(this,"measureRequestTimeout"),A(this,"measureRequestsBatched",[]),A(this,"config"),A(this,"sdkInfo"),A(this,"userId"),A(this,"sessionId"),A(this,"sendMeasureEvent",async(a,o={},n={})=>{const c={event_name:a,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...n}};if(a==="document_clicked"){const u=JSON.stringify(c),h=`${this.baseMeasureUrl}/event`;try{const i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:u,keepalive:!0});if(!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`)}catch(i){throw console.error("Error sending MeasureRequest:",i),i}}else this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const u=JSON.stringify({items:this.measureRequestsBatched}),h=`${this.baseMeasureUrl}/batch`;try{const i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:u,keepalive:!0});if(this.measureRequestsBatched=[],!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`);return}catch(i){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",i),i}},Tn)}),this.config=t,this.sdkInfo=r,this.userId=s,this.sessionId=Le(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const _n=e=>e.endsWith("/")?e.slice(0,-1):e,jt=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},In=500;class An{constructor(t,r,s){A(this,"config"),A(this,"userId"),A(this,"parent"),A(this,"searchCompletedEventTimeout"),A(this,"getSearchResponseItems",async a=>{var o,n,c,u,h;let i;const p=typeof a=="string"?a:a.searchTerm;try{return(o=this.parent.measureClient)==null||o.sendMeasureEvent("search_requested",{search_term:p}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:p}}),(n=this.parent.adClient)==null||n.onQuerySubmitted(typeof a=="string"?{searchTerm:p,mode:"exact"}:a),typeof a=="string"?i=await this.handleGetSearchResponseItemsWithString(a):i=await this.handleGetSearchResponseItemsWithObject(a),(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_response_received",{search_term:p,number_of_documents:i.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var g;(g=this.parent.measureClient)==null||g.sendMeasureEvent("search_completed",{search_term:p,number_of_documents:i.data.count})},In),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:p}}),(((u=i.data.hits)==null?void 0:u.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(h=this.parent.adClient)==null||h.onQueryFetched(typeof a=="string"?{searchTerm:p,mode:"exact"}:a,i),i}catch(g){throw console.error("Error parsing response:",g),g}}),A(this,"handleGetSearchResponseItemsWithString",async a=>{var o;let n;try{n=JSON.parse(a),n={limit:this.config.searchResultsPerPage,...n}}catch{throw new Error("Error: Query string is not valid json.")}const c=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||Le()},body:JSON.stringify(n)});if(!c.ok)throw new Error(`Error: ${c.statusText} (Status: ${c.status})`);return await c.json()}),A(this,"handleGetSearchResponseItemsWithObject",async a=>{var o;try{const n=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||Le()},body:JSON.stringify({query:this.formatParamsForRequest(a),offset:a.offset||0,limit:a.limit||this.config.searchResultsPerPage||20,...a.order_by&&{order_by:a.order_by},...a.sort&&{sort:a.sort}})});if(!n.ok)throw new Error(`Error: ${n.statusText} (Status: ${n.status})`);return await n.json()}catch(n){throw console.error("Error parsing response:",n),n}}),this.parent=t,this.config=r,this.userId=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}formatParamsForRequest(t){const r=[];t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(o=>{var n;const c=(n=t.facetPathsForIndexFields)==null?void 0:n[o];c&&r.push({occur:"must",exact:{ctx:jt(c.value)}})}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(o=>{var n;const c=(n=t.rangeValueForIndexFields)==null?void 0:n[o];c&&r.push({occur:"must",exact:{ctx:jt(c.value)}})});const s=jt(t.searchTerm),a=t.mode==="fuzzy"?{fuzzy:{ctx:s}}:{exact:{ctx:`${s.startsWith('"')?s:`"${s}"`}`}};return r.push({occur:t.mode==="exact"?"must":"should",...a}),r}}class Mn{constructor(t,r){if(A(this,"config"),A(this,"measureClient"),A(this,"searchClient"),A(this,"adClient"),A(this,"userId"),A(this,"requestTimeout"),A(this,"subscriptionEvents",{}),A(this,"getResponseItems",(s,a,o)=>{const n=async()=>{(async()=>{var c;const u=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(s));if(!u)throw new Error("Search client was not initialized.");const h=(u.data.hits||[]).filter(i=>!!i.doc).map(i=>({id:Le(),document:i.doc||{id:-1},source_index:i.source_index,type:"SearchDocument"}));a(u,h)})(),(async()=>{if(this.adClient&&typeof s!="string"){const c=await this.adClient.getAds(s);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(n,this.config.searchDebounceDelay):n()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:_n(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&r.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),typeof window<"u"&&(this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations())}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let s=!1;for(const a of t)a.type==="childList"&&a.addedNodes.forEach(o=>{o.nodeType===1&&(o.getAttribute("class")||"").toLowerCase()==="searchcraft-input-form"&&(s=!0)});s&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let s=this.config.userId;switch(s||(s=await hn()),this.measureClient=new $n(t,r,s),this.searchClient=new An(this,t,s),t.adSource){case"adMarketplace":this.adClient=new Rn(t);break;case"Nativo":this.adClient=new Pn(t);break;case"Custom":this.adClient=new xn(t);break}this.emitEvent("initialized",{name:"initialized"})},300)}emitEvent(t,r){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}var Yr={},Vt={};const Zr=e=>{let t;const r=new Set,s=(h,i)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const g=t;t=i??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(k=>k(t,g))}},a=()=>t,c={setState:s,getState:a,getInitialState:()=>u,subscribe:h=>(r.add(h),()=>r.delete(h))},u=t=e(s,a,c);return c},Ln=e=>e?Zr(e):Zr;Vt.createStore=Ln;var Bt={},Qr={exports:{}},w={};/**
11
+ `,a=C.createShader(C.VERTEX_SHADER),o=C.createShader(C.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(C.shaderSource(a,r),C.shaderSource(o,s),C.compileShader(a),!C.getShaderParameter(a,C.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+C.getShaderInfoLog(a));if(C.compileShader(o),!C.getShaderParameter(o,C.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+C.getShaderInfoLog(o));var n=C.createProgram();if(!n)throw new Error("Failed to create shader program");if(C.attachShader(n,a),C.attachShader(n,o),C.linkProgram(n),!C.getProgramParameter(n,C.LINK_STATUS))throw new Error("Shader program linking failed: "+C.getProgramInfoLog(n));C.useProgram(n);for(var c=137,u=new Float32Array(4*c),h=2*Math.PI/c,i=0;i<c;i++){var p=i*h;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(Q.width/2),u[4*i+3]=Math.sin(p)*(Q.height/2)}var g=C.createBuffer();C.bindBuffer(C.ARRAY_BUFFER,g),C.bufferData(C.ARRAY_BUFFER,u,C.STATIC_DRAW);var k=C.getAttribLocation(n,"position");C.enableVertexAttribArray(k),C.vertexAttribPointer(k,2,C.FLOAT,!1,0,0),C.viewport(0,0,Q.width,Q.height),C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT),C.drawArrays(C.LINES,0,2*c);var b=new Uint8ClampedArray(Q.width*Q.height*4);return C.readPixels(0,0,Q.width,Q.height,C.RGBA,C.UNSIGNED_BYTE,b),new ImageData(b,Q.width,Q.height)}catch{return new ImageData(1,1)}finally{C&&(C.bindBuffer(C.ARRAY_BUFFER,null),C.useProgram(null),C.viewport(0,0,C.drawingBufferWidth,C.drawingBufferHeight),C.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Nt(Br(e,Q.width,Q.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var xe=function(e,t,r,s){for(var a=(r-t)/s,o=0,n=0;n<s;n++)o+=e(t+(n+.5)*a);return o*a};le("math",function(){return pe(void 0,void 0,void 0,function(){return me(this,function(e){return[2,{acos:Math.acos(.5),asin:xe(Math.asin,-1,1,97),atan:xe(Math.atan,-1,1,97),cos:xe(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:xe(Math.sin,-Math.PI,Math.PI,97),sinh:xe(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:xe(Math.tan,0,2*Math.PI,97),tanh:xe(Math.tanh,-9/7,7/9,97)}]})})});const wn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Le=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=wn[r[e]&63];return t};class zt{constructor(t){A(this,"config"),this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class Rn extends zt{async getAds(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,s=await(await fetch(r,{method:"GET"})).json(),a=s.product_ads.map(n=>({id:Le(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:n})),o=s.text_ads.map(n=>({id:Le(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:n}));return a.concat(o)}async onAdContainerViewed(t){var r;const s=t.adClientResponseItem;(r=s.admAd)!=null&&r.impression_url&&fetch(s.admAd.impression_url)}}class xn extends zt{async getAds(t){return[]}}const En=1e3;class Pn extends zt{constructor(t){super(t),A(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var s;if((((s=r.data.hits)==null?void 0:s.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(En)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const Tn=600;class $n{constructor(t,r,s){A(this,"measureRequestTimeout"),A(this,"measureRequestsBatched",[]),A(this,"config"),A(this,"sdkInfo"),A(this,"userId"),A(this,"sessionId"),A(this,"sendMeasureEvent",async(a,o={},n={})=>{const c={event_name:a,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...n}};if(a==="document_clicked"){const u=JSON.stringify(c),h=`${this.baseMeasureUrl}/event`;try{const i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:u,keepalive:!0});if(!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`)}catch(i){throw console.error("Error sending MeasureRequest:",i),i}}else this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const u=JSON.stringify({items:this.measureRequestsBatched}),h=`${this.baseMeasureUrl}/batch`;try{const i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:u,keepalive:!0});if(this.measureRequestsBatched=[],!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`);return}catch(i){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",i),i}},Tn)}),this.config=t,this.sdkInfo=r,this.userId=s,this.sessionId=Le(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const _n=e=>e.endsWith("/")?e.slice(0,-1):e,jt=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},In=500;class An{constructor(t,r,s){A(this,"config"),A(this,"userId"),A(this,"parent"),A(this,"searchCompletedEventTimeout"),A(this,"getSearchResponseItems",async a=>{var o,n,c,u,h;let i;const p=typeof a=="string"?a:a.searchTerm;try{return(o=this.parent.measureClient)==null||o.sendMeasureEvent("search_requested",{search_term:p}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:p}}),(n=this.parent.adClient)==null||n.onQuerySubmitted(typeof a=="string"?{searchTerm:p,mode:"exact"}:a),typeof a=="string"?i=await this.handleGetSearchResponseItemsWithString(a):i=await this.handleGetSearchResponseItemsWithObject(a),(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_response_received",{search_term:p,number_of_documents:i.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var g;(g=this.parent.measureClient)==null||g.sendMeasureEvent("search_completed",{search_term:p,number_of_documents:i.data.count})},In),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:p}}),(((u=i.data.hits)==null?void 0:u.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(h=this.parent.adClient)==null||h.onQueryFetched(typeof a=="string"?{searchTerm:p,mode:"exact"}:a,i),i}catch(g){throw console.error("Error parsing response:",g),g}}),A(this,"handleGetSearchResponseItemsWithString",async a=>{var o;let n;try{n=JSON.parse(a),n={limit:this.config.searchResultsPerPage,...n}}catch{throw new Error("Error: Query string is not valid json.")}const c=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||Le()},body:JSON.stringify(n)});if(!c.ok)throw new Error(`Error: ${c.statusText} (Status: ${c.status})`);return await c.json()}),A(this,"handleGetSearchResponseItemsWithObject",async a=>{var o;try{const n=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||Le()},body:JSON.stringify({query:this.formatParamsForRequest(a),offset:a.offset||0,limit:a.limit||this.config.searchResultsPerPage||20,...a.order_by&&{order_by:a.order_by},...a.sort&&{sort:a.sort}})});if(!n.ok)throw new Error(`Error: ${n.statusText} (Status: ${n.status})`);return await n.json()}catch(n){throw console.error("Error parsing response:",n),n}}),this.parent=t,this.config=r,this.userId=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}formatParamsForRequest(t){const r=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var c;const u=(c=t.facetPathsForIndexFields)==null?void 0:c[n];u&&(s="must",r.push({occur:"must",exact:{ctx:jt(u.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var c;const u=(c=t.rangeValueForIndexFields)==null?void 0:c[n];u&&(s="must",r.push({occur:"must",exact:{ctx:jt(u.value)}}))});const a=jt(t.searchTerm),o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return r.push({occur:t.mode==="exact"?"must":s,...o}),r}}class Mn{constructor(t,r){if(A(this,"config"),A(this,"measureClient"),A(this,"searchClient"),A(this,"adClient"),A(this,"userId"),A(this,"requestTimeout"),A(this,"subscriptionEvents",{}),A(this,"getResponseItems",(s,a,o)=>{const n=async()=>{(async()=>{var c;const u=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(s));if(!u)throw new Error("Search client was not initialized.");const h=(u.data.hits||[]).filter(i=>!!i.doc).map(i=>({id:Le(),document:i.doc||{id:-1},source_index:i.source_index,type:"SearchDocument"}));a(u,h)})(),(async()=>{if(this.adClient&&typeof s!="string"){const c=await this.adClient.getAds(s);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(n,this.config.searchDebounceDelay):n()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:_n(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&r.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),typeof window<"u"&&(this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations())}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let s=!1;for(const a of t)a.type==="childList"&&a.addedNodes.forEach(o=>{o.nodeType===1&&(o.getAttribute("class")||"").toLowerCase()==="searchcraft-input-form"&&(s=!0)});s&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let s=this.config.userId;switch(s||(s=await hn()),this.measureClient=new $n(t,r,s),this.searchClient=new An(this,t,s),t.adSource){case"adMarketplace":this.adClient=new Rn(t);break;case"Nativo":this.adClient=new Pn(t);break;case"Custom":this.adClient=new xn(t);break}this.emitEvent("initialized",{name:"initialized"})},300)}emitEvent(t,r){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}var Yr={},Vt={};const Zr=e=>{let t;const r=new Set,s=(h,i)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const g=t;t=i??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(k=>k(t,g))}},a=()=>t,c={setState:s,getState:a,getInitialState:()=>u,subscribe:h=>(r.add(h),()=>r.delete(h))},u=t=e(s,a,c);return c},Ln=e=>e?Zr(e):Zr;Vt.createStore=Ln;var Bt={},Qr={exports:{}},w={};/**
12
12
  * @license React
13
13
  * react.production.js
14
14
  *
@@ -16,11 +16,11 @@
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Wt=Symbol.for("react.transitional.element"),On=Symbol.for("react.portal"),Fn=Symbol.for("react.fragment"),Dn=Symbol.for("react.strict_mode"),Hn=Symbol.for("react.profiler"),Nn=Symbol.for("react.consumer"),Un=Symbol.for("react.context"),zn=Symbol.for("react.forward_ref"),jn=Symbol.for("react.suspense"),Vn=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy"),Xr=Symbol.iterator;function Bn(e){return e===null||typeof e!="object"?null:(e=Xr&&e[Xr]||e["@@iterator"],typeof e=="function"?e:null)}var Jr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},es=Object.assign,ts={};function Oe(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}Oe.prototype.isReactComponent={},Oe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Oe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rs(){}rs.prototype=Oe.prototype;function Gt(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}var qt=Gt.prototype=new rs;qt.constructor=Gt,es(qt,Oe.prototype),qt.isPureReactComponent=!0;var ss=Array.isArray,L={H:null,A:null,T:null,S:null},as=Object.prototype.hasOwnProperty;function Yt(e,t,r,s,a,o){return r=o.ref,{$$typeof:Wt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Wn(e,t){return Yt(e.type,t,void 0,void 0,void 0,e.props)}function Zt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wt}function Gn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ns=/\/+/g;function Qt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gn(""+e.key):t.toString(36)}function os(){}function qn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(os,os):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Fe(e,t,r,s,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case Wt:case On:n=!0;break;case Kr:return n=e._init,Fe(n(e._payload),t,r,s,a)}}if(n)return a=a(e),n=s===""?"."+Qt(e,0):s,ss(a)?(r="",n!=null&&(r=n.replace(ns,"$&/")+"/"),Fe(a,t,r,"",function(h){return h})):a!=null&&(Zt(a)&&(a=Wn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(ns,"$&/")+"/")+n)),t.push(a)),1;n=0;var c=s===""?".":s+":";if(ss(e))for(var u=0;u<e.length;u++)s=e[u],o=c+Qt(s,u),n+=Fe(s,t,r,o,a);else if(u=Bn(e),typeof u=="function")for(e=u.call(e),u=0;!(s=e.next()).done;)s=s.value,o=c+Qt(s,u++),n+=Fe(s,t,r,o,a);else if(o==="object"){if(typeof e.then=="function")return Fe(qn(e),t,r,s,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function mt(e,t,r){if(e==null)return e;var s=[],a=0;return Fe(e,s,"","",function(o){return t.call(r,o,a++)}),s}function Yn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var cs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Zn(){}w.Children={map:mt,forEach:function(e,t,r){mt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mt(e,function(){t++}),t},toArray:function(e){return mt(e,function(t){return t})||[]},only:function(e){if(!Zt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},w.Component=Oe,w.Fragment=Fn,w.Profiler=Hn,w.PureComponent=Gt,w.StrictMode=Dn,w.Suspense=jn,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,w.act=function(){throw Error("act(...) is not supported in production builds of React.")},w.cache=function(e){return function(){return e.apply(null,arguments)}},w.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=es({},e.props),a=e.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!as.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=r;else if(1<n){for(var c=Array(n),u=0;u<n;u++)c[u]=arguments[u+2];s.children=c}return Yt(e.type,a,void 0,void 0,o,s)},w.createContext=function(e){return e={$$typeof:Un,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Nn,_context:e},e},w.createElement=function(e,t,r){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)as.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var c=Array(n),u=0;u<n;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return Yt(e,o,void 0,void 0,null,a)},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:zn,render:e}},w.isValidElement=Zt,w.lazy=function(e){return{$$typeof:Kr,_payload:{_status:-1,_result:e},_init:Yn}},w.memo=function(e,t){return{$$typeof:Vn,type:e,compare:t===void 0?null:t}},w.startTransition=function(e){var t=L.T,r={};L.T=r;try{var s=e(),a=L.S;a!==null&&a(r,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Zn,cs)}catch(o){cs(o)}finally{L.T=t}},w.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},w.use=function(e){return L.H.use(e)},w.useActionState=function(e,t,r){return L.H.useActionState(e,t,r)},w.useCallback=function(e,t){return L.H.useCallback(e,t)},w.useContext=function(e){return L.H.useContext(e)},w.useDebugValue=function(){},w.useDeferredValue=function(e,t){return L.H.useDeferredValue(e,t)},w.useEffect=function(e,t){return L.H.useEffect(e,t)},w.useId=function(){return L.H.useId()},w.useImperativeHandle=function(e,t,r){return L.H.useImperativeHandle(e,t,r)},w.useInsertionEffect=function(e,t){return L.H.useInsertionEffect(e,t)},w.useLayoutEffect=function(e,t){return L.H.useLayoutEffect(e,t)},w.useMemo=function(e,t){return L.H.useMemo(e,t)},w.useOptimistic=function(e,t){return L.H.useOptimistic(e,t)},w.useReducer=function(e,t,r){return L.H.useReducer(e,t,r)},w.useRef=function(e){return L.H.useRef(e)},w.useState=function(e){return L.H.useState(e)},w.useSyncExternalStore=function(e,t,r){return L.H.useSyncExternalStore(e,t,r)},w.useTransition=function(){return L.H.useTransition()},w.version="19.0.0",Qr.exports=w;var is=Qr.exports,Qn=Vt;const Kn=e=>e;function ls(e,t=Kn){const r=is.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return is.useDebugValue(r),r}const us=e=>{const t=Qn.createStore(e),r=s=>ls(t,s);return Object.assign(r,t),r},Xn=e=>e?us(e):us;Bt.create=Xn,Bt.useStore=ls,function(e){var t=Vt,r=Bt;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(r).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[s]}})})}(Yr);const hs={adClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",logger:void 0,facetPathsForIndexFields:{},initialQuery:"",initialSearchClientResponseItems:[],isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,afterInit:()=>{}},_=Yr.createStore((e,t)=>{const r={set:a=>(e(a),t()),addFacetPathsForIndexField:a=>r.set(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[a.fieldName]:a}})),addRangeValueForIndexField:a=>r.set(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[a.fieldName]:a}})),getSearchcraftCore:()=>{const{core:a}=t();return a},init:(a,o=!1)=>{const n=o?new an({logLevel:fe.DEBUG}):void 0,c=r.set({core:a,logger:n,searchResultsPerPage:(a==null?void 0:a.config.searchResultsPerPage)||20});a==null||a.subscribe("initialized",()=>{c.afterInit&&c.afterInit(c)})},removeFacetPathsForIndexField:a=>r.set(o=>{const n=o.facetPathsForIndexFields;return delete n[a],{facetPathsForIndexFields:{...n}}}),removeRangeValueForIndexField:a=>r.set(o=>{const n=o.rangeValueForIndexFields;return delete n[a],{rangeValueForIndexFields:{...n}}}),resetFacetPaths:()=>{r.set({facetPathsForIndexFields:{}})},search:async()=>{var o,n;const a=t();if((o=a.logger)==null||o.log(fe.INFO,`Starting search with search term: "${a.searchTerm}"`),!a.core)throw new Error("Searchcraft instance is not initialized.");if(!a.searchTerm.trim()){(n=a.logger)==null||n.log(fe.INFO,"No search request was made: search term was empty."),r.set({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}r.set({isSearchInProgress:!0}),a.core.getResponseItems({searchTerm:a.searchTerm,mode:a.searchMode,sort:a.sortType,order_by:a.orderByField,facetPathsForIndexFields:a.facetPathsForIndexFields,rangeValueForIndexFields:a.rangeValueForIndexFields,offset:a.searchResultsPerPage?a.searchResultsPerPage*(a.searchResultsPage-1):0,limit:a.searchResultsPerPage},r.setSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setAdClientResponseItems:a=>r.set({adClientResponseItems:a}),setSearchClientResponseItemsFromResponse:(a,o)=>{var i,p;const{facets:n,count:c=0,time_taken:u=0}=a.data,h=r.set(g=>({isSearchInProgress:!1,searchClientResponseItems:o,searchResponseTimeTaken:u,searchResultsPage:c===g.searchResultsCount?g.searchResultsPage:1,searchResultsCount:c,...n&&{searchResponseFacetPrime:n}}));(i=h.logger)==null||i.log(fe.DEBUG,`Search results: ${JSON.stringify(o)}`),(p=h.logger)==null||p.log(fe.DEBUG,`Facets from response: ${JSON.stringify(n)}`)},setInitialSearchClientResponseItemsFromResponse:(a,o)=>{var h;const n=t(),{count:c=0,time_taken:u=0}=a.data;r.set(i=>({isSearchInProgress:!1,initialSearchClientResponseItems:o,searchResponseTimeTaken:u,searchResultsPage:c===i.searchResultsCount?i.searchResultsPage:1,searchResultsCount:c})),(h=n.logger)==null||h.log(fe.DEBUG,`Search results: ${JSON.stringify(o)}`)},setInitialQuery:async a=>{var n;const o=r.set({initialQuery:a});if((n=o.logger)==null||n.log(fe.INFO,`Starting search with query: "${o.initialQuery}"`),!o.core)throw new Error("Searchcraft instance is not initialized.");await o.core.getResponseItems(a,r.setInitialSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setPopoverVisibility:a=>r.set({isPopoverVisible:a}),setSearchMode:a=>r.set({searchMode:a}),setSortOrder:({orderByField:a,sortType:o})=>r.set({sortType:o,orderByField:a}),setSearchTerm:a=>{const{core:o}=t();a.length===0&&(o==null||o.handleInputCleared()),r.set({searchTerm:a,facetPathsForIndexFields:{},...a.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null}})},setSearchClientResponseItems:a=>r.set({searchClientResponseItems:a}),setSearchResultsCount:a=>r.set({searchResultsCount:a}),setSearchResultsPage:async a=>{r.set({searchResultsPage:a}),await r.search()},setSearchResultsPerPage:async a=>{r.set({searchResultsPerPage:a}),await r.search()},setHotKeyAndHotKeyModifier:(a,o)=>{const{hotkey:n,hotkeyModifier:c}=hs;r.set({hotkey:a||n,hotkeyModifier:o||c})}};return{...hs,...r}});var ds={exports:{}};/*!
19
+ */var Wt=Symbol.for("react.transitional.element"),On=Symbol.for("react.portal"),Fn=Symbol.for("react.fragment"),Dn=Symbol.for("react.strict_mode"),Hn=Symbol.for("react.profiler"),Nn=Symbol.for("react.consumer"),Un=Symbol.for("react.context"),zn=Symbol.for("react.forward_ref"),jn=Symbol.for("react.suspense"),Vn=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy"),Xr=Symbol.iterator;function Bn(e){return e===null||typeof e!="object"?null:(e=Xr&&e[Xr]||e["@@iterator"],typeof e=="function"?e:null)}var Jr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},es=Object.assign,ts={};function Oe(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}Oe.prototype.isReactComponent={},Oe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Oe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rs(){}rs.prototype=Oe.prototype;function Gt(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}var qt=Gt.prototype=new rs;qt.constructor=Gt,es(qt,Oe.prototype),qt.isPureReactComponent=!0;var ss=Array.isArray,L={H:null,A:null,T:null,S:null},as=Object.prototype.hasOwnProperty;function Yt(e,t,r,s,a,o){return r=o.ref,{$$typeof:Wt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Wn(e,t){return Yt(e.type,t,void 0,void 0,void 0,e.props)}function Zt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wt}function Gn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ns=/\/+/g;function Qt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gn(""+e.key):t.toString(36)}function os(){}function qn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(os,os):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Fe(e,t,r,s,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case Wt:case On:n=!0;break;case Kr:return n=e._init,Fe(n(e._payload),t,r,s,a)}}if(n)return a=a(e),n=s===""?"."+Qt(e,0):s,ss(a)?(r="",n!=null&&(r=n.replace(ns,"$&/")+"/"),Fe(a,t,r,"",function(h){return h})):a!=null&&(Zt(a)&&(a=Wn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(ns,"$&/")+"/")+n)),t.push(a)),1;n=0;var c=s===""?".":s+":";if(ss(e))for(var u=0;u<e.length;u++)s=e[u],o=c+Qt(s,u),n+=Fe(s,t,r,o,a);else if(u=Bn(e),typeof u=="function")for(e=u.call(e),u=0;!(s=e.next()).done;)s=s.value,o=c+Qt(s,u++),n+=Fe(s,t,r,o,a);else if(o==="object"){if(typeof e.then=="function")return Fe(qn(e),t,r,s,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function mt(e,t,r){if(e==null)return e;var s=[],a=0;return Fe(e,s,"","",function(o){return t.call(r,o,a++)}),s}function Yn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var cs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Zn(){}w.Children={map:mt,forEach:function(e,t,r){mt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mt(e,function(){t++}),t},toArray:function(e){return mt(e,function(t){return t})||[]},only:function(e){if(!Zt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},w.Component=Oe,w.Fragment=Fn,w.Profiler=Hn,w.PureComponent=Gt,w.StrictMode=Dn,w.Suspense=jn,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,w.act=function(){throw Error("act(...) is not supported in production builds of React.")},w.cache=function(e){return function(){return e.apply(null,arguments)}},w.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=es({},e.props),a=e.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!as.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=r;else if(1<n){for(var c=Array(n),u=0;u<n;u++)c[u]=arguments[u+2];s.children=c}return Yt(e.type,a,void 0,void 0,o,s)},w.createContext=function(e){return e={$$typeof:Un,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Nn,_context:e},e},w.createElement=function(e,t,r){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)as.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var c=Array(n),u=0;u<n;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return Yt(e,o,void 0,void 0,null,a)},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:zn,render:e}},w.isValidElement=Zt,w.lazy=function(e){return{$$typeof:Kr,_payload:{_status:-1,_result:e},_init:Yn}},w.memo=function(e,t){return{$$typeof:Vn,type:e,compare:t===void 0?null:t}},w.startTransition=function(e){var t=L.T,r={};L.T=r;try{var s=e(),a=L.S;a!==null&&a(r,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Zn,cs)}catch(o){cs(o)}finally{L.T=t}},w.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},w.use=function(e){return L.H.use(e)},w.useActionState=function(e,t,r){return L.H.useActionState(e,t,r)},w.useCallback=function(e,t){return L.H.useCallback(e,t)},w.useContext=function(e){return L.H.useContext(e)},w.useDebugValue=function(){},w.useDeferredValue=function(e,t){return L.H.useDeferredValue(e,t)},w.useEffect=function(e,t){return L.H.useEffect(e,t)},w.useId=function(){return L.H.useId()},w.useImperativeHandle=function(e,t,r){return L.H.useImperativeHandle(e,t,r)},w.useInsertionEffect=function(e,t){return L.H.useInsertionEffect(e,t)},w.useLayoutEffect=function(e,t){return L.H.useLayoutEffect(e,t)},w.useMemo=function(e,t){return L.H.useMemo(e,t)},w.useOptimistic=function(e,t){return L.H.useOptimistic(e,t)},w.useReducer=function(e,t,r){return L.H.useReducer(e,t,r)},w.useRef=function(e){return L.H.useRef(e)},w.useState=function(e){return L.H.useState(e)},w.useSyncExternalStore=function(e,t,r){return L.H.useSyncExternalStore(e,t,r)},w.useTransition=function(){return L.H.useTransition()},w.version="19.0.0",Qr.exports=w;var is=Qr.exports,Qn=Vt;const Kn=e=>e;function ls(e,t=Kn){const r=is.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return is.useDebugValue(r),r}const us=e=>{const t=Qn.createStore(e),r=s=>ls(t,s);return Object.assign(r,t),r},Xn=e=>e?us(e):us;Bt.create=Xn,Bt.useStore=ls,function(e){var t=Vt,r=Bt;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(r).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[s]}})})}(Yr);const hs={adClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",logger:void 0,facetPathsForIndexFields:{},initialQuery:"",initialSearchClientResponseItems:[],isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,afterInit:()=>{}},_=Yr.createStore((e,t)=>{const r={set:a=>(e(a),t()),addFacetPathsForIndexField:a=>r.set(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[a.fieldName]:a}})),addRangeValueForIndexField:a=>r.set(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[a.fieldName]:a}})),getSearchcraftCore:()=>{const{core:a}=t();return a},init:(a,o=!1)=>{const n=o?new an({logLevel:fe.DEBUG}):void 0,c=r.set({core:a,logger:n,searchResultsPerPage:(a==null?void 0:a.config.searchResultsPerPage)||20});a==null||a.subscribe("initialized",()=>{c.afterInit&&c.afterInit(c)})},removeFacetPathsForIndexField:a=>r.set(o=>{const n=o.facetPathsForIndexFields;return delete n[a],{facetPathsForIndexFields:{...n}}}),removeRangeValueForIndexField:a=>r.set(o=>{const n=o.rangeValueForIndexFields;return delete n[a],{rangeValueForIndexFields:{...n}}}),resetFacetPaths:()=>{r.set({facetPathsForIndexFields:{}})},search:async()=>{var o,n;const a=t();if((o=a.logger)==null||o.log(fe.INFO,`Starting search with search term: "${a.searchTerm}"`),!a.core)throw new Error("Searchcraft instance is not initialized.");if(!a.searchTerm.trim()){(n=a.logger)==null||n.log(fe.INFO,"No search request was made: search term was empty."),r.set({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}r.set({isSearchInProgress:!0}),a.core.getResponseItems({searchTerm:a.searchTerm,mode:a.searchMode,sort:a.sortType,order_by:a.orderByField,facetPathsForIndexFields:a.facetPathsForIndexFields,rangeValueForIndexFields:a.rangeValueForIndexFields,offset:a.searchResultsPerPage?a.searchResultsPerPage*(a.searchResultsPage-1):0,limit:a.searchResultsPerPage},r.setSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setAdClientResponseItems:a=>r.set({adClientResponseItems:a}),setSearchClientResponseItemsFromResponse:(a,o)=>{var i,p;const{facets:n,count:c=0,time_taken:u=0}=a.data,h=r.set(g=>({isSearchInProgress:!1,searchClientResponseItems:o,searchResponseTimeTaken:u,searchResultsPage:c===g.searchResultsCount?g.searchResultsPage:1,searchResultsCount:c,searchResponseFacetPrime:n}));(i=h.logger)==null||i.log(fe.DEBUG,`Search results: ${JSON.stringify(o)}`),(p=h.logger)==null||p.log(fe.DEBUG,`Facets from response: ${JSON.stringify(n)}`)},setInitialSearchClientResponseItemsFromResponse:(a,o)=>{var h;const n=t(),{count:c=0,time_taken:u=0}=a.data;r.set(i=>({isSearchInProgress:!1,initialSearchClientResponseItems:o,searchResponseTimeTaken:u,searchResultsPage:c===i.searchResultsCount?i.searchResultsPage:1,searchResultsCount:c})),(h=n.logger)==null||h.log(fe.DEBUG,`Search results: ${JSON.stringify(o)}`)},setInitialQuery:async a=>{var n;const o=r.set({initialQuery:a});if((n=o.logger)==null||n.log(fe.INFO,`Starting search with query: "${o.initialQuery}"`),!o.core)throw new Error("Searchcraft instance is not initialized.");await o.core.getResponseItems(a,r.setInitialSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setPopoverVisibility:a=>r.set({isPopoverVisible:a}),setSearchMode:a=>r.set({searchMode:a}),setSortOrder:({orderByField:a,sortType:o})=>r.set({sortType:o,orderByField:a}),setSearchTerm:a=>{const{core:o}=t();a.length===0&&(o==null||o.handleInputCleared()),r.set({searchTerm:a,facetPathsForIndexFields:{},...a.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null}})},setSearchClientResponseItems:a=>r.set({searchClientResponseItems:a}),setSearchResultsCount:a=>r.set({searchResultsCount:a}),setSearchResultsPage:async a=>{r.set({searchResultsPage:a}),await r.search()},setSearchResultsPerPage:async a=>{r.set({searchResultsPerPage:a}),await r.search()},setHotKeyAndHotKeyModifier:(a,o)=>{const{hotkey:n,hotkeyModifier:c}=hs;r.set({hotkey:a||n,hotkeyModifier:o||c})}};return{...hs,...r}});var ds={exports:{}};/*!
20
20
  Copyright (c) 2018 Jed Watson.
21
21
  Licensed under the MIT License (MIT), see
22
22
  http://jedwatson.github.io/classnames
23
23
  */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",n=0;n<arguments.length;n++){var c=arguments[n];c&&(o=a(o,s(c)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var c in o)t.call(o,c)&&o[c]&&(n=a(n,c));return n}function a(o,n){return n?o?o+" "+n:o+n:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ds);const oe=ds.exports;var Jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fs={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(e,t){(function(r,s){e.exports=s()})(Jn,function(){const{entries:r,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:c,seal:u,create:h}=Object,{apply:i,construct:p}=typeof Reflect<"u"&&Reflect;c||(c=function(y){return y}),u||(u=function(y){return y}),i||(i=function(y,$,E){return y.apply($,E)}),p||(p=function(y,$){return new y(...$)});const g=X(Array.prototype.forEach),k=X(Array.prototype.lastIndexOf),b=X(Array.prototype.pop),P=X(Array.prototype.push),I=X(Array.prototype.splice),F=X(String.prototype.toLowerCase),T=X(String.prototype.toString),be=X(String.prototype.match),ce=X(String.prototype.replace),Ee=X(String.prototype.indexOf),U=X(String.prototype.trim),se=X(Object.prototype.hasOwnProperty),z=X(RegExp.prototype.test),Pe=Ec(TypeError);function X(x){return function(y){for(var $=arguments.length,E=new Array($>1?$-1:0),Y=1;Y<$;Y++)E[Y-1]=arguments[Y];return i(x,y,E)}}function Ec(x){return function(){for(var y=arguments.length,$=new Array(y),E=0;E<y;E++)$[E]=arguments[E];return p(x,$)}}function R(x,y){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:F;s&&s(x,null);let E=y.length;for(;E--;){let Y=y[E];if(typeof Y=="string"){const ye=$(Y);ye!==Y&&(a(y)||(y[E]=ye),Y=ye)}x[Y]=!0}return x}function Pc(x){for(let y=0;y<x.length;y++)se(x,y)||(x[y]=null);return x}function Te(x){const y=h(null);for(const[$,E]of r(x))se(x,$)&&(Array.isArray(E)?y[$]=Pc(E):E&&typeof E=="object"&&E.constructor===Object?y[$]=Te(E):y[$]=E);return y}function Ke(x,y){for(;x!==null;){const E=n(x,y);if(E){if(E.get)return X(E.get);if(typeof E.value=="function")return X(E.value)}x=o(x)}function $(){return null}return $}const Ls=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),er=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tr=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tc=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rr=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$c=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Os=c(["#text"]),Fs=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),sr=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ds=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yt=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_c=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ic=u(/<%[\w\W]*|[\w\W]*%>/gm),Ac=u(/\$\{[\w\W]*/gm),Mc=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lc=u(/^aria-[\-\w]+$/),Hs=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oc=u(/^(?:\w+script|data):/i),Fc=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ns=u(/^html$/i),Dc=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var Us=Object.freeze({__proto__:null,ARIA_ATTR:Lc,ATTR_WHITESPACE:Fc,CUSTOM_ELEMENT:Dc,DATA_ATTR:Mc,DOCTYPE_NAME:Ns,ERB_EXPR:Ic,IS_ALLOWED_URI:Hs,IS_SCRIPT_OR_DATA:Oc,MUSTACHE_EXPR:_c,TMPLIT_EXPR:Ac});const Xe={element:1,text:3,progressingInstruction:7,comment:8,document:9},Hc=function(){return typeof window>"u"?null:window},Nc=function(y,$){if(typeof y!="object"||typeof y.createPolicy!="function")return null;let E=null;const Y="data-tt-policy-suffix";$&&$.hasAttribute(Y)&&(E=$.getAttribute(Y));const ye="dompurify"+(E?"#"+E:"");try{return y.createPolicy(ye,{createHTML(De){return De},createScriptURL(De){return De}})}catch{return console.warn("TrustedTypes policy "+ye+" could not be created."),null}},zs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function js(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hc();const y=S=>js(S);if(y.version="3.2.4",y.removed=[],!x||!x.document||x.document.nodeType!==Xe.document||!x.Element)return y.isSupported=!1,y;let{document:$}=x;const E=$,Y=E.currentScript,{DocumentFragment:ye,HTMLTemplateElement:De,Node:ar,Element:Vs,NodeFilter:Je,NamedNodeMap:zc=x.NamedNodeMap||x.MozNamedAttrMap,HTMLFormElement:jc,DOMParser:Vc,trustedTypes:St}=x,et=Vs.prototype,Bc=Ke(et,"cloneNode"),Wc=Ke(et,"remove"),Gc=Ke(et,"nextSibling"),qc=Ke(et,"childNodes"),Ct=Ke(et,"parentNode");if(typeof De=="function"){const S=$.createElement("template");S.content&&S.content.ownerDocument&&($=S.content.ownerDocument)}let J,tt="";const{implementation:nr,createNodeIterator:Yc,createDocumentFragment:Zc,getElementsByTagName:Qc}=$,{importNode:Kc}=E;let ee=zs();y.isSupported=typeof r=="function"&&typeof Ct=="function"&&nr&&nr.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:or,ERB_EXPR:cr,TMPLIT_EXPR:ir,DATA_ATTR:Xc,ARIA_ATTR:Jc,IS_SCRIPT_OR_DATA:ei,ATTR_WHITESPACE:Bs,CUSTOM_ELEMENT:ti}=Us;let{IS_ALLOWED_URI:Ws}=Us,j=null;const Gs=R({},[...Ls,...er,...tr,...rr,...Os]);let W=null;const qs=R({},[...Fs,...sr,...Ds,...yt]);let N=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rt=null,lr=null,Ys=!0,ur=!0,Zs=!1,Qs=!0,He=!1,hr=!0,$e=!1,dr=!1,fr=!1,Ne=!1,kt=!1,wt=!1,Ks=!0,Xs=!1;const ri="user-content-";let pr=!0,st=!1,Ue={},ze=null;const Js=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ea=null;const ta=R({},["audio","video","img","source","image","track"]);let mr=null;const ra=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",xt="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let je=Se,gr=!1,vr=null;const si=R({},[Rt,xt,Se],T);let Et=R({},["mi","mo","mn","ms","mtext"]),Pt=R({},["annotation-xml"]);const ai=R({},["title","style","font","a","script"]);let at=null;const ni=["application/xhtml+xml","text/html"],oi="text/html";let V=null,Ve=null;const ci=$.createElement("form"),sa=function(d){return d instanceof RegExp||d instanceof Function},br=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ve&&Ve===d)){if((!d||typeof d!="object")&&(d={}),d=Te(d),at=ni.indexOf(d.PARSER_MEDIA_TYPE)===-1?oi:d.PARSER_MEDIA_TYPE,V=at==="application/xhtml+xml"?T:F,j=se(d,"ALLOWED_TAGS")?R({},d.ALLOWED_TAGS,V):Gs,W=se(d,"ALLOWED_ATTR")?R({},d.ALLOWED_ATTR,V):qs,vr=se(d,"ALLOWED_NAMESPACES")?R({},d.ALLOWED_NAMESPACES,T):si,mr=se(d,"ADD_URI_SAFE_ATTR")?R(Te(ra),d.ADD_URI_SAFE_ATTR,V):ra,ea=se(d,"ADD_DATA_URI_TAGS")?R(Te(ta),d.ADD_DATA_URI_TAGS,V):ta,ze=se(d,"FORBID_CONTENTS")?R({},d.FORBID_CONTENTS,V):Js,rt=se(d,"FORBID_TAGS")?R({},d.FORBID_TAGS,V):{},lr=se(d,"FORBID_ATTR")?R({},d.FORBID_ATTR,V):{},Ue=se(d,"USE_PROFILES")?d.USE_PROFILES:!1,Ys=d.ALLOW_ARIA_ATTR!==!1,ur=d.ALLOW_DATA_ATTR!==!1,Zs=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Qs=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=d.SAFE_FOR_TEMPLATES||!1,hr=d.SAFE_FOR_XML!==!1,$e=d.WHOLE_DOCUMENT||!1,Ne=d.RETURN_DOM||!1,kt=d.RETURN_DOM_FRAGMENT||!1,wt=d.RETURN_TRUSTED_TYPE||!1,fr=d.FORCE_BODY||!1,Ks=d.SANITIZE_DOM!==!1,Xs=d.SANITIZE_NAMED_PROPS||!1,pr=d.KEEP_CONTENT!==!1,st=d.IN_PLACE||!1,Ws=d.ALLOWED_URI_REGEXP||Hs,je=d.NAMESPACE||Se,Et=d.MATHML_TEXT_INTEGRATION_POINTS||Et,Pt=d.HTML_INTEGRATION_POINTS||Pt,N=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&sa(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&sa(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(N.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),He&&(ur=!1),kt&&(Ne=!0),Ue&&(j=R({},Os),W=[],Ue.html===!0&&(R(j,Ls),R(W,Fs)),Ue.svg===!0&&(R(j,er),R(W,sr),R(W,yt)),Ue.svgFilters===!0&&(R(j,tr),R(W,sr),R(W,yt)),Ue.mathMl===!0&&(R(j,rr),R(W,Ds),R(W,yt))),d.ADD_TAGS&&(j===Gs&&(j=Te(j)),R(j,d.ADD_TAGS,V)),d.ADD_ATTR&&(W===qs&&(W=Te(W)),R(W,d.ADD_ATTR,V)),d.ADD_URI_SAFE_ATTR&&R(mr,d.ADD_URI_SAFE_ATTR,V),d.FORBID_CONTENTS&&(ze===Js&&(ze=Te(ze)),R(ze,d.FORBID_CONTENTS,V)),pr&&(j["#text"]=!0),$e&&R(j,["html","head","body"]),j.table&&(R(j,["tbody"]),delete rt.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=d.TRUSTED_TYPES_POLICY,tt=J.createHTML("")}else J===void 0&&(J=Nc(St,Y)),J!==null&&typeof tt=="string"&&(tt=J.createHTML(""));c&&c(d),Ve=d}},aa=R({},[...er,...tr,...Tc]),na=R({},[...rr,...$c]),ii=function(d){let m=Ct(d);(!m||!m.tagName)&&(m={namespaceURI:je,tagName:"template"});const v=F(d.tagName),M=F(m.tagName);return vr[d.namespaceURI]?d.namespaceURI===xt?m.namespaceURI===Se?v==="svg":m.namespaceURI===Rt?v==="svg"&&(M==="annotation-xml"||Et[M]):!!aa[v]:d.namespaceURI===Rt?m.namespaceURI===Se?v==="math":m.namespaceURI===xt?v==="math"&&Pt[M]:!!na[v]:d.namespaceURI===Se?m.namespaceURI===xt&&!Pt[M]||m.namespaceURI===Rt&&!Et[M]?!1:!na[v]&&(ai[v]||!aa[v]):!!(at==="application/xhtml+xml"&&vr[d.namespaceURI]):!1},ue=function(d){P(y.removed,{element:d});try{Ct(d).removeChild(d)}catch{Wc(d)}},Tt=function(d,m){try{P(y.removed,{attribute:m.getAttributeNode(d),from:m})}catch{P(y.removed,{attribute:null,from:m})}if(m.removeAttribute(d),d==="is")if(Ne||kt)try{ue(m)}catch{}else try{m.setAttribute(d,"")}catch{}},oa=function(d){let m=null,v=null;if(fr)d="<remove></remove>"+d;else{const G=be(d,/^[\r\n\t ]+/);v=G&&G[0]}at==="application/xhtml+xml"&&je===Se&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const M=J?J.createHTML(d):d;if(je===Se)try{m=new Vc().parseFromString(M,at)}catch{}if(!m||!m.documentElement){m=nr.createDocument(je,"template",null);try{m.documentElement.innerHTML=gr?tt:M}catch{}}const Z=m.body||m.documentElement;return d&&v&&Z.insertBefore($.createTextNode(v),Z.childNodes[0]||null),je===Se?Qc.call(m,$e?"html":"body")[0]:$e?m.documentElement:Z},ca=function(d){return Yc.call(d.ownerDocument||d,d,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT|Je.SHOW_PROCESSING_INSTRUCTION|Je.SHOW_CDATA_SECTION,null)},yr=function(d){return d instanceof jc&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof zc)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},ia=function(d){return typeof ar=="function"&&d instanceof ar};function Ce(S,d,m){g(S,v=>{v.call(y,d,m,Ve)})}const la=function(d){let m=null;if(Ce(ee.beforeSanitizeElements,d,null),yr(d))return ue(d),!0;const v=V(d.nodeName);if(Ce(ee.uponSanitizeElement,d,{tagName:v,allowedTags:j}),d.hasChildNodes()&&!ia(d.firstElementChild)&&z(/<[/\w]/g,d.innerHTML)&&z(/<[/\w]/g,d.textContent)||d.nodeType===Xe.progressingInstruction||hr&&d.nodeType===Xe.comment&&z(/<[/\w]/g,d.data))return ue(d),!0;if(!j[v]||rt[v]){if(!rt[v]&&ha(v)&&(N.tagNameCheck instanceof RegExp&&z(N.tagNameCheck,v)||N.tagNameCheck instanceof Function&&N.tagNameCheck(v)))return!1;if(pr&&!ze[v]){const M=Ct(d)||d.parentNode,Z=qc(d)||d.childNodes;if(Z&&M){const G=Z.length;for(let ae=G-1;ae>=0;--ae){const he=Bc(Z[ae],!0);he.__removalCount=(d.__removalCount||0)+1,M.insertBefore(he,Gc(d))}}}return ue(d),!0}return d instanceof Vs&&!ii(d)||(v==="noscript"||v==="noembed"||v==="noframes")&&z(/<\/no(script|embed|frames)/i,d.innerHTML)?(ue(d),!0):(He&&d.nodeType===Xe.text&&(m=d.textContent,g([or,cr,ir],M=>{m=ce(m,M," ")}),d.textContent!==m&&(P(y.removed,{element:d.cloneNode()}),d.textContent=m)),Ce(ee.afterSanitizeElements,d,null),!1)},ua=function(d,m,v){if(Ks&&(m==="id"||m==="name")&&(v in $||v in ci))return!1;if(!(ur&&!lr[m]&&z(Xc,m))){if(!(Ys&&z(Jc,m))){if(!W[m]||lr[m]){if(!(ha(d)&&(N.tagNameCheck instanceof RegExp&&z(N.tagNameCheck,d)||N.tagNameCheck instanceof Function&&N.tagNameCheck(d))&&(N.attributeNameCheck instanceof RegExp&&z(N.attributeNameCheck,m)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(m))||m==="is"&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&z(N.tagNameCheck,v)||N.tagNameCheck instanceof Function&&N.tagNameCheck(v))))return!1}else if(!mr[m]){if(!z(Ws,ce(v,Bs,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&d!=="script"&&Ee(v,"data:")===0&&ea[d])){if(!(Zs&&!z(ei,ce(v,Bs,"")))){if(v)return!1}}}}}}return!0},ha=function(d){return d!=="annotation-xml"&&be(d,ti)},da=function(d){Ce(ee.beforeSanitizeAttributes,d,null);const{attributes:m}=d;if(!m||yr(d))return;const v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let M=m.length;for(;M--;){const Z=m[M],{name:G,namespaceURI:ae,value:he}=Z,nt=V(G);let te=G==="value"?he:U(he);if(v.attrName=nt,v.attrValue=te,v.keepAttr=!0,v.forceKeepAttr=void 0,Ce(ee.uponSanitizeAttribute,d,v),te=v.attrValue,Xs&&(nt==="id"||nt==="name")&&(Tt(G,d),te=ri+te),hr&&z(/((--!?|])>)|<\/(style|title)/i,te)){Tt(G,d);continue}if(v.forceKeepAttr||(Tt(G,d),!v.keepAttr))continue;if(!Qs&&z(/\/>/i,te)){Tt(G,d);continue}He&&g([or,cr,ir],pa=>{te=ce(te,pa," ")});const fa=V(d.nodeName);if(ua(fa,nt,te)){if(J&&typeof St=="object"&&typeof St.getAttributeType=="function"&&!ae)switch(St.getAttributeType(fa,nt)){case"TrustedHTML":{te=J.createHTML(te);break}case"TrustedScriptURL":{te=J.createScriptURL(te);break}}try{ae?d.setAttributeNS(ae,G,te):d.setAttribute(G,te),yr(d)?ue(d):b(y.removed)}catch{}}}Ce(ee.afterSanitizeAttributes,d,null)},li=function S(d){let m=null;const v=ca(d);for(Ce(ee.beforeSanitizeShadowDOM,d,null);m=v.nextNode();)Ce(ee.uponSanitizeShadowNode,m,null),la(m),da(m),m.content instanceof ye&&S(m.content);Ce(ee.afterSanitizeShadowDOM,d,null)};return y.sanitize=function(S){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,v=null,M=null,Z=null;if(gr=!S,gr&&(S="<!-->"),typeof S!="string"&&!ia(S))if(typeof S.toString=="function"){if(S=S.toString(),typeof S!="string")throw Pe("dirty is not a string, aborting")}else throw Pe("toString is not a function");if(!y.isSupported)return S;if(dr||br(d),y.removed=[],typeof S=="string"&&(st=!1),st){if(S.nodeName){const he=V(S.nodeName);if(!j[he]||rt[he])throw Pe("root node is forbidden and cannot be sanitized in-place")}}else if(S instanceof ar)m=oa("<!---->"),v=m.ownerDocument.importNode(S,!0),v.nodeType===Xe.element&&v.nodeName==="BODY"||v.nodeName==="HTML"?m=v:m.appendChild(v);else{if(!Ne&&!He&&!$e&&S.indexOf("<")===-1)return J&&wt?J.createHTML(S):S;if(m=oa(S),!m)return Ne?null:wt?tt:""}m&&fr&&ue(m.firstChild);const G=ca(st?S:m);for(;M=G.nextNode();)la(M),da(M),M.content instanceof ye&&li(M.content);if(st)return S;if(Ne){if(kt)for(Z=Zc.call(m.ownerDocument);m.firstChild;)Z.appendChild(m.firstChild);else Z=m;return(W.shadowroot||W.shadowrootmode)&&(Z=Kc.call(E,Z,!0)),Z}let ae=$e?m.outerHTML:m.innerHTML;return $e&&j["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&z(Ns,m.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
24
- `+ae),He&&g([or,cr,ir],he=>{ae=ce(ae,he," ")}),J&&wt?J.createHTML(ae):ae},y.setConfig=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(S),dr=!0},y.clearConfig=function(){Ve=null,dr=!1},y.isValidAttribute=function(S,d,m){Ve||br({});const v=V(S),M=V(d);return ua(v,M,m)},y.addHook=function(S,d){typeof d=="function"&&P(ee[S],d)},y.removeHook=function(S,d){if(d!==void 0){const m=k(ee[S],d);return m===-1?void 0:I(ee[S],m,1)[0]}return b(ee[S])},y.removeHooks=function(S){ee[S]=[]},y.removeAllHooks=function(){ee=zs()},y}var Uc=js();return Uc})})(fs);const eo=fs.exports,Ye=(e,...t)=>{let r=e[0];for(let s=0;s<t.length;s++)r+=eo.sanitize(t[s]?String(t[s]):"")+e[s+1];return r||""},to="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let K=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=to[r[e]&63];return t};const ro=H(class extends D{constructor(){super();f(this,"adSource","Custom");f(this,"adClientResponseItem");f(this,"adContainerId",K());f(this,"searchTerm");f(this,"isSearchInProgress",!1);f(this,"core");f(this,"intersectionObserver");f(this,"storeUnsubscribe");f(this,"adContainerRenderedTimeout");f(this,"isComponentConnected",!0);this.__registerHost()}get hostElement(){return this}connectedCallback(){const r=_.getState();this.core=r.core,this.searchTerm=r.searchTerm,this.isSearchInProgress=r.isSearchInProgress,this.storeUnsubscribe=_.subscribe(s=>{this.searchTerm=s.searchTerm,this.isSearchInProgress=s.isSearchInProgress})}componentDidLoad(){this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{var s;r!=null&&r.isIntersecting&&!this.isSearchInProgress&&((s=this.core)==null||s.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""}))},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var r,s;(r=this.storeUnsubscribe)==null||r.call(this),(s=this.intersectionObserver)==null||s.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,c;const r=this.adClientResponseItem;if(!r.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(o=(a=this.core)==null?void 0:a.config)!=null&&o.admAdTemplate&&(s=(c=(n=this.core)==null?void 0:n.config)==null?void 0:c.admAdTemplate(r.admAd,{html:Ye})),l("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n;const r=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdTemplate,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return r&&(a=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Ye})),l("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s;const r=((s=this.core)==null?void 0:s.config.nativoAdClassName)||"ntv-item";return l("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:oe("searchcraft-ad",r),"data-searchcraft-ad-container-id":this.adContainerId})}render(){var r,s;if(!this.isSearchInProgress)switch(this.isComponentConnected&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var a;(a=this.core)==null||a.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((s=(r=this.core)==null?void 0:r.config)==null?void 0:s.adContainerRenderedDebounceDelay)||500)),this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{adSource:[1,"ad-source"],adClientResponseItem:[16],adContainerId:[1,"ad-container-id"],searchTerm:[32],isSearchInProgress:[32]}]);function gt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,ro);break}})}const so=gt,ao=H(class extends D{constructor(){super();f(this,"hierarchy","primary");f(this,"disabled",!1);f(this,"icon");f(this,"iconOnly",!1);f(this,"iconPosition","left");f(this,"label","Search");f(this,"type","button");f(this,"buttonClick");f(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=we(this,"buttonClick")}render(){return l("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:oe("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:l(tn,null,this.iconPosition==="left"&&this.icon,l("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function vt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,ao);break}})}const no=vt,oo=H(class extends D{constructor(){super(),this.__registerHost()}render(){return l("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},l("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function bt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,oo);break}})}const co=bt;function ps(e,t){const r={...e};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&e[s]instanceof Object?r[s]=ps(e[s],t[s]):r[s]=t[s]);return r}function io(e){return e.filter((t,r,s)=>!s.some((a,o)=>o!==r&&a.includes(t)))}function ms(e){const t={},r=s=>{var a;t[s.path]={count:s.count,path:s.path},(a=s.children)==null||a.forEach(o=>{r(o)})};return r(e),t}function lo(e){const t={count:0,path:"/",children:{}};return Object.keys(e).forEach(r=>{const s=e[r];if(!s||s.path==="/")return;const a=s.path.substring(1).split("/");let o=t,n="";a.forEach((c,u)=>{const h=`${n}/${c}`;o.children[h]||(o.children[h]={count:0,path:h,children:{}}),u===a.length-1&&(o.children[h].count=s.count),n=h,o=o.children[h]})}),t}function gs(e){const t={count:e.count,path:e.path,children:[]};return Object.keys(e.children).length>0&&(t.children=Object.values(e.children).map(r=>gs(r))),t}function uo(e,t){const r=Object.keys(e),s=Object.keys(t),a=new Set(s.filter(n=>n.split("/").length>2).map(n=>n.substring(0,n.lastIndexOf("/"))));return Object.fromEntries(r.filter(n=>!a.has(n.substring(0,n.lastIndexOf("/")))).map(n=>[n,e[n]]))}function ho(e,t,r){const s=t[e],a=r[e],o={count:0,path:"/",children:s},n={count:0,path:"/",children:a},c=ms(o),u=ms(n),h=uo(c,u),i=ps(h,u),p=lo(i),g=gs(p);return{[e]:g.children}}const fo=H(class extends D{constructor(){super();f(this,"fieldName","");f(this,"facetSelectionUpdated");f(this,"baseFacetRoot");f(this,"facetRoot");f(this,"selectedPaths",{});f(this,"lastTimeTaken");f(this,"hasNewSearchTerm",!1);f(this,"lastSearchTerm");f(this,"lastSearchMode");f(this,"lastSortType");f(this,"unsubscribe");f(this,"searchStore",_.getState());f(this,"formatLabel",r=>{const s=r.path.replace(/^\//,""),a=r.count;return`${s.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase())} (${a})`});f(this,"formatSubLabel",(r,s)=>{const o=r.path.substring(s.path.length).replace(/^\//,""),n=r.count;return`${o.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())} (${n})`});this.__registerHost(),this.facetSelectionUpdated=we(this,"facetSelectionUpdated")}handleStateUpdate(r){const s=r.searchResponseFacetPrime,a=r.searchResponseTimeTaken;if(this.fieldName){if((r.searchTerm!==this.lastSearchTerm||r.searchMode!==this.lastSearchMode)&&(this.selectedPaths={},this.hasNewSearchTerm=!0),a!==this.lastTimeTaken&&s){this.facetRoot=void 0;const o=s.find(n=>this.fieldName===Object.keys(n)[0]);this.hasNewSearchTerm?(this.baseFacetRoot=o,this.facetRoot=o,this.hasNewSearchTerm=!1):this.baseFacetRoot&&o&&(this.facetRoot=ho(this.fieldName,this.baseFacetRoot,o))}this.lastSearchTerm=r.searchTerm,this.lastSearchMode=r.searchMode,this.lastSortType=r.sortType,this.lastTimeTaken=a}}connectedCallback(){this.handleStateUpdate(this.searchStore),this.unsubscribe=_.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var n;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const c=Object.keys(this.selectedPaths).filter(u=>!u.includes(r));this.selectedPaths=c.reduce((u,h)=>(u[h]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=io(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}render(){var s;if(!this.fieldName)return;const r=(s=this.facetRoot)==null?void 0:s[this.fieldName];return l("div",{class:"searchcraft-facet-list"},!r&&l("p",{class:"searchcraft-facet-list-message"},"Enter a search to view facets."),r==null?void 0:r.map(a=>{var n;const o=a.children?(n=a.children)==null?void 0:n.some(c=>this.selectedPaths[c.path]):!1;return l("div",{key:a.path,class:"searchcraft-facet-list-item"},l("label",{class:"searchcraft-facet-list-checkbox-label"},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[a.path],onChange:c=>this.handleCheckboxChange(a.path),type:"checkbox"}),o?l("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},l("svg",{width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},l("title",null,"Checkbox dash"),l("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),this.formatLabel(a)),a.children&&a.children.length>0&&l("div",{class:"searchcraft-facet-child-list"},a.children.map(c=>l("label",{key:c.path,class:"searchcraft-facet-list-checkbox-label searchcraft-facet-child-list-checkbox-label",style:{display:this.selectedPaths[a.path]?"flex":"none"}},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper searchcraft-facet-child-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input searchcraft-facet-child-list-checkbox-input",checked:this.selectedPaths[c.path],onChange:u=>{this.handleCheckboxChange(c.path)},type:"checkbox"}),l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon searchcraft-facet-child-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),this.formatSubLabel(c,a)))))}))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],baseFacetRoot:[32],facetRoot:[32],selectedPaths:[32],lastTimeTaken:[32]}]);function vs(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,fo);break}})}const po=vs;function Ze(e,t){if(e&&t)return t.fieldNames.map(r=>{let s=e[r.fieldName];if(s)switch(r.dataType){case"date":{s=mo(s,r.dateFormatLocale,r.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(s*(r.numberScale||1));break}}return s}).filter(r=>!!r).join(t.delimiter||" ")}function bs(e){switch(e){case"hour":return 36e5;case"day":return 864e5;case"month":return 2592e6;case"year":return 31536e6;default:return 36e5}}function ys(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function mo(e,t="en-US",r={day:"numeric",month:"long",year:"numeric"}){const s=new Date(e),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const c=Math.trunc(o/1e3),u=Math.trunc(c/60),h=Math.trunc(u/60),i=Math.trunc(h/24),p=new Intl.RelativeTimeFormat(t,r);return i>=1?p.format(-i,"day"):h>=1?p.format(-h,"hour"):u>=1?p.format(-u,"minute"):p.format(0,"second")}return new Intl.DateTimeFormat(t,r).format(s)}const go=H(class extends D{constructor(){super();f(this,"max",100);f(this,"min",0);f(this,"granularity",bs("month"));f(this,"dataType","number");f(this,"endValue",this.max);f(this,"startValue",this.min);f(this,"lastFocusedHandle","max");f(this,"rangeChanged");f(this,"emitUpdate",async()=>{var r;(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue})});f(this,"handleStartValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.emitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});f(this,"handleEndValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.emitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});this.__registerHost(),this.rangeChanged=we(this,"rangeChanged")}componentDidLoad(){this.startValue=this.min,this.endValue=this.max}render(){const r=this.min,s=this.max,a=(this.startValue-r)/(s-r)*100,o=(this.endValue-r)/(s-r)*100,n=this.dataType==="number"?this.startValue:new Date(this.startValue).getFullYear(),c=this.dataType==="number"?this.endValue:new Date(this.endValue).getFullYear();return l("div",{key:"9225b18ce2f40246837d183fcefdd0be7cc22383",class:"searchcraft-slider"},l("div",{key:"8078c1eda2ceb781282f59216915896fdbe2a8d3",class:"searchcraft-slider-range"},l("div",{key:"6a6bafa9f7abf41ab24f020cd291a4a08c618afb",class:"searchcraft-slider-active-range",style:{left:`${a}%`,width:`${o-a}%`}}),l("input",{key:"f07a91d441d277b8e9eba34e39093393a44bbf53",class:oe("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.max,min:this.min,onInput:this.handleStartValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),l("input",{key:"0637ea5fe123abe1d77c540b347c78fc8ad3d281",class:oe("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.max,min:this.min,onInput:this.handleEndValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),l("div",{key:"b62f8d8485915dddefb7ca29f62b4a96d70470c5",class:"searchcraft-slider-label"},l("span",{key:"fd5d32172ce53d93b858ca54c17b12b80fcdde1d",class:"searchcraft-slider-start-label"},n),l("span",{key:"8f4d230b78fb8d896a469f17ade3a3fd3162b427",class:"searchcraft-slider-end-label"},c)))}},[0,"searchcraft-slider",{max:[2],min:[2],granularity:[2],dataType:[1,"data-type"],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function Ss(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,go);break}})}const vo=H(class extends D{constructor(){super();f(this,"label","Toggle");f(this,"subLabel");f(this,"toggleUpdated");f(this,"isActive",!1);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=we(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=_.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("div",{key:"f8a751315daf6bcdc0d47bc4fc802bc4615e565f",class:oe("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},l("div",{key:"aaa92d7c1aebe241a163a1fba7cd1f8d3804286d"},l("p",{key:"068b82b17a99bf55ad17818d0dd4c7e95858317b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&l("p",{key:"39e43e3fad6a2ab09d20f37c6d6865cede3701d9",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),l("button",{key:"5ae352870d4a01c430389e75b967b2eb9d3fa5f7",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},l("div",{key:"0574ade4e1681ce8e122039c40e761cb68555621",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function Cs(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,vo);break}})}const bo=H(class extends D{constructor(){super();f(this,"items",[]);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"searchStore",_.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,s,a){const o=new Date(new Date(s).getFullYear(),0,1),n=new Date(new Date(a).getFullYear()+1,0,0);this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${o.toISOString()} TO ${n.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,s,a){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${s} TO ${a}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,s){s.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${s.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r,s){s?this.searchStore.setSortOrder({orderByField:r,sortType:"desc"}):this.searchStore.setSortOrder({orderByField:null,sortType:null}),this.searchStore.search()}render(){return l("div",{key:"7f15e8f1a2e1be763118f9cd4ded34cf7e2902d0",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const s=r,a=new Date(s.options.minDate).getTime(),o=new Date(s.options.maxDate).getTime(),n=bs(s.options.granularity);return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:a,max:o,granularity:n,dataType:"date",onRangeChanged:c=>{this.handleDateRangeChanged(s.fieldName,c.detail.startValue,c.detail.endValue)}}))}case"numericRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:s.options.min,max:s.options.max,granularity:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function yo(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,bo);break;case"searchcraft-facet-list":customElements.get(t)||vs();break;case"searchcraft-slider":customElements.get(t)||Ss();break;case"searchcraft-toggle-button":customElements.get(t)||Cs();break}})}const So=yo,Co=H(class extends D{constructor(){super();f(this,"inputLabelClassName","");f(this,"label","");this.__registerHost()}render(){return l("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:oe("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Kt(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,Co);break}})}const ko=H(class extends D{constructor(){super();f(this,"autoSearch",!0);f(this,"buttonPlacement","none");f(this,"buttonLabel");f(this,"inputLabel");f(this,"placeholderValue","Enter Search");f(this,"inputFocus");f(this,"inputBlur");f(this,"inputInit");f(this,"inputValue","");f(this,"searchTerm","");f(this,"error",!1);f(this,"core");f(this,"searchcraftStore",_.getState());f(this,"unsubscribe",()=>{});f(this,"handleInput",r=>{const s=r.target;this.inputValue=s.value,this.autoSearch&&this.performSearch(s.value)});f(this,"performSearch",async r=>{if(r!==this.searchTerm){this.searchcraftStore.setSearchTerm(r.trim()),this.error=!1;try{await this.searchcraftStore.search()}catch(s){console.error(`Search for ${r} failed:`,s),this.error=!0}}});f(this,"handleReset",()=>{this.searchcraftStore.setSearchResultsCount(0),this.searchcraftStore.setSearchTerm(""),this.searchcraftStore.setSearchClientResponseItems([]),this.error=!1});f(this,"handleClearInput",()=>{this.handleReset()});f(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch(this.inputValue)});this.__registerHost(),this.inputFocus=we(this,"inputFocus"),this.inputBlur=we(this,"inputBlur"),this.inputInit=we(this,"inputInit")}init(){var r;this.core&&(this.searchcraftStore.init(this.core),(r=this.inputInit)==null||r.emit())}onCoreChange(){this.init()}connectedCallback(){this.init()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.inputValue=r.searchTerm})}disconnectedCallback(){var r;this.handleReset(),(r=this.unsubscribe)==null||r.call(this)}render(){const r=this.inputValue.length>0,s=oe("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return l("form",{key:"6af89b2ab634e0f3e0ef575f98f33d091602f95a",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},l("div",{key:"93fea8e2b80468afeb6014122d5b749d74bfaf35",class:s,style:o},l("div",{key:"1e5a416843b99aec68c4672a9c78f607347dc9d1",class:"searchcraft-input-form-button"},l("searchcraft-button",{key:"c38c1df0ce20f914ed76fbc0acad5a22b40e6fff",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&l("div",{key:"2169a4466b0fdc8075c0dc74da442aef28a84d65",class:"searchcraft-input-form-label"},l("searchcraft-input-label",{key:"a263b5aa2a4d50d297f06c1fe9e6afb64763f097",label:this.inputLabel})),this.error&&l("div",{key:"49be2ac0f2d01916e5ea533e6406ee9d4d932178",class:"searchcraft-input-form-error-message"},l("searchcraft-error-message",{key:"310c9aebcf580d4abe92d288c6b70a5adf083f8e"},"Something went wrong.")),l("div",{key:"f4702e368815e049586e97cf59541b2dc5460fc0",class:"searchcraft-input-form-input-wrapper"},l("input",{key:"a8cddd5e937eee1d30fb98eaaa3dbffe96c192ce",autoComplete:"off",class:"searchcraft-input-form-input",onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),l("div",{key:"616b4dde1ba016cf6a2fba8594a99a3a3f584ef5",class:"searchcraft-input-form-input-icon"},l("svg",{key:"daaef561677a06a76813375e429be7e053b8b122",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},l("title",{key:"e6d82ca64dd9bfc663813c239d11e5652aa0b9a1"},"Search icon"),l("path",{key:"1df856c98c2063c1d0c80027255935f73b513939",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),r&&l("button",{key:"8dd6dfefe0ba909657bd436b559ce35b5004f9ae",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},l("svg",{key:"bcdba04d5c0949cacc8e1962d2b3cd40ad995de6",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},l("title",{key:"e01e7fb9b23daf9434520c4c68c0d7539b37d1f8"},"Clear icon"),l("path",{key:"ce526d332b6e352cd9cf6008ee2f7497c6769782",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function ks(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,ko);break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-label":customElements.get(t)||Kt();break}})}const wo=ks,Ro=Kt,xo=H(class extends D{constructor(){super();f(this,"searchTerm");f(this,"searchResultsPerPage");f(this,"searchResultsPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount",1);f(this,"searchResultsRangeMin",1);f(this,"searchResultsRangeMax",1);f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):l("li",null,l("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):l("li",null,l("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-pagination"},l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Previous page icon"),l("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),l("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Next page icon"),l("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function Eo(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,xo);break;case"searchcraft-button":customElements.get(t)||vt();break}})}const Po=Eo,To=H(class extends D{constructor(){super();f(this,"template");f(this,"type");f(this,"hotkey");f(this,"hotkeyModifier");f(this,"hotkeyModifierSymbol");f(this,"isPopoverVisible");f(this,"userAgent");f(this,"unsubscribe",()=>{});f(this,"renderOptionSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Option key"),l("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),l("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));f(this,"renderCtrlSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Ctrl key"),l("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));f(this,"renderWindowsMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Windows meta key"),l("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));f(this,"renderMacMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Mac meta key"),l("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));this.__registerHost()}handleOnClick(){_.getState().setPopoverVisibility(!0)}componentDidLoad(){const r=_.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=_.subscribe(s=>{this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}setUserAgent(){const r=navigator.userAgent.toLowerCase();switch(!0){case r.includes("windows"):return"window";case r.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return l("div",{class:"searchcraft-popover-button-wrapper"},l("div",{class:"searchcraft-popover-button-input"},l("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},l("title",null,"Search icon"),l("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),l("span",null,"Search")),l("div",{class:"searchcraft-popover-button-keycaps"},l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},l("span",null,this.hotkeyModifierSymbol)),l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},l("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return l("div",null,l("slot",null))}}render(){return l("button",{key:"74e36b0593ba2cbb03f5ecff1434bc7056bf0db0",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Ye}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function $o(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,To);break}})}const _o=$o,Io=H(class extends D{constructor(){super();f(this,"searchResultsCount");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.searchResultsCount=_.getState().searchResultsCount,this.unsubscribe=_.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("footer",{key:"e1344ae185ef1b8a83bb69ba88e2952ab1c75e70",class:"searchcraft-popover-footer"},l("p",{key:"51874f4ce490e4f164b999e8c6f89710702e73bd",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ys(this.searchResultsCount)} Results Found`:" "),l("a",{key:"5476e24cc3fa7fa265bd2b5cba43c8a70d8609ca",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},l("svg",{key:"0a4edf94e9e40a96a93a4e7ba1ffbd081e51b585",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"67813a626922d709a4409028cb0f3f1ce3e2cfe8"},"Powered by Searchcraft"),l("path",{key:"bf9e46a5f9783edd7167c1c5c1256d0200053969",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[0,"searchcraft-popover-footer",{searchResultsCount:[32]}]);function ws(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,Io);break}})}const Ao=ws,Mo=H(class extends D{constructor(){super();f(this,"item");f(this,"popoverResultMappings");f(this,"documentPosition",0);f(this,"title");f(this,"subtitle");f(this,"href");f(this,"imageSource");f(this,"imageAlt");f(this,"handleLinkClick",()=>{var a;const r=_.getState(),s=r.getSearchcraftCore();if(s){const o=this.documentPosition,n=r.searchTerm,c=r.searchClientResponseItems.length||0;(a=s.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:n})}});this.__registerHost()}mapValuesFromDocument(r){var s,a,o,n,c;this.title=Ze(r,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Ze(r,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Ze(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Ze(r,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Ze(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return l("div",{key:"63a2f070ce71cd1330105c03985e32cd1f228b29",class:"searchcraft-popover-list-item"},l("a",{key:"d9bb09248be9be235147acdfeed1a9f29cd123a2",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&l("div",{key:"6af7c3e754885730d8651a593f13b7b5b704a26d",class:"searchcraft-popover-list-item-image-wrapper"},l("img",{key:"74c7e53467efd83ae95439a7065c1de2748113f5",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),l("div",{key:"25a12e5cf582b248773005f5fb58f7a15304d2d1",class:"searchcraft-popover-list-item-content"},this.title&&l("p",{key:"8169f7730feb832178adbc9bdb14a089e955a2ad",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&l("p",{key:"96812df1bab635e3865bdfdb31f133ca629d800e",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Xt(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,Mo);break}})}const Lo=H(class extends D{constructor(){super();f(this,"popoverResultMappings");f(this,"searchClientResponseItems");f(this,"adClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"config",(Ms=_.getState().core)==null?void 0:Ms.config);this.__registerHost()}renderWithADMAds(){var r,s;return l("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>l("searchcraft-ad",{adClientResponseItem:a,adContainerId:K(),adSource:"adMarketplace",key:a.id})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>l("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,h,i,p;const r=[],s=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let g=0;g<o;g++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g}-ad`}));c.forEach((g,k)=>{if(s&&k%s===0&&k+s<c.length&&k>=s)for(let b=0;b<a;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g.id}-ad-${b}`}));r.push(l("searchcraft-popover-list-item",{item:g,key:g.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+k}))});for(let g=0;g<n;g++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var h,i,p,g,k;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((g=this.config)==null?void 0:g.nativoAdStartQuantity)||0,c=((k=this.config)==null?void 0:k.nativoAdEndQuantity)||0,u=this.searchClientResponseItems||[];for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));u.forEach((b,P)=>{if(a&&(P+s)%a===0&&P+a<u.length&&P>=a)for(let I=0;I<o;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-popover-list-item",{item:b,key:b.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let b=0;b<c;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return l("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>l("searchcraft-popover-list-item",{item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Rs(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,Lo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break}})}const Oo=H(class extends D{constructor(){super();f(this,"type","inline");f(this,"popoverResultMappings");f(this,"hotkey","k");f(this,"hotkeyModifier","meta");f(this,"isPopoverVisibleInState",!1);f(this,"unsubscribe");f(this,"searchClientResponseItems",[]);f(this,"adClientResponseItems",[]);f(this,"searchTerm");f(this,"isFocused",!1);f(this,"breakpointSm",576);f(this,"breakpointMd",768);f(this,"breakpointLg",992);f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"modalElement");f(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});f(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":_.getState().setPopoverVisibility(!1);break;default:return}});f(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input-form-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=_.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=_.subscribe(s=>{this.isPopoverVisibleInState!==s.isPopoverVisible&&this.handlePopoverVisibilityChange(s.isPopoverVisible),this.searchClientResponseItems=[...s.searchClientResponseItems],this.adClientResponseItems=[...s.adClientResponseItems],this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage}),_.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(_.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){_.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const s=this.hostElement.querySelector(".searchcraft-input-form-input");s==null||s.focus()}else _.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){_.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=s.indexOf(document.activeElement);if(r==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(r==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,s;return this.searchTerm&&((s=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused;return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)})),r&&l("div",{class:"searchcraft-popover-form-inline-wrapper"},l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}),l("searchcraft-popover-footer",null)))}renderModalPopover(){if(this.isPopoverVisibleInState)return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),l("div",{class:"searchcraft-popover-form-modal-wrapper"},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null)))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function xs(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,Oo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-form":customElements.get(t)||ks();break;case"searchcraft-input-label":customElements.get(t)||Kt();break;case"searchcraft-popover-footer":customElements.get(t)||ws();break;case"searchcraft-popover-form":customElements.get(t)||xs();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break;case"searchcraft-popover-list-view":customElements.get(t)||Rs();break}})}const Fo=xs,Do=Xt,Ho=Rs,No=H(class extends D{constructor(){super();f(this,"template");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"count",0);f(this,"range",[0,0]);f(this,"responseTime","0");f(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:l("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Ye}):`${ys(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Uo(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,No);break}})}const zo=Uo,jo=H(class extends D{constructor(){super();f(this,"item");f(this,"index");f(this,"documentPosition",0);f(this,"template");f(this,"templateHtml");f(this,"handleResultContainerClick",r=>{var i;const s=_.getState(),a=s.getSearchcraftCore();if(!r.target)return;const n=r.target.closest("a");if(!n||!((i=this.hostElement)!=null&&i.contains(n))||!a||!a.measureClient)return;const c=this.documentPosition,u=s.searchTerm,h=s.searchClientResponseItems.length||0;a.measureClient.sendMeasureEvent("document_clicked",{document_position:c,number_of_documents:h,search_term:u})});f(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}connectedCallback(){var r;if(this.item)try{this.templateHtml=(r=this.template)==null?void 0:r.call(this,this.item.document,this.index,{html:Ye,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}render(){if(this.item)return typeof this.template>"u"?l("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([r,s])=>l("p",{key:r},l("strong",null,r),": ",s))):l("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],templateHtml:[32]}]);function Es(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,jo);break}})}const Vo=Es,Bo=H(class extends D{constructor(){super();f(this,"initialQuery");f(this,"template");f(this,"adClientResponseItems",[]);f(this,"config");f(this,"initialSearchClientResponseItems");f(this,"isSearchInProgress",!0);f(this,"searchClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchTerm","");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){var s;const r=_.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(s=r.core)==null?void 0:s.config,r.afterInit=a=>{this.initialQuery&&a.setInitialQuery(this.initialQuery)},this.unsubscribe=_.subscribe(a=>this.handleStateChange(a))}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var s;this.adClientResponseItems=[...r.adClientResponseItems],this.config=(s=r.core)==null?void 0:s.config,this.initialSearchClientResponseItems=[...r.initialSearchClientResponseItems],this.isSearchInProgress=r.isSearchInProgress,this.searchClientResponseItems=[...r.searchClientResponseItems],this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchTerm=r.searchTerm}renderEmptyState(){return l("div",{class:"searchcraft-search-results-empty-state"},l("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return l("div",{class:"searchcraft-search-results"},l("div",{class:"searchcraft-search-results-error-message"},l("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s,a,o;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},(o=this.adClientResponseItems)==null?void 0:o.map(n=>l("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,adContainerId:K(),key:n.id})),r.map((n,c)=>l("searchcraft-search-result",{key:n.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+c,index:c,item:n,template:this.template})))}renderWithCustomAds(){var u,h,i,p,g,k;const r=[],s=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=(g=this.searchClientResponseItems)!=null&&g.length?this.searchClientResponseItems:(k=this.initialSearchClientResponseItems)!=null&&k.length?this.initialSearchClientResponseItems:[];for(let b=0;b<o;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));c.forEach((b,P)=>{if(s&&P%s===0&&P+s<c.length&&P>=s)for(let I=0;I<a;I++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-search-result",{key:b.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:b,template:this.template}))});for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNativoAds(){var h,i,p,g,k,b,P;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((g=this.config)==null?void 0:g.nativoAdStartQuantity)||0,c=((k=this.config)==null?void 0:k.nativoAdEndQuantity)||0,u=(b=this.searchClientResponseItems)!=null&&b.length?this.searchClientResponseItems:(P=this.initialSearchClientResponseItems)!=null&&P.length?this.initialSearchClientResponseItems:[];for(let I=0;I<n;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));u.forEach((I,F)=>{if(a&&(F+s)%a===0&&F+a<u.length&&F>=a)for(let T=0;T<o;T++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I.id}-ad-${T}`}));r.push(l("searchcraft-search-result",{key:I.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+F,index:F,item:I,template:this.template}))});for(let I=0;I<c;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNoAds(){var s,a;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},r.map((o,n)=>l("searchcraft-search-result",{key:o.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:o,template:this.template})))}render(){var a;const r=this.searchClientResponseItems||[],s=this.initialSearchClientResponseItems||[];if(this.searchTerm===""&&s.length===0&&!this.isSearchInProgress)return this.renderEmptyState();if(this.searchTerm.length>0&&r.length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((a=this.config)==null?void 0:a.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-search-results",{initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],initialSearchClientResponseItems:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Wo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Bo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-search-result":customElements.get(t)||Es();break}})}const Go=Wo,qo=H(class extends D{constructor(){super();f(this,"caption");f(this,"disabled",!1);f(this,"inputId");f(this,"label");f(this,"labelId");f(this,"name");f(this,"options",[]);f(this,"selectChange");f(this,"searchResultsPerPage");f(this,"setSearchResultsPage",()=>{});f(this,"setSearchResultsPerPage",()=>{});f(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=we(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return l("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&l("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),l("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},l("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:r,value:s,selected:a})=>l("option",{key:s,value:s,selected:a},r))),l("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),l("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&l("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Ps(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,qo);break}})}const Yo=H(class extends D{constructor(){super();f(this,"increment",20);f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount");f(this,"initialSearchResultsPerPage");f(this,"setSearchResultsPerPage",()=>{});f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=_.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-search-results-per-page"},l("div",{class:"searchcraft-search-results-per-page-select"},l("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),l("div",{class:"searchcraft-search-results-per-page-select-input"},l("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Zo(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Yo);break;case"searchcraft-select":customElements.get(t)||Ps();break}})}const Qo=Zo,Ko=Ps,Xo=Ss,Jo=`[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:6px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius-sm);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:block}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:block}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro",sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
25
- `,ec=H(class extends D{constructor(){super(),this.__registerHost()}render(){return l("style",{key:"912dbad4e0aa5be21ed638cd20c276b530991454"},Jo)}},[0,"searchcraft-theme"]);function tc(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,ec);break}})}const rc=tc,sc=Cs,Ts=()=>{so(),no(),co(),po(),So(),wo(),Ro(),Po(),_o(),Ao(),Fo(),Do(),Ho(),zo(),Vo(),Qo(),Go(),Ko(),Xo(),rc(),sc()};globalThis.__scDefineCustomElements__=Ts;const $s={name:"@searchcraft/vue-sdk",version:"0.10.3"},Jt="routerLink",_s="navManager",ac="router",nc="aria",Qe=Symbol(),Is={default:Qe},As=e=>(e==null?void 0:e.split(" "))||[],oc=(e,t,r=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...r].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},ve=(e,t,r=[],s=[],a,o)=>{t!==void 0&&t();const n=B.defineComponent((c,{attrs:u,slots:h,emit:i})=>{var F;const p=B.ref(),g=new Set(As(u.class)),k=B.getCurrentInstance(),P=((F=k==null?void 0:k.appContext)==null?void 0:F.provides[_s])?B.inject(_s):void 0,I=T=>{const{routerLink:be}=c;if(be!==Qe)if(P!==void 0){T.preventDefault();let ce={event:T};for(const Ee in c){const U=c[Ee];c.hasOwnProperty(Ee)&&Ee.startsWith(ac)&&U!==Qe&&(ce[Ee]=U)}P.navigate(ce)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],As(u.class).forEach(U=>{g.add(U)});const T=c.onClick,be=U=>{T!==void 0&&T(U),U.defaultPrevented||I(U)};let ce={ref:p,class:oc(p,g),onClick:be};for(const U in c){const se=c[U];(c.hasOwnProperty(U)&&se!==Qe||U.startsWith(nc))&&(ce[U]=se);const z="on"+U.slice(0,1).toUpperCase()+U.slice(1),Pe=u[z];p.value&&u.hasOwnProperty(z)&&"addEventListener"in p.value&&p.value.addEventListener(U,Pe)}return Jt in c&&c[Jt]!==Qe&&(ce={...ce,href:c[Jt]}),B.h(e,ce,h.default&&h.default())}});if(typeof n!="function"){let c=[],u={};u.ROUTER_LINK_VALUE=Is,r.forEach(h=>u[h]=Is),c=s,n.name=e,n.emits=c,n.props=u}return n},cc=ve("searchcraft-filter-panel",()=>{},["items"]),ic=ve("searchcraft-input-form",()=>{},["autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),lc=ve("searchcraft-pagination",()=>{}),uc=ve("searchcraft-popover-button",()=>{},["template","type"]),hc=ve("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier"]),dc=ve("searchcraft-results-info",()=>{},["template"]),fc=ve("searchcraft-search-results",()=>{},["initialQuery","template"]),pc=ve("searchcraft-search-results-per-page",()=>{},["increment"]),mc=ve("searchcraft-theme",()=>{}),gc=fc,vc=cc,bc=ic,yc=uc,Sc=hc,Cc=dc,kc=mc,wc=lc,Rc=pc;class xc extends Mn{constructor(t){super(t,{sdkName:$s.name,sdkVersion:$s.version})}}Ts(),O.Searchcraft=xc,O.SearchcraftFilterPanel=vc,O.SearchcraftInputForm=bc,O.SearchcraftPagination=wc,O.SearchcraftPopoverButton=yc,O.SearchcraftPopoverForm=Sc,O.SearchcraftResultsInfo=Cc,O.SearchcraftSearchResults=gc,O.SearchcraftSearchResultsPerPage=Rc,O.SearchcraftTheme=kc,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
24
+ `+ae),He&&g([or,cr,ir],he=>{ae=ce(ae,he," ")}),J&&wt?J.createHTML(ae):ae},y.setConfig=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(S),dr=!0},y.clearConfig=function(){Ve=null,dr=!1},y.isValidAttribute=function(S,d,m){Ve||br({});const v=V(S),M=V(d);return ua(v,M,m)},y.addHook=function(S,d){typeof d=="function"&&P(ee[S],d)},y.removeHook=function(S,d){if(d!==void 0){const m=k(ee[S],d);return m===-1?void 0:I(ee[S],m,1)[0]}return b(ee[S])},y.removeHooks=function(S){ee[S]=[]},y.removeAllHooks=function(){ee=zs()},y}var Uc=js();return Uc})})(fs);const eo=fs.exports,Ye=(e,...t)=>{let r=e[0];for(let s=0;s<t.length;s++)r+=eo.sanitize(t[s]?String(t[s]):"")+e[s+1];return r||""},to="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let K=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=to[r[e]&63];return t};const ro=H(class extends D{constructor(){super();f(this,"adSource","Custom");f(this,"adClientResponseItem");f(this,"adContainerId",K());f(this,"searchTerm");f(this,"isSearchInProgress",!1);f(this,"core");f(this,"intersectionObserver");f(this,"storeUnsubscribe");f(this,"adContainerRenderedTimeout");f(this,"isComponentConnected",!0);this.__registerHost()}get hostElement(){return this}connectedCallback(){const r=_.getState();this.core=r.core,this.searchTerm=r.searchTerm,this.isSearchInProgress=r.isSearchInProgress,this.storeUnsubscribe=_.subscribe(s=>{this.searchTerm=s.searchTerm,this.isSearchInProgress=s.isSearchInProgress})}componentDidLoad(){this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{var s;r!=null&&r.isIntersecting&&!this.isSearchInProgress&&((s=this.core)==null||s.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""}))},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var r,s;(r=this.storeUnsubscribe)==null||r.call(this),(s=this.intersectionObserver)==null||s.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,c;const r=this.adClientResponseItem;if(!r.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(o=(a=this.core)==null?void 0:a.config)!=null&&o.admAdTemplate&&(s=(c=(n=this.core)==null?void 0:n.config)==null?void 0:c.admAdTemplate(r.admAd,{html:Ye})),l("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n;const r=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdTemplate,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return r&&(a=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Ye})),l("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s;const r=((s=this.core)==null?void 0:s.config.nativoAdClassName)||"ntv-item";return l("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:oe("searchcraft-ad",r),"data-searchcraft-ad-container-id":this.adContainerId})}render(){var r,s;if(!this.isSearchInProgress)switch(this.isComponentConnected&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var a;(a=this.core)==null||a.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((s=(r=this.core)==null?void 0:r.config)==null?void 0:s.adContainerRenderedDebounceDelay)||500)),this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{adSource:[1,"ad-source"],adClientResponseItem:[16],adContainerId:[1,"ad-container-id"],searchTerm:[32],isSearchInProgress:[32]}]);function gt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,ro);break}})}const so=gt,ao=H(class extends D{constructor(){super();f(this,"hierarchy","primary");f(this,"disabled",!1);f(this,"icon");f(this,"iconOnly",!1);f(this,"iconPosition","left");f(this,"label","Search");f(this,"type","button");f(this,"buttonClick");f(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=we(this,"buttonClick")}render(){return l("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:oe("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:l(tn,null,this.iconPosition==="left"&&this.icon,l("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function vt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,ao);break}})}const no=vt,oo=H(class extends D{constructor(){super(),this.__registerHost()}render(){return l("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},l("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function bt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,oo);break}})}const co=bt;function ps(e,t){const r={...e};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&e[s]instanceof Object?r[s]=ps(e[s],t[s]):r[s]=t[s]);return r}function io(e){return e.filter((t,r,s)=>!s.some((a,o)=>o!==r&&a.includes(t)))}function ms(e){const t={},r=s=>{var a;t[s.path]={count:s.count,path:s.path},(a=s.children)==null||a.forEach(o=>{r(o)})};return r(e),t}function lo(e){const t={count:0,path:"/",children:{}};return Object.keys(e).forEach(r=>{const s=e[r];if(!s||s.path==="/")return;const a=s.path.substring(1).split("/");let o=t,n="";a.forEach((c,u)=>{const h=`${n}/${c}`;o.children[h]||(o.children[h]={count:0,path:h,children:{}}),u===a.length-1&&(o.children[h].count=s.count),n=h,o=o.children[h]})}),t}function gs(e){const t={count:e.count,path:e.path,children:[]};return Object.keys(e.children).length>0&&(t.children=Object.values(e.children).map(r=>gs(r))),t}function uo(e,t){const r=Object.keys(e),s=Object.keys(t),a=new Set(s.filter(n=>n.split("/").length>2).map(n=>n.substring(0,n.lastIndexOf("/"))));return Object.fromEntries(r.filter(n=>!a.has(n.substring(0,n.lastIndexOf("/")))).map(n=>[n,e[n]]))}function ho(e,t,r){const s=t[e],a=r[e],o={count:0,path:"/",children:s},n={count:0,path:"/",children:a},c=ms(o),u=ms(n),h=uo(c,u),i=ps(h,u),p=lo(i),g=gs(p);return{[e]:g.children}}const fo=H(class extends D{constructor(){super();f(this,"fieldName","");f(this,"facetSelectionUpdated");f(this,"baseFacetRoot");f(this,"facetRoot");f(this,"selectedPaths",{});f(this,"lastTimeTaken");f(this,"hasNewSearchTerm",!1);f(this,"lastSearchTerm");f(this,"lastSearchMode");f(this,"lastSortType");f(this,"unsubscribe");f(this,"searchStore",_.getState());f(this,"formatLabel",r=>{const s=r.path.replace(/^\//,""),a=r.count;return`${s.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase())} (${a})`});f(this,"formatSubLabel",(r,s)=>{const o=r.path.substring(s.path.length).replace(/^\//,""),n=r.count;return`${o.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())} (${n})`});this.__registerHost(),this.facetSelectionUpdated=we(this,"facetSelectionUpdated")}handleStateUpdate(r){const s=r.searchResponseFacetPrime,a=r.searchResponseTimeTaken;if(this.fieldName){if(r.searchTerm||(this.facetRoot=void 0),(r.searchTerm!==this.lastSearchTerm||r.searchMode!==this.lastSearchMode)&&(this.selectedPaths={},this.hasNewSearchTerm=!0),a!==this.lastTimeTaken&&s){this.facetRoot=void 0;const o=s.find(n=>this.fieldName===Object.keys(n)[0]);this.hasNewSearchTerm?(this.baseFacetRoot=o,this.facetRoot=o,this.hasNewSearchTerm=!1):this.baseFacetRoot&&o&&(this.facetRoot=ho(this.fieldName,this.baseFacetRoot,o))}else!s&&Object.keys(this.selectedPaths).length===0&&(this.facetRoot=void 0);this.lastSearchTerm=r.searchTerm,this.lastSearchMode=r.searchMode,this.lastSortType=r.sortType,this.lastTimeTaken=a}}connectedCallback(){this.handleStateUpdate(this.searchStore),this.unsubscribe=_.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var n;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const c=Object.keys(this.selectedPaths).filter(u=>!u.includes(r));this.selectedPaths=c.reduce((u,h)=>(u[h]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=io(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}render(){var s;if(!this.fieldName)return;const r=(s=this.facetRoot)==null?void 0:s[this.fieldName];return l("div",{class:"searchcraft-facet-list"},!r&&l("p",{class:"searchcraft-facet-list-message"},"Enter a search to view facets."),r==null?void 0:r.map(a=>{var n;const o=a.children?(n=a.children)==null?void 0:n.some(c=>this.selectedPaths[c.path]):!1;return l("div",{key:a.path,class:"searchcraft-facet-list-item"},l("label",{class:"searchcraft-facet-list-checkbox-label"},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[a.path],onChange:c=>this.handleCheckboxChange(a.path),type:"checkbox"}),o?l("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},l("svg",{width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},l("title",null,"Checkbox dash"),l("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),this.formatLabel(a)),a.children&&a.children.length>0&&l("div",{class:"searchcraft-facet-child-list"},a.children.map(c=>l("label",{key:c.path,class:"searchcraft-facet-list-checkbox-label searchcraft-facet-child-list-checkbox-label",style:{display:this.selectedPaths[a.path]?"flex":"none"}},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper searchcraft-facet-child-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input searchcraft-facet-child-list-checkbox-input",checked:this.selectedPaths[c.path],onChange:u=>{this.handleCheckboxChange(c.path)},type:"checkbox"}),l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon searchcraft-facet-child-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),this.formatSubLabel(c,a)))))}))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],baseFacetRoot:[32],facetRoot:[32],selectedPaths:[32],lastTimeTaken:[32]}]);function vs(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,fo);break}})}const po=vs;function Ze(e,t){if(e&&t)return t.fieldNames.map(r=>{let s=e[r.fieldName];if(s)switch(r.dataType){case"date":{s=mo(s,r.dateFormatLocale,r.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(s*(r.numberScale||1));break}}return s}).filter(r=>!!r).join(t.delimiter||" ")}function bs(e){switch(e){case"hour":return 36e5;case"day":return 864e5;case"month":return 2592e6;case"year":return 31536e6;default:return 36e5}}function ys(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function mo(e,t="en-US",r={day:"numeric",month:"long",year:"numeric"}){const s=new Date(e),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const c=Math.trunc(o/1e3),u=Math.trunc(c/60),h=Math.trunc(u/60),i=Math.trunc(h/24),p=new Intl.RelativeTimeFormat(t,r);return i>=1?p.format(-i,"day"):h>=1?p.format(-h,"hour"):u>=1?p.format(-u,"minute"):p.format(0,"second")}return new Intl.DateTimeFormat(t,r).format(s)}const go=H(class extends D{constructor(){super();f(this,"max",100);f(this,"min",0);f(this,"granularity",bs("month"));f(this,"dataType","number");f(this,"endValue",this.max);f(this,"startValue",this.min);f(this,"lastFocusedHandle","max");f(this,"rangeChanged");f(this,"emitUpdate",async()=>{var r;(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue})});f(this,"handleStartValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.emitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});f(this,"handleEndValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.emitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});this.__registerHost(),this.rangeChanged=we(this,"rangeChanged")}componentDidLoad(){this.startValue=this.min,this.endValue=this.max}render(){const r=this.min,s=this.max,a=(this.startValue-r)/(s-r)*100,o=(this.endValue-r)/(s-r)*100,n=this.dataType==="number"?this.startValue:new Date(this.startValue).getFullYear(),c=this.dataType==="number"?this.endValue:new Date(this.endValue).getFullYear();return l("div",{key:"9225b18ce2f40246837d183fcefdd0be7cc22383",class:"searchcraft-slider"},l("div",{key:"8078c1eda2ceb781282f59216915896fdbe2a8d3",class:"searchcraft-slider-range"},l("div",{key:"6a6bafa9f7abf41ab24f020cd291a4a08c618afb",class:"searchcraft-slider-active-range",style:{left:`${a}%`,width:`${o-a}%`}}),l("input",{key:"f07a91d441d277b8e9eba34e39093393a44bbf53",class:oe("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.max,min:this.min,onInput:this.handleStartValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),l("input",{key:"0637ea5fe123abe1d77c540b347c78fc8ad3d281",class:oe("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.max,min:this.min,onInput:this.handleEndValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),l("div",{key:"b62f8d8485915dddefb7ca29f62b4a96d70470c5",class:"searchcraft-slider-label"},l("span",{key:"fd5d32172ce53d93b858ca54c17b12b80fcdde1d",class:"searchcraft-slider-start-label"},n),l("span",{key:"8f4d230b78fb8d896a469f17ade3a3fd3162b427",class:"searchcraft-slider-end-label"},c)))}},[0,"searchcraft-slider",{max:[2],min:[2],granularity:[2],dataType:[1,"data-type"],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function Ss(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,go);break}})}const vo=H(class extends D{constructor(){super();f(this,"label","Toggle");f(this,"subLabel");f(this,"toggleUpdated");f(this,"isActive",!1);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=we(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=_.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("div",{key:"f8a751315daf6bcdc0d47bc4fc802bc4615e565f",class:oe("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},l("div",{key:"aaa92d7c1aebe241a163a1fba7cd1f8d3804286d"},l("p",{key:"068b82b17a99bf55ad17818d0dd4c7e95858317b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&l("p",{key:"39e43e3fad6a2ab09d20f37c6d6865cede3701d9",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),l("button",{key:"5ae352870d4a01c430389e75b967b2eb9d3fa5f7",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},l("div",{key:"0574ade4e1681ce8e122039c40e761cb68555621",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function Cs(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,vo);break}})}const bo=H(class extends D{constructor(){super();f(this,"items",[]);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"searchStore",_.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,s,a){const o=new Date(new Date(s).getFullYear(),0,1),n=new Date(new Date(a).getFullYear()+1,0,0);this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${o.toISOString()} TO ${n.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,s,a){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${s} TO ${a}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,s){s.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${s.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r,s){s?this.searchStore.setSortOrder({orderByField:r,sortType:"desc"}):this.searchStore.setSortOrder({orderByField:null,sortType:null}),this.searchStore.search()}render(){return l("div",{key:"7f15e8f1a2e1be763118f9cd4ded34cf7e2902d0",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const s=r,a=new Date(s.options.minDate).getTime(),o=new Date(s.options.maxDate).getTime(),n=bs(s.options.granularity);return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:a,max:o,granularity:n,dataType:"date",onRangeChanged:c=>{this.handleDateRangeChanged(s.fieldName,c.detail.startValue,c.detail.endValue)}}))}case"numericRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:s.options.min,max:s.options.max,granularity:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function yo(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,bo);break;case"searchcraft-facet-list":customElements.get(t)||vs();break;case"searchcraft-slider":customElements.get(t)||Ss();break;case"searchcraft-toggle-button":customElements.get(t)||Cs();break}})}const So=yo,Co=H(class extends D{constructor(){super();f(this,"inputLabelClassName","");f(this,"label","");this.__registerHost()}render(){return l("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:oe("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Kt(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,Co);break}})}const ko=H(class extends D{constructor(){super();f(this,"autoSearch",!0);f(this,"buttonPlacement","none");f(this,"buttonLabel");f(this,"inputLabel");f(this,"placeholderValue","Enter Search");f(this,"inputFocus");f(this,"inputBlur");f(this,"inputInit");f(this,"inputValue","");f(this,"searchTerm","");f(this,"error",!1);f(this,"core");f(this,"searchcraftStore",_.getState());f(this,"unsubscribe",()=>{});f(this,"handleInput",r=>{const s=r.target;this.inputValue=s.value,this.autoSearch&&this.performSearch(s.value)});f(this,"performSearch",async r=>{if(r!==this.searchTerm){this.searchcraftStore.setSearchTerm(r.trim()),this.error=!1;try{await this.searchcraftStore.search()}catch(s){console.error(`Search for ${r} failed:`,s),this.error=!0}}});f(this,"handleReset",()=>{this.searchcraftStore.setSearchResultsCount(0),this.searchcraftStore.setSearchTerm(""),this.searchcraftStore.setSearchClientResponseItems([]),this.error=!1});f(this,"handleClearInput",()=>{this.handleReset()});f(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch(this.inputValue)});this.__registerHost(),this.inputFocus=we(this,"inputFocus"),this.inputBlur=we(this,"inputBlur"),this.inputInit=we(this,"inputInit")}init(){var r;this.core&&(this.searchcraftStore.init(this.core),(r=this.inputInit)==null||r.emit())}onCoreChange(){this.init()}connectedCallback(){this.init()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.inputValue=r.searchTerm})}disconnectedCallback(){var r;this.handleReset(),(r=this.unsubscribe)==null||r.call(this)}render(){const r=this.inputValue.length>0,s=oe("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return l("form",{key:"6af89b2ab634e0f3e0ef575f98f33d091602f95a",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},l("div",{key:"93fea8e2b80468afeb6014122d5b749d74bfaf35",class:s,style:o},l("div",{key:"1e5a416843b99aec68c4672a9c78f607347dc9d1",class:"searchcraft-input-form-button"},l("searchcraft-button",{key:"c38c1df0ce20f914ed76fbc0acad5a22b40e6fff",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&l("div",{key:"2169a4466b0fdc8075c0dc74da442aef28a84d65",class:"searchcraft-input-form-label"},l("searchcraft-input-label",{key:"a263b5aa2a4d50d297f06c1fe9e6afb64763f097",label:this.inputLabel})),this.error&&l("div",{key:"49be2ac0f2d01916e5ea533e6406ee9d4d932178",class:"searchcraft-input-form-error-message"},l("searchcraft-error-message",{key:"310c9aebcf580d4abe92d288c6b70a5adf083f8e"},"Something went wrong.")),l("div",{key:"f4702e368815e049586e97cf59541b2dc5460fc0",class:"searchcraft-input-form-input-wrapper"},l("input",{key:"a8cddd5e937eee1d30fb98eaaa3dbffe96c192ce",autoComplete:"off",class:"searchcraft-input-form-input",onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),l("div",{key:"616b4dde1ba016cf6a2fba8594a99a3a3f584ef5",class:"searchcraft-input-form-input-icon"},l("svg",{key:"daaef561677a06a76813375e429be7e053b8b122",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},l("title",{key:"e6d82ca64dd9bfc663813c239d11e5652aa0b9a1"},"Search icon"),l("path",{key:"1df856c98c2063c1d0c80027255935f73b513939",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),r&&l("button",{key:"8dd6dfefe0ba909657bd436b559ce35b5004f9ae",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},l("svg",{key:"bcdba04d5c0949cacc8e1962d2b3cd40ad995de6",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},l("title",{key:"e01e7fb9b23daf9434520c4c68c0d7539b37d1f8"},"Clear icon"),l("path",{key:"ce526d332b6e352cd9cf6008ee2f7497c6769782",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function ks(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,ko);break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-label":customElements.get(t)||Kt();break}})}const wo=ks,Ro=Kt,xo=H(class extends D{constructor(){super();f(this,"searchTerm");f(this,"searchResultsPerPage");f(this,"searchResultsPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount",1);f(this,"searchResultsRangeMin",1);f(this,"searchResultsRangeMax",1);f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):l("li",null,l("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?l("li",null,l("button",{class:oe("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):l("li",null,l("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-pagination"},l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Previous page icon"),l("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),l("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Next page icon"),l("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function Eo(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,xo);break;case"searchcraft-button":customElements.get(t)||vt();break}})}const Po=Eo,To=H(class extends D{constructor(){super();f(this,"template");f(this,"type");f(this,"hotkey");f(this,"hotkeyModifier");f(this,"hotkeyModifierSymbol");f(this,"isPopoverVisible");f(this,"userAgent");f(this,"unsubscribe",()=>{});f(this,"renderOptionSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Option key"),l("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),l("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));f(this,"renderCtrlSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Ctrl key"),l("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));f(this,"renderWindowsMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Windows meta key"),l("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));f(this,"renderMacMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Mac meta key"),l("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));this.__registerHost()}handleOnClick(){_.getState().setPopoverVisibility(!0)}componentDidLoad(){const r=_.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=_.subscribe(s=>{this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}setUserAgent(){const r=navigator.userAgent.toLowerCase();switch(!0){case r.includes("windows"):return"window";case r.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return l("div",{class:"searchcraft-popover-button-wrapper"},l("div",{class:"searchcraft-popover-button-input"},l("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},l("title",null,"Search icon"),l("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),l("span",null,"Search")),l("div",{class:"searchcraft-popover-button-keycaps"},l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},l("span",null,this.hotkeyModifierSymbol)),l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},l("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return l("div",null,l("slot",null))}}render(){return l("button",{key:"74e36b0593ba2cbb03f5ecff1434bc7056bf0db0",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Ye}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function $o(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,To);break}})}const _o=$o,Io=H(class extends D{constructor(){super();f(this,"searchResultsCount");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.searchResultsCount=_.getState().searchResultsCount,this.unsubscribe=_.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("footer",{key:"e1344ae185ef1b8a83bb69ba88e2952ab1c75e70",class:"searchcraft-popover-footer"},l("p",{key:"51874f4ce490e4f164b999e8c6f89710702e73bd",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ys(this.searchResultsCount)} Results Found`:" "),l("a",{key:"5476e24cc3fa7fa265bd2b5cba43c8a70d8609ca",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},l("svg",{key:"0a4edf94e9e40a96a93a4e7ba1ffbd081e51b585",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"67813a626922d709a4409028cb0f3f1ce3e2cfe8"},"Powered by Searchcraft"),l("path",{key:"bf9e46a5f9783edd7167c1c5c1256d0200053969",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[0,"searchcraft-popover-footer",{searchResultsCount:[32]}]);function ws(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,Io);break}})}const Ao=ws,Mo=H(class extends D{constructor(){super();f(this,"item");f(this,"popoverResultMappings");f(this,"documentPosition",0);f(this,"title");f(this,"subtitle");f(this,"href");f(this,"imageSource");f(this,"imageAlt");f(this,"handleLinkClick",()=>{var a;const r=_.getState(),s=r.getSearchcraftCore();if(s){const o=this.documentPosition,n=r.searchTerm,c=r.searchClientResponseItems.length||0;(a=s.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:n})}});this.__registerHost()}mapValuesFromDocument(r){var s,a,o,n,c;this.title=Ze(r,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Ze(r,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Ze(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Ze(r,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Ze(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return l("div",{key:"63a2f070ce71cd1330105c03985e32cd1f228b29",class:"searchcraft-popover-list-item"},l("a",{key:"d9bb09248be9be235147acdfeed1a9f29cd123a2",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&l("div",{key:"6af7c3e754885730d8651a593f13b7b5b704a26d",class:"searchcraft-popover-list-item-image-wrapper"},l("img",{key:"74c7e53467efd83ae95439a7065c1de2748113f5",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),l("div",{key:"25a12e5cf582b248773005f5fb58f7a15304d2d1",class:"searchcraft-popover-list-item-content"},this.title&&l("p",{key:"8169f7730feb832178adbc9bdb14a089e955a2ad",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&l("p",{key:"96812df1bab635e3865bdfdb31f133ca629d800e",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Xt(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,Mo);break}})}const Lo=H(class extends D{constructor(){super();f(this,"popoverResultMappings");f(this,"searchClientResponseItems");f(this,"adClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"config",(Ms=_.getState().core)==null?void 0:Ms.config);this.__registerHost()}renderWithADMAds(){var r,s;return l("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>l("searchcraft-ad",{adClientResponseItem:a,adContainerId:K(),adSource:"adMarketplace",key:a.id})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>l("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,h,i,p;const r=[],s=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let g=0;g<o;g++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g}-ad`}));c.forEach((g,k)=>{if(s&&k%s===0&&k+s<c.length&&k>=s)for(let b=0;b<a;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g.id}-ad-${b}`}));r.push(l("searchcraft-popover-list-item",{item:g,key:g.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+k}))});for(let g=0;g<n;g++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${g}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var h,i,p,g,k;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((g=this.config)==null?void 0:g.nativoAdStartQuantity)||0,c=((k=this.config)==null?void 0:k.nativoAdEndQuantity)||0,u=this.searchClientResponseItems||[];for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));u.forEach((b,P)=>{if(a&&(P+s)%a===0&&P+a<u.length&&P>=a)for(let I=0;I<o;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-popover-list-item",{item:b,key:b.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let b=0;b<c;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return l("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>l("searchcraft-popover-list-item",{item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Rs(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,Lo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break}})}const Oo=H(class extends D{constructor(){super();f(this,"type","inline");f(this,"popoverResultMappings");f(this,"hotkey","k");f(this,"hotkeyModifier","meta");f(this,"isPopoverVisibleInState",!1);f(this,"unsubscribe");f(this,"searchClientResponseItems",[]);f(this,"adClientResponseItems",[]);f(this,"searchTerm");f(this,"isFocused",!1);f(this,"breakpointSm",576);f(this,"breakpointMd",768);f(this,"breakpointLg",992);f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"modalElement");f(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});f(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":_.getState().setPopoverVisibility(!1);break;default:return}});f(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input-form-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=_.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=_.subscribe(s=>{this.isPopoverVisibleInState!==s.isPopoverVisible&&this.handlePopoverVisibilityChange(s.isPopoverVisible),this.searchClientResponseItems=[...s.searchClientResponseItems],this.adClientResponseItems=[...s.adClientResponseItems],this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage}),_.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(_.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){_.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const s=this.hostElement.querySelector(".searchcraft-input-form-input");s==null||s.focus()}else _.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){_.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=s.indexOf(document.activeElement);if(r==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(r==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,s;return this.searchTerm&&((s=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused;return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)})),r&&l("div",{class:"searchcraft-popover-form-inline-wrapper"},l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}),l("searchcraft-popover-footer",null)))}renderModalPopover(){if(this.isPopoverVisibleInState)return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),l("div",{class:"searchcraft-popover-form-modal-wrapper"},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null)))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return l("div",{class:oe("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function xs(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,Oo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-form":customElements.get(t)||ks();break;case"searchcraft-input-label":customElements.get(t)||Kt();break;case"searchcraft-popover-footer":customElements.get(t)||ws();break;case"searchcraft-popover-form":customElements.get(t)||xs();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break;case"searchcraft-popover-list-view":customElements.get(t)||Rs();break}})}const Fo=xs,Do=Xt,Ho=Rs,No=H(class extends D{constructor(){super();f(this,"template");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"count",0);f(this,"range",[0,0]);f(this,"responseTime","0");f(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:l("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Ye}):`${ys(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Uo(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,No);break}})}const zo=Uo,jo=H(class extends D{constructor(){super();f(this,"item");f(this,"index");f(this,"documentPosition",0);f(this,"template");f(this,"templateHtml");f(this,"handleResultContainerClick",r=>{var i;const s=_.getState(),a=s.getSearchcraftCore();if(!r.target)return;const n=r.target.closest("a");if(!n||!((i=this.hostElement)!=null&&i.contains(n))||!a||!a.measureClient)return;const c=this.documentPosition,u=s.searchTerm,h=s.searchClientResponseItems.length||0;a.measureClient.sendMeasureEvent("document_clicked",{document_position:c,number_of_documents:h,search_term:u})});f(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}connectedCallback(){var r;if(this.item)try{this.templateHtml=(r=this.template)==null?void 0:r.call(this,this.item.document,this.index,{html:Ye,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}render(){if(this.item)return typeof this.template>"u"?l("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([r,s])=>l("p",{key:r},l("strong",null,r),": ",s))):l("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],templateHtml:[32]}]);function Es(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,jo);break}})}const Vo=Es,Bo=H(class extends D{constructor(){super();f(this,"initialQuery");f(this,"template");f(this,"adClientResponseItems",[]);f(this,"config");f(this,"initialSearchClientResponseItems");f(this,"isSearchInProgress",!0);f(this,"searchClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchTerm","");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){var s;const r=_.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(s=r.core)==null?void 0:s.config,r.afterInit=a=>{this.initialQuery&&a.setInitialQuery(this.initialQuery)},this.unsubscribe=_.subscribe(a=>this.handleStateChange(a))}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var s;this.adClientResponseItems=[...r.adClientResponseItems],this.config=(s=r.core)==null?void 0:s.config,this.initialSearchClientResponseItems=[...r.initialSearchClientResponseItems],this.isSearchInProgress=r.isSearchInProgress,this.searchClientResponseItems=[...r.searchClientResponseItems],this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchTerm=r.searchTerm}renderEmptyState(){return l("div",{class:"searchcraft-search-results-empty-state"},l("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return l("div",{class:"searchcraft-search-results"},l("div",{class:"searchcraft-search-results-error-message"},l("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s,a,o;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},(o=this.adClientResponseItems)==null?void 0:o.map(n=>l("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,adContainerId:K(),key:n.id})),r.map((n,c)=>l("searchcraft-search-result",{key:n.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+c,index:c,item:n,template:this.template})))}renderWithCustomAds(){var u,h,i,p,g,k;const r=[],s=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=(g=this.searchClientResponseItems)!=null&&g.length?this.searchClientResponseItems:(k=this.initialSearchClientResponseItems)!=null&&k.length?this.initialSearchClientResponseItems:[];for(let b=0;b<o;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));c.forEach((b,P)=>{if(s&&P%s===0&&P+s<c.length&&P>=s)for(let I=0;I<a;I++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-search-result",{key:b.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:b,template:this.template}))});for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNativoAds(){var h,i,p,g,k,b,P;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((g=this.config)==null?void 0:g.nativoAdStartQuantity)||0,c=((k=this.config)==null?void 0:k.nativoAdEndQuantity)||0,u=(b=this.searchClientResponseItems)!=null&&b.length?this.searchClientResponseItems:(P=this.initialSearchClientResponseItems)!=null&&P.length?this.initialSearchClientResponseItems:[];for(let I=0;I<n;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));u.forEach((I,F)=>{if(a&&(F+s)%a===0&&F+a<u.length&&F>=a)for(let T=0;T<o;T++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I.id}-ad-${T}`}));r.push(l("searchcraft-search-result",{key:I.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+F,index:F,item:I,template:this.template}))});for(let I=0;I<c;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNoAds(){var s,a;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},r.map((o,n)=>l("searchcraft-search-result",{key:o.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:o,template:this.template})))}render(){var a;const r=this.searchClientResponseItems||[],s=this.initialSearchClientResponseItems||[];if(this.searchTerm===""&&s.length===0&&!this.isSearchInProgress)return this.renderEmptyState();if(this.searchTerm.length>0&&r.length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((a=this.config)==null?void 0:a.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-search-results",{initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],initialSearchClientResponseItems:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Wo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Bo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-search-result":customElements.get(t)||Es();break}})}const Go=Wo,qo=H(class extends D{constructor(){super();f(this,"caption");f(this,"disabled",!1);f(this,"inputId");f(this,"label");f(this,"labelId");f(this,"name");f(this,"options",[]);f(this,"selectChange");f(this,"searchResultsPerPage");f(this,"setSearchResultsPage",()=>{});f(this,"setSearchResultsPerPage",()=>{});f(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=we(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return l("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&l("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),l("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},l("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:r,value:s,selected:a})=>l("option",{key:s,value:s,selected:a},r))),l("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),l("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&l("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Ps(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,qo);break}})}const Yo=H(class extends D{constructor(){super();f(this,"increment",20);f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount");f(this,"initialSearchResultsPerPage");f(this,"setSearchResultsPerPage",()=>{});f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=_.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-search-results-per-page"},l("div",{class:"searchcraft-search-results-per-page-select"},l("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),l("div",{class:"searchcraft-search-results-per-page-select-input"},l("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Zo(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Yo);break;case"searchcraft-select":customElements.get(t)||Ps();break}})}const Qo=Zo,Ko=Ps,Xo=Ss,Jo=`[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:6px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius-sm);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:block}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:block}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro",sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
25
+ `,ec=H(class extends D{constructor(){super(),this.__registerHost()}render(){return l("style",{key:"912dbad4e0aa5be21ed638cd20c276b530991454"},Jo)}},[0,"searchcraft-theme"]);function tc(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,ec);break}})}const rc=tc,sc=Cs,Ts=()=>{so(),no(),co(),po(),So(),wo(),Ro(),Po(),_o(),Ao(),Fo(),Do(),Ho(),zo(),Vo(),Qo(),Go(),Ko(),Xo(),rc(),sc()};globalThis.__scDefineCustomElements__=Ts;const $s={name:"@searchcraft/vue-sdk",version:"0.10.4"},Jt="routerLink",_s="navManager",ac="router",nc="aria",Qe=Symbol(),Is={default:Qe},As=e=>(e==null?void 0:e.split(" "))||[],oc=(e,t,r=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...r].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},ve=(e,t,r=[],s=[],a,o)=>{t!==void 0&&t();const n=B.defineComponent((c,{attrs:u,slots:h,emit:i})=>{var F;const p=B.ref(),g=new Set(As(u.class)),k=B.getCurrentInstance(),P=((F=k==null?void 0:k.appContext)==null?void 0:F.provides[_s])?B.inject(_s):void 0,I=T=>{const{routerLink:be}=c;if(be!==Qe)if(P!==void 0){T.preventDefault();let ce={event:T};for(const Ee in c){const U=c[Ee];c.hasOwnProperty(Ee)&&Ee.startsWith(ac)&&U!==Qe&&(ce[Ee]=U)}P.navigate(ce)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],As(u.class).forEach(U=>{g.add(U)});const T=c.onClick,be=U=>{T!==void 0&&T(U),U.defaultPrevented||I(U)};let ce={ref:p,class:oc(p,g),onClick:be};for(const U in c){const se=c[U];(c.hasOwnProperty(U)&&se!==Qe||U.startsWith(nc))&&(ce[U]=se);const z="on"+U.slice(0,1).toUpperCase()+U.slice(1),Pe=u[z];p.value&&u.hasOwnProperty(z)&&"addEventListener"in p.value&&p.value.addEventListener(U,Pe)}return Jt in c&&c[Jt]!==Qe&&(ce={...ce,href:c[Jt]}),B.h(e,ce,h.default&&h.default())}});if(typeof n!="function"){let c=[],u={};u.ROUTER_LINK_VALUE=Is,r.forEach(h=>u[h]=Is),c=s,n.name=e,n.emits=c,n.props=u}return n},cc=ve("searchcraft-filter-panel",()=>{},["items"]),ic=ve("searchcraft-input-form",()=>{},["autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),lc=ve("searchcraft-pagination",()=>{}),uc=ve("searchcraft-popover-button",()=>{},["template","type"]),hc=ve("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier"]),dc=ve("searchcraft-results-info",()=>{},["template"]),fc=ve("searchcraft-search-results",()=>{},["initialQuery","template"]),pc=ve("searchcraft-search-results-per-page",()=>{},["increment"]),mc=ve("searchcraft-theme",()=>{}),gc=fc,vc=cc,bc=ic,yc=uc,Sc=hc,Cc=dc,kc=mc,wc=lc,Rc=pc;class xc extends Mn{constructor(t){super(t,{sdkName:$s.name,sdkVersion:$s.version})}}Ts(),O.Searchcraft=xc,O.SearchcraftFilterPanel=vc,O.SearchcraftInputForm=bc,O.SearchcraftPagination=wc,O.SearchcraftPopoverButton=yc,O.SearchcraftPopoverForm=Sc,O.SearchcraftResultsInfo=Cc,O.SearchcraftSearchResults=gc,O.SearchcraftSearchResultsPerPage=Rc,O.SearchcraftTheme=kc,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
26
26
  //# sourceMappingURL=index.umd.js.map