@searchcraft/vue-sdk 0.9.0 → 0.9.2

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
@@ -1,4 +1,4 @@
1
- (function(m,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],S):(m=typeof globalThis<"u"?globalThis:m||self,S(m.SearchcraftVueSdk={},m.Vue))})(this,function(m,S){"use strict";var te=Object.defineProperty,ne=(t,n,r)=>n in t?te(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,n,r)=>ne(t,typeof n!="symbol"?n+"":n,r);function b(t,n,r,a){return new(r||(r=Promise))(function(o,i){function e(c){try{d(a.next(c))}catch(s){i(s)}}function u(c){try{d(a.throw(c))}catch(s){i(s)}}function d(c){var s;c.done?o(c.value):(s=c.value,s instanceof r?s:new r(function(h){h(s)})).then(e,u)}d((a=a.apply(t,[])).next())})}function P(t,n){var r,a,o,i,e={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(d){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(e=0)),e;)try{if(r=1,a&&(o=2&s[0]?a.return:s[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;switch(a=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,a=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!((o=o.length>0&&o[o.length-1])||s[0]!==6&&s[0]!==2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1],o=s;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(s);break}o[2]&&e.ops.pop(),e.trys.pop();continue}s=n.call(t,e)}catch(h){s=[6,h],a=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([d,c])}}}var E={exclude:[]},q={},re={timeout:"true"},w=function(t,n){typeof window<"u"&&(q[t]=n)},ae=function(){return Object.fromEntries(Object.entries(q).filter(function(t){var n,r=t[0];return!(!((n=E==null?void 0:E.exclude)===null||n===void 0)&&n.includes(r))}).map(function(t){return[t[0],(0,t[1])()]}))};function _(t){return t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),(t^=t>>>16)>>>0}var p=new Uint32Array([597399067,2869860233,951274213,2716044179]);function y(t,n){return t<<n|t>>>32-n}function O(t,n){var r;if(n===void 0&&(n=0),n=n?0|n:0,typeof t=="string"&&(r=t,t=new TextEncoder().encode(r).buffer),!(t instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var a=new Uint32Array([n,n,n,n]);(function(i,e){for(var u=i.byteLength/16|0,d=new Uint32Array(i,0,4*u),c=0;c<u;c++){var s=d.subarray(4*c,4*(c+1));s[0]=Math.imul(s[0],p[0]),s[0]=y(s[0],15),s[0]=Math.imul(s[0],p[1]),e[0]=e[0]^s[0],e[0]=y(e[0],19),e[0]=e[0]+e[1],e[0]=Math.imul(e[0],5)+1444728091,s[1]=Math.imul(s[1],p[1]),s[1]=y(s[1],16),s[1]=Math.imul(s[1],p[2]),e[1]=e[1]^s[1],e[1]=y(e[1],17),e[1]=e[1]+e[2],e[1]=Math.imul(e[1],5)+197830471,s[2]=Math.imul(s[2],p[2]),s[2]=y(s[2],17),s[2]=Math.imul(s[2],p[3]),e[2]=e[2]^s[2],e[2]=y(e[2],15),e[2]=e[2]+e[3],e[2]=Math.imul(e[2],5)+2530024501,s[3]=Math.imul(s[3],p[3]),s[3]=y(s[3],18),s[3]=Math.imul(s[3],p[0]),e[3]=e[3]^s[3],e[3]=y(e[3],13),e[3]=e[3]+e[0],e[3]=Math.imul(e[3],5)+850148119}})(t,a),function(i,e){var u=i.byteLength/16|0,d=i.byteLength%16,c=new Uint32Array(4),s=new Uint8Array(i,16*u,d);switch(d){case 15:c[3]=c[3]^s[14]<<16;case 14:c[3]=c[3]^s[13]<<8;case 13:c[3]=c[3]^s[12]<<0,c[3]=Math.imul(c[3],p[3]),c[3]=y(c[3],18),c[3]=Math.imul(c[3],p[0]),e[3]=e[3]^c[3];case 12:c[2]=c[2]^s[11]<<24;case 11:c[2]=c[2]^s[10]<<16;case 10:c[2]=c[2]^s[9]<<8;case 9:c[2]=c[2]^s[8]<<0,c[2]=Math.imul(c[2],p[2]),c[2]=y(c[2],17),c[2]=Math.imul(c[2],p[3]),e[2]=e[2]^c[2];case 8:c[1]=c[1]^s[7]<<24;case 7:c[1]=c[1]^s[6]<<16;case 6:c[1]=c[1]^s[5]<<8;case 5:c[1]=c[1]^s[4]<<0,c[1]=Math.imul(c[1],p[1]),c[1]=y(c[1],16),c[1]=Math.imul(c[1],p[2]),e[1]=e[1]^c[1];case 4:c[0]=c[0]^s[3]<<24;case 3:c[0]=c[0]^s[2]<<16;case 2:c[0]=c[0]^s[1]<<8;case 1:c[0]=c[0]^s[0]<<0,c[0]=Math.imul(c[0],p[0]),c[0]=y(c[0],15),c[0]=Math.imul(c[0],p[1]),e[0]=e[0]^c[0]}}(t,a),function(i,e){e[0]=e[0]^i.byteLength,e[1]=e[1]^i.byteLength,e[2]=e[2]^i.byteLength,e[3]=e[3]^i.byteLength,e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0,e[0]=_(e[0]),e[1]=_(e[1]),e[2]=_(e[2]),e[3]=_(e[3]),e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0}(t,a);var o=new Uint8Array(a.buffer);return Array.from(o).map(function(i){return i.toString(16).padStart(2,"0")}).join("")}function oe(t,n){return new Promise(function(r){setTimeout(function(){return r(n)},t)})}function ie(t,n,r){return Promise.all(t.map(function(a){return Promise.race([a,oe(n,r)])}))}function se(){return b(this,void 0,void 0,function(){var t,n,r,a,o;return P(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=ae(),n=Object.keys(t),[4,ie(Object.values(t),(E==null?void 0:E.timeout)||1e3,re)];case 1:return r=i.sent(),a=r.filter(function(e){return e!==void 0}),o={},a.forEach(function(e,u){o[n[u]]=e}),[2,V(o,E.exclude||[])];case 2:throw i.sent();case 3:return[2]}})})}function V(t,n){var r={},a=function(i){if(t.hasOwnProperty(i)){var e=t[i];if(typeof e!="object"||Array.isArray(e))n.includes(i)||(r[i]=e);else{var u=V(e,n.map(function(d){return d.startsWith(i+".")?d.slice(i.length+1):d}));Object.keys(u).length>0&&(r[i]=u)}}};for(var o in t)a(o);return r}function ce(t){return b(this,void 0,void 0,function(){var n,r;return P(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,se()];case 1:return n=a.sent(),r=O(JSON.stringify(n)),[2,r.toString()];case 2:throw a.sent();case 3:return[2]}})})}function ue(t){for(var n=0,r=0;r<t.length;++r)n+=Math.abs(t[r]);return n}function G(t,n,r){for(var a=[],o=0;o<t[0].data.length;o++){for(var i=[],e=0;e<t.length;e++)i.push(t[e].data[o]);a.push(de(i))}var u=new Uint8ClampedArray(a);return new ImageData(u,n,r)}function de(t){if(t.length===0)return 0;for(var n={},r=0,a=t;r<a.length;r++)n[i=a[r]]=(n[i]||0)+1;var o=t[0];for(var i in n)n[i]>n[o]&&(o=parseInt(i,10));return o}function T(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var t=navigator.userAgent,n={Edg:"Edge",OPR:"Opera"},r=0,a=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<a.length;r++){var o=a[r],i=t.match(o);if(i&&i.groups)return{name:n[i.groups.name]||i.groups.name,version:i.groups.version}}return{name:"unknown",version:"unknown"}}w("audio",function(){return b(this,void 0,void 0,function(){return P(this,function(t){return[2,new Promise(function(n,r){try{var a=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),o=a.createBufferSource(),i=a.createOscillator();i.frequency.value=1e3;var e,u=a.createDynamicsCompressor();u.threshold.value=-50,u.knee.value=40,u.ratio.value=12,u.attack.value=0,u.release.value=.2,i.connect(u),u.connect(a.destination),i.start(),a.oncomplete=function(d){e=d.renderedBuffer.getChannelData(0),n({sampleHash:ue(e),oscillator:i.type,maxChannels:a.destination.maxChannelCount,channelCountMode:o.channelCountMode})},a.startRendering()}catch(d){console.error("Error creating audio fingerprint:",d),r(d)}})]})})});var le=T().name!=="SamsungBrowser"?1:3,$=280,W=20;T().name!="Firefox"&&w("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(t){var n=Array.from({length:le},function(){return function(){var r=document.createElement("canvas"),a=r.getContext("2d");if(!a)return new ImageData(1,1);r.width=$,r.height=W;var o=a.createLinearGradient(0,0,r.width,r.height);o.addColorStop(0,"red"),o.addColorStop(.16666666666666666,"orange"),o.addColorStop(.3333333333333333,"yellow"),o.addColorStop(.5,"green"),o.addColorStop(.6666666666666666,"blue"),o.addColorStop(.8333333333333334,"indigo"),o.addColorStop(1,"violet"),a.fillStyle=o,a.fillRect(0,0,r.width,r.height);var i="Random Text WMwmil10Oo";a.font="23.123px Arial",a.fillStyle="black",a.fillText(i,-5,15),a.fillStyle="rgba(0, 0, 255, 0.5)",a.fillText(i,-3.3,17.7),a.beginPath(),a.moveTo(0,0),a.lineTo(2*r.width/7,r.height),a.strokeStyle="white",a.lineWidth=2,a.stroke();var e=a.getImageData(0,0,r.width,r.height);return e}()});t({commonImageDataHash:O(G(n,$,W).data.toString()).toString()})})});var U,he=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],fe=["monospace","sans-serif","serif"];function H(t,n){if(!t)throw new Error("Canvas context not supported");return t.font,t.font="72px ".concat(n),t.measureText("WwMmLli0Oo").width}function me(){var t,n=document.createElement("canvas"),r=(t=n.getContext("webgl"))!==null&&t!==void 0?t:n.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var a=(r.getParameter(r.VENDOR)||"").toString(),o=(r.getParameter(r.RENDERER)||"").toString(),i={vendor:a,renderer:o,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!o.length||!a.length){var e=r.getExtension("WEBGL_debug_renderer_info");if(e){var u=(r.getParameter(e.UNMASKED_VENDOR_WEBGL)||"").toString(),d=(r.getParameter(e.UNMASKED_RENDERER_WEBGL)||"").toString();u&&(i.vendorUnmasked=u),d&&(i.rendererUnmasked=d)}}return i}catch{}return"undefined"}function pe(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],n[3]}function ge(t,n){var r={};return n.forEach(function(a){var o=function(i){if(i.length===0)return null;var e={};i.forEach(function(c){var s=String(c);e[s]=(e[s]||0)+1});var u=i[0],d=1;return Object.keys(e).forEach(function(c){e[c]>d&&(u=c,d=e[c])}),u}(t.map(function(i){return a in i?i[a]:void 0}).filter(function(i){return i!==void 0}));o&&(r[a]=o)}),r}function ve(){var t=[],n={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(n).forEach(function(r){n[r].forEach(function(a){matchMedia("(".concat(r,": ").concat(a,")")).matches&&t.push("".concat(r,": ").concat(a))})}),t}function ye(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var t=window.ApplePaySession.supportsVersion,n=15;n>0;n--)if(t(n))return n}catch{return 0}return 0}T().name!="Firefox"&&w("fonts",function(){var t=this;return new Promise(function(n,r){try{(function(a){var o;b(this,void 0,void 0,function(){var i,e,u;return P(this,function(d){switch(d.label){case 0:return document.body?[3,2]:[4,(c=50,new Promise(function(h){return setTimeout(h,c,s)}))];case 1:return d.sent(),[3,0];case 2:if((i=document.createElement("iframe")).setAttribute("frameBorder","0"),(e=i.style).setProperty("position","fixed"),e.setProperty("display","block","important"),e.setProperty("visibility","visible"),e.setProperty("border","0"),e.setProperty("opacity","0"),i.src="about:blank",document.body.appendChild(i),!(u=i.contentDocument||((o=i.contentWindow)===null||o===void 0?void 0:o.document)))throw new Error("Iframe document is not accessible");return a({iframe:u}),setTimeout(function(){document.body.removeChild(i)},0),[2]}var c,s})})})(function(a){var o=a.iframe;return b(t,void 0,void 0,function(){var i,e,u,d;return P(this,function(c){return i=o.createElement("canvas"),e=i.getContext("2d"),u=fe.map(function(s){return H(e,s)}),d={},he.forEach(function(s){var h=H(e,s);u.includes(h)||(d[s]=h)}),n(d),[2]})})})}catch{r({error:"unsupported"})}})}),w("hardware",function(){return new Promise(function(t,n){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,a=window.performance&&window.performance.memory?window.performance.memory:0;t({videocard:me(),architecture:pe(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:a.jsHeapSizeLimit||0})})}),w("locales",function(){return new Promise(function(t){t({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),w("permissions",function(){return b(this,void 0,void 0,function(){var t;return P(this,function(n){return U=(E==null?void 0:E.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],t=Array.from({length:(E==null?void 0:E.retries)||3},function(){return function(){return b(this,void 0,void 0,function(){var r,a,o,i,e;return P(this,function(u){switch(u.label){case 0:r={},a=0,o=U,u.label=1;case 1:if(!(a<o.length))return[3,6];i=o[a],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,navigator.permissions.query({name:i})];case 3:return e=u.sent(),r[i]=e.state.toString(),[3,5];case 4:return u.sent(),[3,5];case 5:return a++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(t).then(function(r){return ge(r,U)})]})})}),w("plugins",function(){var t=[];if(navigator.plugins)for(var n=0;n<navigator.plugins.length;n++){var r=navigator.plugins[n];t.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(a){a({plugins:t})})}),w("screen",function(){return new Promise(function(t){t({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:ve()})})}),w("system",function(){return new Promise(function(t){var n=T();t({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:n.name,version:n.version},applePayVersion:ye()})})});var v,we=T().name!=="SamsungBrowser"?1:3,l=null;w("webgl",function(){return b(this,void 0,void 0,function(){var t;return P(this,function(n){typeof document<"u"&&((v=document.createElement("canvas")).width=200,v.height=100,l=v.getContext("webgl"));try{if(!l)throw new Error("WebGL not supported");return t=Array.from({length:we},function(){return function(){try{if(!l)throw new Error("WebGL not supported");var r=`
1
+ (function(L,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],G):(L=typeof globalThis<"u"?globalThis:L||self,G(L.SearchcraftVueSdk={},L.Vue))})(this,function(L,G){"use strict";var Uc=Object.defineProperty;var zc=(L,G,Ne)=>G in L?Uc(L,G,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):L[G]=Ne;var h=(L,G,Ne)=>zc(L,typeof G!="symbol"?G+"":G,Ne);var Ya;var Ne=Object.defineProperty,_s=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t,r)=>_s(e,typeof t!="symbol"?t+"":t,r);function be(e,t,r,a){return new(r||(r=Promise))(function(n,o){function s(l){try{u(a.next(l))}catch(i){o(i)}}function c(l){try{u(a.throw(l))}catch(i){o(i)}}function u(l){var i;l.done?n(l.value):(i=l.value,i instanceof r?i:new r(function(p){p(i)})).then(s,c)}u((a=a.apply(e,[])).next())})}function ve(e,t){var r,a,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||i[0]!==6&&i[0]!==2)){s=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(i[0]===6&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(p){i=[6,p],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([u,l])}}}var ye={exclude:[]},Ir={},As={timeout:"true"},fe=function(e,t){typeof window<"u"&&(Ir[e]=t)},Is=function(){return Object.fromEntries(Object.entries(Ir).filter(function(e){var t,r=e[0];return!(!((t=ye==null?void 0:ye.exclude)===null||t===void 0)&&t.includes(r))}).map(function(e){return[e[0],(0,e[1])()]}))};function dt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var q=new Uint32Array([597399067,2869860233,951274213,2716044179]);function le(e,t){return e<<t|e>>>32-t}function Ut(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var a=new Uint32Array([t,t,t,t]);(function(o,s){for(var c=o.byteLength/16|0,u=new Uint32Array(o,0,4*c),l=0;l<c;l++){var i=u.subarray(4*l,4*(l+1));i[0]=Math.imul(i[0],q[0]),i[0]=le(i[0],15),i[0]=Math.imul(i[0],q[1]),s[0]=s[0]^i[0],s[0]=le(s[0],19),s[0]=s[0]+s[1],s[0]=Math.imul(s[0],5)+1444728091,i[1]=Math.imul(i[1],q[1]),i[1]=le(i[1],16),i[1]=Math.imul(i[1],q[2]),s[1]=s[1]^i[1],s[1]=le(s[1],17),s[1]=s[1]+s[2],s[1]=Math.imul(s[1],5)+197830471,i[2]=Math.imul(i[2],q[2]),i[2]=le(i[2],17),i[2]=Math.imul(i[2],q[3]),s[2]=s[2]^i[2],s[2]=le(s[2],15),s[2]=s[2]+s[3],s[2]=Math.imul(s[2],5)+2530024501,i[3]=Math.imul(i[3],q[3]),i[3]=le(i[3],18),i[3]=Math.imul(i[3],q[0]),s[3]=s[3]^i[3],s[3]=le(s[3],13),s[3]=s[3]+s[0],s[3]=Math.imul(s[3],5)+850148119}})(e,a),function(o,s){var c=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),i=new Uint8Array(o,16*c,u);switch(u){case 15:l[3]=l[3]^i[14]<<16;case 14:l[3]=l[3]^i[13]<<8;case 13:l[3]=l[3]^i[12]<<0,l[3]=Math.imul(l[3],q[3]),l[3]=le(l[3],18),l[3]=Math.imul(l[3],q[0]),s[3]=s[3]^l[3];case 12:l[2]=l[2]^i[11]<<24;case 11:l[2]=l[2]^i[10]<<16;case 10:l[2]=l[2]^i[9]<<8;case 9:l[2]=l[2]^i[8]<<0,l[2]=Math.imul(l[2],q[2]),l[2]=le(l[2],17),l[2]=Math.imul(l[2],q[3]),s[2]=s[2]^l[2];case 8:l[1]=l[1]^i[7]<<24;case 7:l[1]=l[1]^i[6]<<16;case 6:l[1]=l[1]^i[5]<<8;case 5:l[1]=l[1]^i[4]<<0,l[1]=Math.imul(l[1],q[1]),l[1]=le(l[1],16),l[1]=Math.imul(l[1],q[2]),s[1]=s[1]^l[1];case 4:l[0]=l[0]^i[3]<<24;case 3:l[0]=l[0]^i[2]<<16;case 2:l[0]=l[0]^i[1]<<8;case 1:l[0]=l[0]^i[0]<<0,l[0]=Math.imul(l[0],q[0]),l[0]=le(l[0],15),l[0]=Math.imul(l[0],q[1]),s[0]=s[0]^l[0]}}(e,a),function(o,s){s[0]=s[0]^o.byteLength,s[1]=s[1]^o.byteLength,s[2]=s[2]^o.byteLength,s[3]=s[3]^o.byteLength,s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0,s[0]=dt(s[0]),s[1]=dt(s[1]),s[2]=dt(s[2]),s[3]=dt(s[3]),s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0}(e,a);var n=new Uint8Array(a.buffer);return Array.from(n).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Ms(e,t){return new Promise(function(r){setTimeout(function(){return r(t)},e)})}function Ls(e,t,r){return Promise.all(e.map(function(a){return Promise.race([a,Ms(t,r)])}))}function Os(){return be(this,void 0,void 0,function(){var e,t,r,a,n;return ve(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=Is(),t=Object.keys(e),[4,Ls(Object.values(e),(ye==null?void 0:ye.timeout)||1e3,As)];case 1:return r=o.sent(),a=r.filter(function(s){return s!==void 0}),n={},a.forEach(function(s,c){n[t[c]]=s}),[2,Mr(n,ye.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function Mr(e,t){var r={},a=function(o){if(e.hasOwnProperty(o)){var s=e[o];if(typeof s!="object"||Array.isArray(s))t.includes(o)||(r[o]=s);else{var c=Mr(s,t.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(c).length>0&&(r[o]=c)}}};for(var n in e)a(n);return r}function Fs(e){return be(this,void 0,void 0,function(){var t,r;return ve(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Os()];case 1:return t=a.sent(),r=Ut(JSON.stringify(t)),[2,r.toString()];case 2:throw a.sent();case 3:return[2]}})})}function Ds(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function Lr(e,t,r){for(var a=[],n=0;n<e[0].data.length;n++){for(var o=[],s=0;s<e.length;s++)o.push(e[s].data[n]);a.push(Ns(o))}var c=new Uint8ClampedArray(a);return new ImageData(c,t,r)}function Ns(e){if(e.length===0)return 0;for(var t={},r=0,a=e;r<a.length;r++)t[o=a[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function Qe(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,a=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<a.length;r++){var n=a[r],o=e.match(n);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}fe("audio",function(){return be(this,void 0,void 0,function(){return ve(this,function(e){return[2,new Promise(function(t,r){try{var a=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=a.createBufferSource(),o=a.createOscillator();o.frequency.value=1e3;var s,c=a.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(a.destination),o.start(),a.oncomplete=function(u){s=u.renderedBuffer.getChannelData(0),t({sampleHash:Ds(s),oscillator:o.type,maxChannels:a.destination.maxChannelCount,channelCountMode:n.channelCountMode})},a.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),r(u)}})]})})});var Us=Qe().name!=="SamsungBrowser"?1:3,Or=280,Fr=20;Qe().name!="Firefox"&&fe("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:Us},function(){return function(){var r=document.createElement("canvas"),a=r.getContext("2d");if(!a)return new ImageData(1,1);r.width=Or,r.height=Fr;var n=a.createLinearGradient(0,0,r.width,r.height);n.addColorStop(0,"red"),n.addColorStop(.16666666666666666,"orange"),n.addColorStop(.3333333333333333,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(.6666666666666666,"blue"),n.addColorStop(.8333333333333334,"indigo"),n.addColorStop(1,"violet"),a.fillStyle=n,a.fillRect(0,0,r.width,r.height);var o="Random Text WMwmil10Oo";a.font="23.123px Arial",a.fillStyle="black",a.fillText(o,-5,15),a.fillStyle="rgba(0, 0, 255, 0.5)",a.fillText(o,-3.3,17.7),a.beginPath(),a.moveTo(0,0),a.lineTo(2*r.width/7,r.height),a.strokeStyle="white",a.lineWidth=2,a.stroke();var s=a.getImageData(0,0,r.width,r.height);return s}()});e({commonImageDataHash:Ut(Lr(t,Or,Fr).data.toString()).toString()})})});var zt,zs=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],Hs=["monospace","sans-serif","serif"];function Dr(e,t){if(!e)throw new Error("Canvas context not supported");return e.font,e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function Bs(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var a=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:a,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!a.length){var s=r.getExtension("WEBGL_debug_renderer_info");if(s){var c=(r.getParameter(s.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(s.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function js(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function Gs(e,t){var r={};return t.forEach(function(a){var n=function(o){if(o.length===0)return null;var s={};o.forEach(function(l){var i=String(l);s[i]=(s[i]||0)+1});var c=o[0],u=1;return Object.keys(s).forEach(function(l){s[l]>u&&(c=l,u=s[l])}),c}(e.map(function(o){return a in o?o[a]:void 0}).filter(function(o){return o!==void 0}));n&&(r[a]=n)}),r}function Ws(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(r){t[r].forEach(function(a){matchMedia("(".concat(r,": ").concat(a,")")).matches&&e.push("".concat(r,": ").concat(a))})}),e}function Vs(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}Qe().name!="Firefox"&&fe("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(a){var n;be(this,void 0,void 0,function(){var o,s,c;return ve(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(p){return setTimeout(p,l,i)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(s=o.style).setProperty("position","fixed"),s.setProperty("display","block","important"),s.setProperty("visibility","visible"),s.setProperty("border","0"),s.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(c=o.contentDocument||((n=o.contentWindow)===null||n===void 0?void 0:n.document)))throw new Error("Iframe document is not accessible");return a({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,i})})})(function(a){var n=a.iframe;return be(e,void 0,void 0,function(){var o,s,c,u;return ve(this,function(l){return o=n.createElement("canvas"),s=o.getContext("2d"),c=Hs.map(function(i){return Dr(s,i)}),u={},zs.forEach(function(i){var p=Dr(s,i);c.includes(p)||(u[i]=p)}),t(u),[2]})})})}catch{r({error:"unsupported"})}})}),fe("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,a=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:Bs(),architecture:js(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:a.jsHeapSizeLimit||0})})}),fe("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),fe("permissions",function(){return be(this,void 0,void 0,function(){var e;return ve(this,function(t){return zt=(ye==null?void 0:ye.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(ye==null?void 0:ye.retries)||3},function(){return function(){return be(this,void 0,void 0,function(){var r,a,n,o,s;return ve(this,function(c){switch(c.label){case 0:r={},a=0,n=zt,c.label=1;case 1:if(!(a<n.length))return[3,6];o=n[a],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return s=c.sent(),r[o]=s.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return a++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return Gs(r,zt)})]})})}),fe("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(a){a({plugins:e})})}),fe("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Ws()})})}),fe("system",function(){return new Promise(function(e){var t=Qe();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:Vs()})})});var J,qs=Qe().name!=="SamsungBrowser"?1:3,w=null;fe("webgl",function(){return be(this,void 0,void 0,function(){var e;return ve(this,function(t){typeof document<"u"&&((J=document.createElement("canvas")).width=200,J.height=100,w=J.getContext("webgl"));try{if(!w)throw new Error("WebGL not supported");return e=Array.from({length:qs},function(){return function(){try{if(!w)throw new Error("WebGL not supported");var r=`
2
2
  attribute vec2 position;
3
3
  void main() {
4
4
  gl_Position = vec4(position, 0.0, 1.0);
@@ -8,5 +8,29 @@
8
8
  void main() {
9
9
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
10
10
  }
11
- `,o=l.createShader(l.VERTEX_SHADER),i=l.createShader(l.FRAGMENT_SHADER);if(!o||!i)throw new Error("Failed to create shaders");if(l.shaderSource(o,r),l.shaderSource(i,a),l.compileShader(o),!l.getShaderParameter(o,l.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+l.getShaderInfoLog(o));if(l.compileShader(i),!l.getShaderParameter(i,l.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+l.getShaderInfoLog(i));var e=l.createProgram();if(!e)throw new Error("Failed to create shader program");if(l.attachShader(e,o),l.attachShader(e,i),l.linkProgram(e),!l.getProgramParameter(e,l.LINK_STATUS))throw new Error("Shader program linking failed: "+l.getProgramInfoLog(e));l.useProgram(e);for(var u=137,d=new Float32Array(4*u),c=2*Math.PI/u,s=0;s<u;s++){var h=s*c;d[4*s]=0,d[4*s+1]=0,d[4*s+2]=Math.cos(h)*(v.width/2),d[4*s+3]=Math.sin(h)*(v.height/2)}var L=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,L),l.bufferData(l.ARRAY_BUFFER,d,l.STATIC_DRAW);var C=l.getAttribLocation(e,"position");l.enableVertexAttribArray(C),l.vertexAttribPointer(C,2,l.FLOAT,!1,0,0),l.viewport(0,0,v.width,v.height),l.clearColor(0,0,0,1),l.clear(l.COLOR_BUFFER_BIT),l.drawArrays(l.LINES,0,2*u);var N=new Uint8ClampedArray(v.width*v.height*4);return l.readPixels(0,0,v.width,v.height,l.RGBA,l.UNSIGNED_BYTE,N),new ImageData(N,v.width,v.height)}catch{return new ImageData(1,1)}finally{l&&(l.bindBuffer(l.ARRAY_BUFFER,null),l.useProgram(null),l.viewport(0,0,l.drawingBufferWidth,l.drawingBufferHeight),l.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:O(G(t,v.width,v.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var R=function(t,n,r,a){for(var o=(r-n)/a,i=0,e=0;e<a;e++)i+=t(n+(e+.5)*o);return i*o};w("math",function(){return b(void 0,void 0,void 0,function(){return P(this,function(t){return[2,{acos:Math.acos(.5),asin:R(Math.asin,-1,1,97),atan:R(Math.atan,-1,1,97),cos:R(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:R(Math.sin,-Math.PI,Math.PI,97),sinh:R(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:R(Math.tan,0,2*Math.PI,97),tanh:R(Math.tanh,-9/7,7/9,97)}]})})});const Se="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let F=(t=21)=>{let n="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)n+=Se[r[t]&63];return n};class D{constructor(n){f(this,"config"),this.config=n}async getAdsForSearchParams(n){return[]}}class be extends D{async getAdsForSearchParams(n){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:n.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,a=await(await fetch(r,{method:"GET"})).json(),o=a.product_ads.map(e=>({id:F(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:e})),i=a.text_ads.map(e=>({id:F(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:e}));return o.concat(i)}}class Pe extends D{async getAdsForSearchParams(n){return[]}}class Ee extends D{async getAdsForSearchParams(n){return[]}}const Me=500;class Re{constructor(n,r,a){f(this,"measureRequestTimeout"),f(this,"measureRequestsBatched",[]),f(this,"config"),f(this,"sdkInfo"),f(this,"userId"),f(this,"sessionId"),f(this,"sendMeasureEvent",(o,i={},e={})=>{const u={event_name:o,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...i},user:{...this.measureRequestUser,...e}};this.measureRequestsBatched.push(u),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const d=JSON.stringify({items:this.measureRequestsBatched}),c=`${this.baseMeasureUrl}/batch`;try{const s=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId},body:d,keepalive:!0});if(!s.ok)throw new Error(`Failed to send request: ${s.status} ${s.statusText}`);this.measureRequestsBatched=[];return}catch(s){throw console.error("Error sending MeasureRequest:",s),s}},Me)}),this.config=n,this.sdkInfo=r,this.userId=a,this.sessionId=F(),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"}}}function Ae(t){const n=[];let r="should";return t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(a=>{var o;const i=(o=t.facetPathsForIndexFields)==null?void 0:o[a];i&&(r="must",n.push({occur:r,exact:{ctx:i.value}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(a=>{var o;const i=(o=t.rangeValueForIndexFields)==null?void 0:o[a];i&&(r="must",n.push({occur:r,exact:{ctx:i.value}}))}),t.sort==="desc"?t.order_by="date_published":t.order_by="",n.push({occur:r,[t.mode]:{ctx:t.searchTerm}}),n}const Ce=t=>t.endsWith("/")?t.slice(0,-1):t,Te=t=>{let n="";if(n=t.trim(),n=n.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(n.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return n};class ke{constructor(n,r,a){f(this,"config"),f(this,"userId"),f(this,"parent"),f(this,"getSearchResponse",async o=>{var i,e;const u=Te(o.searchTerm);(i=this.parent.measureClient)==null||i.sendMeasureEvent("search_requested",{search_term:u}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:u}});try{const d={query:Ae(o),offset:o.offset||0,limit:o.limit||this.config.searchResultsPerPage||20};o.order_by&&(d.order_by=o.order_by,d.sort=o.sort==="desc"||o.sort==="asc"?o.sort:"asc");const c={method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId},body:JSON.stringify(d)},s=await fetch(this.baseSearchUrl,c);if(!s.ok)throw new Error(`Error: ${s.statusText} (Status: ${s.status})`);const h=await s.json();return(e=this.parent.measureClient)==null||e.sendMeasureEvent("search_response_received",{search_term:u,number_of_documents:h.data.count}),h}catch(d){throw console.error("Error parsing response:",d),d}}),this.parent=n,this.config=r,this.userId=a}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}}class Ie{constructor(n,r){if(f(this,"config"),f(this,"measureClient"),f(this,"searchClient"),f(this,"adClient"),f(this,"userId"),f(this,"requestTimeout"),f(this,"subscriptionEvents",{}),f(this,"getItems",(a,o,i)=>{const e=async()=>{(async()=>{var u,d;const c=await((u=this==null?void 0:this.searchClient)==null?void 0:u.getSearchResponse(a));if(!c)throw new Error("Search client was not initialized.");const s=(d=c.data.hits||[])==null?void 0:d.map(h=>h.doc).filter(h=>!!h).map(h=>({type:"SearchDocument",id:F(),document:h}));s.length===0&&this.emitEvent("no_results_returned",{name:"no_results_returned"}),o(c,s)})(),(async()=>{if(this.adClient){const u=await this.adClient.getAdsForSearchParams(a);i(u)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(e,this.config.searchDebounceDelay):e()}),!n.endpointURL||!n.index||!n.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...n,endpointURL:Ce(n.endpointURL)},this.userId="",this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations()}initInputForms(){const n=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{n.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((n,r)=>{let a=!1;for(const o of n)o.type==="childList"&&o.addedNodes.forEach(i=>{i.nodeType===1&&i.className.toLowerCase()==="searchcraft-input-form"&&(a=!0)});a&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(n,r){setTimeout(async()=>{let a=this.config.userId;switch(a||(a=await ce()),this.measureClient=new Re(n,r,a),this.searchClient=new ke(this,n,a),n.adSource){case"adMarketplace":this.adClient=new be(n);break;case"Nativo":this.adClient=new Ee(n);break;case"Custom":this.adClient=new Pe(n);break}},300)}emitEvent(n,r){var a;(a=this.subscriptionEvents[n])==null||a.forEach(o=>{o(r)})}subscribe(n,r){return this.subscriptionEvents[n]||(this.subscriptionEvents[n]=[]),this.subscriptionEvents[n].push(r),()=>{this.subscriptionEvents[n]=this.subscriptionEvents[n].filter(a=>a!==r)}}}const K={name:"@searchcraft/vue-sdk",version:"0.9.0",private:!1,description:"Searchcraft Vue SDK.",type:"module",license:"Apache-2.0",keywords:["searchcraft"],scripts:{dev:"vite",clean:"rm -rf dist",build:"yarn clean && vite build && yarn docs",docs:"typedoc --options typedoc.json",preview:"vite preview","build-only":"vite build","type-check":"vue-tsc --build"},repository:{type:"git",url:"https://bitbucket.org/madebychalk/searchcraft-javascript-sdks/"},engines:{node:">=18.0.0",npm:">=10.0.0"},main:"./dist/index.umd.js",module:"./dist/index.es.js",types:"./dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.es.js",require:"./dist/index.umd.js"},"./components":"./dist/components/index.d.ts","./plugin":"./dist/plugin.d.ts"},files:["dist"],peerDependencies:{vue:"^3.5.13"},devDependencies:{"@tsconfig/node22":"^22.0.0","@types/node":"^22.10.7","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","@vue/runtime-dom":"^3.5.13","@vue/tsconfig":"^0.7.0","npm-run-all2":"^7.0.2",vite:"^6.0.11","vite-plugin-dts":"^4.5.0","vite-plugin-vue-devtools":"^7.7.0","vue-docgen-web-types":"^0.1.8","vue-tsc":"^2.2.0"}},B="routerLink",z="navManager",xe="router",_e="aria",k=Symbol(),Y={default:k},J=t=>(t==null?void 0:t.split(" "))||[],Fe=(t,n,r=[])=>{var a;return[...Array.from(((a=t.value)==null?void 0:a.classList)||[]),...r].filter((o,i,e)=>!n.has(o)&&e.indexOf(o)===i)},M=(t,n,r=[],a=[],o,i)=>{const e=S.defineComponent((u,{attrs:d,slots:c,emit:s})=>{var Q;const h=S.ref(),L=new Set(J(d.class)),C=S.getCurrentInstance(),X=((Q=C==null?void 0:C.appContext)==null?void 0:Q.provides[z])?S.inject(z):void 0,Ze=I=>{const{routerLink:j}=u;if(j!==k)if(X!==void 0){I.preventDefault();let A={event:I};for(const x in u){const g=u[x];u.hasOwnProperty(x)&&x.startsWith(xe)&&g!==k&&(A[x]=g)}X.navigate(A)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{u[o],J(d.class).forEach(g=>{L.add(g)});const I=u.onClick,j=g=>{I!==void 0&&I(g),g.defaultPrevented||Ze(g)};let A={ref:h,class:Fe(h,L),onClick:j};for(const g in u){const Z=u[g];(u.hasOwnProperty(g)&&Z!==k||g.startsWith(_e))&&(A[g]=Z);const ee="on"+g.slice(0,1).toUpperCase()+g.slice(1),et=d[ee];h.value&&d.hasOwnProperty(ee)&&"addEventListener"in h.value&&h.value.addEventListener(g,et)}return B in u&&u[B]!==k&&(A={...A,href:u[B]}),S.h(t,A,c.default&&c.default())}});if(typeof e!="function"){let u=[],d={};d.ROUTER_LINK_VALUE=Y,r.forEach(c=>d[c]=Y),u=a,e.name=t,e.emits=u,e.props=d}return e},Le=M("searchcraft-base-search-results",void 0,["customStylesForResults","searchResultMappings","resultImagePlacement","buttonLabel","buttonTarget","buttonRel","containerTarget","containerRel"]),Oe=M("searchcraft-filter-panel",void 0,["items"]),Ue=M("searchcraft-input-form",void 0,["autoSearch","buttonPlacement","buttonLabel","inputLabel","customStyles","placeholderValue","searchTerm","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),De=M("searchcraft-pagination",void 0,["customStyles"]),Be=M("searchcraft-popover-button"),Ne=M("searchcraft-popover-form",void 0,["type","popoverResultMappings","hotkey","hotkeyModifier"]),je=M("searchcraft-results-info",void 0,["customFormatter","customStyles"]),qe=M("searchcraft-search-results-per-page",void 0,["increment","customStyles"]),Ve=M("searchcraft-theme",void 0,["theme","customTheme"]),Ge=Le,$e=Oe,We=Ue,He=Be,Ke=Ne,ze=je,Ye=Ve,Je=De,Xe=qe;class Qe extends Ie{constructor(n){super(n,{sdkName:K.name,sdkVersion:K.version})}}m.Searchcraft=Qe,m.SearchcraftBaseSearchResults=Ge,m.SearchcraftFilterPanel=$e,m.SearchcraftInputForm=We,m.SearchcraftPagination=Je,m.SearchcraftPopoverButton=He,m.SearchcraftPopoverForm=Ke,m.SearchcraftResultsInfo=ze,m.SearchcraftSearchResultsPerPage=Xe,m.SearchcraftTheme=Ye,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
11
+ `,n=w.createShader(w.VERTEX_SHADER),o=w.createShader(w.FRAGMENT_SHADER);if(!n||!o)throw new Error("Failed to create shaders");if(w.shaderSource(n,r),w.shaderSource(o,a),w.compileShader(n),!w.getShaderParameter(n,w.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+w.getShaderInfoLog(n));if(w.compileShader(o),!w.getShaderParameter(o,w.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+w.getShaderInfoLog(o));var s=w.createProgram();if(!s)throw new Error("Failed to create shader program");if(w.attachShader(s,n),w.attachShader(s,o),w.linkProgram(s),!w.getProgramParameter(s,w.LINK_STATUS))throw new Error("Shader program linking failed: "+w.getProgramInfoLog(s));w.useProgram(s);for(var c=137,u=new Float32Array(4*c),l=2*Math.PI/c,i=0;i<c;i++){var p=i*l;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(J.width/2),u[4*i+3]=Math.sin(p)*(J.height/2)}var g=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,g),w.bufferData(w.ARRAY_BUFFER,u,w.STATIC_DRAW);var S=w.getAttribLocation(s,"position");w.enableVertexAttribArray(S),w.vertexAttribPointer(S,2,w.FLOAT,!1,0,0),w.viewport(0,0,J.width,J.height),w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT),w.drawArrays(w.LINES,0,2*c);var P=new Uint8ClampedArray(J.width*J.height*4);return w.readPixels(0,0,J.width,J.height,w.RGBA,w.UNSIGNED_BYTE,P),new ImageData(P,J.width,J.height)}catch{return new ImageData(1,1)}finally{w&&(w.bindBuffer(w.ARRAY_BUFFER,null),w.useProgram(null),w.viewport(0,0,w.drawingBufferWidth,w.drawingBufferHeight),w.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Ut(Lr(e,J.width,J.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var $e=function(e,t,r,a){for(var n=(r-t)/a,o=0,s=0;s<a;s++)o+=e(t+(s+.5)*n);return o*n};fe("math",function(){return be(void 0,void 0,void 0,function(){return ve(this,function(e){return[2,{acos:Math.acos(.5),asin:$e(Math.asin,-1,1,97),atan:$e(Math.atan,-1,1,97),cos:$e(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:$e(Math.sin,-Math.PI,Math.PI,97),sinh:$e(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:$e(Math.tan,0,2*Math.PI,97),tanh:$e(Math.tanh,-9/7,7/9,97)}]})})});const Ys="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let pt=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ys[r[e]&63];return t};class Ht{constructor(t){F(this,"config"),this.config=t}async getAdsForSearchParams(t){return[]}}class Ks extends Ht{async getAdsForSearchParams(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()}`,a=await(await fetch(r,{method:"GET"})).json(),n=a.product_ads.map(s=>({id:pt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:s})),o=a.text_ads.map(s=>({id:pt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:s}));return n.concat(o)}}class Xs extends Ht{async getAdsForSearchParams(t){return[]}}class Qs extends Ht{async getAdsForSearchParams(t){return[]}}const Js=500;class Zs{constructor(t,r,a){F(this,"measureRequestTimeout"),F(this,"measureRequestsBatched",[]),F(this,"config"),F(this,"sdkInfo"),F(this,"userId"),F(this,"sessionId"),F(this,"sendMeasureEvent",(n,o={},s={})=>{const c={event_name:n,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...s}};this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const u=JSON.stringify({items:this.measureRequestsBatched}),l=`${this.baseMeasureUrl}/batch`;try{const i=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId},body:u,keepalive:!0});if(!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`);this.measureRequestsBatched=[];return}catch(i){throw console.error("Error sending MeasureRequest:",i),i}},Js)}),this.config=t,this.sdkInfo=r,this.userId=a,this.sessionId=pt(),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"}}}function en(e){const t=[];let r="should";return e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(a=>{var n;const o=(n=e.facetPathsForIndexFields)==null?void 0:n[a];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(a=>{var n;const o=(n=e.rangeValueForIndexFields)==null?void 0:n[a];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.sort==="desc"?e.order_by="date_published":e.order_by="",t.push({occur:r,[e.mode]:{ctx:e.searchTerm}}),t}const tn=e=>e.endsWith("/")?e.slice(0,-1):e,rn=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};class an{constructor(t,r,a){F(this,"config"),F(this,"userId"),F(this,"parent"),F(this,"getSearchResponse",async n=>{var o,s;const c=rn(n.searchTerm);(o=this.parent.measureClient)==null||o.sendMeasureEvent("search_requested",{search_term:c}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:c}});try{const u={query:en(n),offset:n.offset||0,limit:n.limit||this.config.searchResultsPerPage||20};n.order_by&&(u.order_by=n.order_by,u.sort=n.sort==="desc"||n.sort==="asc"?n.sort:"asc");const l={method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId},body:JSON.stringify(u)},i=await fetch(this.baseSearchUrl,l);if(!i.ok)throw new Error(`Error: ${i.statusText} (Status: ${i.status})`);const p=await i.json();return(s=this.parent.measureClient)==null||s.sendMeasureEvent("search_response_received",{search_term:c,number_of_documents:p.data.count}),p}catch(u){throw console.error("Error parsing response:",u),u}}),this.parent=t,this.config=r,this.userId=a}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}}class sn{constructor(t,r){if(F(this,"config"),F(this,"measureClient"),F(this,"searchClient"),F(this,"adClient"),F(this,"userId"),F(this,"requestTimeout"),F(this,"subscriptionEvents",{}),F(this,"getItems",(a,n,o)=>{const s=async()=>{(async()=>{var c,u;const l=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponse(a));if(!l)throw new Error("Search client was not initialized.");const i=(u=l.data.hits||[])==null?void 0:u.map(p=>p.doc).filter(p=>!!p).map(p=>({type:"SearchDocument",id:pt(),document:p}));i.length===0&&this.emitEvent("no_results_returned",{name:"no_results_returned"}),n(l,i)})(),(async()=>{if(this.adClient){const c=await this.adClient.getAdsForSearchParams(a);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(s,this.config.searchDebounceDelay):s()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:tn(t.endpointURL)},this.userId="",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 a=!1;for(const n of t)n.type==="childList"&&n.addedNodes.forEach(o=>{o.nodeType===1&&o.className.toLowerCase()==="searchcraft-input-form"&&(a=!0)});a&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let a=this.config.userId;switch(a||(a=await Fs()),this.measureClient=new Zs(t,r,a),this.searchClient=new an(this,t,a),t.adSource){case"adMarketplace":this.adClient=new Ks(t);break;case"Nativo":this.adClient=new Qs(t);break;case"Custom":this.adClient=new Xs(t);break}},300)}emitEvent(t,r){var a;(a=this.subscriptionEvents[t])==null||a.forEach(n=>{n(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(a=>a!==r)}}}const nn="searchcraft-javascript-sdk",Ue={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!1,cmpDidUnload:!1,cmpDidUpdate:!1,cmpShouldUpdate:!1,cmpWillLoad:!1,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!0,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!1,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,modernPropertyDecls:!0,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!1,propNumber:!0,propString:!0,reflect:!1,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!1,svg:!0,taskQueue:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!1,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!1,watchCallback:!0};var on=Object.defineProperty,cn=(e,t)=>{for(var r in t)on(e,r,{get:t[r],enumerable:!0})},ln="http://www.w3.org/2000/svg",un="http://www.w3.org/1999/xhtml",hn=(e,t)=>{var r;const a=t.$cmpMeta$;Object.entries((r=a.$members$)!=null?r:{}).map(([o,[s]])=>{if(s&31||s&32){const c=e[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),o);Object.defineProperty(e,o,{get(){return u.get.call(this)},set(l){u.set.call(this,l)},configurable:!0,enumerable:!0}),e[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):c}})},Bt=new WeakMap,fn=e=>Bt.delete(e),Te=e=>Bt.get(e),dn=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onReadyPromise$=new Promise(n=>r.$onReadyResolve$=n),e["s-p"]=[],e["s-rc"]=[];const a=Bt.set(e,r);return hn(e,r),a},Nr=(e,t)=>t in e,mt=(e,t)=>(0,console.error)(e,t),gt=typeof window<"u"?window:{},ze=gt.document||{head:{}},D=gt.HTMLElement||class{},se={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,a)=>e.addEventListener(t,r,a),rel:(e,t,r,a)=>e.removeEventListener(t,r,a),ce:(e,t)=>new CustomEvent(e,t)},pn=Ue.shadowDom,mn=e=>Promise.resolve(e),jt=!1,Ur=[],zr=[],gn=(e,t)=>r=>{e.push(r),jt||(jt=!0,se.$flags$&4?Wt(Gt):se.raf(Gt))},Hr=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){mt(r)}e.length=0},Gt=()=>{Hr(Ur),Hr(zr),(jt=Ur.length>0)&&se.raf(Gt)},Wt=e=>mn().then(e),bn=gn(zr),Vt=e=>(e=typeof e,e==="object"||e==="function"),vn={};cn(vn,{err:()=>Br,map:()=>yn,ok:()=>qt,unwrap:()=>Sn,unwrapErr:()=>wn});var qt=e=>({isOk:!0,isErr:!1,value:e}),Br=e=>({isOk:!1,isErr:!0,value:e});function yn(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(a=>qt(a)):qt(r)}if(e.isErr){const r=e.value;return Br(r)}throw"should never get here"}var Sn=e=>{if(e.isOk)return e.value;throw e.value},wn=e=>{if(e.isErr)return e.value;throw e.value},jr=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Gr(t,e.tagName).forEach(r=>{var a;r.nodeType===1&&r.tagName==="SLOT-FB"&&((a=En(r,r["s-sn"],!1))!=null&&a.length?r.hidden=!0:r.hidden=!1)});for(const r of t)r.nodeType===1&&(r.__childNodes||r.childNodes).length&&jr(r)};function Gr(e,t,r){let a=0,n=[],o;for(;a<e.length;a++)o=e[a],o["s-sr"]&&o["s-hn"]===t&&r===void 0&&n.push(o),n=[...n,...Gr(o.childNodes,t,r)];return n}var En=(e,t,r=!0)=>{const a=[];for((r&&e["s-sr"]||!e["s-sr"])&&a.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)a.push(e);return a},Wr=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Je=(e,t="")=>()=>{},d=(e,t,...r)=>{let a=null,n=null,o=null,s=!1,c=!1;const u=[],l=p=>{for(let g=0;g<p.length;g++)a=p[g],Array.isArray(a)?l(a):a!=null&&typeof a!="boolean"&&((s=typeof e!="function"&&!Vt(a))&&(a=String(a)),s&&c?u[u.length-1].$text$+=a:u.push(s?bt(null,a):a),c=s)};if(l(r),t){t.key&&(n=t.key),t.name&&(o=t.name);{const p=t.className||t.class;p&&(t.class=typeof p!="object"?p:Object.keys(p).filter(g=>p[g]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,u,kn);const i=bt(e,null);return i.$attrs$=t,u.length>0&&(i.$children$=u),i.$key$=n,i.$name$=o,i},bt=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},Rn={},Pn=e=>e&&e.$tag$===Rn,kn={forEach:(e,t)=>e.map(Vr).forEach(t),map:(e,t)=>e.map(Vr).map(t).map(Tn)},Vr=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Tn=e=>{if(typeof e.vtag=="function"){const r={...e.vattrs};return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),d(e.vtag,r,...e.vchildren||[])}const t=bt(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},qr=(e,t)=>e!=null&&!Vt(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,Cn=e=>e,Ce=(e,t,r)=>{const a=Cn(e);return{emit:n=>Yr(a,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},Yr=(e,t,r)=>{const a=se.ce(t,r);return e.dispatchEvent(a),a},vt=new WeakMap,Kr=(e,t,r,a,n,o)=>{if(r!==a){let s=Nr(e,t),c=t.toLowerCase();if(t==="class"){const u=e.classList,l=Xr(r);let i=Xr(a);e["s-si"]?(i.push(e["s-si"]),l.forEach(p=>{p.startsWith(e["s-si"])&&i.push(p)}),i=[...new Set(i)],u.add(...i),delete e["s-si"]):(u.remove(...l.filter(p=>p&&!i.includes(p))),u.add(...i.filter(p=>p&&!l.includes(p))))}else if(t==="style"){for(const u in r)(!a||a[u]==null)&&(u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(const u in a)(!r||a[u]!==r[u])&&(u.includes("-")?e.style.setProperty(u,a[u]):e.style[u]=a[u])}else if(t!=="key")if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Nr(gt,c)?t=c.slice(2):t=c[2]+t.slice(3),r||a){const u=t.endsWith(Qr);t=t.replace($n,""),r&&se.rel(e,t,r,u),a&&se.ael(e,t,a,u)}}else{const u=Vt(a);if((s||u&&a!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==a&&(e[t]=a);else{const l=a??"";t==="list"?s=!1:(r==null||e[t]!=l)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=l:e.setAttribute(t,l))}}catch{}a==null||a===!1?(a!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!s||o&4||n)&&!u&&(a=a===!0?"":a,e.setAttribute(t,a))}}},xn=/\s/,Xr=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(xn):[]),Qr="Capture",$n=new RegExp(Qr+"$"),Jr=(e,t,r)=>{const a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,n=e&&e.$attrs$||{},o=t.$attrs$||{};for(const s of Zr(Object.keys(n)))s in o||Kr(a,s,n[s],void 0,r,t.$flags$);for(const s of Zr(Object.keys(o)))Kr(a,s,n[s],o[s],r,t.$flags$)};function Zr(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var Yt,Kt,yt=!1,St=!1,Xt=!1,ie=!1,wt=(e,t,r)=>{var a;const n=t.$children$[r];let o=0,s,c,u;if(yt||(Xt=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)s=n.$elm$=ze.createTextNode(n.$text$);else if(n.$flags$&1)s=n.$elm$=ze.createTextNode("");else{if(ie||(ie=n.$tag$==="svg"),s=n.$elm$=ze.createElementNS(ie?ln:un,!yt&&Ue.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),ie&&n.$tag$==="foreignObject"&&(ie=!1),Jr(null,n,ie),n.$children$)for(o=0;o<n.$children$.length;++o)c=wt(e,n,o),c&&s.appendChild(c);n.$tag$==="svg"?ie=!1:s.tagName==="foreignObject"&&(ie=!0)}return s["s-hn"]=Kt,n.$flags$&3&&(s["s-sr"]=!0,s["s-cr"]=Yt,s["s-sn"]=n.$name$||"",s["s-rf"]=(a=n.$attrs$)==null?void 0:a.ref,u=e&&e.$children$&&e.$children$[r],u&&u.$tag$===n.$tag$&&e.$elm$&&Ze(e.$elm$,!1)),s},Ze=(e,t)=>{se.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&Ue.experimentalSlotFixes;for(let a=r.length-1;a>=0;a--){const n=r[a];n["s-hn"]!==Kt&&n["s-ol"]&&(xe(et(n).parentNode,n,et(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,Xt=!0),t&&Ze(n,t)}se.$flags$&=-2},ea=(e,t,r,a,n,o)=>{let s=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(;n<=o;++n)a[n]&&(c=wt(null,r,n),c&&(a[n].$elm$=c,xe(s,c,et(t))))},ta=(e,t,r)=>{for(let a=t;a<=r;++a){const n=e[a];if(n){const o=n.$elm$;o&&(St=!0,o["s-ol"]?o["s-ol"].remove():Ze(o,!0),o.remove())}}},_n=(e,t,r,a,n=!1)=>{let o=0,s=0,c=0,u=0,l=t.length-1,i=t[0],p=t[l],g=a.length-1,S=a[0],P=a[g],U,pe;for(;o<=l&&s<=g;)if(i==null)i=t[++o];else if(p==null)p=t[--l];else if(S==null)S=a[++s];else if(P==null)P=a[--g];else if(Et(i,S,n))He(i,S,n),i=t[++o],S=a[++s];else if(Et(p,P,n))He(p,P,n),p=t[--l],P=a[--g];else if(Et(i,P,n))(i.$tag$==="slot"||P.$tag$==="slot")&&Ze(i.$elm$.parentNode,!1),He(i,P,n),xe(e,i.$elm$,p.$elm$.nextSibling),i=t[++o],P=a[--g];else if(Et(p,S,n))(i.$tag$==="slot"||P.$tag$==="slot")&&Ze(p.$elm$.parentNode,!1),He(p,S,n),xe(e,p.$elm$,i.$elm$),p=t[--l],S=a[++s];else{for(c=-1,u=o;u<=l;++u)if(t[u]&&t[u].$key$!==null&&t[u].$key$===S.$key$){c=u;break}c>=0?(pe=t[c],pe.$tag$!==S.$tag$?U=wt(t&&t[s],r,c):(He(pe,S,n),t[c]=void 0,U=pe.$elm$),S=a[++s]):(U=wt(t&&t[s],r,s),S=a[++s]),U&&xe(et(i.$elm$).parentNode,U,et(i.$elm$))}o>l?ea(e,a[g+1]==null?null:a[g+1].$elm$,r,a,s,g):s>g&&ta(t,o,l)},Et=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,et=e=>e&&e["s-ol"]||e,He=(e,t,r=!1)=>{const a=t.$elm$=e.$elm$,n=e.$children$,o=t.$children$,s=t.$tag$,c=t.$text$;let u;c===null?(ie=s==="svg"?!0:s==="foreignObject"?!1:ie,s==="slot"&&!yt||Jr(e,t,ie),n!==null&&o!==null?_n(a,n,t,o,r):o!==null?(e.$text$!==null&&(a.textContent=""),ea(a,null,t,o,0,o.length-1)):!r&&Ue.updatable&&n!==null&&ta(n,0,n.length-1),ie&&s==="svg"&&(ie=!1)):(u=a["s-cr"])?u.parentNode.textContent=c:e.$text$!==c&&(a.data=c)},Se=[],ra=e=>{let t,r,a;const n=e.__childNodes||e.childNodes;for(const o of n){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const s=o["s-sn"];for(a=r.length-1;a>=0;a--)if(t=r[a],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(Wr(t,s)){let c=Se.find(u=>u.$nodeToRelocate$===t);St=!0,t["s-sn"]=t["s-sn"]||s,c?(c.$nodeToRelocate$["s-sh"]=o["s-hn"],c.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],Se.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&Se.map(u=>{Wr(u.$nodeToRelocate$,t["s-sn"])&&(c=Se.find(l=>l.$nodeToRelocate$===t),c&&!u.$slotRefNode$&&(u.$slotRefNode$=c.$slotRefNode$))})}else Se.some(c=>c.$nodeToRelocate$===t)||Se.push({$nodeToRelocate$:t})}o.nodeType===1&&ra(o)}},xe=(e,t,r)=>e==null?void 0:e.insertBefore(t,r),An=(e,t,r=!1)=>{var a,n,o,s;const c=e.$hostElement$,u=e.$vnode$||bt(null,null),l=Pn(t)?t:d(null,null,t);if(Kt=c.tagName,r&&l.$attrs$)for(const i of Object.keys(l.$attrs$))c.hasAttribute(i)&&!["key","ref","style","class"].includes(i)&&(l.$attrs$[i]=c[i]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=u.$elm$=c,yt=pn,Yt=c["s-cr"],St=!1,He(u,l,r);{if(se.$flags$|=1,Xt){ra(l.$elm$);for(const i of Se){const p=i.$nodeToRelocate$;if(!p["s-ol"]){const g=ze.createTextNode("");g["s-nr"]=p,xe(p.parentNode,p["s-ol"]=g,p)}}for(const i of Se){const p=i.$nodeToRelocate$,g=i.$slotRefNode$;if(g){const S=g.parentNode;let P=g.nextSibling;{let K=(a=p["s-ol"])==null?void 0:a.previousSibling;for(;K;){let $=(n=K["s-nr"])!=null?n:null;if($&&$["s-sn"]===p["s-sn"]&&S===($.__parentNode||$.parentNode)){for($=$.nextSibling;$===p||$!=null&&$["s-sr"];)$=$==null?void 0:$.nextSibling;if(!$||!$["s-nr"]){P=$;break}}K=K.previousSibling}}const U=p.__parentNode||p.parentNode,pe=p.__nextSibling||p.nextSibling;(!P&&S!==U||pe!==P)&&p!==P&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),xe(S,p,P),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(o=p["s-ih"])!=null?o:!1)),p&&typeof g["s-rf"]=="function"&&g["s-rf"](p)}else p.nodeType===1&&(r&&(p["s-ih"]=(s=p.hidden)!=null?s:!1),p.hidden=!0)}}St&&jr(l.$elm$),se.$flags$&=-2,Se.length=0}Yt=void 0},aa=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise(a=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),a()}))}},Qt=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return aa(e,e.$ancestorComponent$),bn(()=>In(e,t))},In=(e,t)=>{const r=e.$hostElement$,a=Je("scheduleUpdate",e.$cmpMeta$.$tagName$),n=r;if(!n)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return a(),Mn(o,()=>On(e,n,t))},Mn=(e,t)=>Ln(e)?e.then(t).catch(r=>{console.error(r),t()}):t(),Ln=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",On=async(e,t,r)=>{var a;const n=e.$hostElement$,o=Je("update",e.$cmpMeta$.$tagName$),s=n["s-rc"],c=Je("render",e.$cmpMeta$.$tagName$);Fn(e,t,n,r),s&&(s.map(u=>u()),n["s-rc"]=void 0),c(),o();{const u=(a=n["s-p"])!=null?a:[],l=()=>Dn(e);u.length===0?l():(Promise.all(u).then(l),e.$flags$|=4,u.length=0)}},Fn=(e,t,r,a)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,An(e,t,a)}catch(n){mt(n,e.$hostElement$)}return null},Dn=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,a=Je("postUpdate",t),n=r,o=e.$ancestorComponent$;e.$flags$&64?a():(e.$flags$|=64,sa(r),Un(n,"componentDidLoad",void 0,r),a(),e.$onReadyResolve$(r),o||Nn()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Wt(()=>Qt(e,!1)),e.$flags$&=-517},Nn=e=>{sa(ze.documentElement),Wt(()=>Yr(gt,"appload",{detail:{namespace:nn}}))},Un=(e,t,r,a)=>{if(e&&e[t])try{return e[t](r)}catch(n){mt(n,a)}},sa=e=>{var t;return e.classList.add((t=Ue.hydratedSelectorName)!=null?t:"hydrated")},zn=(e,t)=>Te(e).$instanceValues$.get(t),na=(e,t,r,a)=>{const n=Te(e),o=e,s=n.$instanceValues$.get(t),c=n.$flags$,u=o;r=qr(r,a.$members$[t][0]);const l=Number.isNaN(s)&&Number.isNaN(r);if(r!==s&&!l){n.$instanceValues$.set(t,r);{if(a.$watchers$&&c&128){const p=a.$watchers$[t];p&&p.map(g=>{try{u[g](r,s,t)}catch(S){mt(S,o)}})}(c&18)===2&&Qt(n,!1)}}},Hn=(e,t,r)=>{var a,n;const o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const s=Object.entries((a=t.$members$)!=null?a:{});s.map(([c,[u]])=>{if(u&31||u&32){const{get:l,set:i}=Object.getOwnPropertyDescriptor(o,c)||{};l&&(t.$members$[c][0]|=2048),i&&(t.$members$[c][0]|=4096),Object.defineProperty(o,c,{get(){return l?l.apply(this):zn(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(o,c,{set(p){const g=Te(this);if(i){const S=u&32?this[c]:g.$hostElement$[c];typeof S>"u"&&g.$instanceValues$.get(c)?p=g.$instanceValues$.get(c):!g.$instanceValues$.get(c)&&S&&g.$instanceValues$.set(c,S),i.apply(this,[qr(p,u)]),p=u&32?this[c]:g.$hostElement$[c],na(this,c,p,t);return}{na(this,c,p,t);return}}})}});{const c=new Map;o.attributeChangedCallback=function(u,l,i){se.jmp(()=>{var p;const g=c.get(u);if(!(this.hasOwnProperty(g)&&Ue.lazyLoad)){if(o.hasOwnProperty(g)&&typeof this[g]=="number"&&this[g]==i)return;if(g==null){const P=Te(this),U=P==null?void 0:P.$flags$;if(U&&!(U&8)&&U&128&&i!==l){const K=this,$=(p=t.$watchers$)==null?void 0:p[u];$==null||$.forEach(Ee=>{K[Ee]!=null&&K[Ee].call(K,i,l,u)})}return}}const S=Object.getOwnPropertyDescriptor(o,g);i=i===null&&typeof this[g]=="boolean"?!1:i,i!==this[g]&&(!S.get||S.set)&&(this[g]=i)})},e.observedAttributes=Array.from(new Set([...Object.keys((n=t.$watchers$)!=null?n:{}),...s.filter(([u,l])=>l[0]&15).map(([u,l])=>{const i=l[1]||u;return c.set(i,u),i})]))}}return e},Bn=async(e,t,r,a)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const s=e.localName;customElements.whenDefined(s).then(()=>t.$flags$|=128)}}const n=t.$ancestorComponent$,o=()=>Qt(t,!0);n&&n["s-rc"]?n["s-rc"].push(o):o()},jn=(e,t)=>{},Gn=e=>{if(!(se.$flags$&1)){const t=Te(e),r=t.$cmpMeta$,a=Je("connectedCallback",r.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>jn());else{t.$flags$|=1,r.$flags$&12&&Wn(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){aa(t,t.$ancestorComponent$=n);break}}r.$members$&&Object.entries(r.$members$).map(([n,[o]])=>{if(o&31&&e.hasOwnProperty(n)){const s=e[n];delete e[n],e[n]=s}}),Bn(e,t)}a()}},Wn=e=>{const t=e["s-cr"]=ze.createComment("");t["s-cn"]=!0,xe(e,t,e.firstChild)},Vn=async e=>{se.$flags$&1||Te(e),vt.has(e)&&vt.delete(e),e.shadowRoot&&vt.has(e.shadowRoot)&&vt.delete(e.shadowRoot)},N=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$watchers$=e.$watchers$;const a=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){dn(this,r)},connectedCallback(){this.__hasHostListenerAttached||(Te(this),this.__hasHostListenerAttached=!0),Gn(this),a&&a.call(this)},disconnectedCallback(){Vn(this),n&&n.call(this),se.raf(()=>{var o;const s=Te(this);((o=s==null?void 0:s.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!s.$vnode$.$elm$.isConnected&&delete s.$vnode$,this instanceof Node&&!this.isConnected&&fn(this)})},__attachShadow(){this.shadowRoot=this}}),e.is=r.$tagName$,Hn(e,r)},Jt=(e,t)=>t,qn=Object.defineProperty,Yn=(e,t,r)=>t in e?qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oa=(e,t,r)=>Yn(e,typeof t!="symbol"?t+"":t,r),_e=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(_e||{});class Kn{constructor(t){oa(this,"logLevel"),oa(this,"logFormatter"),this.logLevel=t.logLevel||1,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,r){return`[${_e[t]}] ${new Date().toISOString()}: ${r}`}debug(t){this.logLevel<=0&&console.log(this.logFormatter(0,t))}info(t){this.logLevel<=1&&console.info(this.logFormatter(1,t))}warn(t){this.logLevel<=2&&console.warn(this.logFormatter(2,t))}error(t){this.logLevel<=3&&console.error(this.logFormatter(3,t))}log(t,r){switch(t){case 0:this.debug(r);break;case 1:this.info(r);break;case 2:this.warn(r);break;case 3:this.error(r);break}}}function Ae(e,t,r,a){return new(r||(r=Promise))(function(n,o){function s(l){try{u(a.next(l))}catch(i){o(i)}}function c(l){try{u(a.throw(l))}catch(i){o(i)}}function u(l){var i;l.done?n(l.value):(i=l.value,i instanceof r?i:new r(function(p){p(i)})).then(s,c)}u((a=a.apply(e,[])).next())})}function Ie(e,t){var r,a,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||i[0]!==6&&i[0]!==2)){s=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(i[0]===6&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(p){i=[6,p],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([u,l])}}}var Rt={exclude:[]},Xn={},de=function(e,t){typeof window<"u"&&(Xn[e]=t)};function Pt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var Y=new Uint32Array([597399067,2869860233,951274213,2716044179]);function ue(e,t){return e<<t|e>>>32-t}function ia(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var a=new Uint32Array([t,t,t,t]);(function(o,s){for(var c=o.byteLength/16|0,u=new Uint32Array(o,0,4*c),l=0;l<c;l++){var i=u.subarray(4*l,4*(l+1));i[0]=Math.imul(i[0],Y[0]),i[0]=ue(i[0],15),i[0]=Math.imul(i[0],Y[1]),s[0]=s[0]^i[0],s[0]=ue(s[0],19),s[0]=s[0]+s[1],s[0]=Math.imul(s[0],5)+1444728091,i[1]=Math.imul(i[1],Y[1]),i[1]=ue(i[1],16),i[1]=Math.imul(i[1],Y[2]),s[1]=s[1]^i[1],s[1]=ue(s[1],17),s[1]=s[1]+s[2],s[1]=Math.imul(s[1],5)+197830471,i[2]=Math.imul(i[2],Y[2]),i[2]=ue(i[2],17),i[2]=Math.imul(i[2],Y[3]),s[2]=s[2]^i[2],s[2]=ue(s[2],15),s[2]=s[2]+s[3],s[2]=Math.imul(s[2],5)+2530024501,i[3]=Math.imul(i[3],Y[3]),i[3]=ue(i[3],18),i[3]=Math.imul(i[3],Y[0]),s[3]=s[3]^i[3],s[3]=ue(s[3],13),s[3]=s[3]+s[0],s[3]=Math.imul(s[3],5)+850148119}})(e,a),function(o,s){var c=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),i=new Uint8Array(o,16*c,u);switch(u){case 15:l[3]=l[3]^i[14]<<16;case 14:l[3]=l[3]^i[13]<<8;case 13:l[3]=l[3]^i[12]<<0,l[3]=Math.imul(l[3],Y[3]),l[3]=ue(l[3],18),l[3]=Math.imul(l[3],Y[0]),s[3]=s[3]^l[3];case 12:l[2]=l[2]^i[11]<<24;case 11:l[2]=l[2]^i[10]<<16;case 10:l[2]=l[2]^i[9]<<8;case 9:l[2]=l[2]^i[8]<<0,l[2]=Math.imul(l[2],Y[2]),l[2]=ue(l[2],17),l[2]=Math.imul(l[2],Y[3]),s[2]=s[2]^l[2];case 8:l[1]=l[1]^i[7]<<24;case 7:l[1]=l[1]^i[6]<<16;case 6:l[1]=l[1]^i[5]<<8;case 5:l[1]=l[1]^i[4]<<0,l[1]=Math.imul(l[1],Y[1]),l[1]=ue(l[1],16),l[1]=Math.imul(l[1],Y[2]),s[1]=s[1]^l[1];case 4:l[0]=l[0]^i[3]<<24;case 3:l[0]=l[0]^i[2]<<16;case 2:l[0]=l[0]^i[1]<<8;case 1:l[0]=l[0]^i[0]<<0,l[0]=Math.imul(l[0],Y[0]),l[0]=ue(l[0],15),l[0]=Math.imul(l[0],Y[1]),s[0]=s[0]^l[0]}}(e,a),function(o,s){s[0]=s[0]^o.byteLength,s[1]=s[1]^o.byteLength,s[2]=s[2]^o.byteLength,s[3]=s[3]^o.byteLength,s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0,s[0]=Pt(s[0]),s[1]=Pt(s[1]),s[2]=Pt(s[2]),s[3]=Pt(s[3]),s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0}(e,a);var n=new Uint8Array(a.buffer);return Array.from(n).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Qn(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function ca(e,t,r){for(var a=[],n=0;n<e[0].data.length;n++){for(var o=[],s=0;s<e.length;s++)o.push(e[s].data[n]);a.push(Jn(o))}var c=new Uint8ClampedArray(a);return new ImageData(c,t,r)}function Jn(e){if(e.length===0)return 0;for(var t={},r=0,a=e;r<a.length;r++)t[o=a[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function tt(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,a=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<a.length;r++){var n=a[r],o=e.match(n);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}de("audio",function(){return Ae(this,void 0,void 0,function(){return Ie(this,function(e){return[2,new Promise(function(t,r){try{var a=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=a.createBufferSource(),o=a.createOscillator();o.frequency.value=1e3;var s,c=a.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(a.destination),o.start(),a.oncomplete=function(u){s=u.renderedBuffer.getChannelData(0),t({sampleHash:Qn(s),oscillator:o.type,maxChannels:a.destination.maxChannelCount,channelCountMode:n.channelCountMode})},a.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),r(u)}})]})})});var Zn=tt().name!=="SamsungBrowser"?1:3,la=280,ua=20;tt().name!="Firefox"&&de("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:Zn},function(){return function(){var r=document.createElement("canvas"),a=r.getContext("2d");if(!a)return new ImageData(1,1);r.width=la,r.height=ua;var n=a.createLinearGradient(0,0,r.width,r.height);n.addColorStop(0,"red"),n.addColorStop(.16666666666666666,"orange"),n.addColorStop(.3333333333333333,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(.6666666666666666,"blue"),n.addColorStop(.8333333333333334,"indigo"),n.addColorStop(1,"violet"),a.fillStyle=n,a.fillRect(0,0,r.width,r.height);var o="Random Text WMwmil10Oo";a.font="23.123px Arial",a.fillStyle="black",a.fillText(o,-5,15),a.fillStyle="rgba(0, 0, 255, 0.5)",a.fillText(o,-3.3,17.7),a.beginPath(),a.moveTo(0,0),a.lineTo(2*r.width/7,r.height),a.strokeStyle="white",a.lineWidth=2,a.stroke();var s=a.getImageData(0,0,r.width,r.height);return s}()});e({commonImageDataHash:ia(ca(t,la,ua).data.toString()).toString()})})});var Zt,eo=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],to=["monospace","sans-serif","serif"];function ha(e,t){if(!e)throw new Error("Canvas context not supported");return e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function ro(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var a=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:a,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!a.length){var s=r.getExtension("WEBGL_debug_renderer_info");if(s){var c=(r.getParameter(s.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(s.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function ao(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function so(e,t){var r={};return t.forEach(function(a){var n=function(o){if(o.length===0)return null;var s={};o.forEach(function(l){var i=String(l);s[i]=(s[i]||0)+1});var c=o[0],u=1;return Object.keys(s).forEach(function(l){s[l]>u&&(c=l,u=s[l])}),c}(e.map(function(o){return a in o?o[a]:void 0}).filter(function(o){return o!==void 0}));n&&(r[a]=n)}),r}function no(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(r){t[r].forEach(function(a){matchMedia("(".concat(r,": ").concat(a,")")).matches&&e.push("".concat(r,": ").concat(a))})}),e}function oo(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}tt().name!="Firefox"&&de("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(a){var n;Ae(this,void 0,void 0,function(){var o,s,c;return Ie(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(p){return setTimeout(p,l,i)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(s=o.style).setProperty("position","fixed"),s.setProperty("display","block","important"),s.setProperty("visibility","visible"),s.setProperty("border","0"),s.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(c=o.contentDocument||((n=o.contentWindow)===null||n===void 0?void 0:n.document)))throw new Error("Iframe document is not accessible");return a({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,i})})})(function(a){var n=a.iframe;return Ae(e,void 0,void 0,function(){var o,s,c,u;return Ie(this,function(l){return o=n.createElement("canvas"),s=o.getContext("2d"),c=to.map(function(i){return ha(s,i)}),u={},eo.forEach(function(i){var p=ha(s,i);c.includes(p)||(u[i]=p)}),t(u),[2]})})})}catch{r({error:"unsupported"})}})}),de("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,a=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:ro(),architecture:ao(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:a.jsHeapSizeLimit||0})})}),de("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),de("permissions",function(){return Ae(this,void 0,void 0,function(){var e;return Ie(this,function(t){return Zt=(Rt==null?void 0:Rt.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(Rt==null?void 0:Rt.retries)||3},function(){return function(){return Ae(this,void 0,void 0,function(){var r,a,n,o,s;return Ie(this,function(c){switch(c.label){case 0:r={},a=0,n=Zt,c.label=1;case 1:if(!(a<n.length))return[3,6];o=n[a],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return s=c.sent(),r[o]=s.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return a++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return so(r,Zt)})]})})}),de("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(a){a({plugins:e})})}),de("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:no()})})}),de("system",function(){return new Promise(function(e){var t=tt();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:oo()})})});var Z,io=tt().name!=="SamsungBrowser"?1:3,E=null;de("webgl",function(){return Ae(this,void 0,void 0,function(){var e;return Ie(this,function(t){typeof document<"u"&&((Z=document.createElement("canvas")).width=200,Z.height=100,E=Z.getContext("webgl"));try{if(!E)throw new Error("WebGL not supported");return e=Array.from({length:io},function(){return function(){try{if(!E)throw new Error("WebGL not supported");var r=`
12
+ attribute vec2 position;
13
+ void main() {
14
+ gl_Position = vec4(position, 0.0, 1.0);
15
+ }
16
+ `,a=`
17
+ precision mediump float;
18
+ void main() {
19
+ gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
20
+ }
21
+ `,n=E.createShader(E.VERTEX_SHADER),o=E.createShader(E.FRAGMENT_SHADER);if(!n||!o)throw new Error("Failed to create shaders");if(E.shaderSource(n,r),E.shaderSource(o,a),E.compileShader(n),!E.getShaderParameter(n,E.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+E.getShaderInfoLog(n));if(E.compileShader(o),!E.getShaderParameter(o,E.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+E.getShaderInfoLog(o));var s=E.createProgram();if(!s)throw new Error("Failed to create shader program");if(E.attachShader(s,n),E.attachShader(s,o),E.linkProgram(s),!E.getProgramParameter(s,E.LINK_STATUS))throw new Error("Shader program linking failed: "+E.getProgramInfoLog(s));E.useProgram(s);for(var c=137,u=new Float32Array(4*c),l=2*Math.PI/c,i=0;i<c;i++){var p=i*l;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(Z.width/2),u[4*i+3]=Math.sin(p)*(Z.height/2)}var g=E.createBuffer();E.bindBuffer(E.ARRAY_BUFFER,g),E.bufferData(E.ARRAY_BUFFER,u,E.STATIC_DRAW);var S=E.getAttribLocation(s,"position");E.enableVertexAttribArray(S),E.vertexAttribPointer(S,2,E.FLOAT,!1,0,0),E.viewport(0,0,Z.width,Z.height),E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT),E.drawArrays(E.LINES,0,2*c);var P=new Uint8ClampedArray(Z.width*Z.height*4);return E.readPixels(0,0,Z.width,Z.height,E.RGBA,E.UNSIGNED_BYTE,P),new ImageData(P,Z.width,Z.height)}catch{return new ImageData(1,1)}finally{E&&(E.bindBuffer(E.ARRAY_BUFFER,null),E.useProgram(null),E.viewport(0,0,E.drawingBufferWidth,E.drawingBufferHeight),E.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:ia(ca(e,Z.width,Z.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var Me=function(e,t,r,a){for(var n=(r-t)/a,o=0,s=0;s<a;s++)o+=e(t+(s+.5)*n);return o*n};de("math",function(){return Ae(void 0,void 0,void 0,function(){return Ie(this,function(e){return[2,{acos:Math.acos(.5),asin:Me(Math.asin,-1,1,97),atan:Me(Math.atan,-1,1,97),cos:Me(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:Me(Math.sin,-Math.PI,Math.PI,97),sinh:Me(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:Me(Math.tan,0,2*Math.PI,97),tanh:Me(Math.tanh,-9/7,7/9,97)}]})})});var fa={},er={};const da=e=>{let t;const r=new Set,a=(l,i)=>{const p=typeof l=="function"?l(t):l;if(!Object.is(p,t)){const g=t;t=i??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(S=>S(t,g))}},n=()=>t,c={setState:a,getState:n,getInitialState:()=>u,subscribe:l=>(r.add(l),()=>r.delete(l))},u=t=e(a,n,c);return c},co=e=>e?da(e):da;er.createStore=co;var tr={},pa={exports:{}},R={};/**
22
+ * @license React
23
+ * react.production.js
24
+ *
25
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */var rr=Symbol.for("react.transitional.element"),lo=Symbol.for("react.portal"),uo=Symbol.for("react.fragment"),ho=Symbol.for("react.strict_mode"),fo=Symbol.for("react.profiler"),po=Symbol.for("react.consumer"),mo=Symbol.for("react.context"),go=Symbol.for("react.forward_ref"),bo=Symbol.for("react.suspense"),vo=Symbol.for("react.memo"),ma=Symbol.for("react.lazy"),ga=Symbol.iterator;function yo(e){return e===null||typeof e!="object"?null:(e=ga&&e[ga]||e["@@iterator"],typeof e=="function"?e:null)}var ba={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},va=Object.assign,ya={};function Be(e,t,r){this.props=e,this.context=t,this.refs=ya,this.updater=r||ba}Be.prototype.isReactComponent={},Be.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")},Be.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sa(){}Sa.prototype=Be.prototype;function ar(e,t,r){this.props=e,this.context=t,this.refs=ya,this.updater=r||ba}var sr=ar.prototype=new Sa;sr.constructor=ar,va(sr,Be.prototype),sr.isPureReactComponent=!0;var wa=Array.isArray,I={H:null,A:null,T:null,S:null},Ea=Object.prototype.hasOwnProperty;function nr(e,t,r,a,n,o){return r=o.ref,{$$typeof:rr,type:e,key:t,ref:r!==void 0?r:null,props:o}}function So(e,t){return nr(e.type,t,void 0,void 0,void 0,e.props)}function or(e){return typeof e=="object"&&e!==null&&e.$$typeof===rr}function wo(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ra=/\/+/g;function ir(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wo(""+e.key):t.toString(36)}function Pa(){}function Eo(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Pa,Pa):(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 je(e,t,r,a,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case rr:case lo:s=!0;break;case ma:return s=e._init,je(s(e._payload),t,r,a,n)}}if(s)return n=n(e),s=a===""?"."+ir(e,0):a,wa(n)?(r="",s!=null&&(r=s.replace(Ra,"$&/")+"/"),je(n,t,r,"",function(l){return l})):n!=null&&(or(n)&&(n=So(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(Ra,"$&/")+"/")+s)),t.push(n)),1;s=0;var c=a===""?".":a+":";if(wa(e))for(var u=0;u<e.length;u++)a=e[u],o=c+ir(a,u),s+=je(a,t,r,o,n);else if(u=yo(e),typeof u=="function")for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,o=c+ir(a,u++),s+=je(a,t,r,o,n);else if(o==="object"){if(typeof e.then=="function")return je(Eo(e),t,r,a,n);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 s}function kt(e,t,r){if(e==null)return e;var a=[],n=0;return je(e,a,"","",function(o){return t.call(r,o,n++)}),a}function Ro(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 ka=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 Po(){}R.Children={map:kt,forEach:function(e,t,r){kt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return kt(e,function(){t++}),t},toArray:function(e){return kt(e,function(t){return t})||[]},only:function(e){if(!or(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},R.Component=Be,R.Fragment=uo,R.Profiler=fo,R.PureComponent=ar,R.StrictMode=ho,R.Suspense=bo,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,R.act=function(){throw Error("act(...) is not supported in production builds of React.")},R.cache=function(e){return function(){return e.apply(null,arguments)}},R.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=va({},e.props),n=e.key,o=void 0;if(t!=null)for(s in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(n=""+t.key),t)!Ea.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];a.children=c}return nr(e.type,n,void 0,void 0,o,a)},R.createContext=function(e){return e={$$typeof:mo,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:po,_context:e},e},R.createElement=function(e,t,r){var a,n={},o=null;if(t!=null)for(a in t.key!==void 0&&(o=""+t.key),t)Ea.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(n[a]=t[a]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];n.children=c}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)n[a]===void 0&&(n[a]=s[a]);return nr(e,o,void 0,void 0,null,n)},R.createRef=function(){return{current:null}},R.forwardRef=function(e){return{$$typeof:go,render:e}},R.isValidElement=or,R.lazy=function(e){return{$$typeof:ma,_payload:{_status:-1,_result:e},_init:Ro}},R.memo=function(e,t){return{$$typeof:vo,type:e,compare:t===void 0?null:t}},R.startTransition=function(e){var t=I.T,r={};I.T=r;try{var a=e(),n=I.S;n!==null&&n(r,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(Po,ka)}catch(o){ka(o)}finally{I.T=t}},R.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},R.use=function(e){return I.H.use(e)},R.useActionState=function(e,t,r){return I.H.useActionState(e,t,r)},R.useCallback=function(e,t){return I.H.useCallback(e,t)},R.useContext=function(e){return I.H.useContext(e)},R.useDebugValue=function(){},R.useDeferredValue=function(e,t){return I.H.useDeferredValue(e,t)},R.useEffect=function(e,t){return I.H.useEffect(e,t)},R.useId=function(){return I.H.useId()},R.useImperativeHandle=function(e,t,r){return I.H.useImperativeHandle(e,t,r)},R.useInsertionEffect=function(e,t){return I.H.useInsertionEffect(e,t)},R.useLayoutEffect=function(e,t){return I.H.useLayoutEffect(e,t)},R.useMemo=function(e,t){return I.H.useMemo(e,t)},R.useOptimistic=function(e,t){return I.H.useOptimistic(e,t)},R.useReducer=function(e,t,r){return I.H.useReducer(e,t,r)},R.useRef=function(e){return I.H.useRef(e)},R.useState=function(e){return I.H.useState(e)},R.useSyncExternalStore=function(e,t,r){return I.H.useSyncExternalStore(e,t,r)},R.useTransition=function(){return I.H.useTransition()},R.version="19.0.0",pa.exports=R;var Ta=pa.exports,ko=er;const To=e=>e;function Ca(e,t=To){const r=Ta.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return Ta.useDebugValue(r),r}const xa=e=>{const t=ko.createStore(e),r=a=>Ca(t,a);return Object.assign(r,t),r},Co=e=>e?xa(e):xa;tr.create=Co,tr.useStore=Ca,function(e){var t=er,r=tr;Object.keys(t).forEach(function(a){a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})}),Object.keys(r).forEach(function(a){a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})})}(fa);const xo={adClientResponseItems:[],core:void 0,logger:void 0,facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,searchTerm:"",rangeValueForIndexFields:{},searchMode:"fuzzy",searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:"asc"},_=fa.createStore((e,t)=>{const r={addFacetPathsForIndexField:n=>e(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[n.fieldName]:n}})),addRangeValueForIndexField:n=>e(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[n.fieldName]:n}})),getSearchcraftInstance:()=>{const{core:n}=t();return n},initialize:(n,o=!1)=>{const s=n,c=o?new Kn({logLevel:_e.DEBUG}):void 0;e({core:s,logger:c,searchResultsPerPage:s.config.searchResultsPerPage||20})},removeFacetPathsForIndexField:n=>e(o=>{const s=o.facetPathsForIndexFields;return delete s[n],{facetPathsForIndexFields:{...s}}}),removeRangeValueForIndexField:n=>e(o=>{const s=o.rangeValueForIndexFields;return delete s[n],{rangeValueForIndexFields:{...s}}}),resetFacetPaths:()=>{e({facetPathsForIndexFields:{}})},search:async()=>{var c,u;const n=t();if((c=n.logger)==null||c.log(_e.INFO,`Starting search with search term: "${n.searchTerm}"`),!n.core)throw new Error("Searchcraft instance is not initialized.");if(!n.searchTerm.trim()){(u=n.logger)==null||u.log(_e.INFO,"No search request was made: search term was empty."),e({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}e({isSearchInProgress:!0});const o=(l,i)=>{var g,S;const p=l.data.facets;e(P=>({isSearchInProgress:!1,searchClientResponseItems:i,searchResponseTimeTaken:l.data.time_taken||0,searchResultsPage:l.data.count===P.searchResultsCount?P.searchResultsPage:1,searchResultsCount:l.data.count||0})),p&&e({searchResponseFacetPrime:p}),(g=n.logger)==null||g.log(_e.DEBUG,`Search results: ${JSON.stringify(i)}`),(S=n.logger)==null||S.log(_e.DEBUG,`Facets from response: ${JSON.stringify(p)}`)},s=l=>{e({adClientResponseItems:l})};n.core.getItems({searchTerm:n.searchTerm,mode:n.searchMode,sort:n.sortType,facetPathsForIndexFields:n.facetPathsForIndexFields,rangeValueForIndexFields:n.rangeValueForIndexFields,offset:n.searchResultsPerPage?n.searchResultsPerPage*(n.searchResultsPage-1):0,limit:n.searchResultsPerPage},o,s)},setPopoverVisibility:n=>{e({isPopoverVisible:n})},setSearchMode:n=>e({searchMode:n}),setSortType:n=>e({sortType:n}),setSearchTerm:n=>{const{core:o}=t();o&&n.length===0&&o.emitEvent("input_cleared",{name:"input_cleared"}),e({searchTerm:n,facetPathsForIndexFields:{},...n.trim().length===0&&{searchMode:"fuzzy",sortType:"asc"}})},setSearchClientResponseItems:n=>e({searchClientResponseItems:n}),setSearchResultsPage:async n=>{e({searchResultsPage:n}),await r.search()},setSearchResultsPerPage:async n=>{e({searchResultsPerPage:n}),await r.search()}};return{...xo,...r}});var $o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a={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,a){e.exports=a()})($o,function(){const{entries:r,setPrototypeOf:a,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:c,seal:u,create:l}=Object,{apply:i,construct:p}=typeof Reflect<"u"&&Reflect;c||(c=function(v){return v}),u||(u=function(v){return v}),i||(i=function(v,x,C){return v.apply(x,C)}),p||(p=function(v,x){return new v(...x)});const g=ee(Array.prototype.forEach),S=ee(Array.prototype.lastIndexOf),P=ee(Array.prototype.pop),U=ee(Array.prototype.push),pe=ee(Array.prototype.splice),K=ee(String.prototype.toLowerCase),$=ee(String.prototype.toString),Ee=ee(String.prototype.match),ce=ee(String.prototype.replace),Le=ee(String.prototype.indexOf),z=ee(String.prototype.trim),ne=ee(Object.prototype.hasOwnProperty),H=ee(RegExp.prototype.test),Oe=tc(TypeError);function ee(T){return function(v){for(var x=arguments.length,C=new Array(x>1?x-1:0),X=1;X<x;X++)C[X-1]=arguments[X];return i(T,v,C)}}function tc(T){return function(){for(var v=arguments.length,x=new Array(v),C=0;C<v;C++)x[C]=arguments[C];return p(T,x)}}function k(T,v){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:K;a&&a(T,null);let C=v.length;for(;C--;){let X=v[C];if(typeof X=="string"){const Re=x(X);Re!==X&&(n(v)||(v[C]=Re),X=Re)}T[X]=!0}return T}function rc(T){for(let v=0;v<T.length;v++)ne(T,v)||(T[v]=null);return T}function Fe(T){const v=l(null);for(const[x,C]of r(T))ne(T,x)&&(Array.isArray(C)?v[x]=rc(C):C&&typeof C=="object"&&C.constructor===Object?v[x]=Fe(C):v[x]=C);return v}function st(T,v){for(;T!==null;){const C=s(T,v);if(C){if(C.get)return ee(C.get);if(typeof C.value=="function")return ee(C.value)}T=o(T)}function x(){return null}return x}const Ka=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"]),fr=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"]),dr=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"]),ac=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"]),pr=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"]),sc=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xa=c(["#text"]),Qa=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"]),mr=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"]),Ja=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"]),$t=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nc=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),oc=u(/<%[\w\W]*|[\w\W]*%>/gm),ic=u(/\$\{[\w\W]*/gm),cc=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),lc=u(/^aria-[\-\w]+$/),Za=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uc=u(/^(?:\w+script|data):/i),hc=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),es=u(/^html$/i),fc=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var ts=Object.freeze({__proto__:null,ARIA_ATTR:lc,ATTR_WHITESPACE:hc,CUSTOM_ELEMENT:fc,DATA_ATTR:cc,DOCTYPE_NAME:es,ERB_EXPR:oc,IS_ALLOWED_URI:Za,IS_SCRIPT_OR_DATA:uc,MUSTACHE_EXPR:nc,TMPLIT_EXPR:ic});const nt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},dc=function(){return typeof window>"u"?null:window},pc=function(v,x){if(typeof v!="object"||typeof v.createPolicy!="function")return null;let C=null;const X="data-tt-policy-suffix";x&&x.hasAttribute(X)&&(C=x.getAttribute(X));const Re="dompurify"+(C?"#"+C:"");try{return v.createPolicy(Re,{createHTML(Ge){return Ge},createScriptURL(Ge){return Ge}})}catch{return console.warn("TrustedTypes policy "+Re+" could not be created."),null}},rs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function as(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dc();const v=y=>as(y);if(v.version="3.2.4",v.removed=[],!T||!T.document||T.document.nodeType!==nt.document||!T.Element)return v.isSupported=!1,v;let{document:x}=T;const C=x,X=C.currentScript,{DocumentFragment:Re,HTMLTemplateElement:Ge,Node:gr,Element:ss,NodeFilter:ot,NamedNodeMap:gc=T.NamedNodeMap||T.MozNamedAttrMap,HTMLFormElement:bc,DOMParser:vc,trustedTypes:_t}=T,it=ss.prototype,yc=st(it,"cloneNode"),Sc=st(it,"remove"),wc=st(it,"nextSibling"),Ec=st(it,"childNodes"),At=st(it,"parentNode");if(typeof Ge=="function"){const y=x.createElement("template");y.content&&y.content.ownerDocument&&(x=y.content.ownerDocument)}let te,ct="";const{implementation:br,createNodeIterator:Rc,createDocumentFragment:Pc,getElementsByTagName:kc}=x,{importNode:Tc}=C;let re=rs();v.isSupported=typeof r=="function"&&typeof At=="function"&&br&&br.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:vr,ERB_EXPR:yr,TMPLIT_EXPR:Sr,DATA_ATTR:Cc,ARIA_ATTR:xc,IS_SCRIPT_OR_DATA:$c,ATTR_WHITESPACE:ns,CUSTOM_ELEMENT:_c}=ts;let{IS_ALLOWED_URI:os}=ts,B=null;const is=k({},[...Ka,...fr,...dr,...pr,...Xa]);let W=null;const cs=k({},[...Qa,...mr,...Ja,...$t]);let O=Object.seal(l(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}})),lt=null,wr=null,ls=!0,Er=!0,us=!1,hs=!0,We=!1,Rr=!0,De=!1,Pr=!1,kr=!1,Ve=!1,It=!1,Mt=!1,fs=!0,ds=!1;const Ac="user-content-";let Tr=!0,ut=!1,qe={},Ye=null;const ps=k({},["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 ms=null;const gs=k({},["audio","video","img","source","image","track"]);let Cr=null;const bs=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",Ot="http://www.w3.org/2000/svg",Pe="http://www.w3.org/1999/xhtml";let Ke=Pe,xr=!1,$r=null;const Ic=k({},[Lt,Ot,Pe],$);let Ft=k({},["mi","mo","mn","ms","mtext"]),Dt=k({},["annotation-xml"]);const Mc=k({},["title","style","font","a","script"]);let ht=null;const Lc=["application/xhtml+xml","text/html"],Oc="text/html";let j=null,Xe=null;const Fc=x.createElement("form"),vs=function(f){return f instanceof RegExp||f instanceof Function},_r=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xe&&Xe===f)){if((!f||typeof f!="object")&&(f={}),f=Fe(f),ht=Lc.indexOf(f.PARSER_MEDIA_TYPE)===-1?Oc:f.PARSER_MEDIA_TYPE,j=ht==="application/xhtml+xml"?$:K,B=ne(f,"ALLOWED_TAGS")?k({},f.ALLOWED_TAGS,j):is,W=ne(f,"ALLOWED_ATTR")?k({},f.ALLOWED_ATTR,j):cs,$r=ne(f,"ALLOWED_NAMESPACES")?k({},f.ALLOWED_NAMESPACES,$):Ic,Cr=ne(f,"ADD_URI_SAFE_ATTR")?k(Fe(bs),f.ADD_URI_SAFE_ATTR,j):bs,ms=ne(f,"ADD_DATA_URI_TAGS")?k(Fe(gs),f.ADD_DATA_URI_TAGS,j):gs,Ye=ne(f,"FORBID_CONTENTS")?k({},f.FORBID_CONTENTS,j):ps,lt=ne(f,"FORBID_TAGS")?k({},f.FORBID_TAGS,j):{},wr=ne(f,"FORBID_ATTR")?k({},f.FORBID_ATTR,j):{},qe=ne(f,"USE_PROFILES")?f.USE_PROFILES:!1,ls=f.ALLOW_ARIA_ATTR!==!1,Er=f.ALLOW_DATA_ATTR!==!1,us=f.ALLOW_UNKNOWN_PROTOCOLS||!1,hs=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,We=f.SAFE_FOR_TEMPLATES||!1,Rr=f.SAFE_FOR_XML!==!1,De=f.WHOLE_DOCUMENT||!1,Ve=f.RETURN_DOM||!1,It=f.RETURN_DOM_FRAGMENT||!1,Mt=f.RETURN_TRUSTED_TYPE||!1,kr=f.FORCE_BODY||!1,fs=f.SANITIZE_DOM!==!1,ds=f.SANITIZE_NAMED_PROPS||!1,Tr=f.KEEP_CONTENT!==!1,ut=f.IN_PLACE||!1,os=f.ALLOWED_URI_REGEXP||Za,Ke=f.NAMESPACE||Pe,Ft=f.MATHML_TEXT_INTEGRATION_POINTS||Ft,Dt=f.HTML_INTEGRATION_POINTS||Dt,O=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&vs(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&vs(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),We&&(Er=!1),It&&(Ve=!0),qe&&(B=k({},Xa),W=[],qe.html===!0&&(k(B,Ka),k(W,Qa)),qe.svg===!0&&(k(B,fr),k(W,mr),k(W,$t)),qe.svgFilters===!0&&(k(B,dr),k(W,mr),k(W,$t)),qe.mathMl===!0&&(k(B,pr),k(W,Ja),k(W,$t))),f.ADD_TAGS&&(B===is&&(B=Fe(B)),k(B,f.ADD_TAGS,j)),f.ADD_ATTR&&(W===cs&&(W=Fe(W)),k(W,f.ADD_ATTR,j)),f.ADD_URI_SAFE_ATTR&&k(Cr,f.ADD_URI_SAFE_ATTR,j),f.FORBID_CONTENTS&&(Ye===ps&&(Ye=Fe(Ye)),k(Ye,f.FORBID_CONTENTS,j)),Tr&&(B["#text"]=!0),De&&k(B,["html","head","body"]),B.table&&(k(B,["tbody"]),delete lt.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw Oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');te=f.TRUSTED_TYPES_POLICY,ct=te.createHTML("")}else te===void 0&&(te=pc(_t,X)),te!==null&&typeof ct=="string"&&(ct=te.createHTML(""));c&&c(f),Xe=f}},ys=k({},[...fr,...dr,...ac]),Ss=k({},[...pr,...sc]),Dc=function(f){let m=At(f);(!m||!m.tagName)&&(m={namespaceURI:Ke,tagName:"template"});const b=K(f.tagName),A=K(m.tagName);return $r[f.namespaceURI]?f.namespaceURI===Ot?m.namespaceURI===Pe?b==="svg":m.namespaceURI===Lt?b==="svg"&&(A==="annotation-xml"||Ft[A]):!!ys[b]:f.namespaceURI===Lt?m.namespaceURI===Pe?b==="math":m.namespaceURI===Ot?b==="math"&&Dt[A]:!!Ss[b]:f.namespaceURI===Pe?m.namespaceURI===Ot&&!Dt[A]||m.namespaceURI===Lt&&!Ft[A]?!1:!Ss[b]&&(Mc[b]||!ys[b]):!!(ht==="application/xhtml+xml"&&$r[f.namespaceURI]):!1},me=function(f){U(v.removed,{element:f});try{At(f).removeChild(f)}catch{Sc(f)}},Nt=function(f,m){try{U(v.removed,{attribute:m.getAttributeNode(f),from:m})}catch{U(v.removed,{attribute:null,from:m})}if(m.removeAttribute(f),f==="is")if(Ve||It)try{me(m)}catch{}else try{m.setAttribute(f,"")}catch{}},ws=function(f){let m=null,b=null;if(kr)f="<remove></remove>"+f;else{const V=Ee(f,/^[\r\n\t ]+/);b=V&&V[0]}ht==="application/xhtml+xml"&&Ke===Pe&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const A=te?te.createHTML(f):f;if(Ke===Pe)try{m=new vc().parseFromString(A,ht)}catch{}if(!m||!m.documentElement){m=br.createDocument(Ke,"template",null);try{m.documentElement.innerHTML=xr?ct:A}catch{}}const Q=m.body||m.documentElement;return f&&b&&Q.insertBefore(x.createTextNode(b),Q.childNodes[0]||null),Ke===Pe?kc.call(m,De?"html":"body")[0]:De?m.documentElement:Q},Es=function(f){return Rc.call(f.ownerDocument||f,f,ot.SHOW_ELEMENT|ot.SHOW_COMMENT|ot.SHOW_TEXT|ot.SHOW_PROCESSING_INSTRUCTION|ot.SHOW_CDATA_SECTION,null)},Ar=function(f){return f instanceof bc&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof gc)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},Rs=function(f){return typeof gr=="function"&&f instanceof gr};function ke(y,f,m){g(y,b=>{b.call(v,f,m,Xe)})}const Ps=function(f){let m=null;if(ke(re.beforeSanitizeElements,f,null),Ar(f))return me(f),!0;const b=j(f.nodeName);if(ke(re.uponSanitizeElement,f,{tagName:b,allowedTags:B}),f.hasChildNodes()&&!Rs(f.firstElementChild)&&H(/<[/\w]/g,f.innerHTML)&&H(/<[/\w]/g,f.textContent)||f.nodeType===nt.progressingInstruction||Rr&&f.nodeType===nt.comment&&H(/<[/\w]/g,f.data))return me(f),!0;if(!B[b]||lt[b]){if(!lt[b]&&Ts(b)&&(O.tagNameCheck instanceof RegExp&&H(O.tagNameCheck,b)||O.tagNameCheck instanceof Function&&O.tagNameCheck(b)))return!1;if(Tr&&!Ye[b]){const A=At(f)||f.parentNode,Q=Ec(f)||f.childNodes;if(Q&&A){const V=Q.length;for(let oe=V-1;oe>=0;--oe){const ge=yc(Q[oe],!0);ge.__removalCount=(f.__removalCount||0)+1,A.insertBefore(ge,wc(f))}}}return me(f),!0}return f instanceof ss&&!Dc(f)||(b==="noscript"||b==="noembed"||b==="noframes")&&H(/<\/no(script|embed|frames)/i,f.innerHTML)?(me(f),!0):(We&&f.nodeType===nt.text&&(m=f.textContent,g([vr,yr,Sr],A=>{m=ce(m,A," ")}),f.textContent!==m&&(U(v.removed,{element:f.cloneNode()}),f.textContent=m)),ke(re.afterSanitizeElements,f,null),!1)},ks=function(f,m,b){if(fs&&(m==="id"||m==="name")&&(b in x||b in Fc))return!1;if(!(Er&&!wr[m]&&H(Cc,m))){if(!(ls&&H(xc,m))){if(!W[m]||wr[m]){if(!(Ts(f)&&(O.tagNameCheck instanceof RegExp&&H(O.tagNameCheck,f)||O.tagNameCheck instanceof Function&&O.tagNameCheck(f))&&(O.attributeNameCheck instanceof RegExp&&H(O.attributeNameCheck,m)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(m))||m==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&H(O.tagNameCheck,b)||O.tagNameCheck instanceof Function&&O.tagNameCheck(b))))return!1}else if(!Cr[m]){if(!H(os,ce(b,ns,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&f!=="script"&&Le(b,"data:")===0&&ms[f])){if(!(us&&!H($c,ce(b,ns,"")))){if(b)return!1}}}}}}return!0},Ts=function(f){return f!=="annotation-xml"&&Ee(f,_c)},Cs=function(f){ke(re.beforeSanitizeAttributes,f,null);const{attributes:m}=f;if(!m||Ar(f))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let A=m.length;for(;A--;){const Q=m[A],{name:V,namespaceURI:oe,value:ge}=Q,ft=j(V);let ae=V==="value"?ge:z(ge);if(b.attrName=ft,b.attrValue=ae,b.keepAttr=!0,b.forceKeepAttr=void 0,ke(re.uponSanitizeAttribute,f,b),ae=b.attrValue,ds&&(ft==="id"||ft==="name")&&(Nt(V,f),ae=Ac+ae),Rr&&H(/((--!?|])>)|<\/(style|title)/i,ae)){Nt(V,f);continue}if(b.forceKeepAttr||(Nt(V,f),!b.keepAttr))continue;if(!hs&&H(/\/>/i,ae)){Nt(V,f);continue}We&&g([vr,yr,Sr],$s=>{ae=ce(ae,$s," ")});const xs=j(f.nodeName);if(ks(xs,ft,ae)){if(te&&typeof _t=="object"&&typeof _t.getAttributeType=="function"&&!oe)switch(_t.getAttributeType(xs,ft)){case"TrustedHTML":{ae=te.createHTML(ae);break}case"TrustedScriptURL":{ae=te.createScriptURL(ae);break}}try{oe?f.setAttributeNS(oe,V,ae):f.setAttribute(V,ae),Ar(f)?me(f):P(v.removed)}catch{}}}ke(re.afterSanitizeAttributes,f,null)},Nc=function y(f){let m=null;const b=Es(f);for(ke(re.beforeSanitizeShadowDOM,f,null);m=b.nextNode();)ke(re.uponSanitizeShadowNode,m,null),Ps(m),Cs(m),m.content instanceof Re&&y(m.content);ke(re.afterSanitizeShadowDOM,f,null)};return v.sanitize=function(y){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,A=null,Q=null;if(xr=!y,xr&&(y="<!-->"),typeof y!="string"&&!Rs(y))if(typeof y.toString=="function"){if(y=y.toString(),typeof y!="string")throw Oe("dirty is not a string, aborting")}else throw Oe("toString is not a function");if(!v.isSupported)return y;if(Pr||_r(f),v.removed=[],typeof y=="string"&&(ut=!1),ut){if(y.nodeName){const ge=j(y.nodeName);if(!B[ge]||lt[ge])throw Oe("root node is forbidden and cannot be sanitized in-place")}}else if(y instanceof gr)m=ws("<!---->"),b=m.ownerDocument.importNode(y,!0),b.nodeType===nt.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!Ve&&!We&&!De&&y.indexOf("<")===-1)return te&&Mt?te.createHTML(y):y;if(m=ws(y),!m)return Ve?null:Mt?ct:""}m&&kr&&me(m.firstChild);const V=Es(ut?y:m);for(;A=V.nextNode();)Ps(A),Cs(A),A.content instanceof Re&&Nc(A.content);if(ut)return y;if(Ve){if(It)for(Q=Pc.call(m.ownerDocument);m.firstChild;)Q.appendChild(m.firstChild);else Q=m;return(W.shadowroot||W.shadowrootmode)&&(Q=Tc.call(C,Q,!0)),Q}let oe=De?m.outerHTML:m.innerHTML;return De&&B["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&H(es,m.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
30
+ `+oe),We&&g([vr,yr,Sr],ge=>{oe=ce(oe,ge," ")}),te&&Mt?te.createHTML(oe):oe},v.setConfig=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_r(y),Pr=!0},v.clearConfig=function(){Xe=null,Pr=!1},v.isValidAttribute=function(y,f,m){Xe||_r({});const b=j(y),A=j(f);return ks(b,A,m)},v.addHook=function(y,f){typeof f=="function"&&U(re[y],f)},v.removeHook=function(y,f){if(f!==void 0){const m=S(re[y],f);return m===-1?void 0:pe(re[y],m,1)[0]}return P(re[y])},v.removeHooks=function(y){re[y]=[]},v.removeAllHooks=function(){re=rs()},v}var mc=as();return mc})})($a);const _o=$a.exports,Ao="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Io=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ao[r[e]&63];return t};const Mo=N(class extends D{constructor(){super();h(this,"adSource","Custom");h(this,"adClientResponseItem");h(this,"searchTerm");h(this,"unsubscribe",()=>{});h(this,"core");h(this,"adContainerId",Io());this.__registerHost()}connectedCallback(){var a,n,o;const r=_.getState();if(this.core=r.core,this.searchTerm=r.searchTerm,this.unsubscribe=_.subscribe(s=>{this.searchTerm=s.searchTerm}),((a=this.adClientResponseItem)==null?void 0:a.adSource)==="adMarketplace"){const s=this.adClientResponseItem;(n=s.admAd)!=null&&n.impression_url&&fetch(s.admAd.impression_url)}(o=this.core)==null||o.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm}})}disconnectedCallback(){this.unsubscribe()}renderADMAd(){const r=this.adClientResponseItem;if(r.admAd)return d("a",{class:"searchcraft-adm-ad",href:r.admAd.click_url},r.admAd.image_url&&d("div",{class:"searchcraft-adm-ad-image-wrapper"},d("img",{alt:r.admAd.term||"image",src:r.admAd.image_url,class:"searchcraft-adm-ad-image"})),d("div",{class:"searchcraft-adm-ad-info-wrapper"},d("p",{class:"searchcraft-adm-ad-title"},r.admAd.term),r.admAd.price&&d("p",{class:"searchcraft-adm-ad-subtitle"},r.admAd.price)))}renderCustomAd(){var o,s;const r=(s=(o=this.core)==null?void 0:o.config)==null?void 0:s.customAdTemplate,a=`searchcraft-custom-ad-${this.adContainerId}`;let n="<p>Custom Ad Placeholder</p>";return r&&(n=r({searchTerm:this.searchTerm,adContainerId:this.adContainerId})),d("div",{class:"searchcraft-custom-ad",id:a,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:_o.sanitize(n)})}renderNativoAd(){return d("div",{class:"searchcraft-nativo-ad"})}render(){switch(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],searchTerm:[32]}]);function Tt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,Mo);break}})}const Lo=Tt;function he(e,t){if(e&&t)return t.fieldNames.map(r=>{let a=e[r.fieldName];if(a)switch(r.dataType){case"date":{a=Oo(a);break}case"number":{a=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(a*(r.numberScale||1));break}}return a}).filter(r=>!!r).join(t.delimiter||" ")}function _a(e){switch(e){case"hour":return 36e5;case"day":return 864e5;case"month":return 2592e6;case"year":return 31536e6;default:return 36e5}}function cr(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Oo(e){const t=new Date,r=new Date(e),a=Math.floor((t.getTime()-r.getTime())/1e3),n=Math.floor(a/60),o=Math.floor(n/60),s=Math.floor(o/24),c=Math.floor(s/365);return n<60?`${n}m ago`:o<24?`${o}h ago`:s<365?`${s}d ago`:`${c}y ago`}const Fo=N(class extends D{constructor(){super();h(this,"item");h(this,"searchResultMappings");h(this,"containerTarget","_blank");h(this,"containerRel");h(this,"buttonTarget","_blank");h(this,"buttonRel");h(this,"imagePlacement","right");h(this,"customStyles");h(this,"documentPosition",0);h(this,"titleContent");h(this,"subtitleContent");h(this,"bodyContent");h(this,"footerContent");h(this,"buttonLabel");h(this,"buttonHref");h(this,"containerHref");h(this,"imageSrc");h(this,"imageAlt");h(this,"searchcraftStore",_.getState());h(this,"handleLinkClick",()=>{var a;const r=this.searchcraftStore.getSearchcraftInstance();if(r){const n=this.documentPosition,o=this.searchcraftStore.searchTerm,s=this.searchcraftStore.searchClientResponseItems.length;(a=r.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:s,search_term:o})}});h(this,"parseStyles",()=>{if(this.customStyles)try{return JSON.parse(this.customStyles)}catch(r){return console.error("Error parsing custom styles:",r),{}}return{}});this.__registerHost()}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}mapValuesFromDocument(r){var a,n,o,s,c,u,l;this.titleContent=he(r,(a=this.searchResultMappings)==null?void 0:a.title),this.subtitleContent=he(r,(n=this.searchResultMappings)==null?void 0:n.subtitle),this.bodyContent=he(r,(o=this.searchResultMappings)==null?void 0:o.body),this.containerHref=he(r,(s=this.searchResultMappings)==null?void 0:s.containerHref),this.buttonHref=he(r,(c=this.searchResultMappings)==null?void 0:c.buttonHref),this.imageSrc=he(r,(u=this.searchResultMappings)==null?void 0:u.imageSource),this.footerContent=he(r,(l=this.searchResultMappings)==null?void 0:l.footer)}render(){const r=this.parseStyles(),a=this.imageSrc&&d("img",{alt:this.imageAlt,class:"searchcraft-search-result-image",src:this.imageSrc,style:r.image||{}}),n=d(Jt,null,this.imageSrc&&this.imagePlacement==="left"&&a,d("div",{class:"searchcraft-base-search-result-content-container"},this.titleContent&&d("h2",{class:"searchcraft-base-search-result-title",style:r.title||{}},this.titleContent),this.subtitleContent&&d("h3",{class:"searchcraft-base-search-result-subtitle",style:r.subtitle||{}},this.subtitleContent),this.bodyContent&&d("p",{class:"searchcraft-base-search-result-body-content",style:r.primaryContent||{}},this.bodyContent),this.footerContent&&d("p",{class:"searchcraft-base-search-result-footer-content",style:r.secondaryContent||{}},this.footerContent),this.buttonHref&&!this.containerHref&&this.buttonLabel&&d("a",{class:"searchcraft-search-result-button",href:this.buttonHref,style:r.button||{},target:this.buttonTarget,rel:this.buttonRel},this.buttonLabel)),this.imageSrc&&this.imagePlacement==="right"&&a);return this.containerHref?d("a",{class:"searchcraft-search-result-container",onClick:this.handleLinkClick,href:this.containerHref,rel:this.containerRel,style:r.container||{},tabindex:"0",target:this.containerTarget},n):d("div",{class:"searchcraft-search-result-container",style:r.container||{}},n)}},[0,"searchcraft-base-search-result",{item:[16],searchResultMappings:[16],containerTarget:[1,"container-target"],containerRel:[1,"container-rel"],buttonTarget:[1,"button-target"],buttonRel:[1,"button-rel"],imagePlacement:[1,"image-placement"],customStyles:[1,"custom-styles"],documentPosition:[2,"document-position"],titleContent:[32],subtitleContent:[32],bodyContent:[32],footerContent:[32],buttonLabel:[32],buttonHref:[32],containerHref:[32],imageSrc:[32],imageAlt:[32]}]);function Aa(){if(typeof customElements>"u")return;["searchcraft-base-search-result"].forEach(t=>{switch(t){case"searchcraft-base-search-result":customElements.get(t)||customElements.define(t,Fo);break}})}const Do=Aa;function rt(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return console.error("Invalid customStyles format:",e),{}}return e||{}}function No(e){try{return JSON.stringify(e)}catch(t){return console.error("Error serializing styles:",t),"{}"}}const Uo=N(class extends D{constructor(){super();h(this,"errorMessage");this.__registerHost()}render(){return d("p",{key:"dc97bb66da10a98fca027f928deaaf80d945417b",class:"searchcraft-error-message"},this.errorMessage||"Search term is required.")}},[0,"searchcraft-error-message",{errorMessage:[1,"error-message"]}]);function Ct(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,Uo);break}})}const zo=N(class extends D{constructor(){super();h(this,"customStylesForResults");h(this,"searchResultMappings");h(this,"resultImagePlacement","right");h(this,"buttonLabel");h(this,"buttonTarget","_blank");h(this,"buttonRel");h(this,"containerTarget","_blank");h(this,"containerRel");h(this,"searchTerm","");h(this,"searchClientResponseItems",[]);h(this,"adClientResponseItems",[]);h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"isSearchInProgress",!1);h(this,"config");h(this,"unsubscribe",()=>{});this.__registerHost()}get serializedStyles(){let r="";return this.customStylesForResults&&(r=typeof this.customStylesForResults=="string"?this.customStylesForResults:No(this.customStylesForResults)),r}componentDidLoad(){var a;this.unsubscribe=_.subscribe(n=>this.handleStateChange(n));const r=_.getState();this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var a;this.searchClientResponseItems=[...r.searchClientResponseItems],this.adClientResponseItems=[...r.adClientResponseItems],this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.config=(a=r.core)==null?void 0:a.config,this.isSearchInProgress=r.isSearchInProgress}renderEmptyState(){return d("div",{class:"searchcraft-search-results-empty-state-container"},d("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return d("div",{class:"searchcraft-search-results-container"},d("div",{class:"searchcraft-search-results-error-message-container"},d("searchcraft-error-message",{"error-message":`No search results found for "${this.searchTerm}" query`})))}renderWithADMAds(){var r,a;return d("div",{class:"searchcraft-search-results-container"},(r=this.adClientResponseItems)==null?void 0:r.map(n=>d("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,key:n.id})),(a=this.searchClientResponseItems)==null?void 0:a.map((n,o)=>d("searchcraft-base-search-result",{key:n.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*this.searchResultsPage+o,searchResultMappings:this.searchResultMappings,item:n})))}renderWithCustomAds(){var u,l,i,p;const r=[],a=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,n=((l=this.config)==null?void 0:l.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,s=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let g=0;g<o;g++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g}-ad`}));c.forEach((g,S)=>{if(a&&S%a===0&&S+a<c.length&&S>=a)for(let P=0;P<n;P++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g.id}-ad-${P}`}));r.push(d("searchcraft-base-search-result",{key:g.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*this.searchResultsPage+S,searchResultMappings:this.searchResultMappings,item:g}))});for(let g=0;g<s;g++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g}-ad`}));return d("div",{class:"searchcraft-search-results-container"},r)}renderWithNoAds(){var r;return d("div",{class:"searchcraft-search-results-container"},(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>d("searchcraft-base-search-result",{key:a.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*this.searchResultsPage+n,searchResultMappings:this.searchResultMappings,item:a})))}render(){var r;if(this.searchTerm.trim()==="")return this.renderEmptyState();if(this.searchTerm.length>0&&this.searchClientResponseItems.length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-base-search-results",{customStylesForResults:[1,"custom-styles-for-results"],searchResultMappings:[16],resultImagePlacement:[1,"result-image-placement"],buttonLabel:[1,"button-label"],buttonTarget:[1,"button-target"],buttonRel:[1,"button-rel"],containerTarget:[1,"container-target"],containerRel:[1,"container-rel"],searchTerm:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchResultsPerPage:[32],searchResultsPage:[32],isSearchInProgress:[32],config:[32]}]);function Ho(){if(typeof customElements>"u")return;["searchcraft-base-search-results","searchcraft-ad","searchcraft-base-search-result","searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-base-search-results":customElements.get(t)||customElements.define(t,zo);break;case"searchcraft-ad":customElements.get(t)||Tt();break;case"searchcraft-base-search-result":customElements.get(t)||Aa();break;case"searchcraft-error-message":customElements.get(t)||Ct();break}})}const Bo=Ho;var Ia={exports:{}};/*!
31
+ Copyright (c) 2018 Jed Watson.
32
+ Licensed under the MIT License (MIT), see
33
+ http://jedwatson.github.io/classnames
34
+ */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",s=0;s<arguments.length;s++){var c=arguments[s];c&&(o=n(o,a(c)))}return o}function a(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 s="";for(var c in o)t.call(o,c)&&o[c]&&(s=n(s,c));return s}function n(o,s){return s?o?o+" "+s:o+s:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ia);const M=Ia.exports,jo=N(class extends D{constructor(){super();h(this,"hierarchy","primary");h(this,"disabled",!1);h(this,"icon");h(this,"iconOnly",!1);h(this,"iconPosition","left");h(this,"label","Search");h(this,"type","button");h(this,"buttonClick");h(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Ce(this,"buttonClick")}render(){return d("button",{key:"ff883b930d03da6cbfb40badd3be1de0a873f853","aria-label":this.label,class:M("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:d(Jt,null,this.iconPosition==="left"&&this.icon,d("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 xt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,jo);break}})}const Go=xt,Wo=Ct;function Ma(e,t){const r={...e};for(const a in t)t.hasOwnProperty(a)&&(t[a]instanceof Object&&e[a]instanceof Object?r[a]=Ma(e[a],t[a]):r[a]=t[a]);return r}function Vo(e){return e.filter((t,r,a)=>!a.some((n,o)=>o!==r&&n.includes(t)))}function La(e){const t={},r=a=>{var n;t[a.path]={count:a.count,path:a.path},(n=a.children)==null||n.forEach(o=>{r(o)})};return r(e),t}function qo(e){const t={count:0,path:"/",children:{}};return Object.keys(e).forEach(r=>{const a=e[r];if(!a||a.path==="/")return;const n=a.path.substring(1).split("/");let o=t,s="";n.forEach((c,u)=>{const l=`${s}/${c}`;o.children[l]||(o.children[l]={count:0,path:l,children:{}}),u===n.length-1&&(o.children[l].count=a.count),s=l,o=o.children[l]})}),t}function Oa(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=>Oa(r))),t}function Yo(e,t){const r=Object.keys(e),a=Object.keys(t),n=new Set(a.filter(s=>s.split("/").length>2).map(s=>s.substring(0,s.lastIndexOf("/"))));return Object.fromEntries(r.filter(s=>!n.has(s.substring(0,s.lastIndexOf("/")))).map(s=>[s,e[s]]))}function Ko(e,t,r){const a=t[e],n=r[e],o={count:0,path:"/",children:a},s={count:0,path:"/",children:n},c=La(o),u=La(s),l=Yo(c,u),i=Ma(l,u),p=qo(i),g=Oa(p);return{[e]:g.children}}const Xo=N(class extends D{constructor(){super();h(this,"fieldName","");h(this,"facetSelectionUpdated");h(this,"baseFacetRoot");h(this,"facetRoot");h(this,"selectedPaths",{});h(this,"lastTimeTaken");h(this,"hasNewSearchTerm",!1);h(this,"lastSearchTerm");h(this,"lastSearchMode");h(this,"lastSortType");h(this,"unsubscribe");h(this,"searchStore",_.getState());h(this,"formatLabel",r=>{const a=r.path.replace(/^\//,""),n=r.count;return`${a.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase())} (${n})`});h(this,"formatSubLabel",(r,a)=>{const o=r.path.substring(a.path.length).replace(/^\//,""),s=r.count;return`${o.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())} (${s})`});this.__registerHost(),this.facetSelectionUpdated=Ce(this,"facetSelectionUpdated")}handleStateUpdate(r){const a=r.searchResponseFacetPrime,n=r.searchResponseTimeTaken;if(this.fieldName){if((r.searchTerm!==this.lastSearchTerm||r.searchMode!==this.lastSearchMode||r.sortType!==this.lastSortType)&&(this.selectedPaths={},this.hasNewSearchTerm=!0),n!==this.lastTimeTaken&&a){this.facetRoot=void 0;const o=a.find(s=>this.fieldName===Object.keys(s)[0]);this.hasNewSearchTerm?(this.baseFacetRoot=o,this.facetRoot=o,this.hasNewSearchTerm=!1):this.baseFacetRoot&&o&&(this.facetRoot=Ko(this.fieldName,this.baseFacetRoot,o))}this.lastSearchTerm=r.searchTerm,this.lastSearchMode=r.searchMode,this.lastSortType=r.sortType,this.lastTimeTaken=n}}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 s;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,l)=>(u[l]=!0,u),{})}const n=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=Vo(n);(s=this.facetSelectionUpdated)==null||s.emit({paths:o})}render(){var a;if(!this.fieldName)return;const r=(a=this.facetRoot)==null?void 0:a[this.fieldName];return d("div",{class:M("filtersListContainer","searchcraft-filters-list-container")},!r&&d("p",{class:"searchcraft-facet-message"},"Enter a search to view facets."),r==null?void 0:r.map(n=>{var s;const o=n.children?(s=n.children)==null?void 0:s.some(c=>this.selectedPaths[c.path]):!1;return d("div",{key:n.path,class:M("searchcraft-filters-list-item")},d("label",{class:M("filterCheckboxLabel","searchcraft-filters-list-checkbox-label")},d("input",{checked:this.selectedPaths[n.path],onChange:c=>this.handleCheckboxChange(n.path),type:"checkbox"}),o?d("div",{class:M("dashContainer","searchcraft-filter-list-dash-container")},d("svg",{width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},d("title",null,"Checkbox Dash"),d("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):d("div",{class:M("checkContainer","searchcraft-filter-list-check-container")},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox Check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatLabel(n)),n.children&&n.children.length>0&&d(Jt,null,n.children.map(c=>d("label",{key:c.path,class:M("childFilterCheckboxLabel","searchcraft-child-filter-checkbox-label"),style:{display:this.selectedPaths[n.path]?"flex":"none"}},d("input",{checked:this.selectedPaths[c.path],onChange:u=>{this.handleCheckboxChange(c.path)},type:"checkbox"}),d("div",{class:M("checkContainer","searchcraft-filter-list-check-container")},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox Check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatSubLabel(c,n)))))}))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],baseFacetRoot:[32],facetRoot:[32],selectedPaths:[32],lastTimeTaken:[32],hasNewSearchTerm:[32],lastSearchTerm:[32],lastSearchMode:[32],lastSortType:[32],unsubscribe:[32]}]);function Fa(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,Xo);break}})}const Qo=Fa,Jo=N(class extends D{constructor(){super();h(this,"max",100);h(this,"min",0);h(this,"granularity",_a("month"));h(this,"dataType","number");h(this,"endValue",this.max);h(this,"startValue",this.min);h(this,"lastFocusedHandle","max");h(this,"rangeChanged");h(this,"emitUpdate",async()=>{var r;(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue})});h(this,"handleStartValueChange",r=>{const a=r.target,n=Number.parseInt(a.value,10);this.lastFocusedHandle="min",n<=this.endValue?(this.startValue=n,this.emitUpdate()):(this.startValue=this.endValue,a.value=`${this.endValue}`)});h(this,"handleEndValueChange",r=>{const a=r.target,n=Number.parseInt(a.value,10);this.lastFocusedHandle="max",n>=this.startValue?(this.endValue=n,this.emitUpdate()):(this.endValue=this.startValue,a.value=`${this.startValue}`)});this.__registerHost(),this.rangeChanged=Ce(this,"rangeChanged")}componentDidLoad(){this.startValue=this.min,this.endValue=this.max}render(){const r=this.min,a=this.max,n=(this.startValue-r)/(a-r)*100,o=(this.endValue-r)/(a-r)*100,s=this.dataType==="number"?this.startValue:new Date(this.startValue).getFullYear(),c=this.dataType==="number"?this.endValue:new Date(this.endValue).getFullYear();return d("div",{key:"ec4a36e1ce6534b7c077114086d759e0b1e7a24e",class:"searchcraft-slider-container"},d("div",{key:"35487cbeaeeb23052631804704645ca929340f70",class:"searchcraft-slider-range-container"},d("div",{key:"186e699def8e7a6e58e8ad5f04953ac1c6584344",class:"searchcraft-slider-active-range",style:{left:`${n}%`,width:`${o-n}%`}}),d("input",{key:"97638e2a1471888c2be47f7526e9dd98fea58683",class:M("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}),d("input",{key:"db2abded80b606d17bde1677e4acc09a85e6e20e",class:M("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})),d("div",{key:"83954b6955a872a17377d506d2d8458059acac03",class:"searchcraft-slider-label-container"},d("span",{key:"b5315b4438385ecf5df3f76579fdf102b6a8c39c",class:"searchcraft-slider-label"},s),d("span",{key:"875094ac7ee69e04c3a16407388dd27f167b3c8f",class:"searchcraft-slider-label"},c)))}},[0,"searchcraft-slider",{max:[2],min:[2],granularity:[2],dataType:[1,"data-type"],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function Da(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,Jo);break}})}const Zo=N(class extends D{constructor(){super();h(this,"label","Toggle");h(this,"subLabel");h(this,"toggleUpdated");h(this,"isActive",!1);h(this,"unsubscribe");h(this,"lastSearchTerm");h(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Ce(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 d("div",{key:"25f3acd2b5dd6837182c8f07c092c54c35542c2f",class:"searchcraft-toggle-button-container"},d("div",{key:"d2951f2673af55159ad6f39d381d272a3f9f872b"},d("p",{key:"2468e261d46b454ce896b614ca2a076d27a31a8b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&d("p",{key:"1d9887dc12f30fb1982cf0d8a692ebfeca8edc1a",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),d("button",{key:"f51bb553d6b210233aa6ebfc4318aa521036d922",class:M("searchcraft-toggle-button-background",{active:this.isActive}),onClick:this.handleToggle,type:"button"},d("div",{key:"a34339f1bb5ab4742d897b01b61fe6c8c23e7e1e",class:M("searchcraft-toggle-button-handle",{active:this.isActive})})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function Na(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,Zo);break}})}const ei=N(class extends D{constructor(){super();h(this,"items",[]);h(this,"unsubscribe");h(this,"lastSearchTerm");h(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,a,n){const o=new Date(new Date(a).getFullYear(),0,1),s=new Date(new Date(n).getFullYear()+1,0,0);this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${o.toISOString()} TO ${s.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,a,n){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${a} TO ${n}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,a){a.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${a.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r){this.searchStore.setSortType(r?"desc":"asc"),this.searchStore.search()}render(){return d("div",{key:"73ca2e0efab911c5095c23ba33e85a26cc440b4a",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const a=r,n=new Date(a.options.minDate).getTime(),o=new Date(a.options.maxDate).getTime(),s=_a(a.options.granularity);return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-slider",{min:n,max:o,granularity:s,dataType:"date",onRangeChanged:c=>{this.handleDateRangeChanged(a.fieldName,c.detail.startValue,c.detail.endValue)}}))}case"numericRange":{const a=r;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-slider",{min:a.options.min,max:a.options.max,granularity:a.options.granularity,onRangeChanged:n=>{this.handleNumericRangeChanged(a.fieldName,n.detail.startValue,n.detail.endValue)}}))}case"facets":{const a=r;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-facet-list",{fieldName:a.fieldName,onFacetSelectionUpdated:n=>{this.handleFacetSelectionUpdated(a.fieldName,n.detail.paths)}}))}case"exactMatchToggle":{const a=r;return d("searchcraft-toggle-button",{label:a.label,subLabel:a.options.subLabel,onToggleUpdated:n=>{this.handleExactMatchToggleUpdated(n.detail)}})}case"mostRecentToggle":{const a=r;return d("searchcraft-toggle-button",{label:a.label,subLabel:a.options.subLabel,onToggleUpdated:n=>{this.handleMostRecentToggleUpdated(n.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function ti(){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,ei);break;case"searchcraft-facet-list":customElements.get(t)||Fa();break;case"searchcraft-slider":customElements.get(t)||Da();break;case"searchcraft-toggle-button":customElements.get(t)||Na();break}})}const ri=ti,ai=N(class extends D{constructor(){super();h(this,"inputLabelClassName","");h(this,"label","");this.__registerHost()}render(){return d("label",{key:"528396d4be9f22ff0c02d95d8bcea056576aed41",class:M("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function lr(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,ai);break}})}const si=N(class extends D{constructor(){super();h(this,"autoSearch",!0);h(this,"buttonPlacement","none");h(this,"buttonLabel");h(this,"inputLabel");h(this,"customStyles",{});h(this,"placeholderValue","Enter Search");h(this,"searchTerm","");h(this,"inputFocus");h(this,"inputBlur");h(this,"inputInit");h(this,"inputValue",this.searchTerm);h(this,"error",!1);h(this,"core");h(this,"searchStore",_.getState());h(this,"handleOnInput",r=>{const a=r.target;this.inputValue=a.value,this.autoSearch&&this.performSearch(a.value)});h(this,"performSearch",async r=>{if(r!==_.getState().searchTerm){this.searchTerm=r.trim(),this.error=!1,this.searchStore.setSearchTerm(this.searchTerm);try{await this.searchStore.search()}catch(a){console.log(a),this.error=!0}}});h(this,"handleClearInput",()=>{this.inputValue="",this.searchTerm="",this.searchStore.setSearchTerm(""),this.searchStore.setSearchClientResponseItems([]),this.error=!1});h(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch(this.searchTerm)});this.__registerHost(),this.inputFocus=Ce(this,"inputFocus"),this.inputBlur=Ce(this,"inputBlur"),this.inputInit=Ce(this,"inputInit")}init(){var r;this.core&&(this.searchStore.initialize(this.core),(r=this.inputInit)==null||r.emit())}connectedCallback(){this.init()}onCoreChange(){this.init()}render(){const r=rt(this.customStyles),a=this.inputValue.length>0,n=M("searchcraft-input-grid",{"searchcraft-input-grid-buttonLeft":this.buttonPlacement==="left","searchcraft-input-grid-buttonRight":this.buttonPlacement==="right","searchcraft-input-grid-buttonNone":this.buttonPlacement==="none"}),s={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return d("form",{key:"52760b113a209c51638bcb005e0b6c3d5bf9741d",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},d("div",{key:"6b20020b8a67c9d860fca7da67150a8d75bd3313",class:n,style:s},d("div",{key:"67bba2889e6fde70c4f349dfbd61d9a632c08301",class:"searchcraft-input-button-wrapper"},d("searchcraft-button",{key:"a839e1a67d238bfbe6d47857f6339e49d14f9560",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&d("div",{key:"a2a69b7dbdf1142459d6ffad90dc26a38a76276d",class:"searchcraft-input-label-wrapper"},d("searchcraft-input-label",{key:"621a4903821ba8c1854e3ff89d30a24dba3ed0fb",label:this.inputLabel})),this.error&&d("div",{key:"b4cd633a139488cac185c38123b138fc5d51cd20",class:"searchcraft-input-error-wrapper"},d("searchcraft-error-message",{key:"ccadaf96ac8317b6415a83e6523816328e83eb3e",errorMessage:"Something went wrong."})),d("div",{key:"0f13777c2e5f806ce12fff9680d7862a27b2e260",class:"searchcraft-input-wrapper"},d("input",{key:"a9b58a486dfaadaedf3eeb9aec5e4c3c3548536b",autoComplete:"off",class:"searchcraft-input",onFocus:()=>{var c;return(c=this.inputFocus)==null?void 0:c.emit()},onBlur:()=>{var c;return(c=this.inputBlur)==null?void 0:c.emit()},onInput:c=>{this.handleOnInput(c)},placeholder:this.placeholderValue,style:r,type:"text",value:this.inputValue}),d("div",{key:"a57e4f72ee1383e42158bbc9e35d47d2c468acf5",class:"searchcraft-input-search-icon-wrapper"},d("svg",{key:"c7bda92af1488981d5de08af0f9ae3064c76c354",class:"searchcraft-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},d("title",{key:"f4dc47ae6c88517eeaea574fe819423b3d6e6cb5",id:"searchcraft-title"},"Searchcraft Search Icon Light"),d("path",{key:"c77497591b4f31de0f3e008baa79c006fd0a2eb9",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"}))),a&&d("button",{key:"e125b759eaa21dfdd4058bf36f3c10233f067835",type:"button",class:"searchcraft-input-clear-button",onClick:this.handleClearInput},d("svg",{key:"b2767658bb9edbc51efd6430e051127b08c9ab83",class:"searchcraft-input-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},d("title",{key:"990ff3c8f207d09192e954b0f5d059e0683db2d4",id:"icon-title"},"Searchcraft Clear Input Icon Light"),d("path",{key:"5322d9abb4d60a75869ca943a17157a32c502035",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"],customStyles:[1,"custom-styles"],placeholderValue:[1,"placeholder-value"],searchTerm:[1,"search-term"],core:[16],inputValue:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function Ua(){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,si);break;case"searchcraft-button":customElements.get(t)||xt();break;case"searchcraft-error-message":customElements.get(t)||Ct();break;case"searchcraft-input-label":customElements.get(t)||lr();break}})}const ni=Ua,oi=lr,ii=N(class extends D{constructor(){super();h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount",1);h(this,"searchResultsRangeMin",1);h(this,"searchResultsRangeMax",1);h(this,"setSearchResultsPage",()=>{});h(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 d("li",null,d("button",{class:M("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)?d("li",null,d("button",{class:M("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):d("li",null,d("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?d("li",null,d("button",{class:M("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)):d("li",null,d("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return d("div",{class:M("searchcraft-pagination",rt(this.customStyles||{}))},d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Previous page icon"),d("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),d("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)),d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Next page icon"),d("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",{customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function ci(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,ii);break;case"searchcraft-button":customElements.get(t)||xt();break}})}const li=ci,ui=N(class extends D{constructor(){super(),this.__registerHost()}handleOnClick(){_.getState().setPopoverVisibility(!0)}render(){return d("button",{key:"a8ee70b49a5309cfb1363a272ea0870c48c59688",type:"button",onClick:this.handleOnClick.bind(this)},d("slot",{key:"9ac712ed1f6e69d73e7ade3d42501fb67a02c7ff"}))}},[4,"searchcraft-popover-button"]);function hi(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,ui);break}})}const fi=hi,di=N(class extends D{constructor(){super();h(this,"item");h(this,"popoverResultMappings");h(this,"documentPosition",0);h(this,"href");h(this,"imageSrc");h(this,"imageAlt");h(this,"titleContent");h(this,"subtitleContent");h(this,"handleLinkClick",()=>{var n;const r=_.getState(),a=r.getSearchcraftInstance();if(a){const o=this.documentPosition,s=r.searchTerm,c=r.searchClientResponseItems.length||0;(n=a.measureClient)==null||n.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:s})}});this.__registerHost()}mapValuesFromDocument(r){var a,n,o,s,c;this.titleContent=he(r,(a=this.popoverResultMappings)==null?void 0:a.title),this.subtitleContent=he(r,(n=this.popoverResultMappings)==null?void 0:n.subtitle),this.href=he(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSrc=he(r,(s=this.popoverResultMappings)==null?void 0:s.imageSource),this.imageAlt=he(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return d("a",{key:"870fae8c0019ea24d9ecd173a781a38e3b17f8de",class:"searchcraft-popover-list-item",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSrc&&d("div",{key:"9e200a2be177fed7f6303fdc1ba466fc47817b5d",class:"searchcraft-popover-list-item-image-wrapper"},d("img",{key:"22124b2856cd41220ac852a1fbc94cbf2a1cd9f9",alt:this.imageAlt,src:this.imageSrc,class:"searchcraft-popover-list-item-image"})),d("div",{key:"b3f0bb6784a36befd044e71798915994093177ab",class:"searchcraft-popover-list-item-info-wrapper"},d("p",{key:"caa22a8d68b56814ee29498db48fe1c65d8d7644",class:"searchcraft-popover-list-item-title"},this.titleContent),d("p",{key:"63e11be221d6f274855f7989b3a9dc4532c08e05",class:"searchcraft-popover-list-item-subtitle"},this.subtitleContent)))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],href:[32],imageSrc:[32],imageAlt:[32],titleContent:[32],subtitleContent:[32]}]);function ur(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,di);break}})}const pi=N(class extends D{constructor(){super();h(this,"popoverResultMappings");h(this,"searchClientResponseItems");h(this,"adClientResponseItems");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"config",(Ya=_.getState().core)==null?void 0:Ya.config);this.__registerHost()}renderWithADMAds(){var r,a;return d("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(n=>d("searchcraft-ad",{adClientResponseItem:n,adSource:"adMarketplace",key:n.id})),(a=this.searchClientResponseItems)==null?void 0:a.map((n,o)=>d("searchcraft-popover-list-item",{item:n,key:n.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,l,i,p;const r=[],a=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,n=((l=this.config)==null?void 0:l.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,s=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let g=0;g<o;g++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g}-ad`}));c.forEach((g,S)=>{if(a&&S%a===0&&S+a<c.length&&S>=a)for(let P=0;P<n;P++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g.id}-ad-${P}`}));r.push(d("searchcraft-popover-list-item",{item:g,key:g.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+S}))});for(let g=0;g<s;g++)r.push(d("searchcraft-ad",{adSource:"Custom",key:`${g}-ad`}));return d("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return d("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>d("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();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 za(){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,pi);break;case"searchcraft-ad":customElements.get(t)||Tt();break;case"searchcraft-popover-list-item":customElements.get(t)||ur();break}})}const mi=N(class extends D{constructor(){super();h(this,"type","inline");h(this,"popoverResultMappings");h(this,"hotkey","k");h(this,"hotkeyModifier","meta");h(this,"isPopoverVisibleInState",!1);h(this,"unsubscribe");h(this,"searchClientResponseItems",[]);h(this,"adClientResponseItems",[]);h(this,"searchTerm");h(this,"isFocused",!1);h(this,"breakpointSm",576);h(this,"breakpointMd",768);h(this,"breakpointLg",992);h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"modalElement");h(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});h(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}});h(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-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(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage})}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 a=this.hostElement.querySelector(".searchcraft-input");a==null||a.focus()}else _.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){_.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,s;const a=Array.from(document.querySelectorAll("a.searchcraft-popover-list-item")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),n=a.indexOf(document.activeElement);if(r==="ArrowDown")(o=a[(n+1)%a.length])==null||o.focus();else if(r==="ArrowUp")if(n>=1)(s=a[n-1])==null||s.focus();else{const c=document.querySelector(".searchcraft-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,a;return this.searchTerm&&((a=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:a.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused,a=M("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r});return d("div",{class:a},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)}),r&&d("div",{class:"searchcraft-popover-inline-wrapper-outer"},d("div",{class:"searchcraft-popover-inline-wrapper-inner"},d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}renderModalPopover(){if(this.isPopoverVisibleInState){const r=M("searchcraft-popover-form",{"searchcraft-popover-form-active":this.hasResultsToShow});return d("div",{class:"searchcraft-popover-form-modal"},d("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),d("div",{class:"searchcraft-popover-form-modal-inner"},d("div",{class:r},d("div",{class:"searchcraft-popover-form-input-wrapper"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return d("div",{class:"searchcraft-popover-form-fullscreen"},d("div",{class:"searchcraft-popover-form"},d("div",{class:"searchcraft-popover-form-input-wrapper"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})))}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 Ha(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","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,mi);break;case"searchcraft-ad":customElements.get(t)||Tt();break;case"searchcraft-button":customElements.get(t)||xt();break;case"searchcraft-error-message":customElements.get(t)||Ct();break;case"searchcraft-input-form":customElements.get(t)||Ua();break;case"searchcraft-input-label":customElements.get(t)||lr();break;case"searchcraft-popover-form":customElements.get(t)||Ha();break;case"searchcraft-popover-list-item":customElements.get(t)||ur();break;case"searchcraft-popover-list-view":customElements.get(t)||za();break}})}const gi=Ha,bi=ur,vi=za,yi=N(class extends D{constructor(){super();h(this,"customFormatter");h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"count",0);h(this,"range",[0,0]);h(this,"responseTime","0");h(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:d("p",{class:M("searchcraft-results-info",rt(this.customStyles||{}))},this.customFormatter?this.customFormatter([cr(this.range[0]),cr(this.range[1])],cr(this.count),this.responseTime):`${this.count} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{customFormatter:[16],customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Si(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,yi);break}})}const wi=Si,Ei=N(class extends D{constructor(){super();h(this,"caption");h(this,"disabled",!1);h(this,"inputId");h(this,"label");h(this,"labelId");h(this,"name");h(this,"options",[]);h(this,"customStyles");h(this,"selectChange");h(this,"searchResultsPerPage");h(this,"setSearchResultsPage",()=>{});h(this,"setSearchResultsPerPage",()=>{});h(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=Ce(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return d("div",{key:"5024d49d89a3649a5de591d37ded304a9dfb36d9",class:M("searchcraft-select",rt(this.customStyles||{}))},this.label&&d("label",{key:"005aea9b190e5a6c041721e20395be23f76faab6",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),d("div",{key:"209d56844c0bcd241e73bafcad24fac927fe7ffa",class:"searchcraft-select-input-wrapper"},d("select",{key:"010c9e596ef45a303f84c0ac0fa54ab67556d7b6","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:a,selected:n})=>d("option",{key:a,value:a,selected:n},r))),d("svg",{key:"51d9fb79381468ee0992475ba376df5a5961116c",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"59186138953557764915d41708d4bcc23a9bb97f"},"Select dropdown icon"),d("path",{key:"ec2c962df16cb68bdaf3e2c32e57d875a63957a9",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&d("p",{key:"742bc2dbd8371938894d49bb37d429d1b7a07d7a",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],customStyles:[1,"custom-styles"],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Ba(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Ei);break}})}const Ri=N(class extends D{constructor(){super();h(this,"increment",20);h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount");h(this,"initialSearchResultsPerPage");h(this,"setSearchResultsPerPage",()=>{});h(this,"setSearchResultsPage",()=>{});h(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 d("div",{class:M("searchcraft-search-results-per-page",rt(this.customStyles||{}))},d("div",{class:"searchcraft-search-results-per-page-select"},d("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),d("div",{class:"searchcraft-search-results-per-page-select-input"},d("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Pi(){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,Ri);break;case"searchcraft-select":customElements.get(t)||Ba();break}})}const ki=Pi,Ti=Ba,Ci=Da,xi=`: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)}: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: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var(--sc-color-background-hover, #fafafa);--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, #f7f7f7 );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-secondary-hover, var(--sc-color-background-hover, #e6e6e6) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var(--sc-color-foreground-secondary, #404040);--sc-border-neutral: rgba(0, 0, 0, 0.1);--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var(--sc-color-brand-hover, #2e2e2e);--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var(--sc-color-brand-active, #292929);--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-surface-brand-secondary-hover: var( --sc-color-brand-secondary-hover, var(--sc-color-brand-hover, #ebebeb) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active, #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: hsl(from var(--sc-color-success) h s 30);--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, #009900 );--sc-color-success-primary-active: hsl(from var(--sc-color-success) h s 20);--sc-surface-success-primary-active: var( --sc-color-success-primary-active, #006600 );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90);--sc-surface-success-secondary: var(--sc-color-success-secondary, #ccffcc);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, #e6ffe6 );--sc-color-success-secondary-active: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, #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: hsl(from var(--sc-color-caution) h s 30);--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, #e57300 );--sc-color-caution-primary-active: hsl(from var(--sc-color-caution) h s 20);--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, #b25a00 );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90);--sc-surface-caution-secondary: var(--sc-color-caution-secondary, #ffd9b3);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, #ffe5cc );--sc-color-caution-secondary-active: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, #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: hsl(from var(--sc-color-danger) h s 30);--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, #e50000 );--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20);--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, #b30000 );--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var(--sc-color-danger-secondary, #ffcccc);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, #ffe7e7 );--sc-color-danger-secondary-active: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, #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: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover: hsl(from var(--sc-color-success) h s 30%);--sc-color-success-primary-active: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90%);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active: 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: hsl(from var(--sc-color-caution) h s 30%);--sc-color-caution-primary-active: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90%);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active: 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: hsl(from var(--sc-color-danger) h s 30%);--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20%);--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90%);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active: 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-custom-ad{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-adm-ad{all:unset;display:flex;flex-direction:row;cursor:pointer;gap:8px;padding-right:var(--sc-popover-list-item-padding-horizontal);padding-left:var(--sc-popover-list-item-padding-horizontal);padding-top:var(--sc-popover-list-item-padding-vertical);padding-bottom:var(--sc-popover-list-item-padding-vertical);border:1px solid blue}.searchcraft-adm-ad:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:inherit}.searchcraft-adm-ad-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:inherit}.searchcraft-adm-ad-image-wrapper{width:var(--sc-popover-list-item-image-size);height:var(--sc-popover-list-item-image-size);display:flex;align-items:center;justify-content:center;flex-shrink:0}.searchcraft-adm-ad-image{max-width:var(--sc-popover-list-item-image-size);max-height:var(--sc-popover-list-item-image-size)}.searchcraft-adm-ad-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-search-result-container{all:unset;align-items:flex-start;border-radius:var(--sc-border-radius-lg);display:flex;flex-direction:column;gap:16px;padding:8px;color:inherit;background-color:var(--sc-surface-neutral-primary)}@media(min-width: 768px){.searchcraft-search-result-container{flex-direction:row}}a.searchcraft-search-result-container{cursor:pointer;transition:background-color 100ms}.searchcraft-base-search-result-content-container{flex:1;display:flex;flex-direction:column;gap:8px}.searchcraft-search-result-image{border-radius:calc(--sc-border-radius-lg - 8px);border-radius:calc(var(--sc-border-radius-lg) - 8px);width:100%}@media(min-width: 768px){.searchcraft-search-result-image{width:200px}}.searchcraft-base-search-result-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin:0}.searchcraft-base-search-result-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-disabled);margin:0}.searchcraft-base-search-result-body-content{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-base-search-result-footer-content{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-disabled);margin:0}.searchcraft-search-results-container{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state-container{text-align:center}.searchcraft-search-results-error-message-container{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);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-error-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-danger);margin:0}.filtersListContainer{width:100%}.filterCheckboxLabel{align-items:center;color:var(--sc-content-brand);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.filterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.filterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.filterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.filterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.filterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.childFilterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:12px;margin-left:24px;position:relative}.childFilterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childFilterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.childFilterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.childFilterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childFilterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:9px;left:8px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:3px;left:9px}.searchcraft-facet-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);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);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}:root{--sc-input-border-radius: var(--sc-border-radius);--sc-input-search-icon-size: 20px;--sc-input-clear-icon-size: 20px;--sc-input-padding-left: 44px;--sc-input-padding-right: 44px}.searchcraft-input-grid{display:grid;gap:4px 8px}.searchcraft-input-grid-buttonLeft{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-grid-buttonLeft .searchcraft-input-button-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-label-wrapper{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-error-wrapper{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-grid-buttonRight .searchcraft-input-button-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonNone{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-grid-buttonNone .searchcraft-input-button-wrapper{display:none}.searchcraft-input-grid-buttonNone .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-wrapper{position:relative;display:flex}.searchcraft-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-border-radius);border:none;color:var(--sc-content-neutral-primary);outline:none;padding-left:var(--sc-input-padding-left);padding-right:var(--sc-input-padding-right);padding-top:12px;padding-bottom:12px;flex:1}.searchcraft-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input:focus{outline:var(--sc-border-brand) solid 2px}.searchcraft-input:focus::placeholder{opacity:0}.searchcraft-input.error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input.error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-search-icon-wrapper{align-items:center;justify-content:center;display:flex;position:absolute;pointer-events:none;bottom:0;left:0;top:0;width:var(--sc-input-padding-left)}.searchcraft-input-search-icon{pointer-events:none;width:var(--sc-input-search-icon-size);height:var(--sc-input-search-icon-size);color:var(--sc-content-neutral-secondary)}.searchcraft-input-clear-button{all:unset;align-items:center;justify-content:center;cursor:pointer;display:flex;position:absolute;border:none;outline:none;bottom:0;right:0;top:0;width:var(--sc-input-padding-right)}.searchcraft-input-clear-icon{width:var(--sc-input-clear-icon-size);height:var(--sc-input-clear-icon-size);color:var(--sc-content-brand)}.searchcraft-input-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-form-border-radius: var(--sc-border-radius);--sc-popover-list-view-height: 400px;--sc-popover-list-item-image-size: 60px;--sc-popover-list-item-padding-horizontal: 8px;--sc-popover-list-item-padding-vertical: 8px;--sc-popover-modal-max-width: 570px}.searchcraft-popover-form{display:flex;flex-direction:column;flex:1}.searchcraft-popover-form .searchcraft-popover-form-input-wrapper{padding:12px;background-color:var(--sc-surface-neutral-secondary);display:flex;flex-direction:row;gap:4px}.searchcraft-popover-form .searchcraft-popover-form-input-wrapper>searchcraft-input-form{flex:1}.searchcraft-popover-form .searchcraft-popover-form-cancel-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);border:0;outline:0;padding:0;flex-shrink:0;background:none;cursor:pointer;padding-left:12px;padding-right:12px}.searchcraft-popover-form .searchcraft-popover-form-cancel-button:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-popover-form .searchcraft-popover-form-cancel-button:focus{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-popover-form-inline .searchcraft-input{border-top-left-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);border:none;outline:none}.searchcraft-popover-form-inline.searchcraft-popover-form-active .searchcraft-input{border-top-left-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.searchcraft-popover-form-inline .searchcraft-popover-inline-wrapper-outer{position:relative}.searchcraft-popover-form-inline .searchcraft-popover-inline-wrapper-inner{position:absolute;height:var(--sc-popover-list-view-height);z-index:1000;width:100%}.searchcraft-popover-form-inline .searchcraft-popover-list-view{display:flex;flex-direction:column;overflow:auto;background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);max-height:var(--sc-popover-list-view-height)}.searchcraft-popover-form-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding:0;background-color:var(--sc-surface-neutral-secondary)}@media(min-width: 576px){.searchcraft-popover-form-modal{padding:16px;background-color:rgba(0,0,0,0)}}.searchcraft-popover-form-modal .searchcraft-input{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-modal .searchcraft-popover-form-modal-backdrop{position:absolute;inset:0;background-color:rgba(0,0,0,.5);display:none}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal .searchcraft-popover-form-modal-inner{position:absolute;inset:0;z-index:1002;margin-top:0px;display:flex;border-radius:var(--sc-popover-form-border-radius);overflow:hidden}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-form-modal-inner{inset:auto;position:relative;width:100%;margin-top:100px;max-width:var(--sc-popover-modal-max-width)}}.searchcraft-popover-form-modal .searchcraft-popover-list-view{display:flex;flex-direction:column;overflow:auto;background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:0;border-bottom-right-radius:0}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-list-view{max-height:var(--sc-popover-list-view-height)}}.searchcraft-popover-form-modal searchcraft-popover-list-view{overflow:scroll}@media(min-width: 576px){.searchcraft-popover-form-modal searchcraft-popover-list-view{overflow:auto}}.searchcraft-popover-form-fullscreen{position:fixed;inset:0;z-index:1000;background-color:var(--sc-surface-neutral-secondary)}.searchcraft-popover-form-fullscreen .searchcraft-popover-form{position:absolute;inset:0}.searchcraft-popover-form-fullscreen .searchcraft-input{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-fullscreen searchcraft-popover-list-view{overflow:scroll}.searchcraft-popover-list-item{all:unset;color:var(--sc-content-neutral-secondary);display:flex;flex-direction:row;cursor:pointer;gap:8px;padding-right:var(--sc-popover-list-item-padding-horizontal);padding-left:var(--sc-popover-list-item-padding-horizontal);padding-top:var(--sc-popover-list-item-padding-vertical);padding-bottom:var(--sc-popover-list-item-padding-vertical)}.searchcraft-popover-list-item:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-image-wrapper{width:var(--sc-popover-list-item-image-size);height:var(--sc-popover-list-item-image-size);display:flex;align-items:center;justify-content:center;flex-shrink:0}.searchcraft-popover-list-item-image{max-width:var(--sc-popover-list-item-image-size);max-height:var(--sc-popover-list-item-image-size)}.searchcraft-popover-list-item-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-results-info{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-primary);margin:0}.searchcraft-slider-container{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range-container{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range-container::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .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-container .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range-container .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-container .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-container .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-container{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-label{min-width:30px;text-align:center}.searchcraft-toggle-button-container{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:var(--sc-content-neutral-primary)}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:var(--sc-content-neutral-secondary)}.searchcraft-toggle-button-background{transition:background-color .2s;background:var(--sc-surface-disabled);border:none;border-radius:16px;cursor:pointer;height:26px;position:relative;width:44px;flex-shrink:0}.searchcraft-toggle-button-background.active{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.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-handle.active{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);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);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);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);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{pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size)}.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);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
35
+ `,$i=N(class extends D{constructor(){super();h(this,"theme");h(this,"customTheme");h(this,"camelToKebab",r=>r.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`).toLowerCase());this.__registerHost()}componentDidLoad(){const r=document.querySelector("#searchcraft-theme")||document.createElement("style");r.innerHTML=xi,r.id="searchcraft-theme";const a=document.head||document.getElementsByTagName("head")[0];a.contains(r)||(a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r)),document.body.dataset.theme=this.theme||"light",Object.entries(JSON.parse(this.customTheme||"[]")).map(([n,o])=>{document.documentElement.style.setProperty(`--${this.camelToKebab(n)}`,`${o}`)})}render(){}},[0,"searchcraft-theme",{theme:[1],customTheme:[1,"custom-theme"]}]);function _i(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,$i);break}})}const Ai=_i,Ii=Na,ja=()=>{Lo(),Do(),Bo(),Go(),Wo(),Qo(),ri(),ni(),oi(),li(),fi(),gi(),bi(),vi(),wi(),ki(),Ti(),Ci(),Ai(),Ii()};ja();const Ga={name:"@searchcraft/vue-sdk",version:"0.9.2",private:!1,description:"Searchcraft Vue SDK.",type:"module",license:"Apache-2.0",keywords:["searchcraft"],scripts:{dev:"vite",clean:"rm -rf dist",build:"yarn clean && vite build && yarn docs",docs:"typedoc --options typedoc.json",preview:"vite preview","build-only":"vite build","type-check":"vue-tsc --build"},repository:{type:"git",url:"https://bitbucket.org/madebychalk/searchcraft-javascript-sdks/"},engines:{node:">=18.0.0",npm:">=10.0.0"},main:"./dist/index.umd.js",module:"./dist/index.es.js",types:"./dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.es.js",require:"./dist/index.umd.js"},"./components":"./dist/components/index.d.ts","./plugin":"./dist/plugin.d.ts"},files:["dist"],peerDependencies:{vue:"^3.5.13"},devDependencies:{"@searchcraft/core":"^0.9.2","@searchcraft/javascript-sdk":"^0.9.2","@tsconfig/node22":"^22.0.0","@types/node":"^22.10.7","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","@vue/runtime-dom":"^3.5.13","@vue/tsconfig":"^0.7.0","npm-run-all2":"^7.0.2",vite:"^6.0.11","vite-plugin-dts":"^4.5.0","vite-plugin-vue-devtools":"^7.7.0","vue-docgen-web-types":"^0.1.8","vue-tsc":"^2.2.0"}},hr="routerLink",Wa="navManager",Mi="router",Li="aria",at=Symbol(),Va={default:at},qa=e=>(e==null?void 0:e.split(" "))||[],Oi=(e,t,r=[])=>{var a;return[...Array.from(((a=e.value)==null?void 0:a.classList)||[]),...r].filter((n,o,s)=>!t.has(n)&&s.indexOf(n)===o)},we=(e,t,r=[],a=[],n,o)=>{const s=G.defineComponent((c,{attrs:u,slots:l,emit:i})=>{var K;const p=G.ref(),g=new Set(qa(u.class)),S=G.getCurrentInstance(),U=((K=S==null?void 0:S.appContext)==null?void 0:K.provides[Wa])?G.inject(Wa):void 0,pe=$=>{const{routerLink:Ee}=c;if(Ee!==at)if(U!==void 0){$.preventDefault();let ce={event:$};for(const Le in c){const z=c[Le];c.hasOwnProperty(Le)&&Le.startsWith(Mi)&&z!==at&&(ce[Le]=z)}U.navigate(ce)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[n],qa(u.class).forEach(z=>{g.add(z)});const $=c.onClick,Ee=z=>{$!==void 0&&$(z),z.defaultPrevented||pe(z)};let ce={ref:p,class:Oi(p,g),onClick:Ee};for(const z in c){const ne=c[z];(c.hasOwnProperty(z)&&ne!==at||z.startsWith(Li))&&(ce[z]=ne);const H="on"+z.slice(0,1).toUpperCase()+z.slice(1),Oe=u[H];p.value&&u.hasOwnProperty(H)&&"addEventListener"in p.value&&p.value.addEventListener(z,Oe)}return hr in c&&c[hr]!==at&&(ce={...ce,href:c[hr]}),G.h(e,ce,l.default&&l.default())}});if(typeof s!="function"){let c=[],u={};u.ROUTER_LINK_VALUE=Va,r.forEach(l=>u[l]=Va),c=a,s.name=e,s.emits=c,s.props=u}return s},Fi=we("searchcraft-base-search-results",void 0,["customStylesForResults","searchResultMappings","resultImagePlacement","buttonLabel","buttonTarget","buttonRel","containerTarget","containerRel"]),Di=we("searchcraft-filter-panel",void 0,["items"]),Ni=we("searchcraft-input-form",void 0,["autoSearch","buttonPlacement","buttonLabel","inputLabel","customStyles","placeholderValue","searchTerm","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Ui=we("searchcraft-pagination",void 0,["customStyles"]),zi=we("searchcraft-popover-button"),Hi=we("searchcraft-popover-form",void 0,["type","popoverResultMappings","hotkey","hotkeyModifier"]),Bi=we("searchcraft-results-info",void 0,["customFormatter","customStyles"]),ji=we("searchcraft-search-results-per-page",void 0,["increment","customStyles"]),Gi=we("searchcraft-theme",void 0,["theme","customTheme"]),Wi=Fi,Vi=Di,qi=Ni,Yi=zi,Ki=Hi,Xi=Bi,Qi=Gi,Ji=Ui,Zi=ji;class ec extends sn{constructor(t){super(t,{sdkName:Ga.name,sdkVersion:Ga.version})}}ja(),L.Searchcraft=ec,L.SearchcraftBaseSearchResults=Wi,L.SearchcraftFilterPanel=Vi,L.SearchcraftInputForm=qi,L.SearchcraftPagination=Ji,L.SearchcraftPopoverButton=Yi,L.SearchcraftPopoverForm=Ki,L.SearchcraftResultsInfo=Xi,L.SearchcraftSearchResultsPerPage=Zi,L.SearchcraftTheme=Qi,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
12
36
  //# sourceMappingURL=index.umd.js.map