1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5667],{11076:(e,t,r)=>{r.d(t,{A:()=>D});var s,i=r(40459),o=Object.defineProperty,n=Object.defineProperties,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&d(e,r,t[r]);if(c)for(var r of c(t))h.call(t,r)&&d(e,r,t[r]);return e},_=(e,t)=>n(e,l(t)),m=r(11115),g=(e,t)=>function(){return t||(0,e[u(e)[0]])((t={exports:{}}).exports,t),t.exports},y=(e,t,r)=>d(e,"symbol"!=typeof t?t+"":t,r),v=g({"node_modules/@constructor-io/constructorio-id/src/constructorio-id.js"(e,t){function r(e){let t;try{t=window[e];let r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return DOMException&&e instanceof DOMException&&("QuotaExceededError"===e.name||"QUOTA_EXCEEDED_ERR"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||-1!==e.toString().indexOf("QUOTA_EXCEEDED_ERR")||-1!==e.toString().indexOf("QuotaExceededError"))&&t&&0!==t.length}}Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw TypeError("Cannot convert first argument to object");for(var t=Object(e),r=1;r<arguments.length;r++){var s=arguments[r];if(null!=s){s=Object(s);for(var i=Object.keys(Object(s)),o=0,n=i.length;n>o;o++){var a=i[o],l=Object.getOwnPropertyDescriptor(s,a);void 0!==l&&l.enumerable&&(t[a]=s[a])}}}return t}});var s=function(e){var t;Object.assign(this,{user_agent:null,persist:!0,cookie_name_client_id:"ConstructorioID_client_id",cookie_name_session_id:"ConstructorioID_session_id",cookie_name_session_data:"ConstructorioID_session",cookie_domain:null,cookie_secure:null,cookie_samesite:null,cookie_days_to_live:365,local_name_client_id:"_constructorio_search_client_id",local_name_session_id:"_constructorio_search_session_id",local_name_session_data:"_constructorio_search_session",on_node:"undefined"==typeof window,session_is_new:null,new_to_beacon:null,client_id_storage_location:"cookie",session_id_storage_location:"local"},e),this.client_id||(!this.on_node&&this.persist?("cookie"===this.client_id_storage_location&&(t=this.get_cookie(this.cookie_name_client_id))&&(this.delete_cookie(this.cookie_name_client_id),this.set_cookie(this.cookie_name_client_id,t)),"local"===this.client_id_storage_location&&(t=this.get_local_object(this.local_name_client_id)),this.client_id=t||this.generate_client_id()):this.client_id=this.generate_client_id()),this.session_id||(!this.on_node&&this.persist?this.session_id=this.generate_session_id():this.session_id=1),this.on_node||(this.user_agent=this.user_agent||window&&window.navigator&&window.navigator.userAgent)};s.prototype.set_cookie=function(e,t){if(!this.on_node&&this.persist){var r=e+"="+t+"; expires="+new Date(Date.now()+24*this.cookie_days_to_live*36e5).toUTCString()+"; path=/";return this.cookie_domain&&(r+="; domain="+this.cookie_domain),this.cookie_secure&&(r+="; secure"),this.cookie_samesite&&(r+="; samesite="+this.cookie_samesite),document.cookie=r,r}return null},s.prototype.get_cookie=function(e){for(var t=e+"=",r=document.cookie.split(";"),s=0;s<r.length;s++){var i=r[s];try{for(var o=decodeURIComponent(i);" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}catch(e){}}},s.prototype.delete_cookie=function(e){document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"},s.prototype.generate_client_id=function(){var e;if(!this.on_node){var t=this.get_cookie(this.cookie_name_client_id),r=this.get_local_object(this.local_name_client_id);"cookie"===this.client_id_storage_location&&r&&(e=r,this.set_cookie(this.cookie_name_client_id,e),this.delete_local_object(this.local_name_client_id)),"local"===this.client_id_storage_location&&t&&(e=t,this.set_local_object(this.local_name_client_id,e),this.delete_cookie(this.cookie_name_client_id))}return e||(e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),"cookie"===this.client_id_storage_location&&this.set_cookie(this.cookie_name_client_id,e),"local"===this.client_id_storage_location&&this.set_local_object(this.local_name_client_id,e)),e},s.prototype.get_local_object=function(e){var t,s=r("localStorage")&&window&&window.localStorage;if(s&&"string"==typeof e)try{t=JSON.parse(s.getItem(e))}catch(r){t=s.getItem(e)}return t},s.prototype.set_local_object=function(e,t){var s=r("localStorage")&&window&&window.localStorage;if(s&&"string"==typeof e){if("object"==typeof t)try{s.setItem(e,JSON.stringify(t))}catch(e){}if("string"==typeof t||"number"==typeof t)try{s.setItem(e,t)}catch(e){}}},s.prototype.delete_local_object=function(e){var t=r("localStorage")&&window&&window.localStorage;if(t&&"string"==typeof e)try{t.removeItem(e)}catch(e){}},s.prototype.generate_session_id=function(){var e,t=this.get_cookie(this.cookie_name_session_data),r=this.get_local_object(this.local_name_session_data),s=Date.now();if("local"===this.session_id_storage_location&&((e=this.get_local_object(this.local_name_session_data))||!t||(e=t,this.delete_cookie(this.cookie_name_session_data))),"cookie"===this.session_id_storage_location){e=this.get_cookie(this.cookie_name_session_data);try{e=JSON.parse(e)}catch(e){}!e&&r&&(e=r,this.delete_local_object(this.local_name_session_data))}var i=1,o=1;e&&"object"==typeof e&&(o=parseInt(e.sessionId,10)||1,i=e.lastTime>s-18e5?o:o+1),this.session_id=i,this.session_is_new=!e||o!==i,e&&e.newToBeacon&&(this.new_to_beacon=!0);let n={sessionId:i,lastTime:s};return this.session_is_new&&(n.newToBeacon=!0),"local"===this.session_id_storage_location&&(this.set_local_object(this.local_name_session_id,i),this.set_local_object(this.local_name_session_data,n)),"cookie"===this.session_id_storage_location&&(this.cookie_domain&&(this.delete_cookie(this.cookie_name_session_id),this.delete_cookie(this.cookie_name_session_data)),this.set_cookie(this.cookie_name_session_id,i),this.set_cookie(this.cookie_name_session_data,JSON.stringify(n))),i},void 0!==t&&void 0!==m&&(t.exports=s)}}),b=g({"node_modules/crc-32/crc32.js"(e){var t;t=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,s=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):Array(4096);for(s=0;256!=s;++s)i[s]=e[s];for(s=0;256!=s;++s)for(r=e[s],t=256+s;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(s=1;16!=s;++s)o[s-1]="undefined"!=typeof Int32Array?i.subarray(256*s,256*s+256):i.slice(256*s,256*s+256);return o}(t),s=r[0],i=r[1],o=r[2],n=r[3],a=r[4],l=r[5],u=r[6],c=r[7],p=r[8],h=r[9],d=r[10],f=r[11],_=r[12],m=r[13],g=r[14];e.table=t,e.bstr=function(e,r){for(var s=-1^r,i=0,o=e.length;i<o;)s=s>>>8^t[(s^e.charCodeAt(i++))&255];return~s},e.buf=function(e,r){for(var y=-1^r,v=e.length-15,b=0;b<v;)y=g[e[b++]^255&y]^m[e[b++]^y>>8&255]^_[e[b++]^y>>16&255]^f[e[b++]^y>>>24]^d[e[b++]]^h[e[b++]]^p[e[b++]]^c[e[b++]]^u[e[b++]]^l[e[b++]]^a[e[b++]]^n[e[b++]]^o[e[b++]]^i[e[b++]]^s[e[b++]]^t[e[b++]];for(v+=15;b<v;)y=y>>>8^t[(y^e[b++])&255];return~y},e.str=function(e,r){for(var s=-1^r,i=0,o=e.length,n=0,a=0;i<o;)(n=e.charCodeAt(i++))<128?s=s>>>
18^t[(s^n)&255]:n<2048?s=(s=s>>>8^t[(s^(192|n>>6&31))&255])>>>8^t[(s^(128|63&n))&255]:n>=55296&&n<57344?(n=(1023&n)+64,a=1023&e.charCodeAt(i++),s=(s=(s=(s=s>>>8^t[(s^(240|n>>8&7))&255])>>>8^t[(s^(128|n>>2&63))&255])>>>8^t[(s^(128|a>>6&15|(3&n)<<4))&255])>>>8^t[(s^(128|63&a))&255]):s=(s=(s=s>>>8^t[(s^(224|n>>12&15))&255])>>>8^t[(s^(128|n>>6&63))&255])>>>8^t[(s^(128|63&n))&255];return~s}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"==typeof e?t(e):"function"==typeof define&&r.amdO?define(function(){var e={};return t(e),e}):t({}):t({})}}),w=g({"src/utils/store.js"(e,t){function r(e){let t;try{t=window[e];let r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return"undefined"!=typeof DOMException&&e instanceof DOMException&&("QuotaExceededError"===e.name||"QUOTA_EXCEEDED_ERR"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||-1!==e.toString().indexOf("QUOTA_EXCEEDED_ERR")||-1!==e.toString().indexOf("QuotaExceededError"))&&t&&0!==t.length}}t.exports={local:{overflow:{},get(e){let t=this.overflow[e];if(t)return t;if(!r("localStorage"))return null;let s=localStorage.getItem(e);if(s)try{return JSON.parse(s)}catch(e){return s}return null},set(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(r){this.overflow[e]=t}},remove(e){var t;(null==(t=this.overflow)?void 0:t[e])&&delete this.overflow[e],r("localStorage")&&localStorage.removeItem(e)},key(e){var t,s;if(!r("localStorage"))return null==(t=Object.keys(this.overflow))?void 0:t[e];let i=null==localStorage?void 0:localStorage.key(e),o=(null==localStorage?void 0:localStorage.length)||0;if(e>=o){let t=e-o;return null==(s=Object.keys(this.overflow))?void 0:s[t]}return i},length(){let e=Object.keys(this.overflow).length;return r("localStorage")?localStorage.length+e:e},clear(){this.overflow={},r("localStorage")&&localStorage.clear()}},session:{overflow:{},get(e){let t=this.overflow[e];if(t)return t;if(!r("sessionStorage"))return null;let s=sessionStorage.getItem(e);if(s)try{return JSON.parse(s)}catch(e){return s}return null},set(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(r){this.overflow[e]=t}},remove(e){var t;(null==(t=this.overflow)?void 0:t[e])&&delete this.overflow[e],r("sessionStorage")&&sessionStorage.removeItem(e)},key(e){var t,s;if(!r("sessionStorage"))return null==(t=Object.keys(this.overflow))?void 0:t[e];let i=null==sessionStorage?void 0:sessionStorage.key(e),o=(null==sessionStorage?void 0:sessionStorage.length)||0;if(e>=o){let t=e-o;return null==(s=Object.keys(this.overflow))?void 0:s[t]}return i},length(){let e=Object.keys(this.overflow).length;return r("sessionStorage")?sessionStorage.length+e:e},clear(){this.overflow={},r("sessionStorage")&&sessionStorage.clear()}},canUseStorage:r}}}),q=g({"src/utils/helpers.js"(e,t){var r=b(),s=w(),i="_constructorio_purchase_order_ids",o=[{pattern:/[\w\-+\\.]+@([\w-]+\.)+[\w-]{2,4}/,replaceWith:"<email_omitted>"},{pattern:/^(?:\+\d{11,12}|\+\d{1,3}\s\d{3}\s\d{3}\s\d{3,4}|\(\d{3}\)\d{7}|\(\d{3}\)\s\d{3}\s\d{4}|\(\d{3}\)\d{3}-\d{4}|\(\d{3}\)\s\d{3}-\d{4})$/,replaceWith:"<phone_omitted>"},{pattern:/^(?:4[0-9]{15}|(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11})$/,replaceWith:"<credit_omitted>"}],n=2e3,a={trimNonBreakingSpaces:e=>e.replace(/\s/g," ").trim(),encodeURIComponentRFC3986:e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),cleanParams:e=>{let t={};return Object.keys(e).forEach(r=>{let s=e[r];"string"==typeof s?t[r]=a.trimNonBreakingSpaces(s):t[r]=s}),t},trimUrl:(e,t=n)=>{let r=e.toString();if(r.length<=t)return r;let s=new URL(e.toString()),{searchParams:i}=s,o=Array.from(i.entries());if(0===o.length)return a.truncateString(r,t);o.sort((e,t)=>{let r=e[0].length+e[1].length;return t[0].length+t[1].length-r});for(let e=0;e<o.length&&!(r.length<=t);e+=1)i.delete(o[e][0]),r=s.toString();return r.length>t?a.truncateString(r,t):r},cleanAndValidateUrl:(e,t)=>{let r=null;try{(null==e?void 0:e.startsWith("android-app"))&&(e=null==e?void 0:e.replace("android-app","https"));let s=new URL(e,t);r=new URL(a.trimUrl(s)).toString()}catch(e){}return r},throwHttpErrorFromResponse:(e,t)=>t.json().then(r=>{throw e.message=r.message,e.status=t.status,e.statusText=t.statusText,e.url=t.url,e.headers=t.headers,e}),canUseDOM:()=>!!("undefined"!=typeof window&&window.document&&window.document.createElement),addEventListener:(e,t,r)=>{a.canUseDOM()&&window.addEventListener(e,t,r)},removeEventListener:(e,t,r)=>{a.canUseDOM()&&window.removeEventListener(e,t,r)},getNavigator:()=>a.canUseDOM()?window.navigator:{userAgent:"",webdriver:!1},isNil:e=>null==e,getWindowLocation:()=>a.canUseDOM()?window.location:{},getDocumentReferrer:()=>{let e=null;try{a.canUseDOM()&&(e=a.cleanAndValidateUrl(document.referrer))}catch(e){}return e},getCanonicalUrl:()=>{let e=null;try{if(a.canUseDOM()){let t=null==document?void 0:document.querySelector('link[rel="canonical"]'),r=null==t?void 0:t.getAttribute("href");r&&(e=a.cleanAndValidateUrl(r,document.location.href))}}catch(e){}return e},dispatchEvent:e=>{a.canUseDOM()&&window.dispatchEvent(e)},createCustomEvent:(e,t)=>
1{if(a.canUseDOM())try{return new window.CustomEvent(e,{detail:t})}catch(s){let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!1,t),r}return null},hasOrderIdRecord({orderId:e,apiKey:t}){let o=e;t&&(o=`${t}-${e}`);let n=r.str(o.toString()),a=s.local.get(i);return"string"==typeof a&&(a=JSON.parse(a)),!!(a&&a.includes(n))||null},addOrderIdRecord({orderId:e,apiKey:t}){let o=e;t&&(o=`${t}-${e}`);let n=r.str(o.toString()),a=s.local.get(i);if("string"==typeof a&&(a=JSON.parse(a)),a){if(a.includes(n))return;a.length>=10&&(a=a.slice(-9)),a.push(n)}else a=[n];s.local.set(i,a)},applyNetworkTimeout:(e={},t={},r=null)=>{let s=e&&e.networkParameters&&e.networkParameters.timeout,i=t&&t.timeout||s;"number"==typeof i&&r&&setTimeout(()=>r.abort(),i)},stringify:(e,t,r)=>{if(!e)return"";let s=[];return Object.keys(e).forEach(i=>{let o,n=e[i],l=a.encodeURIComponentRFC3986(i);if(null!=n){let e=t?`${t}%5B${l}%5D`:l;o=Array.isArray(n)?a.stringify(n,e,"array"):"object"==typeof n?a.stringify(n,e,"object"):"object"===r?`${e}=${a.encodeURIComponentRFC3986(n)}`:`${t||l}=${a.encodeURIComponentRFC3986(n)}`,s.push(o)}}),s.join("&")},toSnakeCase:e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),toSnakeCaseKeys:(e,t=!1)=>{let r={};return Object.keys(e).forEach(s=>{r[a.toSnakeCase(s)]=t&&"object"==typeof e[s]&&!Array.isArray(e[s])?a.toSnakeCaseKeys(e[s],t):e[s]}),r},containsPii(e,t){let r=e.toLowerCase();return t.test(r)},obfuscatePiiRequest(e){var t,r,s;let i=e;try{let n=new URL(e),l=null==(t=null==n?void 0:n.pathname)?void 0:t.split("/"),u=null==(s=null==(r=null==n?void 0:n.search)?void 0:r.split("&"))?void 0:s.map(e=>{var t;return null==(t=e.split("="))?void 0:t[1]});o.forEach(({pattern:e,replaceWith:t})=>{l.forEach(r=>{let s=decodeURIComponent(r);a.containsPii(s,e)&&(i=i.replaceAll(r,t))}),u.forEach(r=>{let s=decodeURIComponent(r);a.containsPii(s,e)&&(i=i.replaceAll(s,t))})})}catch(e){}return i},convertResponseToJson:e=>e.ok?e.json().catch(()=>e.text().then(t=>{throw Error(`Server responded with an invalid JSON object. Response code: ${e.code}, Response: ${t}`)})):a.throwHttpErrorFromResponse(Error(),e),addHTTPSToString(e,t=!1){if("string"!=typeof e)return null;let r=e.startsWith("https://"),s=e.startsWith("http://");return!r&&s?t?e:e.replace("http","https"):s||r?e:`https://${e}`},truncateString:(e,t)=>e.slice(0,t),toValidTestCells:e=>{if(!e||"object"!=typeof e||Array.isArray(e))return{};let t={};return Object.keys(e).forEach(r=>{"string"==typeof e[r]&&""!==e[r].trim()&&(t[r]=e[r])}),t},applyWindowParameterGetters:e=>{if(!a.canUseDOM())return;let t=(t,r,s)=>{let i=e[t]||void 0;Object.defineProperty(e,t,{get(){if(s(i))return i;let e=window.cnstrc&&window.cnstrc[r]||window[`cnstrc${r.charAt(0).toUpperCase()}${r.slice(1)}`];return s(e)?e:void 0},set(e){i=e},enumerable:!0,configurable:!0})};t("userId","userId",e=>"string"==typeof e&&e.length>0),t("segments","userSegments",e=>Array.isArray(e)&&e.length>0);let r=e.testCells||void 0;Object.defineProperty(e,"testCells",{get(){if(r&&Object.keys(r).length>0)return r;let e=window.cnstrc&&window.cnstrc.testCells||window.cnstrcTestCells,t=a.toValidTestCells(e);if(t&&Object.keys(t).length>0)return t},set(e){r=e},enumerable:!0,configurable:!0})},getBehaviorUrl:e=>{let t=new URL(e);return t.hostname.startsWith("behavior")||(t.hostname=`behavior.${t.hostname}`),t}};t.exports=a}}),k=g({"src/utils/event-dispatcher.js"(e,t){var r=q();t.exports=class{constructor(e){this.events=[],this.enabled=!e||!1!==e.enabled,this.waitForBeacon=!e||!1!==e.waitForBeacon,this.active=this.enabled,this.waitForBeacon&&(this.active=!1,r.canUseDOM()&&(window.ConstructorioAutocomplete||window.ConstructorioBeacon||window.ConstructorioTracker)&&this.enabled&&(this.active=!0,this.dispatchEvents()),r.addEventListener("cio.beacon.loaded",()=>{this.enabled&&(this.active=!0,this.dispatchEvents())}))}queue(e,t){this.events.push({name:e,data:t}),this.active&&this.dispatchEvents()}dispatchEvents(){for(;this.events.length;){let{name:e,data:t}=this.events.shift(),s=`cio.client.${e}`;r.dispatchEvent(r.createCustomEvent(s,t))}}}}}),E=g({"src/modules/search.js"(e,t){var r=k(),s=q();function i(e,t,r,o=!1){let{apiKey:n,version:a,serviceUrl:l,sessionId:u,clientId:c,userId:p,segments:h,testCells:d}=r,f={c:a};if(f.key=n,f.i=c,f.s=u,!e||"string"!=typeof e)throw Error("query is a required parameter of type string");
1if(d&&Object.keys(d).forEach(e=>{f[`ef-${e}`]=d[e]}),h&&h.length&&(f.us=h),p&&(f.ui=String(p)),t){let{offset:e,page:r,resultsPerPage:i,filters:o,sortBy:n,sortOrder:a,section:l,fmtOptions:u,hiddenFields:c,hiddenFacets:p,variationsMap:h,qsParam:d,preFilterExpression:_,filterMatchTypes:m}=t;s.isNil(e)||(f.offset=e),s.isNil(r)||(f.page=r),s.isNil(i)||(f.num_results_per_page=i),o&&(f.filters=o),m&&(f.filter_match_types=m),n&&(f.sort_by=n),a&&(f.sort_order=a),l&&(f.section=l),u&&(f.fmt_options=u),c&&(f.fmt_options?f.fmt_options.hidden_fields=c:f.fmt_options={hidden_fields:c}),p&&(f.fmt_options?f.fmt_options.hidden_facets=p:f.fmt_options={hidden_facets:p}),h&&(f.variations_map=JSON.stringify(h)),_&&(f.pre_filter_expression=JSON.stringify(_)),d&&(f.qs=JSON.stringify(d))}f._dt=Date.now(),f=s.cleanParams(f);let _=s.stringify(f);return`${l}/${o?"search/natural_language":"search"}/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}?${_}`}t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getSearchResults(e,t,r={}){let o,n,{fetch:a}=this.options;if("function"==typeof AbortController){let e=new AbortController;n=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{o=i(e,t,this.options)}catch(e){return Promise.reject(e)}return a(o,{signal:n}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.results)return e.result_id&&e.response.results.forEach(t=>{t.result_id=e.result_id}),this.eventDispatcher.queue("search.getSearchResults.completed",e),e;if(e.response&&e.response.redirect)return this.eventDispatcher.queue("search.getSearchResults.completed",e),e;throw Error("getSearchResults response data is malformed")})}getVoiceSearchResults(e,t,r={}){let o,n,{fetch:a}=this.options;if("function"==typeof AbortController){let e=new AbortController;n=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{o=i(e,t,this.options,!0)}catch(e){return Promise.reject(e)}return a(o,{signal:n}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.results)return e.result_id&&e.response.results.forEach(t=>{t.result_id=e.result_id}),this.eventDispatcher.queue("search.getVoiceSearchResults.completed",e),e;if(e.response&&e.response.redirect)return this.eventDispatcher.queue("search.getVoiceSearchResults.completed",e),e;throw Error("getVoiceSearchResults response data is malformed")})}}}}),S=g({"src/modules/browse.js"(e,t){var r=k(),s=q();function i(e,t){let{apiKey:r,version:i,sessionId:o,clientId:n,userId:a,segments:l,testCells:u}=t,c={c:i};if(c.key=r,c.i=n,c.s=o,u&&Object.keys(u).forEach(e=>{c[`ef-${e}`]=u[e]}),l&&l.length&&(c.us=l),a&&(c.ui=String(a)),e){let{page:t,offset:r,resultsPerPage:i,filters:o,sortBy:n,sortOrder:a,section:l,fmtOptions:u,hiddenFields:p,hiddenFacets:h,variationsMap:d,qsParam:f,preFilterExpression:_,filterMatchTypes:m}=e;s.isNil(t)||(c.page=t),s.isNil(r)||(c.offset=r),s.isNil(i)||(c.num_results_per_page=i),o&&(c.filters=o),m&&(c.filter_match_types=m),n&&(c.sort_by=n),a&&(c.sort_order=a),l&&(c.section=l),u&&(c.fmt_options=u),p&&(c.fmt_options?c.fmt_options.hidden_fields=p:c.fmt_options={hidden_fields:p}),h&&(c.fmt_options?c.fmt_options.hidden_facets=h:c.fmt_options={hidden_facets:h}),d&&(c.variations_map=JSON.stringify(d)),_&&(c.pre_filter_expression=JSON.stringify(_)),f&&(c.qs=JSON.stringify(f))}return c._dt=Date.now(),c=s.cleanParams(c)}t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getBrowseResults(e,t,r,o={}){let n,a,{fetch:l}=this.options;if("function"==typeof AbortController){let e=new AbortController;a=e&&e.signal,s.applyNetworkTimeout(this.options,o,e)}try{n=function(e,t,r,o){let{serviceUrl:n}=o;if(!e||"string"!=typeof e)throw Error("filterName is a required parameter of type string");if(!t||"string"!=typeof t)throw Error("filterValue is a required parameter of type string");let a=i(r,o),l=s.stringify(a);return`${n}/browse/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(t))}?${l}`}(e,t,r,this.options)}catch(e){return Promise.reject(e)}return l(n,{signal:a}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.results)return e.result_id&&e.response.results.forEac
1h(t=>{t.result_id=e.result_id}),this.eventDispatcher.queue("browse.getBrowseResults.completed",e),e;throw Error("getBrowseResults response data is malformed")})}getBrowseResultsForItemIds(e,t,r={}){let o,n,{fetch:a}=this.options;if("function"==typeof AbortController){let e=new AbortController;n=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{o=function(e,t,r){let{serviceUrl:o}=r;if(!e||!Array.isArray(e)||!e.length)throw Error("ids is a required parameter of type array");let n=_(f({},i(t,r)),{ids:e}),a=s.stringify(n);return`${o}/browse/items?${a}`}(e,t,this.options)}catch(e){return Promise.reject(e)}return a(o,{signal:n}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.results)return e.result_id&&e.response.results.forEach(t=>{t.result_id=e.result_id}),this.eventDispatcher.queue("browse.getBrowseResultsForItemIds.completed",e),e;throw Error("getBrowseResultsForItemIds response data is malformed")})}getBrowseGroups(e,t={}){let r,{fetch:o}=this.options,{serviceUrl:n}=this.options,a=i(e,this.options);if("function"==typeof AbortController){let e=new AbortController;r=e&&e.signal,s.applyNetworkTimeout(this.options,t,e)}delete a._dt;let l=s.stringify(a);return o(`${n}/browse/groups?${l}`,{signal:r}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.groups)return this.eventDispatcher.queue("browse.getBrowseGroups.completed",e),e;throw Error("getBrowseGroups response data is malformed")})}getBrowseFacets(e,t){let r,o,{fetch:n}=this.options;if("function"==typeof AbortController){let e=new AbortController;o=e&&e.signal,s.applyNetworkTimeout(this.options,t,e)}try{r=function(e,t){let{serviceUrl:r}=t,o=f({},i(e,t));delete o._dt;let n=s.stringify(o);return`${r}/browse/facets?${n}`}(e,this.options)}catch(e){return Promise.reject(e)}return n(r,{signal:o}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.facets)return this.eventDispatcher.queue("browse.getBrowseFacets.completed",e),e;throw Error("getBrowseFacets response data is malformed")})}getBrowseFacetOptions(e,t={},r={}){let o,n,{fetch:a}=this.options;if("function"==typeof AbortController){let e=new AbortController;n=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{o=function(e,t,r){let{serviceUrl:o}=r;if(!e||"string"!=typeof e)throw Error("facetName is a required parameter of type string");let n=f({},i(t,r));n.facet_name=e,delete n._dt;let a=s.stringify(n);return`${o}/browse/facet_options?${a}`}(e,t,this.options)}catch(e){return Promise.reject(e)}return a(o,{signal:n}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.facets)return this.eventDispatcher.queue("browse.getBrowseFacetOptions.completed",e),e;throw Error("getBrowseFacetOptions response data is malformed")})}}}}),A=g({"src/modules/autocomplete.js"(e,t){var r=k(),{convertResponseToJson:s,cleanParams:i,applyNetworkTimeout:o,trimNonBreakingSpaces:n,encodeURIComponentRFC3986:a,stringify:l}=q();t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getAutocompleteResults(e,t,r={}){let u,c,{fetch:p}=this.options;if("function"==typeof AbortController){let e=new AbortController;c=e&&e.signal,o(this.options,r,e)}try{u=function(e,t,r){let{apiKey:s,version:o,serviceUrl:u,sessionId:c,clientId:p,userId:h,segments:d,testCells:f}=r,_={c:o};if(_.key=s,_.i=p,_.s=c,!e||"string"!=typeof e)throw Error("query is a required parameter of type string");if(f&&Object.keys(f).forEach(e=>{_[`ef-${e}`]=f[e]}),d&&d.length&&(_.us=d),h&&(_.ui=String(h)),t){let{numResults:e,resultsPerSection:r,filters:s,filtersPerSection:i,hiddenFields:o,variationsMap:n,preFilterExpression:a,preFilterExpressionPerSection:l,qsParam:u,fmtOptions:c}=t;e&&(_.num_results=e),r&&Object.keys(r).forEach(e=>{_[`num_results_${e}`]=r[e]}
1),s&&(_.filters=s),i&&Object.keys(i).forEach(e=>{_[`filters[${e}]`]=i[e]}),a&&(_.pre_filter_expression=JSON.stringify(a)),l&&Object.keys(l).forEach(e=>{_[`pre_filter_expression[${e}]`]=JSON.stringify(l[e])}),c&&(_.fmt_options=c),o&&(_.fmt_options?_.fmt_options.hidden_fields=o:_.fmt_options={hidden_fields:o}),n&&(_.variations_map=JSON.stringify(n)),u&&(_.qs=JSON.stringify(u))}_._dt=Date.now();let m=l(_=i(_)),g=e.replace(/^\//,"|");return`${u}/autocomplete/${a(n(g))}?${m}`}(e,t,this.options)}catch(e){return Promise.reject(e)}return p(u,{signal:c}).then(s).then(e=>{if(e.sections)return e.result_id&&Object.keys(e.sections).forEach(t=>{let r=e.sections[t];r.length&&r.forEach(t=>{t.result_id=e.result_id})}),this.eventDispatcher.queue("autocomplete.getAutocompleteResults.completed",e),e;throw Error("getAutocompleteResults response data is malformed")})}}}}),O=g({"src/modules/recommendations.js"(e,t){var r=k(),s=q();t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getRecommendations(e,t,r={}){let i,o,{fetch:n}=this.options;if("function"==typeof AbortController){let e=new AbortController;o=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{i=function(e,t,r){let{apiKey:i,version:o,serviceUrl:n,sessionId:a,userId:l,clientId:u,segments:c,testCells:p}=r,h={c:o};if(h.key=i,h.i=u,h.s=a,!e||"string"!=typeof e)throw Error("podId is a required parameter of type string");if(c&&c.length&&(h.us=c),l&&(h.ui=String(l)),p&&Object.keys(p).forEach(e=>{h[`ef-${e}`]=p[e]}),t){let{numResults:e,itemIds:r,variationId:i,section:o,term:n,filters:a,variationsMap:l,hiddenFields:u,preFilterExpression:c,fmtOptions:p}=t;if(s.isNil(e)||(h.num_results=e),r&&(h.item_id=r),i){if(!r||"string"==typeof r&&!r.trim())throw Error("itemIds is a required parameter for variationId");if(Array.isArray(r)&&!r.length)throw Error("At least one itemId is a required parameter for variationId");h.variation_id=i}o&&(h.section=o),n&&(h.term=n),a&&(h.filters=a),p&&(h.fmt_options=p),u&&(h.fmt_options?h.fmt_options.hidden_fields=u:h.fmt_options={hidden_fields:u}),l&&(h.variations_map=JSON.stringify(l)),c&&(h.pre_filter_expression=JSON.stringify(c))}h=s.cleanParams(h);let d=s.stringify(h);return`${n}/recommendations/v1/pods/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}?${d}`}(e,t,this.options)}catch(e){return Promise.reject(e)}return n(i,{signal:o}).then(s.convertResponseToJson).then(e=>{if(e.response&&e.response.results)return e.result_id&&e.response.results.forEach(t=>{t.result_id=e.result_id}),this.eventDispatcher.queue("recommendations.getRecommendations.completed",e),e;throw Error("getRecommendations response data is malformed")})}}}}),j=g({"src/utils/events.js"(e,t){var r,s="object"==typeof Reflect?Reflect:null,i=s&&"function"==typeof s.apply?s.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}t.exports=n,t.exports.once=function(e,t){return new Promise(function(r,s){var i,o,n;function a(r){e.removeListener(t,l),s(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}m(e,t,l,{once:!0}),"error"!==t&&(i=e,o=a,n={once:!0},"function"==typeof i.on&&m(i,"error",o,n))})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function c(e,t,r,s){if(l(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),n=o[t]),void 0===n)n=o[t]=r,++e._eventsCount;else if("function"==typeof n?n=o[t]=s?[r,n]:[n,r]:s?n.unshift(r):n.push(r),(i=u(e))>0&&n.length>i&&!n.warned){n.warned=!0;var i,o,n,a=Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=n.length,console&&console.warn&&console.warn(a)}return e}function p(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=p.bind(s);return i.listener=r,s.wrapFn=i,i}function d(e,t,r){var s=e._events;if(void 0===s)return[];var i=s[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):_(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function _(e,t){for(var r=Array(t),s=0;s<t;++s)r[s]=e[s];return r}function m(e,t,r,s){if("function"==typeof e.on)s.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){s.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
1,set:function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),n.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return u(this)},n.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,o=this._events;if(void 0!==o)s=s&&void 0===o.error;else if(!s)return!1;if(s){if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var n,a,l="";if(n&&n.message)l=" ("+n.message+")";else if(null!=n){try{a=JSON.stringify(n)}catch(e){a=void 0}"string"!=typeof a&&(a=Object.prototype.toString.call(n)),l=" ("+a+")"}var u=Error("Unhandled error."+l);throw u.context=n,u}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else for(var p=c.length,h=_(c,p),r=0;r<p;++r)i(h[r],this,t);return!0},n.prototype.addListener=function(e,t){return c(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return c(this,e,t,!0)},n.prototype.once=function(e,t){return l(t),this.on(e,h(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,h(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,s,i,o,n;if(l(t),void 0===(s=this._events)||void 0===(r=s[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){n=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(s[e]=r[0]),void 0!==s.removeListener&&this.emit("removeListener",e,n||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,s;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(s=0;s<o.length;++s)"removeListener"!==(i=o[s])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this},n.prototype.listeners=function(e){return d(this,e,!0)},n.prototype.rawListeners=function(e){return d(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},n.prototype.listenerCount=f,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),$=g({"src/utils/botlist.js"(e,t){t.exports=["Googlebot/","Googlebot-Mobile","Googlebot-Image","Googlebot-News","Googlebot-Video","Storebot-Google","Google-InspectionTool","GoogleOther","Google-CloudVertexBot","AdsBot-Google([^-]|$)","AdsBot-Google-Mobile","Feedfetcher-Google","Mediapartners-Google","Mediapartners \\(Googlebot\\)","APIs-Google","bingbot","Slurp","[wW]get","curl","LinkedInBot","Python-urllib","python-requests","libwww","httpunit","nutch","Go-http-client","phpcrawl","msnbot","jyxobot","FAST-WebCrawler","FAST Enterprise Crawler","BIGLOTRON","Teoma","convera","seekbot","Gigabot","Gigablast","exabot","ia_archiver","GingerCrawler","webmon ","HTTrack","grub\\.org","UsineNouvelleCrawler","antibot","netresearchserver","speedy","fluffy","bibnum\\.bnf","findlink","msrbot","panscient","yacybot","AISearchBot","ips-agent","tagoobot","MJ12bot","woriobot","yanga","buzzbot","mlbot","YandexBot","yandex\\.com/bots","purebot","Linguee Bot","CyberPatrol","voilabot","Baiduspider","citeseerxbot","spbot","twengabot","postrank","turnitinbot","scribdbot","page2rss","sitebot","linkdex","Adidxbot","blekkobot","ezooms","dotbot","Mail\\.RU_Bot","discobot","heritrix","findthatfile","europarchive\\.org","NerdByNature\\.Bot","sistrix crawler","Ahrefs(Bot|SiteAudit)","fuelbot","CrunchBot","centurybot9","IndeedBot","mappydata","woobot","ZoominfoBot","PrivacyAwareBot","Multiviewbot","SWIMGBot","Grobbot","eright","Apercite","semanticbot","Aboundex","domaincrawler","wbsearchbot","summify","CCBot","edisterbot","seznambot","ec2linkfinder","gslfbot","aiHitBot","intelium_bot","facebookexternalhit","Yeti","RetrevoPageAnalyzer","lb-spider","Sogou","lssbot","careerbot","
1wotbox","wocbot","ichiro","DuckDuckBot","lssrocketcrawler","drupact","webcompanycrawler","acoonbot","openindexspider","gnam gnam spider","web-archive-net\\.com\\.bot","backlinkcrawler","coccoc","integromedb","content crawler spider","toplistbot","it2media-domain-crawler","ip-web-crawler\\.com","siteexplorer\\.info","elisabot","proximic","changedetection","arabot","WeSEE:Search","niki-bot","CrystalSemanticsBot","rogerbot","360Spider","psbot","InterfaxScanBot","CC Metadata Scaper","g00g1e\\.net","GrapeshotCrawler","urlappendbot","brainobot","fr-crawler","binlar","SimpleCrawler","Twitterbot","cXensebot","smtbot","bnf\\.fr_bot","A6-Indexer","ADmantX","Facebot","OrangeBot/","memorybot","AdvBot","MegaIndex","SemanticScholarBot","ltx71","nerdybot","xovibot","BUbiNG","Qwantify","archive\\.org_bot","Applebot","TweetmemeBot","crawler4j","findxbot","S[eE][mM]rushBot","yoozBot","lipperhey","Y!J","Domain Re-Animator Bot","AddThis","Screaming Frog SEO Spider","MetaURI","Scrapy","Livelap[bB]ot","OpenHoseBot","CapsuleChecker","collection@infegy\\.com","IstellaBot","DeuSu/","betaBot","Cliqzbot/","MojeekBot/","netEstate NE Crawler","SafeSearch microdata crawler","Gluten Free Crawler/","Sonic","Sysomos","Trove","deadlinkchecker","Slack-ImgProxy","Embedly","RankActiveLinkBot","iskanie","SafeDNSBot","SkypeUriPreview","Veoozbot","Slackbot","redditbot","datagnionbot","Google-Adwords-Instant","adbeat_bot","WhatsApp","contxbot","pinterest","electricmonk","GarlikCrawler","BingPreview/","vebidoobot","FemtosearchBot","Yahoo Link Preview","MetaJobBot","DomainStatsBot","mindUpBot","Daum/","Jugendschutzprogramm-Crawler","Xenu Link Sleuth","Pcore-HTTP","moatbot","KosmioBot","pingdom","PhantomJS","Gowikibot","PiplBot","Discordbot","TelegramBot","Jetslide","newsharecounts","James BOT","Barkrowler","TinEye","SocialRankIOBot","trendictionbot","Ocarinabot","epicbot","Primalbot","DuckDuckGo-Favicons-Bot","GnowitNewsbot","Leikibot","LinkArchiver","YaK/","PaperLiBot","Digg Deeper","dcrawl","Snacktory","AndersPinkBot","Fyrebot","EveryoneSocialBot","Mediatoolkitbot","Luminator-robots","ExtLinksBot","SurveyBot","NING/","okhttp","Nuzzel","omgili","PocketParser","YisouSpider","um-LN","ToutiaoSpider","MuckRack","Jamie's Spider","AHC/","NetcraftSurveyAgent","Laserlikebot","Apache-HttpClient","AppEngine-Google","Jetty","Upflow","Thinklab","Traackr\\.com","Twurly","Mastodon","http_get","DnyzBot","botify","007ac9 Crawler","BehloolBot","BrandVerity","check_http","BDCbot","ZumBot","EZID","ICC-Crawler","ArchiveBot","^LCC ","filterdb\\.iss\\.net/crawler","BLP_bbot","BomboraBot","Buck/","Companybook-Crawler","Genieo","magpie-crawler","MeltwaterNews","Moreover","newspaper/","ScoutJet","(^| )sentry/","StorygizeBot","UptimeRobot","OutclicksBot","seoscanners","Hatena","Google Web Preview","MauiBot","AlphaBot","SBL-BOT","IAS crawler","adscanner","Netvibes","acapbot","Baidu-YunGuanCe","bitlybot","blogmuraBot","Bot\\.AraTurka\\.com","bot-pge\\.chlooe\\.com","BoxcarBot","BTWebClient","ContextAd Bot","Digincore bot","Disqus","Feedly","Fetch/","Fever","Flamingo_SearchEngine","FlipboardProxy","g2reader-bot","imrbot","K7MLWCBot","Kemvibot","Landau-Media-Spider","linkapediabot","vkShare","Siteimprove\\.com","BLEXBot/","DareBoost","ZuperlistBot/","Miniflux/","Feedspotbot/","Diffbot/","SEOkicks","tracemyfile","Nimbostratus-Bot","Bytespider","BTTAgent","OnCrawl"]}}),C=g({"src/utils/humanity-check.js"(e,t){var r=w(),s=$(),i=q(),o="_constructorio_is_human",n=["scroll","resize","touchmove","mouseover","mousemove","keydown","keypress","keyup","focus"];t.exports=class{constructor(e={}){let{humanityCheckLocation:t}=e;this.store="local"===t?r.local:r.session,this.hasPerformedHumanEvent=this.getIsHumanFromStorage();let s=()=>
1{this.hasPerformedHumanEvent=!0,this.store.set(o,!0),n.forEach(e=>{i.removeEventListener(e,s,!0)})};this.hasPerformedHumanEvent||n.forEach(e=>{i.addEventListener(e,s,!0)})}getIsHumanFromStorage(){return!!this.store.get(o)}getIsHumanFromSessionStorage(){return!!r.session.get(o)}isBot(){let{userAgent:e,webdriver:t}=i.getNavigator(),r=RegExp(`(${s.join("|")})`);return!(!e.match(r)&&!t&&this.getIsHumanFromStorage())}}}}),R=g({"src/utils/request-queue.js"(e,t){var r=w(),s=C(),i=q(),{obfuscatePiiRequest:o}=q(),n="_constructorio_requests";t.exports=class e{constructor(e,t){this.options=e,this.eventemitter=t,this.humanity=new s(e),this.requestPending=!1,this.pageUnloading=!1,this.sendTrackingEvents=!!e&&!0===e.sendTrackingEvents,i.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?this.pageUnloading=!0:"visible"===document.visibilityState&&!0===this.pageUnloading&&(this.pageUnloading=!1,this.sendTrackingEvents&&this.send())}),this.sendTrackingEvents&&this.send()}queue(t,r="GET",s={},n={}){if(this.sendTrackingEvents&&(!i.canUseDOM()||!this.humanity.isBot())){let i=e.get(),a=o(t);i.push({url:a,method:r,body:s,networkParameters:n}),e.set(i)}}sendEvents(){let{fetch:t}=this.options,r=e.get();if((!i.canUseDOM()||!this.humanity.isBot())&&!this.requestPending&&!this.pageUnloading&&r.length){let s,o,n=r.shift(),{networkParameters:a}=n,l=this;if(e.set(r),a&&"function"==typeof AbortController){let e=new AbortController;({signal:o}=e),i.applyNetworkTimeout(this.options,a,e)}if("string"==typeof n&&(n={url:n,method:"GET"}),n.url){let t=n.url.match(/\?.*_dt=([^&]+)/),r=parseInt(t&&t[1],10),s=+new Date;if(r&&Number.isInteger(r)&&s-r>18e4){this.sendTrackingEvents=!1,e.remove();return}}"GET"===n.method&&(s=t(n.url,{signal:o})),"POST"===n.method&&(s=t(n.url,{method:n.method,body:JSON.stringify(n.body),mode:"cors",headers:{"Content-Type":"text/plain"},signal:o})),s&&(this.requestPending=!0,s.then(e=>{e.ok?(l.eventemitter&&l.eventemitter.emit("success",{url:n.url,method:n.method,message:"ok"}),this.requestPending=!1,this.send()):e.json().then(e=>{l.eventemitter&&l.eventemitter.emit("error",{url:n.url,method:n.method,message:e&&e.message}),this.requestPending=!1,this.send()}).catch(e=>{l.eventemitter&&l.eventemitter.emit("error",{url:n.url,method:n.method,message:e.type}),this.requestPending=!1,this.send()})}).catch(e=>{l.eventemitter&&l.eventemitter.emit("error",{url:n.url,method:n.method,message:e&&e.toString&&e.toString()}),this.requestPending=!1,this.send()}))}}send(){this.sendTrackingEvents&&(this.options&&0===this.options.trackingSendDelay?this.sendEvents():setTimeout(this.sendEvents.bind(this),this.options&&this.options.trackingSendDelay||250))}static get(){return r.local.get(n)||[]}static set(t){!t||Array.isArray(t)&&0===t.length?e.remove():r.local.set(n,t);let s=e.get();Array.isArray(s)&&s.length!==t.length&&(this.sendTrackingEvents=!1,e.remove())}static remove(){r.local.remove(n)}}}}),N=g({"src/modules/tracker.js"(e,t){var r=j(),s=q(),i=R();function o(e,t){let{apiKey:r,version:i,sessionId:o,clientId:n,userId:a,segments:l,testCells:u,requestMethod:c,beaconMode:p}=t,{host:h,pathname:d,search:f}=s.getWindowLocation(),_=s.getCanonicalUrl(),m=s.getDocumentReferrer(),g=!1!==t.sendReferrerWithTrackingEvents,y=Object.assign(e);if(i&&(y.c=i),n&&(y.i=n),o&&(y.s=o),a&&(y.ui=String(a)),l&&l.length&&(y.us=l),r&&(y.key=r),m&&(y.document_referrer=m),_&&(y.canonical_url=_),u&&Object.keys(u).forEach(e=>{y[`ef-${e}`]=u[e]}),p&&c&&c.match(/POST/i)&&(y.beacon=!0),g&&h&&(y.origin_referrer=h,d&&(y.origin_referrer+=d),f))try{let e=[];new URLSearchParams(f).forEach((t,r)=>{r.match(/utm_/)&&e.push(`${r}=${t}`)}),e.length&&(y.origin_referrer+=`?${e.join("&")}`)}catch(e){}return y._dt=Date.now(),y=s.cleanParams(y)}function n(e,t){return s.stringify(o(e,t))}var a=class{constructor(e){this.options=e||{},this.eventemitter=new r,this.requests=new i(e,this.eventemitter)}trackSessionStartV2(e={}){let t=`${this.options.serviceUrl}/v2/behavioral_action/session_start?`;return this.requests.queue(`${t}${n({},this.options)}`,"POST",void 0,e),this.requests.send(),!0}trackSessionStart(e={}){let t=`${this.options.serviceUrl}/behavior?`;return this.requests.queue(`${t}${n({action:"session_start"},this.options)}`,void 0,void 0,e),this.requests.send(),!0}trackInputFocusV2(e="",t={},r={}){let s=`${this.options.serviceUrl}/v2/behavioral_action/focus?`,i={},{analyticsTags:a=null}=t;a&&(i.analytics_tags=a),i.user_input=e;let l="POST",u=o(i,_(f({},this.options),{requestMethod:l}));return this.requests.queue(`${s}${n({},this.options)}`,l,u,r),this.requests.send(),!0}trackInputFocus(e={}){let t=`${this.options.serviceUrl}/behavior?`;return this.requests.queue(`${t}${n({action:"focus"},this.options)}`,void 0,void 0,e),this.requests.send(),!0}
1trackItemDetailLoad(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/item_detail_load?`,i={},{item_name:a,name:l,item_id:u,customer_id:c,customerId:p=c,variation_id:h,itemName:d=a||l,itemId:m=u||p,variationId:g=h,url:y,analyticsTags:v}=e;d&&(i.item_name=d),m&&(i.item_id=m),g&&(i.variation_id=g),v&&(i.analytics_tags=v),y&&(i.url=s.truncateString(y,2048));let b=`${r}${n({},this.options)}`,w="POST",q=o(i,_(f({},this.options),{requestMethod:w}));return this.requests.queue(b,w,q,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAutocompleteSelectV2(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let s=`${this.options.serviceUrl}/v2/behavioral_action/autocomplete_select?`,{original_query:i,originalQuery:a=i,user_input:l,userInput:u=a||l,original_section:c,section:p=c,tr:h,group_id:d,groupId:m=d,item_id:g,itemId:y=g,variation_id:v,variationId:b=v,slCampaignId:w,slCampaignOwner:q}=t,k={},E={user_input:u,tr:h,group_id:m,item_id:y,variation_id:b,item_name:e,section:p};p&&(k.section=p),w&&(E.sl_campaign_id=w),q&&(E.sl_campaign_owner=q);let S=`${s}${n(k,this.options)}`,A="POST",O=o(E,_(f({},this.options),{requestMethod:A}));return this.requests.queue(S,A,O,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackAutocompleteSelect(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let i=`${this.options.serviceUrl}/autocomplete/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}/select?`,o={},{original_query:a,originalQuery:l=a,section:u,original_section:c,originalSection:p=c,tr:h,group_id:d,groupId:f=d,display_name:_,displayName:m=_,item_id:g,itemId:y=g,slCampaignOwner:v,slCampaignId:b}=t;return l&&(o.original_query=l),h&&(o.tr=h),(p||u)&&(o.section=p||u),f&&(o.group={group_id:f,display_name:m}),y&&(o.item_id=y),b&&(o.sl_campaign_id=b),v&&(o.sl_campaign_owner=v),this.requests.queue(`${i}${n(o,this.options)}`,void 0,void 0,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackSearchSubmitV2(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let s=`${this.options.serviceUrl}/v2/behavioral_action/search_submit?`,{original_query:i,originalQuery:a=i,user_input:l,userInput:u=a||l,group_id:c,groupId:p=c,section:h,analyticsTags:d=null}=t,m={},g={user_input:u,search_term:e,section:h};p&&(g.filters={group_id:p}),h&&(m.section=h),d&&(g.analytics_tags=d);let y=`${s}${n(m,this.options)}`,v="POST",b=o(g,_(f({},this.options),{requestMethod:v}));return this.requests.queue(y,v,b,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackSearchSubmit(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let i=`${this.options.serviceUrl}/autocomplete/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}/search?`,o={},{original_query:a,originalQuery:l=a,group_id:u,groupId:c=u,display_name:p,displayName:h=p,analyticsTags:d}=t;return l&&(o.original_query=l),c&&(o.group={group_id:c,display_name:h}),d&&(o.analytics_tags=d),this.requests.queue(`${i}${n(o,this.options)}`,void 0,void 0,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackSearchResultsLoaded(e,t,r={}){var i,a,l;if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let u,c=`${this.options.serviceUrl}/v2/behavioral_action/search_result_load?`,{num_results:p,numResults:h=p,result_count:d,customerIds:m,customer_ids:g=m,itemIds:y,item_ids:v=y,items:b=g||v,result_page:w,resultPage:q=w,result_offset:k,resultOffset:E=k,result_id:S,resultId:A=S,sort_order:O,sortOrder:j=O,sort_by:$,sortBy:C=$,selected_filters:R,selectedFilters:N=R,url:T=(null==(i=s.getWindowLocation())?void 0:i.href)||"N/A",section:P,analyticsTags:I,resultCount:x=null!=(l=null!=(a=null!=h?h:d)?a:null==b?void 0:b.length)?l:0}=t,U={};b&&Array.isArray(b)&&0!==b.length&&(u="string"==typeof b[0]||"number"==typeof b[0]?b.map(e=>({item_id:String(e)})):b.map(e=>s.toSnakeCaseKeys(e,!1))),P&&(U.section=P);let B={search_term:e,result_count:x,items:u,result_page:q,result_offset:E,result_id:A,sort_order:j,sort_by:C,selected_filters:N,url:s.truncateString(T,2048),section:P,analytics_tags:I},D=`${c}${n(U,this.options)}`,L="POST",z=o(B,_(f({},this.options),{requestMethod:L}));return this.requests.queue(D,L,z,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackSearchResultClickV2(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let s=`${this.options.serviceUrl}/v2/behavioral_action/search_result_click?`,{num_results:i,customer_id:a,item_id:l,itemId:u=a||l,name:c,item_name:p,itemName:h=c||p,variation_id:d,variationId:m=d,result_id:g,resultId:y=g,result_count:v,resultCount:b=i||v,result_page:w,resultPage:q=w,result_offset:k,resultOffset:E=k,result_position_on_page:S,resultPositionOnPage:A=S,num_results_per_page:O,numResultsPerPage:j=O,selected_filters:$,selectedFilters:C=$,section:R,analyticsTags:N,slCampaignId:T,slCampaignOwner:P}=t,I={};R&&(I.section=R);let x=`${s}${n(I,this.options)}`,U="POST",B=o({sl_campaign_id:T,sl_campaign_owner:P,item_name:h,item_id:u,variation_id:m,result_id:y,result_count:b,result_page:q,result_offset:E,result_position_on_page:A,num_results_per_page:j,selected_filters:C,section:R,search_term:e,analytics_tags:N},_(f({},this.options),{requestMethod:U}));return this.requests.queue(x,U,B,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackSearchResultClick(e,t,r={}){if(e&&"string"==typeof e){if(t&&"object"==typeof t&&!Array.isArray(t)){let i=`${this.options.serviceUrl}/autocomplete/${s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(e))}/click_through?`,o={},{item_name:a,name:l,itemName:u=a||l,item_id:c,itemId:p=c,customer_id:h,customerId:d=h||p,variation_id:f,variationId:_=f,result_id:m,resultId:g=m,item_is_convert
1ible:y,itemIsConvertible:v=y,section:b,analyticsTags:w,slCampaignOwner:q,slCampaignId:k}=t;return u&&(o.name=u),d&&(o.customer_id=d),_&&(o.variation_id=_),g&&(o.result_id=g),"boolean"==typeof v&&(o.item_is_convertible=v),b&&(o.section=b),w&&(o.analytics_tags=w),k&&(o.sl_campaign_id=k),q&&(o.sl_campaign_owner=q),this.requests.queue(`${i}${n(o,this.options)}`,void 0,void 0,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}return this.requests.send(),Error("term is a required parameter of type string")}trackConversion(e,t,r={}){if(t&&"object"==typeof t&&!Array.isArray(t)){let s=e||"TERM_UNKNOWN",i=`${this.options.serviceUrl}/v2/behavioral_action/conversion?`,a={},l={},{name:u,item_name:c,itemName:p=c||u,customer_id:h,customerId:d=h,item_id:m,itemId:g=m||d,variation_id:y,variationId:v=y,revenue:b,section:w="Products",display_name:q,displayName:k=q,type:E,is_custom_type:S,isCustomType:A=S,analyticsTags:O}=t;g&&(l.item_id=g),p&&(l.item_name=p),v&&(l.variation_id=v),(b||0===b)&&(l.revenue=b.toString()),w&&(a.section=w,l.section=w),s&&(l.search_term=s),E&&(l.type=E),A&&(l.is_custom_type=A),k&&(l.display_name=k),O&&(l.analytics_tags=O);let j=`${i}${n(a,this.options)}`,$="POST",C=o(l,_(f({},this.options),{requestMethod:$}));return this.requests.queue(j,$,C,r),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackPurchase(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/purchase?`,i={},a={},{items:l,revenue:u,order_id:c,orderId:p=c,section:h,analyticsTags:d}=e,{apiKey:m}=this.options;if(p){if(s.hasOrderIdRecord({orderId:p,apiKey:m}))return!1;s.addOrderIdRecord({orderId:p,apiKey:m}),a.order_id=p}l&&Array.isArray(l)&&(a.items=l.slice(0,100).map(e=>s.toSnakeCaseKeys(e,!1))),(u||0===u)&&(a.revenue=u),h?i.section=h:i.section="Products",d&&(a.analytics_tags=d);let g=`${r}${n(i,this.options)}`,y="POST",v=o(a,_(f({},this.options),{requestMethod:y}));return this.requests.queue(g,y,v,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackRecommendationView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/recommendation_result_view?`,i={},{result_count:a,result_page:l,resultPage:u=l,result_offset:c,resultOffset:p=c,result_id:h,resultId:d=h,section:m,url:g,pod_id:y,podId:v=y,num_results_viewed:b,numResultsViewed:w=b,items:q,analyticsTags:k,seedItemIds:E,resultCount:S=a||(null==q?void 0:q.length)||0}=e;s.isNil(S)||(i.result_count=S),s.isNil(u)||(i.result_page=u),s.isNil(p)||(i.result_offset=p),d&&(i.result_id=d),m?i.section=m:i.section="Products",g&&(i.url=s.truncateString(g,2048)),v&&(i.pod_id=v),s.isNil(w)||(i.num_results_viewed=w),q&&Array.isArray(q)&&(i.items=q.slice(0,100).map(e=>s.toSnakeCaseKeys(e,!1))),k&&(i.analytics_tags=k),"number"==typeof E?i.seed_item_ids=[String(E)]:(null==E?void 0:E.length)&&"string"==typeof E?i.seed_item_ids=[E]:(null==E?void 0:E.length)&&Array.isArray(E)&&(i.seed_item_ids=E);let A=`${r}${n({},this.options)}`,O="POST",j=o(i,_(f({},this.options),{requestMethod:O}));return this.requests.queue(A,O,j,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackResultsImpressionView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let{items:r,filterName:i,filterValue:a,searchTerm:l}=e;if(!r||!Array.isArray(r)||0===r.length)return Error("items is a required parameter of type array");for(let e=0;e<r.length;e+=1){let t=r[e];if(!t||"object"!=typeof t||Array.isArray(t))return Error("All items must be objects");if(!t.itemId||"string"!=typeof t.itemId)return Error("itemId is a required property of type string for each item");if(!t.itemName||"string"!=typeof t.itemName)return Error("itemName is a required property of type string for each item")}let u=`${this.options.serviceUrl}/v2/behavioral_action/impression_view?`,c={items:r.map(e=>s.toSnakeCaseKeys(e,!1))};i&&(c.filter_name=i),a&&(c.filter_value=a),l&&(c.search_term=l);let p=`${u}${n({},this.options)}`,h="POST",d=o(c,_(f({},this.options),{requestMethod:h}));return this.requests.queue(p,h,d,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackMediaImpressionView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=s.getBehaviorUrl(this.options.mediaServiceUrl),i=`${r.toString()}v2/ad_behavioral_action/display_ad_view?`,a={}
1,{bannerAdId:l,placementId:u,analyticsTags:c}=e;s.isNil(l)||(a.banner_ad_id=l),s.isNil(u)||(a.placement_id=u),s.isNil(c)||(a.analytics_tags=c);let p=`${i}${n({},this.options)}`,h="POST",d=o(a,_(f({},this.options),{requestMethod:h}));return this.requests.queue(p,h,d,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackMediaImpressionClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=s.getBehaviorUrl(this.options.mediaServiceUrl),i=`${r.toString()}v2/ad_behavioral_action/display_ad_click?`,a={},{bannerAdId:l,placementId:u,analyticsTags:c}=e;s.isNil(l)||(a.banner_ad_id=l),s.isNil(u)||(a.placement_id=u),s.isNil(c)||(a.analytics_tags=c);let p=`${i}${n({},this.options)}`,h="POST",d=o(a,_(f({},this.options),{requestMethod:h}));return this.requests.queue(p,h,d,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackRecommendationClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/recommendation_result_click?`,i={},{variation_id:a,variationId:l=a,section:u="Products",result_id:c,resultId:p=c,result_count:h,resultCount:d=h,result_page:m,resultPage:g=m,result_offset:y,resultOffset:v=y,result_position_on_page:b,resultPositionOnPage:w=b,num_results_per_page:q,numResultsPerPage:k=q,pod_id:E,podId:S=E,strategy_id:A,strategyId:O=A,item_id:j,itemId:$=j,item_name:C,itemName:R=C,analyticsTags:N,slCampaignId:T,slCampaignOwner:P,seedItemIds:I}=e;l&&(i.variation_id=l),u&&(i.section=u),p&&(i.result_id=p),s.isNil(d)||(i.result_count=d),s.isNil(g)||(i.result_page=g),s.isNil(v)||(i.result_offset=v),s.isNil(w)||(i.result_position_on_page=w),s.isNil(k)||(i.num_results_per_page=k),S&&(i.pod_id=S),O&&(i.strategy_id=O),$&&(i.item_id=$),R&&(i.item_name=R),N&&(i.analytics_tags=N),T&&(i.sl_campaign_id=T),P&&(i.sl_campaign_owner=P),"number"==typeof I?i.seed_item_ids=[String(I)]:(null==I?void 0:I.length)&&"string"==typeof I?i.seed_item_ids=[I]:(null==I?void 0:I.length)&&Array.isArray(I)&&(i.seed_item_ids=I);let x=`${r}${n({},this.options)}`,U="POST",B=o(i,_(f({},this.options),{requestMethod:U}));return this.requests.queue(x,U,B,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackBrowseResultsLoaded(e,t={}){var r;if(e&&"object"==typeof e&&!Array.isArray(e)){let i=`${this.options.serviceUrl}/v2/behavioral_action/browse_result_load?`,a={},{section:l="Products",result_count:u,result_page:c,resultPage:p=c,result_offset:h,resultOffset:d=h,result_id:m,resultId:g=m,selected_filters:y,selectedFilters:v=y,url:b,sort_order:w,sortOrder:q=w,sort_by:k,sortBy:E=k,filter_name:S,filterName:A=S,filter_value:O,filterValue:j=O,items:$,analyticsTags:C,resultCount:R=null!=(r=null!=u?u:null==$?void 0:$.length)?r:0}=e;l&&(a.section=l),s.isNil(R)||(a.result_count=R),s.isNil(p)||(a.result_page=p),s.isNil(d)||(a.result_offset=d),g&&(a.result_id=g),v&&(a.selected_filters=v),b&&(a.url=s.truncateString(b,2048)),q&&(a.sort_order=q),E&&(a.sort_by=E),A&&(a.filter_name=A),j&&(a.filter_value=j),$&&Array.isArray($)&&(a.items=$.map(e=>s.toSnakeCaseKeys(e,!1))),C&&(a.analytics_tags=C);let N=`${i}${n({},this.options)}`,T="POST",P=o(a,_(f({},this.options),{requestMethod:T}));return this.requests.queue(N,T,P,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackBrowseResultClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/browse_result_click?`,i={},{section:a="Products",variation_id:l,variationId:u=l,result_id:c,resultId:p=c,result_count:h,resultCount:d=h,result_page:m,resultPage:g=m,result_offset:y,resultOffset:v=y,result_position_on_page:b,resultPositionOnPage:w=b,num_results_per_page:q,numResultsPerPage:k=q,selected_filters:E,selectedFilters:S=E,filter_name:A,filterName:O=A,filter_value:j,filterValue:$=j,customer_id:C,customerId:R=C,item_id:N,itemId:T=R||N,item_name:P,name:I,itemName:x=P||I,analyticsTags:U,slCampaignId:B,slCampaignOwner:D}=e;a&&(i.section=a),u&&(i.variation_id=u),p&&(i.result_id=p),s.isNil(d)||(i.result_count=d),s.isNil(g)||(i.result_page=g),s.isNil(v)||(i.result_offset=v),s.isNil(w)||(i.result_position_on_page=w),s.isNil(k)||(i.num_results_per_page=k),S&&(i.selected_filters=S),O&&(i.filter_name=O),$&&(i.filter_value=$),T&&(i.item_id=T),x&&(i.item_name=x),U&&(i.analytics_tags=U),B&&(i.sl_campaign_id=B),D&&(i.sl_campaign_owner=D);let L=`${r}${n({},this.options)}`,z="POST",M=o(i,_(f({},this.options),{requestMethod:z}));return this.requests.queue(L,z,M,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackBrowseRedirect(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/browse_redirect?`,s={},{searchTerm:i,userInput:a,section:l="Products",selectedFilters:u,redirectToUrl:c,sortOrder:p,sortBy:h,filterName:d,filterValue:m,analyticsTags:g}=e;i&&(s.search_term=i),a&&(s.user_input=a),c&&(s.redirect_to_url=c),l&&(s.section=l),u&&(s.selected_filters=u),p&&(s.sort_order=p),h&&(s.sort_by=h),d&&(s.filter_name=d),m&&(s.filter_value=m),g&&(s.analytics_tags=g);let y=`${r}${n({},this.options)}`,v="POST",b=o(s,_(f({},this.options),{requestMethod:v}));return this.requests.queue(y,v,b,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackGenericResultClick(e,t={}){if("object"==typeof e){let r=`${this.options.serviceUrl}/v2/behavioral_action/result_click?`,i={},{item_id:a,itemId:l=a,item_name:u,itemName:c=u,variation_id:p,variationId:h=p,section:d="Products",result_offset:m,resultOffset:g=m,analyticsTags:y}=e;if(l){i.section=d,i.item_id=l,c&&(i.item_name=c),h&&(i.variation_id=h),s.isNil(g)||(i.result_offset=g),y&&(i.analytics_tags=y);let e=`${r}${n({},this.options)}`,a="POST",u=o(i,_(f({},this.options),{requestMethod:a}));return this.requests.queue(e,a,u,t),this.requests.send(),!0}}return this.requests.send(),Error('A parameters object with an "itemId" property is required.')}trackQuizResultsLoaded(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/quiz_result_load?`,{quiz_id:i,quizId:a=i,quiz_version_id:l,quizVersionId:u=l,quiz_session_id:c,quizSessionId:p=c,url:h,section:d="Products",result_count:m,resultCount:g=m,result_id:y,resultId:v=y,result_page:b,resultPage:w=b,result_offset:q,resultOffset:k=q,items:E}=e,S={},A={};if(E&&Array.isArray(E)&&(A.items=E.slice(0,100).map(e=>s.toSnakeCaseKeys(e,!1))),"string"!=typeof a)return Error('"quizId" is a required parameter of type string');
1if("string"!=typeof u)return Error('"quizVersionId" is a required parameter of type string');if("string"!=typeof p)return Error('"quizSessionId" is a required parameter of type string');if("string"!=typeof h)return Error('"url" is a required parameter of type string');if(A.quiz_id=a,A.quiz_version_id=u,A.quiz_session_id=p,A.url=s.truncateString(h,2048),!s.isNil(d)){if("string"!=typeof d)return Error('"section" must be a string');S.section=d,A.section=d}if(!s.isNil(g)){if("number"!=typeof g)return Error('"resultCount" must be a number');A.result_count=g}if(!s.isNil(v)){if("string"!=typeof v)return Error('"resultId" must be a string');A.result_id=v}if(!s.isNil(w)){if("number"!=typeof w)return Error('"resultPage" must be a number');A.result_page=w}if(!s.isNil(k)){if("number"!=typeof k)return Error('"resultOffset" must be a number');A.result_offset=k}let O=`${r}${n(S,this.options)}`,j="POST",$=o(A,_(f({},this.options),{requestMethod:j}));return this.requests.queue(O,j,$,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackQuizResultClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/quiz_result_click?`,{quiz_id:i,quizId:a=i,quiz_version_id:l,quizVersionId:u=l,quiz_session_id:c,quizSessionId:p=c,item_id:h,itemId:d=h,item_name:m,itemName:g=m,result_count:y,resultCount:v=y,result_id:b,resultId:w=b,result_page:q,resultPage:k=q,result_offset:E,resultOffset:S=E,num_results_per_page:A,numResultsPerPage:O=A,result_position_on_page:j,resultPositionOnPage:$=j,section:C="Products",variationId:R}=e,N={},T={};if("string"!=typeof a)return Error('"quizId" is a required parameter of type string');if("string"!=typeof u)return Error('"quizVersionId" is a required parameter of type string');if("string"!=typeof p)return Error('"quizSessionId" is a required parameter of type string');if("string"!=typeof d&&"string"!=typeof g)return Error('"itemId" or "itemName" is a required parameter of type string');if(T.quiz_id=a,T.quiz_version_id=u,T.quiz_session_id=p,!s.isNil(d)){if("string"!=typeof d)return Error('"itemId" must be a string');T.item_id=d}if(!s.isNil(g)){if("string"!=typeof g)return Error('"itemName" must be a string');T.item_name=g}if(!s.isNil(R)){if("string"!=typeof R)return Error('"variationId" must be a string');T.variation_id=R}if(!s.isNil(C)){if("string"!=typeof C)return Error('"section" must be a string');N.section=C}if(!s.isNil(v)){if("number"!=typeof v)return Error('"resultCount" must be a number');T.result_count=v}if(!s.isNil(w)){if("string"!=typeof w)return Error('"resultId" must be a string');T.result_id=w}if(!s.isNil(k)){if("number"!=typeof k)return Error('"resultPage" must be a number');T.result_page=k}if(!s.isNil(S)){if("number"!=typeof S)return Error('"resultOffset" must be a number');T.result_offset=S}if(!s.isNil(O)){if("number"!=typeof O)return Error('"numResultsPerPage" must be a number');T.num_results_per_page=O}if(!s.isNil($)){if("number"!=typeof $)return Error('"resultPositionOnPage" must be a number');T.result_position_on_page=$}let P=`${r}${n(N,this.options)}`,I="POST",x=o(T,_(f({},this.options),{requestMethod:I}));return this.requests.queue(P,I,x,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackQuizConversion(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/quiz_conversion?`,{quiz_id:i,quizId:a=i,quiz_version_id:l,quizVersionId:u=l,quiz_session_id:c,quizSessionId:p=c,item_id:h,itemId:d=h,item_name:m,itemName:g=m,variation_id:y,variationId:v=y,revenue:b,section:w="Products",type:q,is_custom_type:k,isCustomType:E=k,display_name:S,displayName:A=S}=e,O={};if("string"!=typeof a)return Error('"quizId" is a required parameter of type string');if("string"!=typeof u)return Error('"quizVersionId" is a required parameter of type string');if("string"!=typeof p)return Error('"quizSessionId" is a required parameter of type string');if("string"!=typeof d&&"string"!=typeof g)return Error('"itemId" or "itemName" is a required parameter of type string');
1if(O.quiz_id=a,O.quiz_version_id=u,O.quiz_session_id=p,!s.isNil(d)){if("string"!=typeof d)return Error('"itemId" must be a string');O.item_id=d}if(!s.isNil(g)){if("string"!=typeof g)return Error('"itemName" must be a string');O.item_name=g}if(!s.isNil(v)){if("string"!=typeof v)return Error('"variationId" must be a string');O.variation_id=v}if(!s.isNil(b)){if("string"!=typeof b)return Error('"revenue" must be a string');O.revenue=b}if(!s.isNil(w)){if("string"!=typeof w)return Error('"section" must be a string');O.section=w}if(!s.isNil(q)){if("string"!=typeof q)return Error('"type" must be a string');O.type=q}if(!s.isNil(E)){if("boolean"!=typeof E)return Error('"isCustomType" must be a boolean');O.is_custom_type=E}if(!s.isNil(A)){if("string"!=typeof A)return Error('"displayName" must be a string');O.display_name=A}let j=`${r}${n({},this.options)}`,$="POST",C=o(O,_(f({},this.options),{requestMethod:$}));return this.requests.queue(j,$,C,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentSubmit(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_submit?`,{section:s,intent:i,threadId:a}=e,l={intent:i,section:s};a&&(l.thread_id=a);let u=`${r}${n({},this.options)}`,c="POST",p=o(l,_(f({},this.options),{requestMethod:c}));return this.requests.queue(u,c,p,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentResultLoadStarted(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_result_load_start?`,{section:s,intentResultId:i,intent:a,threadId:l}=e,u={intent_result_id:i,intent:a,section:s};l&&(u.thread_id=l);let c=`${r}${n({},this.options)}`,p="POST",h=o(u,_(f({},this.options),{requestMethod:p}));return this.requests.queue(c,p,h,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentResultLoadFinished(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_result_load_finish?`,{section:s,searchResultCount:i,intentResultId:a,intent:l,threadId:u}=e,c={intent_result_id:a,section:s,intent:l,search_result_count:i};u&&(c.thread_id=u);let p=`${r}${n({},this.options)}`,h="POST",d=o(c,_(f({},this.options),{requestMethod:h}));return this.requests.queue(p,h,d,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentResultClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_search_result_click?`,{section:s="Products",variationId:i,intentResultId:a,searchResultId:l,itemId:u,itemName:c,intent:p,threadId:h}=e,d={section:s,variation_id:i,intent_result_id:a,search_result_id:l,item_id:u,item_name:c,intent:p};h&&(d.thread_id=h);let m=`${r}${n({},this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentResultView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_search_result_view?`,{section:i="Products",items:a,numResultsViewed:l,intentResultId:u,searchResultId:c,intent:p,threadId:h}=e,d={section:i,intent_result_id:u,search_result_id:c,num_results_viewed:l,items:a&&Array.isArray(a)&&a.slice(0,100).map(e=>s.toSnakeCaseKeys(e,!1)),intent:p};h&&(d.thread_id=h);let m=`${r}${n({},this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters are required of type object")}trackAgentSearchSubmit(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/assistant_search_submit?`,{section:s,intent:i,searchTerm:a,searchResultId:l,intentResultId:u,threadId:c}=e,p={intent:i,section:s,search_term:a,search_result_id:l,intent_result_id:u};c&&(p.thread_id=c);let h=`${r}${n({},this.options)}`,d="POST",m=o(p,_(f({},this.options),{requestMethod:d}));return this.requests.queue(h,d,m,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackAssistantSubmit(e,t={}){return this.trackAgentSubmit(e,t)}trackAssistantResultLoadStarted(e,t={}){return this.trackAgentResultLoadStarted(e,t)}trackAssistantResultLoadFinished(e,t={}){return this.trackAgentResultLoadFinished(e,t)}trackAssistantResultClick(e,t={}){return this.trackAgentResultClick(e,t)}trackAssistantResultView(e,t={}){return this.trackAgentResultView(e,t)}trackAssistantSearchSubmit(e,t={}){return this.trackAgentSearchSubmit(e,t)}trackProductInsightsAgentViews(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_views?`,{section:s,questions:i,itemId:a,itemName:l,variationId:u,viewTimespans:c,threadId:p}=e,h={},d={questions:i,item_id:a,item_name:l,variation_id:u,view_timespans:c};
1p&&(d.thread_id=p),s&&(h.section=s);let m=`${r}${n(h,this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_view?`,{section:s,questions:i,itemId:a,itemName:l,variationId:u,threadId:c}=e,p={},h={questions:i,item_id:a,item_name:l,variation_id:u};c&&(h.thread_id=c),s&&(p.section=s);let d=`${r}${n(p,this.options)}`,m="POST",g=o(h,_(f({},this.options),{requestMethod:m}));return this.requests.queue(d,m,g,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentOutOfView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_out_of_view?`,{section:s,itemId:i,itemName:a,variationId:l,threadId:u}=e,c={},p={item_id:i,item_name:a,variation_id:l};u&&(p.thread_id=u),s&&(c.section=s);let h=`${r}${n(c,this.options)}`,d="POST",m=o(p,_(f({},this.options),{requestMethod:d}));return this.requests.queue(h,d,m,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentFocus(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_focus?`,{section:s,itemId:i,itemName:a,variationId:l,threadId:u}=e,c={},p={item_id:i,item_name:a,variation_id:l};u&&(p.thread_id=u),s&&(c.section=s);let h=`${r}${n(c,this.options)}`,d="POST",m=o(p,_(f({},this.options),{requestMethod:d}));return this.requests.queue(h,d,m,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentQuestionClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_question_click?`,{section:s,itemId:i,itemName:a,variationId:l,question:u,threadId:c,questionTopic:p}=e,h={},d={item_id:i,item_name:a,variation_id:l,question:u};c&&(d.thread_id=c),p&&(d.question_topic=p),s&&(h.section=s);let m=`${r}${n(h,this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentQuestionSubmit(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_question_submit?`,{section:s,itemId:i,itemName:a,variationId:l,question:u,threadId:c,questionTopic:p}=e,h={},d={item_id:i,item_name:a,variation_id:l,question:u};c&&(d.thread_id=c),p&&(d.question_topic=p),s&&(h.section=s);let m=`${r}${n(h,this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentAnswerView(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_answer_view?`,{section:i,itemId:a,itemName:l,variationId:u,question:c,answerText:p,qnaResultId:h,items:d,followUpQuestions:m,threadId:g}=e,y={},v={item_id:a,item_name:l,variation_id:u,question:c,answer_text:p,qna_result_id:h};d&&Array.isArray(d)&&(v.items=d.map(e=>s.toSnakeCaseKeys(e,!1))),m&&Array.isArray(m)&&(v.follow_up_questions=m.map(e=>s.toSnakeCaseKeys(e,!1))),g&&(v.thread_id=g),i&&(y.section=i);let b=`${r}${n(y,this.options)}`,w="POST",q=o(v,_(f({},this.options),{requestMethod:w}));return this.requests.queue(b,w,q,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentAnswerFeedback(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_answer_feedback?`,{section:s,itemId:i,itemName:a,variationId:l,feedbackLabel:u,qnaResultId:c,threadId:p}=e,h={},d={item_id:i,item_name:a,variation_id:l,feedback_label:u,qna_result_id:c};
1p&&(d.thread_id=p),s&&(h.section=s);let m=`${r}${n(h,this.options)}`,g="POST",y=o(d,_(f({},this.options),{requestMethod:g}));return this.requests.queue(m,g,y,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}trackProductInsightsAgentResultClick(e,t={}){if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${this.options.serviceUrl}/v2/behavioral_action/product_insights_agent_result_click?`,{section:i,itemId:a,itemName:l,variationId:u,position:c,question:p,seedItemId:h,seedItemName:d,seedVariationId:m,qnaResultId:g,threadId:y}=e,v={},b={item_id:a,item_name:l,variation_id:u,question:p,seed_item_id:h};s.isNil(c)||(b.position=c),d&&(b.seed_item_name=d),m&&(b.seed_variation_id=m),g&&(b.qna_result_id=g),y&&(b.thread_id=y),i&&(v.section=i);let w=`${r}${n(v,this.options)}`,q="POST",k=o(b,_(f({},this.options),{requestMethod:q}));return this.requests.queue(w,q,k,t),this.requests.send(),!0}return this.requests.send(),Error("parameters is a required parameter of type object")}on(e,t){return"success"!==e&&"error"!==e?Error('messageType must be a string of value "success" or "error"'):t&&"function"==typeof t?(this.eventemitter.on(e,t),!0):Error("callback is required and must be a function")}};a.RequestQueue=i,t.exports=a}}),T={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(T,{default:()=>s});var P=((e,t)=>function(){return e&&(t=(0,e[u(e)[0]])(e=0)),t})({"src/version.js"(){s="2.91.0"}}),I=g({"src/modules/quizzes.js"(e,t){var r=k(),s=q();function i(e,t,r,i){let{apiKey:o,clientId:n,sessionId:a,segments:l,userId:u,version:c,quizzesServiceUrl:p}=r,h={c:c},d="";if(h.key=o,h.i=n,h.s=a,l&&l.length&&(h.us=l),u&&(h.ui=String(u)),!e||"string"!=typeof e)throw Error("quizId is a required parameter of type string");if("results"===i&&("object"!=typeof t.answers||!Array.isArray(t.answers)||0===t.answers.length))throw Error("answers is a required parameter of type array");if(t){let{section:e,answers:r,quizSessionId:i,quizVersionId:o,page:n,resultsPerPage:a,filters:l,fmtOptions:u,hiddenFields:c,skipTracking:p}=t;e&&(h.section=e),o&&(h.quiz_version_id=o),i&&(h.quiz_session_id=i),r&&r.length&&(d=`&${s.stringify({a:r.map(e=>[...e.map(encodeURIComponent)].join(","))})}`),s.isNil(n)||(h.page=n),s.isNil(a)||(h.num_results_per_page=a),l&&(h.filters=l),u&&(h.fmt_options=u),c&&(h.fmt_options?h.fmt_options.hidden_fields=c:h.fmt_options={hidden_fields:c}),p&&(h.skip_tracking=p)}h._dt=Date.now(),h=s.cleanParams(h);let f=s.stringify(h);return`${p}/v1/quizzes/${encodeURIComponent(e)}/${encodeURIComponent(i)}/?${f}${d}`}t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getQuizNextQuestion(e,t,r={}){let o,{fetch:n}=this.options,a=new AbortController,{signal:l}=a;try{o=i(e,t,this.options,"next")}catch(e){return Promise.reject(e)}return s.applyNetworkTimeout(this.options,r,a),n(o,{signal:l}).then(s.convertResponseToJson).then(e=>{if(e.quiz_version_id)return this.eventDispatcher.queue("quizzes.getQuizNextQuestion.completed",e),e;throw Error("getQuizNextQuestion response data is malformed")})}getQuizResults(e,t,r={}){let o,{fetch:n}=this.options,a=new AbortController,{signal:l}=a;try{o=i(e,t,this.options,"results")}catch(e){return Promise.reject(e)}return s.applyNetworkTimeout(this.options,r,a),n(o,{signal:l}).then(s.convertResponseToJson).then(e=>{if(e.quiz_version_id)return this.eventDispatcher.queue("quizzes.getQuizResults.completed",e),e;throw Error("getQuizResults response data is malformed")})}getQuizResultsConfig(e,t,r={}){let o,{fetch:n}=this.options,a=new AbortController,{signal:l}=a;try{o=i(e,t,this.options,"results_config")}catch(e){return Promise.reject(e)}return s.applyNetworkTimeout(this.options,r,a),n(o,{signal:l}).then(s.convertResponseToJson).then(e=>{if(e.quiz_version_id)return this.eventDispatcher.queue("quizzes.getQuizResultsConfig.completed",e),e;throw Error("getQuizResultsConfig response data is malformed")})}getQuizAllQuestions(e,t,r={}){let o,{fetch:n}=this.options,a=new AbortController,{signal:l}=a;try{o=i(e,t,this.options,"all_questions")}catch(e){return Promise.reject(e)}return s.applyNetworkTimeout(this.options,r,a),n(o,{signal:l}).then(s.convertResponseToJson).then(e=>{if(e.quiz_version_id)return this.eventDispatcher.queue("quizzes.getQuizAllQuestions.completed",e),e;throw Error("getQuizAllQuestions response data is malformed")})}}}}),x=g({"src/modules/agent.js"(e,t){var{cleanParams:r,trimNonBreakingSpaces:s,encodeURIComponentRFC3986:i,stringify:o,isNil:n}=q();function a(e,t,a){let{apiKey:l,version:u,sessionId:c,clientId:p,userId:h,segments:d,testCells:f,agentServiceUrl:_,assistantServiceUrl:m}=a,g={c:u};if(g.key=l,g.i=p,g.s=c,!e||"string"!=typeof e)throw Error("intent is a required parameter of type string");if(!t||!t.domain||"string"!=typeof t.domain)throw Error("parameters.domain is a required parameter of type string");
1if(f&&Object.keys(f).forEach(e=>{g[`ef-${e}`]=f[e]}),d&&d.length&&(g.us=d),h&&(g.ui=String(h)),t){let{domain:e,numResultsPerPage:r,threadId:s,guard:i,numResultsPerEvent:o,numResultEvents:a,qsParam:l,preFilterExpression:u,fmtOptions:c}=t;e&&(g.domain=e),r&&(g.num_results_per_page=r),s&&(g.thread_id=s),n(i)||(g.guard=i),o&&(g.num_results_per_event=o),a&&(g.num_result_events=a),l&&(g.qs=JSON.stringify(l)),u&&(g.pre_filter_expression=JSON.stringify(u)),c&&(g.fmt_options=c)}g._dt=Date.now();let y=o(g=r(g)),v=e.replace(/^\//,"|");return`${_||m}/v1/intent/${i(s(v))}?${y}`}function l(e,t,r){Object.values(r).forEach(s=>{s!==r.END&&e.addEventListener(s,e=>{let r=JSON.parse(e.data);t.enqueue({type:s,data:r})})}),e.addEventListener(r.END,()=>{t.close(),e.close()}),e.onerror=r=>{t.error(r),e.close()}}var u=class e{constructor(e){this.options=e||{}}getAgentResultsStream(t,r){let s,i;try{let o=a(t,r,this.options);s=new EventSource(o),i=new ReadableStream({start(t){l(s,t,e.EventTypes)},cancel(){s.close()}})}catch(e){throw i?null==i||i.cancel():null==s||s.close(),Error(e.message)}return i}};y(u,"EventTypes",{START:"start",GROUP:"group",SEARCH_RESULT:"search_result",ARTICLE_REFERENCE:"article_reference",RECIPE_INFO:"recipe_info",RECIPE_INSTRUCTIONS:"recipe_instructions",SERVER_ERROR:"server_error",IMAGE_META:"image_meta",MESSAGE:"message",FOLLOW_UP_QUESTIONS:"follow_up_questions",END:"end"}),t.exports=u,t.exports.createAgentUrl=a,t.exports.setupEventListeners=l}}),U=g({"src/modules/pia.js"(e,t){var r=k(),s=q();function i(e,t,r,i){let{apiKey:o,clientId:n,sessionId:a,segments:l,userId:u,version:c,agentServiceUrl:p,assistantServiceUrl:h}=r,d={c:c};if(d.key=o,d.i=n,d.s=a,!e||"string"!=typeof e)throw Error("itemId is a required parameter of type string");if(d.item_id=e,l&&l.length&&(d.us=l),u&&(d.ui=String(u)),t){let{threadId:e,variationId:r,numResults:i}=t;e&&(d.thread_id=e),r&&(d.variation_id=r),s.isNil(i)||(d.num_results=i)}d._dt=Date.now(),d=s.cleanParams(d);let f=s.stringify(d);return`${p||h}/v1/item_questions${i}?${f}`}t.exports=class{constructor(e){this.options=e||{},this.eventDispatcher=new r(e.eventDispatcher)}getSuggestedQuestions(e,t,r={}){let o,n,{fetch:a}=this.options;if("function"==typeof AbortController){let e=new AbortController;n=e&&e.signal,s.applyNetworkTimeout(this.options,r,e)}try{o=i(e,t,this.options,"")}catch(e){return Promise.reject(e)}return a(o,{signal:n}).then(s.convertResponseToJson).then(e=>{if(e.questions)return this.eventDispatcher.queue("pia.getSuggestedQuestions.completed",e),e;throw Error("getSuggestedQuestions response data is malformed")})}getAnswerResults(e,t,r,o={}){let n,a,{fetch:l}=this.options;if(!t||"string"!=typeof t)return Promise.reject(Error("question is a required parameter of type string"));if("function"==typeof AbortController){let e=new AbortController;a=e&&e.signal,s.applyNetworkTimeout(this.options,o,e)}try{let o=s.encodeURIComponentRFC3986(s.trimNonBreakingSpaces(t));n=i(e,r,this.options,`/${o}/answer`)}catch(e){return Promise.reject(e)}return l(n,{signal:a}).then(s.convertResponseToJson).then(e=>{if(e.qna_result_id)return this.eventDispatcher.queue("pia.getAnswerResults.completed",e),e;throw Error("getAnswerResults response data is malformed")})}}}}),B=g({"src/modules/assistant.js"(e,t){var r=x(),{createAgentUrl:s,setupEventListeners:i}=x();t.exports=class extends r{constructor(){super(...arguments),y(this,"EventTypes",r.EventTypes)}getAssistantResultsStream(e,t){return this.getAgentResultsStream(e,t)}},t.exports.createAssistantUrl=s,t.exports.setupEventListeners=i}});let D=g({"src/constructorio.js"(e,t){var r=v(),s=E(),n=S(),l=A(),c=O(),h=N(),d=k(),f=q(),{default:_}=(P(),((e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of u(t))p.call(e,i)||i===r||o(e,i,{get:()=>t[i],enumerable:!(s=a(t,i))||s.enumerable});return e})(o({},"__esModule",{value:!0}),T)),m=I(),g=x(),y=U(),b=B(),w=class{constructor(e={}){let t,o,{apiKey:a,version:u,serviceUrl:p,allowHttpServiceUrl:v=!1,quizzesServiceUrl:w,agentServiceUrl:q,assistantServiceUrl:k,mediaServiceUrl:E,segments:S,testCells:A,clientId:O,sessionId:j,userId:$,fetch:C,trackingSendDelay:R,sendReferrerWithTrackingEvents:N,sendTrackingEvents:T,eventDispatcher:P,idOptions:I,beaconMode:x,networkParameters:U,humanityCheckLocation:B,useWindowParameters:D}=e;if(!a||"string"!=typeof a)throw Error("API key is a required parameter of type string");let L="undefined"!=typeof window&&window.CLIENT_VERSION;if(f.canUseDOM())({session_id:t,client_id:o}=new r(I||{}));else{if(!j||"number"!=typeof j)throw Error("sessionId is a required user parameter of type number");if(!O||"string"!=typeof O)throw Error("clientId is a required user parameter of type string")}let z=p&&p.replace(/\/$/,"");this.options={apiKey:a,version:u||L||(()=>{let e=[];return f.canUseDOM()||e.push("domless"),void 0!==i&&void 0!==i.env&&i.env.BUNDLED&&e.push("bundled"),`ciojs-client-${e.join("-")}${e.length?"-":""}${_}`})(),serviceUrl:f.addHTTPSToString(z,v)||"https://ac.cnstrc.com",allowHttpServiceUrl:v,quizzesServiceUrl:w&&w.replace(/\/$/,"")||"https://quizzes.cnstrc.com",agentServiceUrl:q&&q.replace(/\/$/,"")||"https://agent.cnstrc.com",assistantServiceUrl:k&&k.replace(/\/$/,"")||"https://assistant.cnstrc.com",mediaServiceUrl:E&&E.replace(/\/$/,"")||"https://media-cnstrc.com",sessionId:j||t,clientId:O||o,userId:$,segments:S,testCells:f.toValidTestCells(A),fetch:C||fetch,trackingSendDelay:R,sendTrackingEvents:T,sendReferrerWithTrackingEvents:N,eventDispatcher:P,beaconMode:!1!==x,networkParameters:U||{},humanityCheckLocation:B||"session",useWindowParameters:!0===D},!0===D&&f.applyWindowParameterGetters(this.options),this.search=new s(this.options),this.browse=new n(this.options),this.autocomplete=new l(this.options),this.recommendations=new c(this.options),this.tracker=new h(this.options),this.quizzes=new m(this.options),this.agent=new g(this.options),this.agent.pia=new y(this.options),this.assistant=new b(this.options),new d(e.eventDispatcher).queue("instantiated",this.options)}setClientOptions(e){if(Object.keys(e).length){let{apiKey:t,segments:r,testCells:s,sessionId:i,userId:o,sendTrackingEvents:n,serviceUrl:a}=e;if(t&&(this.options.apiKey=t),r&&(this.options.segments=r),s&&(this.options.testCells=f.toValidTestCells(s)),"boolean"==typeof n&&(this.options.sendTrackingEvents=n,this.tracker.requests.sendTrackingEvents=n),i&&!f.canUseDOM()&&(this.options.sessionId=i),"userId"in e&&(this.options.userId=o),"string"==typeof a&&a.length){let e=a.replace(/\/$/,""),t=f.addHTTPSToString(e,this.options.allowHttpServiceUrl);this.options.serviceUrl=t||this.options.serviceUrl}}}};w.Tracker=h,f.canUseDOM()&&(window.ConstructorioClient=w),t.exports=w}})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.