text: (()=>{var __defineProperty=Object.defineProperty;var __hasOwnProperty=Object.prototype.hasOwnProperty;var __commonJS=(callback,module)=>()=>{if(!module){module={exports:{}};callback(module.exports,module);}
  return module.exports;};var __markAsModule=(target)=>{return __defineProperty(target,"__esModule",{value:true});};var __exportStar=(target,module)=>{__markAsModule(target);if(typeof module==="object"||typeof module==="function"){for(let key2 in module)
  if(__hasOwnProperty.call(module,key2)&&!__hasOwnProperty.call(target,key2)&&key2!=="default")
  __defineProperty(target,key2,{get:()=>module[key2],enumerable:true});}
  return target;};var __toModule=(module)=>{if(module&&module.__esModule)
  return module;return __exportStar(__defineProperty({},"default",{value:module,enumerable:true}),module);};var require_inherits_browser=__commonJS((exports,module)=>{if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}});}};}else{module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor();ctor.prototype.constructor=ctor;}};}});var require_foreach=__commonJS((exports,module)=>{var hasOwn=Object.prototype.hasOwnProperty;var toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if(toString.call(fn)!=="[object Function]"){throw new TypeError("iterator must be a function");}
  var l3=obj.length;if(l3===+l3){for(var i3=0;i3<l3;i3++){fn.call(ctx,obj[i3],i3,obj);}}else{for(var k3 in obj){if(hasOwn.call(obj,k3)){fn.call(ctx,obj[k3],k3,obj);}}}};});var require_errors=__commonJS((exports,module)=>{"use strict";var inherits=require_inherits_browser();function AlgoliaSearchError(message,extraProperties){var forEach=require_foreach();var error=this;if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,this.constructor);}else{error.stack=new Error().stack||"Cannot get a stacktrace, browser is too old";}
  this.name="AlgoliaSearchError";this.message=message||"Unknown error";if(extraProperties){forEach(extraProperties,function addToErrorObject(value,key2){error[key2]=value;});}}
  inherits(AlgoliaSearchError,Error);function createCustomError(name,message){function AlgoliaSearchCustomError(){var args=Array.prototype.slice.call(arguments,0);if(typeof args[0]!=="string"){args.unshift(message);}
  AlgoliaSearchError.apply(this,args);this.name="AlgoliaSearch"+name+"Error";}
  inherits(AlgoliaSearchCustomError,AlgoliaSearchError);return AlgoliaSearchCustomError;}
  module.exports={AlgoliaSearchError,UnparsableJSON:createCustomError("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:createCustomError("RequestTimeout","Request timed out before getting a response"),Network:createCustomError("Network","Network issue, see err.more for details"),JSONPScriptFail:createCustomError("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:createCustomError("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:createCustomError("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:createCustomError("ObjectNotFound","Object not found"),Unknown:createCustomError("Unknown","Unknown error occured")};});var require_exitPromise=__commonJS((exports,module)=>{module.exports=function exitPromise(fn,_setTimeout){_setTimeout(fn,0);};});var require_buildSearchMethod=__commonJS((exports,module)=>{module.exports=buildSearchMethod;var errors=require_errors();function buildSearchMethod(queryParam,url){return function search(query,args,callback){if(typeof query==="function"&&typeof args==="object"||typeof callback==="object"){throw new errors.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");}
  if(arguments.length===0||typeof query==="function"){callback=query;query="";}else if(arguments.length===1||typeof args==="function"){callback=args;args=void 0;}
  if(typeof query==="object"&&query!==null){args=query;query=void 0;}else if(query===void 0||query===null){query="";}
  var params="";if(query!==void 0){params+=queryParam+"="+encodeURIComponent(query);}
  var additionalUA;if(args!==void 0){if(args.additionalUA){additionalUA=args.additionalUA;delete args.additionalUA;}
  params=this.as._getSearchParams(args,params);}
  return this._search(params,url,callback,additionalUA);};}});var require_deprecate=__commonJS((exports,module)=>{module.exports=function deprecate2(fn,message){var warned=false;function deprecated(){if(!warned){console.warn(message);warned=true;}
  return fn.apply(this,arguments);}
  return deprecated;};});var require_deprecatedMessage=__commonJS((exports,module)=>{module.exports=function deprecatedMessage(previousUsage,newUsage){var githubAnchorLink=previousUsage.toLowerCase().replace(/[\.\(\)]/g,"");return "algoliasearch: `"+previousUsage+"` was replaced by `"+newUsage+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+githubAnchorLink;};});var require_merge2=__commonJS((exports,module)=>{var foreach=require_foreach();module.exports=function merge2(destination){var sources=Array.prototype.slice.call(arguments);foreach(sources,function(source){for(var keyName in source){if(source.hasOwnProperty(keyName)){if(typeof destination[keyName]==="object"&&typeof source[keyName]==="object"){destination[keyName]=merge2({},destination[keyName],source[keyName]);}else if(source[keyName]!==void 0){destination[keyName]=source[keyName];}}}});return destination;};});var require_clone=__commonJS((exports,module)=>{module.exports=function clone(obj){return JSON.parse(JSON.stringify(obj));};});var require_isArguments=__commonJS((exports,module)=>{"use strict";var toStr=Object.prototype.toString;module.exports=function isArguments(value){var str=toStr.call(value);var isArgs=str==="[object Arguments]";if(!isArgs){isArgs=str!=="[object Array]"&&value!==null&&typeof value==="object"&&typeof value.length==="number"&&value.length>=0&&toStr.call(value.callee)==="[object Function]";}
  return isArgs;};});var require_implementation=__commonJS((exports,module)=>{"use strict";var keysShim;if(!Object.keys){var has=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var isArgs=require_isArguments();var isEnumerable=Object.prototype.propertyIsEnumerable;var hasDontEnumBug=!isEnumerable.call({toString:null},"toString");var hasProtoEnumBug=isEnumerable.call(function(){},"prototype");var dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var equalsConstructorPrototype=function(o3){var ctor=o3.constructor;return ctor&&ctor.prototype===o3;};var excludedKeys={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true};var hasAutomationEqualityBug=function(){if(typeof window==="undefined"){return false;}
  for(var k3 in window){try{if(!excludedKeys["$"+k3]&&has.call(window,k3)&&window[k3]!==null&&typeof window[k3]==="object"){try{equalsConstructorPrototype(window[k3]);}catch(e3){return true;}}}catch(e3){return true;}}
  return false;}();var equalsConstructorPrototypeIfNotBuggy=function(o3){if(typeof window==="undefined"||!hasAutomationEqualityBug){return equalsConstructorPrototype(o3);}
  try{return equalsConstructorPrototype(o3);}catch(e3){return false;}};keysShim=function keys2(object){var isObject=object!==null&&typeof object==="object";var isFunction=toStr.call(object)==="[object Function]";var isArguments=isArgs(object);var isString=isObject&&toStr.call(object)==="[object String]";var theKeys=[];if(!isObject&&!isFunction&&!isArguments){throw new TypeError("Object.keys called on a non-object");}
  var skipProto=hasProtoEnumBug&&isFunction;if(isString&&object.length>0&&!has.call(object,0)){for(var i3=0;i3<object.length;++i3){theKeys.push(String(i3));}}
  if(isArguments&&object.length>0){for(var j3=0;j3<object.length;++j3){theKeys.push(String(j3));}}else{for(var name in object){if(!(skipProto&&name==="prototype")&&has.call(object,name)){theKeys.push(String(name));}}}
  if(hasDontEnumBug){var skipConstructor=equalsConstructorPrototypeIfNotBuggy(object);for(var k3=0;k3<dontEnums.length;++k3){if(!(skipConstructor&&dontEnums[k3]==="constructor")&&has.call(object,dontEnums[k3])){theKeys.push(dontEnums[k3]);}}}
  return theKeys;};}
  module.exports=keysShim;});var require_object_keys=__commonJS((exports,module)=>{"use strict";var slice=Array.prototype.slice;var isArgs=require_isArguments();var origKeys=Object.keys;var keysShim=origKeys?function keys2(o3){return origKeys(o3);}:require_implementation();var originalKeys=Object.keys;keysShim.shim=function shimObjectKeys(){if(Object.keys){var keysWorksWithArguments=function(){var args=Object.keys(arguments);return args&&args.length===arguments.length;}(1,2);if(!keysWorksWithArguments){Object.keys=function keys2(object){if(isArgs(object)){return originalKeys(slice.call(object));}
  return originalKeys(object);};}}else{Object.keys=keysShim;}
  return Object.keys||keysShim;};module.exports=keysShim;});var require_omit2=__commonJS((exports,module)=>{module.exports=function omit(obj,test){var keys2=require_object_keys();var foreach=require_foreach();var filtered={};foreach(keys2(obj),function doFilter(keyName){if(test(keyName)!==true){filtered[keyName]=obj[keyName];}});return filtered;};});var require_isarray=__commonJS((exports,module)=>{var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]";};});var require_map=__commonJS((exports,module)=>{var foreach=require_foreach();module.exports=function map(arr,fn){var newArr=[];foreach(arr,function(item,itemIndex){newArr.push(fn(item,itemIndex,arr));});return newArr;};});var require_IndexCore=__commonJS((exports,module)=>{var buildSearchMethod=require_buildSearchMethod();var deprecate2=require_deprecate();var deprecatedMessage=require_deprecatedMessage();module.exports=IndexCore;function IndexCore(algoliasearch2,indexName){this.indexName=indexName;this.as=algoliasearch2;this.typeAheadArgs=null;this.typeAheadValueOption=null;this.cache={};}
  IndexCore.prototype.clearCache=function(){this.cache={};};IndexCore.prototype.search=buildSearchMethod("query");IndexCore.prototype.similarSearch=deprecate2(buildSearchMethod("similarQuery"),deprecatedMessage("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])"));IndexCore.prototype.browse=function(query,queryParameters,callback){var merge2=require_merge2();var indexObj=this;var page;var hitsPerPage2;if(arguments.length===0||arguments.length===1&&typeof arguments[0]==="function"){page=0;callback=arguments[0];query=void 0;}else if(typeof arguments[0]==="number"){page=arguments[0];if(typeof arguments[1]==="number"){hitsPerPage2=arguments[1];}else if(typeof arguments[1]==="function"){callback=arguments[1];hitsPerPage2=void 0;}
  query=void 0;queryParameters=void 0;}else if(typeof arguments[0]==="object"){if(typeof arguments[1]==="function"){callback=arguments[1];}
  queryParameters=arguments[0];query=void 0;}else if(typeof arguments[0]==="string"&&typeof arguments[1]==="function"){callback=arguments[1];queryParameters=void 0;}
  queryParameters=merge2({},queryParameters||{},{page,hitsPerPage:hitsPerPage2,query});var params=this.as._getSearchParams(queryParameters,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/browse",body:{params},hostType:"read",callback});};IndexCore.prototype.browseFrom=function(cursor,callback){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor},hostType:"read",callback});};IndexCore.prototype.searchForFacetValues=function(params,callback){var clone=require_clone();var omit=require_omit2();var usage="Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])";if(params.facetName===void 0||params.facetQuery===void 0){throw new Error(usage);}
  var facetName=params.facetName;var filteredParams=omit(clone(params),function(keyName){return keyName==="facetName";});var searchParameters=this.as._getSearchParams(filteredParams,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(facetName)+"/query",hostType:"read",body:{params:searchParameters},callback});};IndexCore.prototype.searchFacet=deprecate2(function(params,callback){return this.searchForFacetValues(params,callback);},deprecatedMessage("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])"));IndexCore.prototype._search=function(params,url,callback,additionalUA){return this.as._jsonRequest({cache:this.cache,method:"POST",url:url||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params}},callback,additionalUA});};IndexCore.prototype.getObject=function(objectID,attrs,callback){var indexObj=this;if(arguments.length===1||typeof attrs==="function"){callback=attrs;attrs=void 0;}
  var params="";if(attrs!==void 0){params="?attributes=";for(var i3=0;i3<attrs.length;++i3){if(i3!==0){params+=",";}
  params+=attrs[i3];}}
  return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/"+encodeURIComponent(objectID)+params,hostType:"read",callback});};IndexCore.prototype.getObjects=function(objectIDs,attributesToRetrieve,callback){var isArray=require_isarray();var map=require_map();var usage="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!isArray(objectIDs)){throw new Error(usage);}
  var indexObj=this;if(arguments.length===1||typeof attributesToRetrieve==="function"){callback=attributesToRetrieve;attributesToRetrieve=void 0;}
  var body={requests:map(objectIDs,function prepareRequest(objectID){var request={indexName:indexObj.indexName,objectID};if(attributesToRetrieve){request.attributesToRetrieve=attributesToRetrieve.join(",");}
  return request;})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body,callback});};IndexCore.prototype.as=null;IndexCore.prototype.indexName=null;IndexCore.prototype.typeAheadArgs=null;IndexCore.prototype.typeAheadValueOption=null;});var require_ms=__commonJS((exports,module)=>{var s3=1e3;var m3=s3*60;var h3=m3*60;var d3=h3*24;var y3=d3*365.25;module.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0){return parse(val);}else if(type==="number"&&isNaN(val)===false){return options.long?fmtLong(val):fmtShort(val);}
  throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val));};function parse(str){str=String(str);if(str.length>100){return;}
  var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match){return;}
  var n2=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case "years":case "year":case "yrs":case "yr":case "y":return n2*y3;case "days":case "day":case "d":return n2*d3;case "hours":case "hour":case "hrs":case "hr":case "h":return n2*h3;case "minutes":case "minute":case "mins":case "min":case "m":return n2*m3;case "seconds":case "second":case "secs":case "sec":case "s":return n2*s3;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return n2;default:return void 0;}}
  function fmtShort(ms){if(ms>=d3){return Math.round(ms/d3)+"d";}
  if(ms>=h3){return Math.round(ms/h3)+"h";}
  if(ms>=m3){return Math.round(ms/m3)+"m";}
  if(ms>=s3){return Math.round(ms/s3)+"s";}
  return ms+"ms";}
  function fmtLong(ms){return plural(ms,d3,"day")||plural(ms,h3,"hour")||plural(ms,m3,"minute")||plural(ms,s3,"second")||ms+" ms";}
  function plural(ms,n2,name){if(ms<n2){return;}
  if(ms<n2*1.5){return Math.floor(ms/n2)+" "+name;}
  return Math.ceil(ms/n2)+" "+name+"s";}});var require_debug=__commonJS((exports,module)=>{exports=module.exports=createDebug.debug=createDebug["default"]=createDebug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require_ms();exports.names=[];exports.skips=[];exports.formatters={};var prevTime;function selectColor(namespace){var hash=0,i3;for(i3 in namespace){hash=(hash<<5)-hash+namespace.charCodeAt(i3);hash|=0;}
  return exports.colors[Math.abs(hash)%exports.colors.length];}
  function createDebug(namespace){function debug(){if(!debug.enabled)
  return;var self2=debug;var curr=+new Date();var ms=curr-(prevTime||curr);self2.diff=ms;self2.prev=prevTime;self2.curr=curr;prevTime=curr;var args=new Array(arguments.length);for(var i3=0;i3<args.length;i3++){args[i3]=arguments[i3];}
  args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args.unshift("%O");}
  var index4=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,function(match,format){if(match==="%%")
  return match;index4++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index4];match=formatter.call(self2,val);args.splice(index4,1);index4--;}
  return match;});exports.formatArgs.call(self2,args);var logFn=debug.log||exports.log||console.log.bind(console);logFn.apply(self2,args);}
  debug.namespace=namespace;debug.enabled=exports.enabled(namespace);debug.useColors=exports.useColors();debug.color=selectColor(namespace);if("function"===typeof exports.init){exports.init(debug);}
  return debug;}
  function enable(namespaces){exports.save(namespaces);exports.names=[];exports.skips=[];var split=(typeof namespaces==="string"?namespaces:"").split(/[\s,]+/);var len=split.length;for(var i3=0;i3<len;i3++){if(!split[i3])
  continue;namespaces=split[i3].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"));}else{exports.names.push(new RegExp("^"+namespaces+"$"));}}}
  function disable(){exports.enable("");}
  function enabled(name){var i3,len;for(i3=0,len=exports.skips.length;i3<len;i3++){if(exports.skips[i3].test(name)){return false;}}
  for(i3=0,len=exports.names.length;i3<len;i3++){if(exports.names[i3].test(name)){return true;}}
  return false;}
  function coerce(val){if(val instanceof Error)
  return val.stack||val.message;return val;}});var require_browser=__commonJS((exports,module)=>{exports=module.exports=require_debug();exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){if(typeof window!=="undefined"&&window.process&&window.process.type==="renderer"){return true;}
  return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);}
  exports.formatters.j=function(v3){try{return JSON.stringify(v3);}catch(err){return "[UnexpectedJSONParseError]: "+err.message;}};function formatArgs(args){var useColors2=this.useColors;args[0]=(useColors2?"%c":"")+this.namespace+(useColors2?" %c":" ")+args[0]+(useColors2?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors2)
  return;var c3="color: "+this.color;args.splice(1,0,c3,"color: inherit");var index4=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if("%%"===match)
  return;index4++;if("%c"===match){lastC=index4;}});args.splice(lastC,0,c3);}
  function log(){return "object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments);}
  function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug");}else{exports.storage.debug=namespaces;}}catch(e3){}}
  function load(){var r3;try{r3=exports.storage.debug;}catch(e3){}
  if(!r3&&typeof process!=="undefined"&&"env"in process){r3=process.env.DEBUG;}
  return r3;}
  exports.enable(load());function localstorage(){try{return window.localStorage;}catch(e3){}}});var require_store=__commonJS((exports,module)=>{var debug=require_browser()("algoliasearch:src/hostIndexState.js");var localStorageNamespace="algoliasearch-client-js";var store;var moduleStore={state:{},set:function(key2,data){this.state[key2]=data;return this.state[key2];},get:function(key2){return this.state[key2]||null;}};var localStorageStore={set:function(key2,data){moduleStore.set(key2,data);try{var namespace=JSON.parse(global.localStorage[localStorageNamespace]);namespace[key2]=data;global.localStorage[localStorageNamespace]=JSON.stringify(namespace);return namespace[key2];}catch(e3){return localStorageFailure(key2,e3);}},get:function(key2){try{return JSON.parse(global.localStorage[localStorageNamespace])[key2]||null;}catch(e3){return localStorageFailure(key2,e3);}}};function localStorageFailure(key2,e3){debug("localStorage failed with",e3);cleanup();store=moduleStore;return store.get(key2);}
  store=supportsLocalStorage()?localStorageStore:moduleStore;module.exports={get:getOrSet,set:getOrSet,supportsLocalStorage};function getOrSet(key2,data){if(arguments.length===1){return store.get(key2);}
  return store.set(key2,data);}
  function supportsLocalStorage(){try{if("localStorage"in global&&global.localStorage!==null){if(!global.localStorage[localStorageNamespace]){global.localStorage.setItem(localStorageNamespace,JSON.stringify({}));}
  return true;}
  return false;}catch(_3){return false;}}
  function cleanup(){try{global.localStorage.removeItem(localStorageNamespace);}catch(_3){}}});var require_AlgoliaSearchCore=__commonJS((exports,module)=>{module.exports=AlgoliaSearchCore;var errors=require_errors();var exitPromise=require_exitPromise();var IndexCore=require_IndexCore();var store=require_store();var MAX_API_KEY_LENGTH=500;var RESET_APP_DATA_TIMER=process.env.RESET_APP_DATA_TIMER&&parseInt(process.env.RESET_APP_DATA_TIMER,10)||60*2*1e3;function AlgoliaSearchCore(applicationID,apiKey,opts){var debug=require_browser()("algoliasearch");var clone=require_clone();var isArray=require_isarray();var map=require_map();var usage="Usage: algoliasearch(applicationID, apiKey, opts)";if(opts._allowEmptyCredentials!==true&&!applicationID){throw new errors.AlgoliaSearchError("Please provide an application ID. "+usage);}
  if(opts._allowEmptyCredentials!==true&&!apiKey){throw new errors.AlgoliaSearchError("Please provide an API key. "+usage);}
  this.applicationID=applicationID;this.apiKey=apiKey;this.hosts={read:[],write:[]};opts=opts||{};this._timeouts=opts.timeouts||{connect:1*1e3,read:2*1e3,write:30*1e3};if(opts.timeout){this._timeouts.connect=this._timeouts.read=this._timeouts.write=opts.timeout;}
  var protocol=opts.protocol||"https:";if(!/:$/.test(protocol)){protocol=protocol+":";}
  if(protocol!=="http:"&&protocol!=="https:"){throw new errors.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+opts.protocol+"`)");}
  this._checkAppIdData();if(!opts.hosts){var defaultHosts=map(this._shuffleResult,function(hostNumber){return applicationID+"-"+hostNumber+".algolianet.com";});var mainSuffix=(opts.dsn===false?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+mainSuffix].concat(defaultHosts);this.hosts.write=[this.applicationID+".algolia.net"].concat(defaultHosts);}else if(isArray(opts.hosts)){this.hosts.read=clone(opts.hosts);this.hosts.write=clone(opts.hosts);}else{this.hosts.read=clone(opts.hosts.read);this.hosts.write=clone(opts.hosts.write);}
  this.hosts.read=map(this.hosts.read,prepareHost(protocol));this.hosts.write=map(this.hosts.write,prepareHost(protocol));this.extraHeaders={};this.cache=opts._cache||{};this._ua=opts._ua;this._useCache=opts._useCache===void 0||opts._cache?true:opts._useCache;this._useRequestCache=this._useCache&&opts._useRequestCache;this._useFallback=opts.useFallback===void 0?true:opts.useFallback;this._setTimeout=opts._setTimeout;debug("init done, %j",this);}
  AlgoliaSearchCore.prototype.initIndex=function(indexName){return new IndexCore(this,indexName);};AlgoliaSearchCore.prototype.setExtraHeader=function(name,value){this.extraHeaders[name.toLowerCase()]=value;};AlgoliaSearchCore.prototype.getExtraHeader=function(name){return this.extraHeaders[name.toLowerCase()];};AlgoliaSearchCore.prototype.unsetExtraHeader=function(name){delete this.extraHeaders[name.toLowerCase()];};AlgoliaSearchCore.prototype.addAlgoliaAgent=function(algoliaAgent){var algoliaAgentWithDelimiter="; "+algoliaAgent;if(this._ua.indexOf(algoliaAgentWithDelimiter)===-1){this._ua+=algoliaAgentWithDelimiter;}};AlgoliaSearchCore.prototype._jsonRequest=function(initialOpts){this._checkAppIdData();var requestDebug=require_browser()("algoliasearch:"+initialOpts.url);var body;var cacheID;var additionalUA=initialOpts.additionalUA||"";var cache=initialOpts.cache;var client2=this;var tries=0;var usingFallback=false;var hasFallback=client2._useFallback&&client2._request.fallback&&initialOpts.fallback;var headers;if(this.apiKey.length>MAX_API_KEY_LENGTH&&initialOpts.body!==void 0&&(initialOpts.body.params!==void 0||initialOpts.body.requests!==void 0)){initialOpts.body.apiKey=this.apiKey;headers=this._computeRequestHeaders({additionalUA,withApiKey:false,headers:initialOpts.headers});}else{headers=this._computeRequestHeaders({additionalUA,headers:initialOpts.headers});}
  if(initialOpts.body!==void 0){body=safeJSONStringify(initialOpts.body);}
  requestDebug("request start");var debugData=[];function doRequest(requester,reqOpts){client2._checkAppIdData();var startTime=new Date();if(client2._useCache&&!client2._useRequestCache){cacheID=initialOpts.url;}
  if(client2._useCache&&!client2._useRequestCache&&body){cacheID+="_body_"+reqOpts.body;}
  if(isCacheValidWithCurrentID(!client2._useRequestCache,cache,cacheID)){requestDebug("serving response from cache");var responseText=cache[cacheID];return client2._promise.resolve({body:JSON.parse(responseText),responseText});}
  if(tries>=client2.hosts[initialOpts.hostType].length){if(!hasFallback||usingFallback){requestDebug("could not get any response");return client2._promise.reject(new errors.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+client2.applicationID,{debugData}));}
  requestDebug("switching to fallback");tries=0;reqOpts.method=initialOpts.fallback.method;reqOpts.url=initialOpts.fallback.url;reqOpts.jsonBody=initialOpts.fallback.body;if(reqOpts.jsonBody){reqOpts.body=safeJSONStringify(reqOpts.jsonBody);}
  headers=client2._computeRequestHeaders({additionalUA,headers:initialOpts.headers});reqOpts.timeouts=client2._getTimeoutsForRequest(initialOpts.hostType);client2._setHostIndexByType(0,initialOpts.hostType);usingFallback=true;return doRequest(client2._request.fallback,reqOpts);}
  var currentHost=client2._getHostByType(initialOpts.hostType);var url=currentHost+reqOpts.url;var options={body:reqOpts.body,jsonBody:reqOpts.jsonBody,method:reqOpts.method,headers,timeouts:reqOpts.timeouts,debug:requestDebug,forceAuthHeaders:reqOpts.forceAuthHeaders};requestDebug("method: %s, url: %s, headers: %j, timeouts: %d",options.method,url,options.headers,options.timeouts);if(requester===client2._request.fallback){requestDebug("using fallback");}
  return requester.call(client2,url,options).then(success,tryFallback);function success(httpResponse){var status=httpResponse&&httpResponse.body&&httpResponse.body.message&&httpResponse.body.status||httpResponse.statusCode||httpResponse&&httpResponse.body&&200;requestDebug("received response: statusCode: %s, computed statusCode: %d, headers: %j",httpResponse.statusCode,status,httpResponse.headers);var httpResponseOk=Math.floor(status/100)===2;var endTime=new Date();debugData.push({currentHost,headers:removeCredentials(headers),content:body||null,contentLength:body!==void 0?body.length:null,method:reqOpts.method,timeouts:reqOpts.timeouts,url:reqOpts.url,startTime,endTime,duration:endTime-startTime,statusCode:status});if(httpResponseOk){if(client2._useCache&&!client2._useRequestCache&&cache){cache[cacheID]=httpResponse.responseText;}
  return{responseText:httpResponse.responseText,body:httpResponse.body};}
  var shouldRetry=Math.floor(status/100)!==4;if(shouldRetry){tries+=1;return retryRequest();}
  requestDebug("unrecoverable error");var unrecoverableError=new errors.AlgoliaSearchError(httpResponse.body&&httpResponse.body.message,{debugData,statusCode:status});return client2._promise.reject(unrecoverableError);}
  function tryFallback(err){requestDebug("error: %s, stack: %s",err.message,err.stack);var endTime=new Date();debugData.push({currentHost,headers:removeCredentials(headers),content:body||null,contentLength:body!==void 0?body.length:null,method:reqOpts.method,timeouts:reqOpts.timeouts,url:reqOpts.url,startTime,endTime,duration:endTime-startTime});if(!(err instanceof errors.AlgoliaSearchError)){err=new errors.Unknown(err&&err.message,err);}
  tries+=1;if(err instanceof errors.Unknown||err instanceof errors.UnparsableJSON||tries>=client2.hosts[initialOpts.hostType].length&&(usingFallback||!hasFallback)){err.debugData=debugData;return client2._promise.reject(err);}
  if(err instanceof errors.RequestTimeout){return retryRequestWithHigherTimeout();}
  return retryRequest();}
  function retryRequest(){requestDebug("retrying request");client2._incrementHostIndex(initialOpts.hostType);return doRequest(requester,reqOpts);}
  function retryRequestWithHigherTimeout(){requestDebug("retrying request with higher timeout");client2._incrementHostIndex(initialOpts.hostType);client2._incrementTimeoutMultipler();reqOpts.timeouts=client2._getTimeoutsForRequest(initialOpts.hostType);return doRequest(requester,reqOpts);}}
  function isCacheValidWithCurrentID(useRequestCache,currentCache,currentCacheID){return client2._useCache&&useRequestCache&&currentCache&&currentCache[currentCacheID]!==void 0;}
  function interopCallbackReturn(request2,callback){if(isCacheValidWithCurrentID(client2._useRequestCache,cache,cacheID)){request2.catch(function(){delete cache[cacheID];});}
  if(typeof initialOpts.callback==="function"){request2.then(function okCb(content){exitPromise(function(){initialOpts.callback(null,callback(content));},client2._setTimeout||setTimeout);},function nookCb(err){exitPromise(function(){initialOpts.callback(err);},client2._setTimeout||setTimeout);});}else{return request2.then(callback);}}
  if(client2._useCache&&client2._useRequestCache){cacheID=initialOpts.url;}
  if(client2._useCache&&client2._useRequestCache&&body){cacheID+="_body_"+body;}
  if(isCacheValidWithCurrentID(client2._useRequestCache,cache,cacheID)){requestDebug("serving request from cache");var maybePromiseForCache=cache[cacheID];var promiseForCache=typeof maybePromiseForCache.then!=="function"?client2._promise.resolve({responseText:maybePromiseForCache}):maybePromiseForCache;return interopCallbackReturn(promiseForCache,function(content){return JSON.parse(content.responseText);});}
  var request=doRequest(client2._request,{url:initialOpts.url,method:initialOpts.method,body,jsonBody:initialOpts.body,timeouts:client2._getTimeoutsForRequest(initialOpts.hostType),forceAuthHeaders:initialOpts.forceAuthHeaders});if(client2._useCache&&client2._useRequestCache&&cache){cache[cacheID]=request;}
  return interopCallbackReturn(request,function(content){return content.body;});};AlgoliaSearchCore.prototype._getSearchParams=function(args,params){if(args===void 0||args===null){return params;}
  for(var key2 in args){if(key2!==null&&args[key2]!==void 0&&args.hasOwnProperty(key2)){params+=params===""?"":"&";params+=key2+"="+encodeURIComponent(Object.prototype.toString.call(args[key2])==="[object Array]"?safeJSONStringify(args[key2]):args[key2]);}}
  return params;};AlgoliaSearchCore.prototype._computeRequestHeaders=function(options){var forEach=require_foreach();var ua=options.additionalUA?this._ua+"; "+options.additionalUA:this._ua;var requestHeaders={"x-algolia-agent":ua,"x-algolia-application-id":this.applicationID};if(options.withApiKey!==false){requestHeaders["x-algolia-api-key"]=this.apiKey;}
  if(this.userToken){requestHeaders["x-algolia-usertoken"]=this.userToken;}
  if(this.securityTags){requestHeaders["x-algolia-tagfilters"]=this.securityTags;}
  forEach(this.extraHeaders,function addToRequestHeaders(value,key2){requestHeaders[key2]=value;});if(options.headers){forEach(options.headers,function addToRequestHeaders(value,key2){requestHeaders[key2]=value;});}
  return requestHeaders;};AlgoliaSearchCore.prototype.search=function(queries,opts,callback){var isArray=require_isarray();var map=require_map();var usage="Usage: client.search(arrayOfQueries[, callback])";if(!isArray(queries)){throw new Error(usage);}
  if(typeof opts==="function"){callback=opts;opts={};}else if(opts===void 0){opts={};}
  var client2=this;var postObj={requests:map(queries,function prepareRequest(query){var params="";if(query.query!==void 0){params+="query="+encodeURIComponent(query.query);}
  return{indexName:query.indexName,params:client2._getSearchParams(query.params,params)};})};var JSONPParams=map(postObj.requests,function prepareJSONPParams(request,requestId){return requestId+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(request.indexName)+"?"+request.params);}).join("&");var url="/1/indexes/*/queries";if(opts.strategy!==void 0){postObj.strategy=opts.strategy;}
  return this._jsonRequest({cache:this.cache,method:"POST",url,body:postObj,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:JSONPParams}},callback});};AlgoliaSearchCore.prototype.searchForFacetValues=function(queries){var isArray=require_isarray();var map=require_map();var usage="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!isArray(queries)){throw new Error(usage);}
  var client2=this;return client2._promise.all(map(queries,function performQuery(query){if(!query||query.indexName===void 0||query.params.facetName===void 0||query.params.facetQuery===void 0){throw new Error(usage);}
  var clone=require_clone();var omit=require_omit2();var indexName=query.indexName;var params=query.params;var facetName=params.facetName;var filteredParams=omit(clone(params),function(keyName){return keyName==="facetName";});var searchParameters=client2._getSearchParams(filteredParams,"");return client2._jsonRequest({cache:client2.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(indexName)+"/facets/"+encodeURIComponent(facetName)+"/query",hostType:"read",body:{params:searchParameters}});}));};AlgoliaSearchCore.prototype.setSecurityTags=function(tags){if(Object.prototype.toString.call(tags)==="[object Array]"){var strTags=[];for(var i3=0;i3<tags.length;++i3){if(Object.prototype.toString.call(tags[i3])==="[object Array]"){var oredTags=[];for(var j3=0;j3<tags[i3].length;++j3){oredTags.push(tags[i3][j3]);}
  strTags.push("("+oredTags.join(",")+")");}else{strTags.push(tags[i3]);}}
  tags=strTags.join(",");}
  this.securityTags=tags;};AlgoliaSearchCore.prototype.setUserToken=function(userToken){this.userToken=userToken;};AlgoliaSearchCore.prototype.clearCache=function(){this.cache={};};AlgoliaSearchCore.prototype.setRequestTimeout=function(milliseconds){if(milliseconds){this._timeouts.connect=this._timeouts.read=this._timeouts.write=milliseconds;}};AlgoliaSearchCore.prototype.setTimeouts=function(timeouts){this._timeouts=timeouts;};AlgoliaSearchCore.prototype.getTimeouts=function(){return this._timeouts;};AlgoliaSearchCore.prototype._getAppIdData=function(){var data=store.get(this.applicationID);if(data!==null)
  this._cacheAppIdData(data);return data;};AlgoliaSearchCore.prototype._setAppIdData=function(data){data.lastChange=new Date().getTime();this._cacheAppIdData(data);return store.set(this.applicationID,data);};AlgoliaSearchCore.prototype._checkAppIdData=function(){var data=this._getAppIdData();var now=new Date().getTime();if(data===null||now-data.lastChange>RESET_APP_DATA_TIMER){return this._resetInitialAppIdData(data);}
  return data;};AlgoliaSearchCore.prototype._resetInitialAppIdData=function(data){var newData=data||{};newData.hostIndexes={read:0,write:0};newData.timeoutMultiplier=1;newData.shuffleResult=newData.shuffleResult||shuffle([1,2,3]);return this._setAppIdData(newData);};AlgoliaSearchCore.prototype._cacheAppIdData=function(data){this._hostIndexes=data.hostIndexes;this._timeoutMultiplier=data.timeoutMultiplier;this._shuffleResult=data.shuffleResult;};AlgoliaSearchCore.prototype._partialAppIdDataUpdate=function(newData){var foreach=require_foreach();var currentData=this._getAppIdData();foreach(newData,function(value,key2){currentData[key2]=value;});return this._setAppIdData(currentData);};AlgoliaSearchCore.prototype._getHostByType=function(hostType){return this.hosts[hostType][this._getHostIndexByType(hostType)];};AlgoliaSearchCore.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier;};AlgoliaSearchCore.prototype._getHostIndexByType=function(hostType){return this._hostIndexes[hostType];};AlgoliaSearchCore.prototype._setHostIndexByType=function(hostIndex,hostType){var clone=require_clone();var newHostIndexes=clone(this._hostIndexes);newHostIndexes[hostType]=hostIndex;this._partialAppIdDataUpdate({hostIndexes:newHostIndexes});return hostIndex;};AlgoliaSearchCore.prototype._incrementHostIndex=function(hostType){return this._setHostIndexByType((this._getHostIndexByType(hostType)+1)%this.hosts[hostType].length,hostType);};AlgoliaSearchCore.prototype._incrementTimeoutMultipler=function(){var timeoutMultiplier=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier});};AlgoliaSearchCore.prototype._getTimeoutsForRequest=function(hostType){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[hostType]*this._timeoutMultiplier};};function prepareHost(protocol){return function prepare(host){return protocol+"//"+host.toLowerCase();};}
  function safeJSONStringify(obj){if(Array.prototype.toJSON===void 0){return JSON.stringify(obj);}
  var toJSON=Array.prototype.toJSON;delete Array.prototype.toJSON;var out=JSON.stringify(obj);Array.prototype.toJSON=toJSON;return out;}
  function shuffle(array){var currentIndex=array.length;var temporaryValue;var randomIndex;while(currentIndex!==0){randomIndex=Math.floor(Math.random()*currentIndex);currentIndex-=1;temporaryValue=array[currentIndex];array[currentIndex]=array[randomIndex];array[randomIndex]=temporaryValue;}
  return array;}
  function removeCredentials(headers){var newHeaders={};for(var headerName in headers){if(Object.prototype.hasOwnProperty.call(headers,headerName)){var value;if(headerName==="x-algolia-api-key"||headerName==="x-algolia-application-id"){value="**hidden for security purposes**";}else{value=headers[headerName];}
  newHeaders[headerName]=value;}}
  return newHeaders;}});var require_window=__commonJS((exports,module)=>{var win;if(typeof window!=="undefined"){win=window;}else if(typeof global!=="undefined"){win=global;}else if(typeof self!=="undefined"){win=self;}else{win={};}
  module.exports=win;});var require_es6_promise=__commonJS((exports,module)=>{/*!
  * @overview es6-promise - a tiny implementation of Promises/A+.
  * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  * @license Licensed under MIT license
  * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
  * @version v4.2.8+1e68dce6
  */(function(global2,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global2.ES6Promise=factory();})(exports,function(){"use strict";function objectOrFunction(x3){var type=typeof x3;return x3!==null&&(type==="object"||type==="function");}
  function isFunction(x3){return typeof x3==="function";}
  var _isArray=void 0;if(Array.isArray){_isArray=Array.isArray;}else{_isArray=function(x3){return Object.prototype.toString.call(x3)==="[object Array]";};}
  var isArray=_isArray;var len=0;var vertxNext=void 0;var customSchedulerFn=void 0;var asap=function asap2(callback,arg){queue[len]=callback;queue[len+1]=arg;len+=2;if(len===2){if(customSchedulerFn){customSchedulerFn(flush);}else{scheduleFlush();}}};function setScheduler(scheduleFn){customSchedulerFn=scheduleFn;}
  function setAsap(asapFn){asap=asapFn;}
  var browserWindow=typeof window!=="undefined"?window:void 0;var browserGlobal=browserWindow||{};var BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver;var isNode=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var isWorker=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function useNextTick(){return function(){return process.nextTick(flush);};}
  function useVertxTimer(){if(typeof vertxNext!=="undefined"){return function(){vertxNext(flush);};}
  return useSetTimeout();}
  function useMutationObserver(){var iterations=0;var observer=new BrowserMutationObserver(flush);var node=document.createTextNode("");observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2;};}
  function useMessageChannel(){var channel=new MessageChannel();channel.port1.onmessage=flush;return function(){return channel.port2.postMessage(0);};}
  function useSetTimeout(){var globalSetTimeout=setTimeout;return function(){return globalSetTimeout(flush,1);};}
  var queue=new Array(1e3);function flush(){for(var i3=0;i3<len;i3+=2){var callback=queue[i3];var arg=queue[i3+1];callback(arg);queue[i3]=void 0;queue[i3+1]=void 0;}
  len=0;}
  function attemptVertx(){try{var vertx=Function("return this")().require("vertx");vertxNext=vertx.runOnLoop||vertx.runOnContext;return useVertxTimer();}catch(e3){return useSetTimeout();}}
  var scheduleFlush=void 0;if(isNode){scheduleFlush=useNextTick();}else if(BrowserMutationObserver){scheduleFlush=useMutationObserver();}else if(isWorker){scheduleFlush=useMessageChannel();}else if(browserWindow===void 0&&true){scheduleFlush=attemptVertx();}else{scheduleFlush=useSetTimeout();}
  function then(onFulfillment,onRejection){var parent=this;var child=new this.constructor(noop4);if(child[PROMISE_ID]===void 0){makePromise(child);}
  var _state=parent._state;if(_state){var callback=arguments[_state-1];asap(function(){return invokeCallback(_state,child,callback,parent._result);});}else{subscribe(parent,child,onFulfillment,onRejection);}
  return child;}
  function resolve$1(object){var Constructor=this;if(object&&typeof object==="object"&&object.constructor===Constructor){return object;}
  var promise=new Constructor(noop4);resolve(promise,object);return promise;}
  var PROMISE_ID=Math.random().toString(36).substring(2);function noop4(){}
  var PENDING=void 0;var FULFILLED=1;var REJECTED=2;function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself");}
  function cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.");}
  function tryThen(then$$1,value,fulfillmentHandler,rejectionHandler){try{then$$1.call(value,fulfillmentHandler,rejectionHandler);}catch(e3){return e3;}}
  function handleForeignThenable(promise,thenable,then$$1){asap(function(promise2){var sealed=false;var error=tryThen(then$$1,thenable,function(value){if(sealed){return;}
  sealed=true;if(thenable!==value){resolve(promise2,value);}else{fulfill(promise2,value);}},function(reason){if(sealed){return;}
  sealed=true;reject(promise2,reason);},"Settle: "+(promise2._label||" unknown promise"));if(!sealed&&error){sealed=true;reject(promise2,error);}},promise);}
  function handleOwnThenable(promise,thenable){if(thenable._state===FULFILLED){fulfill(promise,thenable._result);}else if(thenable._state===REJECTED){reject(promise,thenable._result);}else{subscribe(thenable,void 0,function(value){return resolve(promise,value);},function(reason){return reject(promise,reason);});}}
  function handleMaybeThenable(promise,maybeThenable,then$$1){if(maybeThenable.constructor===promise.constructor&&then$$1===then&&maybeThenable.constructor.resolve===resolve$1){handleOwnThenable(promise,maybeThenable);}else{if(then$$1===void 0){fulfill(promise,maybeThenable);}else if(isFunction(then$$1)){handleForeignThenable(promise,maybeThenable,then$$1);}else{fulfill(promise,maybeThenable);}}}
  function resolve(promise,value){if(promise===value){reject(promise,selfFulfillment());}else if(objectOrFunction(value)){var then$$1=void 0;try{then$$1=value.then;}catch(error){reject(promise,error);return;}
  handleMaybeThenable(promise,value,then$$1);}else{fulfill(promise,value);}}
  function publishRejection(promise){if(promise._onerror){promise._onerror(promise._result);}
  publish(promise);}
  function fulfill(promise,value){if(promise._state!==PENDING){return;}
  promise._result=value;promise._state=FULFILLED;if(promise._subscribers.length!==0){asap(publish,promise);}}
  function reject(promise,reason){if(promise._state!==PENDING){return;}
  promise._state=REJECTED;promise._result=reason;asap(publishRejection,promise);}
  function subscribe(parent,child,onFulfillment,onRejection){var _subscribers=parent._subscribers;var length=_subscribers.length;parent._onerror=null;_subscribers[length]=child;_subscribers[length+FULFILLED]=onFulfillment;_subscribers[length+REJECTED]=onRejection;if(length===0&&parent._state){asap(publish,parent);}}
  function publish(promise){var subscribers=promise._subscribers;var settled=promise._state;if(subscribers.length===0){return;}
  var child=void 0,callback=void 0,detail=promise._result;for(var i3=0;i3<subscribers.length;i3+=3){child=subscribers[i3];callback=subscribers[i3+settled];if(child){invokeCallback(settled,child,callback,detail);}else{callback(detail);}}
  promise._subscribers.length=0;}
  function invokeCallback(settled,promise,callback,detail){var hasCallback=isFunction(callback),value=void 0,error=void 0,succeeded=true;if(hasCallback){try{value=callback(detail);}catch(e3){succeeded=false;error=e3;}
  if(promise===value){reject(promise,cannotReturnOwn());return;}}else{value=detail;}
  if(promise._state!==PENDING){}else if(hasCallback&&succeeded){resolve(promise,value);}else if(succeeded===false){reject(promise,error);}else if(settled===FULFILLED){fulfill(promise,value);}else if(settled===REJECTED){reject(promise,value);}}
  function initializePromise(promise,resolver){try{resolver(function resolvePromise(value){resolve(promise,value);},function rejectPromise(reason){reject(promise,reason);});}catch(e3){reject(promise,e3);}}
  var id=0;function nextId(){return id++;}
  function makePromise(promise){promise[PROMISE_ID]=id++;promise._state=void 0;promise._result=void 0;promise._subscribers=[];}
  function validationError(){return new Error("Array Methods must be provided an Array");}
  var Enumerator=function(){function Enumerator2(Constructor,input){this._instanceConstructor=Constructor;this.promise=new Constructor(noop4);if(!this.promise[PROMISE_ID]){makePromise(this.promise);}
  if(isArray(input)){this.length=input.length;this._remaining=input.length;this._result=new Array(this.length);if(this.length===0){fulfill(this.promise,this._result);}else{this.length=this.length||0;this._enumerate(input);if(this._remaining===0){fulfill(this.promise,this._result);}}}else{reject(this.promise,validationError());}}
  Enumerator2.prototype._enumerate=function _enumerate(input){for(var i3=0;this._state===PENDING&&i3<input.length;i3++){this._eachEntry(input[i3],i3);}};Enumerator2.prototype._eachEntry=function _eachEntry(entry,i3){var c3=this._instanceConstructor;var resolve$$1=c3.resolve;if(resolve$$1===resolve$1){var _then=void 0;var error=void 0;var didError=false;try{_then=entry.then;}catch(e3){didError=true;error=e3;}
  if(_then===then&&entry._state!==PENDING){this._settledAt(entry._state,i3,entry._result);}else if(typeof _then!=="function"){this._remaining--;this._result[i3]=entry;}else if(c3===Promise$1){var promise=new c3(noop4);if(didError){reject(promise,error);}else{handleMaybeThenable(promise,entry,_then);}
  this._willSettleAt(promise,i3);}else{this._willSettleAt(new c3(function(resolve$$12){return resolve$$12(entry);}),i3);}}else{this._willSettleAt(resolve$$1(entry),i3);}};Enumerator2.prototype._settledAt=function _settledAt(state,i3,value){var promise=this.promise;if(promise._state===PENDING){this._remaining--;if(state===REJECTED){reject(promise,value);}else{this._result[i3]=value;}}
  if(this._remaining===0){fulfill(promise,this._result);}};Enumerator2.prototype._willSettleAt=function _willSettleAt(promise,i3){var enumerator=this;subscribe(promise,void 0,function(value){return enumerator._settledAt(FULFILLED,i3,value);},function(reason){return enumerator._settledAt(REJECTED,i3,reason);});};return Enumerator2;}();function all(entries){return new Enumerator(this,entries).promise;}
  function race(entries){var Constructor=this;if(!isArray(entries)){return new Constructor(function(_3,reject2){return reject2(new TypeError("You must pass an array to race."));});}else{return new Constructor(function(resolve2,reject2){var length=entries.length;for(var i3=0;i3<length;i3++){Constructor.resolve(entries[i3]).then(resolve2,reject2);}});}}
  function reject$1(reason){var Constructor=this;var promise=new Constructor(noop4);reject(promise,reason);return promise;}
  function needsResolver(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}
  function needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}
  var Promise$1=function(){function Promise2(resolver){this[PROMISE_ID]=nextId();this._result=this._state=void 0;this._subscribers=[];if(noop4!==resolver){typeof resolver!=="function"&&needsResolver();this instanceof Promise2?initializePromise(this,resolver):needsNew();}}
  Promise2.prototype.catch=function _catch(onRejection){return this.then(null,onRejection);};Promise2.prototype.finally=function _finally(callback){var promise=this;var constructor=promise.constructor;if(isFunction(callback)){return promise.then(function(value){return constructor.resolve(callback()).then(function(){return value;});},function(reason){return constructor.resolve(callback()).then(function(){throw reason;});});}
  return promise.then(callback,callback);};return Promise2;}();Promise$1.prototype.then=then;Promise$1.all=all;Promise$1.race=race;Promise$1.resolve=resolve$1;Promise$1.reject=reject$1;Promise$1._setScheduler=setScheduler;Promise$1._setAsap=setAsap;Promise$1._asap=asap;function polyfill(){var local=void 0;if(typeof global!=="undefined"){local=global;}else if(typeof self!=="undefined"){local=self;}else{try{local=Function("return this")();}catch(e3){throw new Error("polyfill failed because global object is unavailable in this environment");}}
  var P2=local.Promise;if(P2){var promiseToString=null;try{promiseToString=Object.prototype.toString.call(P2.resolve());}catch(e3){}
  if(promiseToString==="[object Promise]"&&!P2.cast){return;}}
  local.Promise=Promise$1;}
  Promise$1.polyfill=polyfill;Promise$1.Promise=Promise$1;return Promise$1;});});var require_encode=__commonJS((exports,module)=>{"use strict";var stringifyPrimitive=function(v3){switch(typeof v3){case "string":return v3;case "boolean":return v3?"true":"false";case "number":return isFinite(v3)?v3:"";default:return "";}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=void 0;}
  if(typeof obj==="object"){return map(objectKeys(obj),function(k3){var ks=encodeURIComponent(stringifyPrimitive(k3))+eq;if(isArray(obj[k3])){return map(obj[k3],function(v3){return ks+encodeURIComponent(stringifyPrimitive(v3));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k3]));}}).join(sep);}
  if(!name)
  return "";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]";};function map(xs,f3){if(xs.map)
  return xs.map(f3);var res=[];for(var i3=0;i3<xs.length;i3++){res.push(f3(xs[i3],i3));}
  return res;}
  var objectKeys=Object.keys||function(obj){var res=[];for(var key2 in obj){if(Object.prototype.hasOwnProperty.call(obj,key2))
  res.push(key2);}
  return res;};});var require_inline_headers=__commonJS((exports,module)=>{"use strict";module.exports=inlineHeaders;var encode=require_encode();function inlineHeaders(url,headers){if(/\?/.test(url)){url+="&";}else{url+="?";}
  return url+encode(headers);}});var require_jsonp_request=__commonJS((exports,module)=>{"use strict";module.exports=jsonpRequest;var errors=require_errors();var JSONPCounter=0;function jsonpRequest(url,opts,cb){if(opts.method!=="GET"){cb(new Error("Method "+opts.method+" "+url+" is not supported by JSONP."));return;}
  opts.debug("JSONP: start");var cbCalled=false;var timedOut=false;JSONPCounter+=1;var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");var cbName="algoliaJSONP_"+JSONPCounter;var done=false;window[cbName]=function(data){removeGlobals();if(timedOut){opts.debug("JSONP: Late answer, ignoring");return;}
  cbCalled=true;clean();cb(null,{body:data,responseText:JSON.stringify(data)});};url+="&callback="+cbName;if(opts.jsonBody&&opts.jsonBody.params){url+="&"+opts.jsonBody.params;}
  var ontimeout=setTimeout(timeout,opts.timeouts.complete);script.onreadystatechange=readystatechange;script.onload=success;script.onerror=error;script.async=true;script.defer=true;script.src=url;head.appendChild(script);function success(){opts.debug("JSONP: success");if(done||timedOut){return;}
  done=true;if(!cbCalled){opts.debug("JSONP: Fail. Script loaded but did not call the callback");clean();cb(new errors.JSONPScriptFail());}}
  function readystatechange(){if(this.readyState==="loaded"||this.readyState==="complete"){success();}}
  function clean(){clearTimeout(ontimeout);script.onload=null;script.onreadystatechange=null;script.onerror=null;head.removeChild(script);}
  function removeGlobals(){try{delete window[cbName];delete window[cbName+"_loaded"];}catch(e3){window[cbName]=window[cbName+"_loaded"]=void 0;}}
  function timeout(){opts.debug("JSONP: Script timeout");timedOut=true;clean();cb(new errors.RequestTimeout());}
  function error(){opts.debug("JSONP: Script error");if(done||timedOut){return;}
  clean();cb(new errors.JSONPScriptError());}}});var require_decode=__commonJS((exports,module)=>{"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}
  module.exports=function(qs3,sep,eq,options){sep=sep||"&";eq=eq||"=";var obj={};if(typeof qs3!=="string"||qs3.length===0){return obj;}
  var regexp=/\+/g;qs3=qs3.split(sep);var maxKeys=1e3;if(options&&typeof options.maxKeys==="number"){maxKeys=options.maxKeys;}
  var len=qs3.length;if(maxKeys>0&&len>maxKeys){len=maxKeys;}
  for(var i3=0;i3<len;++i3){var x3=qs3[i3].replace(regexp,"%20"),idx=x3.indexOf(eq),kstr,vstr,k3,v3;if(idx>=0){kstr=x3.substr(0,idx);vstr=x3.substr(idx+1);}else{kstr=x3;vstr="";}
  k3=decodeURIComponent(kstr);v3=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k3)){obj[k3]=v3;}else if(isArray(obj[k3])){obj[k3].push(v3);}else{obj[k3]=[obj[k3],v3];}}
  return obj;};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]";};});var require_querystring_es3=__commonJS((exports)=>{"use strict";exports.decode=exports.parse=require_decode();exports.encode=exports.stringify=require_encode();});var require_places=__commonJS((exports,module)=>{module.exports=createPlacesClient;var qs3=require_querystring_es3();var buildSearchMethod=require_buildSearchMethod();function createPlacesClient(algoliasearch2){return function places2(appID,apiKey,opts){var cloneDeep=require_clone();opts=opts&&cloneDeep(opts)||{};opts.hosts=opts.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"];if(arguments.length===0||typeof appID==="object"||appID===void 0){appID="";apiKey="";opts._allowEmptyCredentials=true;}
  var client2=algoliasearch2(appID,apiKey,opts);var index4=client2.initIndex("places");index4.search=buildSearchMethod("query","/1/places/query");index4.reverse=function(options,callback){var encoded=qs3.encode(options);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+encoded,hostType:"read",callback});};index4.getObject=function(objectID,callback){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(objectID),hostType:"read",callback});};return index4;};}});var require_version2=__commonJS((exports,module)=>{"use strict";module.exports="3.35.1";});var require_createAlgoliasearch=__commonJS((exports,module)=>{"use strict";var global2=require_window();var Promise2=global2.Promise||require_es6_promise().Promise;module.exports=function createAlgoliasearch(AlgoliaSearch,uaSuffix){var inherits=require_inherits_browser();var errors=require_errors();var inlineHeaders=require_inline_headers();var jsonpRequest=require_jsonp_request();var places2=require_places();uaSuffix=uaSuffix||"";if(false){null.enable("algoliasearch*");}
  function algoliasearch2(applicationID,apiKey,opts){var cloneDeep=require_clone();opts=cloneDeep(opts||{});opts._ua=opts._ua||algoliasearch2.ua;return new AlgoliaSearchBrowser(applicationID,apiKey,opts);}
  algoliasearch2.version=require_version2();algoliasearch2.ua="Algolia for JavaScript ("+algoliasearch2.version+"); "+uaSuffix;algoliasearch2.initPlaces=places2(algoliasearch2);global2.__algolia={debug:require_browser(),algoliasearch:algoliasearch2};var support={hasXMLHttpRequest:"XMLHttpRequest"in global2,hasXDomainRequest:"XDomainRequest"in global2};if(support.hasXMLHttpRequest){support.cors="withCredentials"in new XMLHttpRequest();}
  function AlgoliaSearchBrowser(){AlgoliaSearch.apply(this,arguments);}
  inherits(AlgoliaSearchBrowser,AlgoliaSearch);AlgoliaSearchBrowser.prototype._request=function request(url,opts){return new Promise2(function wrapRequest(resolve,reject){if(!support.cors&&!support.hasXDomainRequest){reject(new errors.Network("CORS not supported"));return;}
  url=inlineHeaders(url,opts.headers);var body=opts.body;var req=support.cors?new XMLHttpRequest():new XDomainRequest();var reqTimeout;var timedOut;var connected=false;reqTimeout=setTimeout(onTimeout,opts.timeouts.connect);req.onprogress=onProgress;if("onreadystatechange"in req)
  req.onreadystatechange=onReadyStateChange;req.onload=onLoad;req.onerror=onError;if(req instanceof XMLHttpRequest){req.open(opts.method,url,true);if(opts.forceAuthHeaders){req.setRequestHeader("x-algolia-application-id",opts.headers["x-algolia-application-id"]);req.setRequestHeader("x-algolia-api-key",opts.headers["x-algolia-api-key"]);}}else{req.open(opts.method,url);}
  if(support.cors){if(body){if(opts.method==="POST"){req.setRequestHeader("content-type","application/x-www-form-urlencoded");}else{req.setRequestHeader("content-type","application/json");}}
  req.setRequestHeader("accept","application/json");}
  if(body){req.send(body);}else{req.send();}
  function onLoad(){if(timedOut){return;}
  clearTimeout(reqTimeout);var out;try{out={body:JSON.parse(req.responseText),responseText:req.responseText,statusCode:req.status,headers:req.getAllResponseHeaders&&req.getAllResponseHeaders()||{}};}catch(e3){out=new errors.UnparsableJSON({more:req.responseText});}
  if(out instanceof errors.UnparsableJSON){reject(out);}else{resolve(out);}}
  function onError(event){if(timedOut){return;}
  clearTimeout(reqTimeout);reject(new errors.Network({more:event}));}
  function onTimeout(){timedOut=true;req.abort();reject(new errors.RequestTimeout());}
  function onConnect(){connected=true;clearTimeout(reqTimeout);reqTimeout=setTimeout(onTimeout,opts.timeouts.complete);}
  function onProgress(){if(!connected)
  onConnect();}
  function onReadyStateChange(){if(!connected&&req.readyState>1)
  onConnect();}});};AlgoliaSearchBrowser.prototype._request.fallback=function requestFallback(url,opts){url=inlineHeaders(url,opts.headers);return new Promise2(function wrapJsonpRequest(resolve,reject){jsonpRequest(url,opts,function jsonpRequestDone(err,content){if(err){reject(err);return;}
  resolve(content);});});};AlgoliaSearchBrowser.prototype._promise={reject:function rejectPromise(val){return Promise2.reject(val);},resolve:function resolvePromise(val){return Promise2.resolve(val);},delay:function delayPromise(ms){return new Promise2(function resolveOnTimeout(resolve){setTimeout(resolve,ms);});},all:function all(promises){return Promise2.all(promises);}};return algoliasearch2;};});var require_algoliasearchLite=__commonJS((exports,module)=>{"use strict";var AlgoliaSearchCore=require_AlgoliaSearchCore();var createAlgoliasearch=require_createAlgoliasearch();module.exports=createAlgoliasearch(AlgoliaSearchCore,"Browser (lite)");});var require_merge=__commonJS((exports,module)=>{"use strict";function clone(value){if(typeof value==="object"&&value!==null){return _merge(Array.isArray(value)?[]:{},value);}
  return value;}
  function isObjectOrArrayOrFunction(value){return typeof value==="function"||Array.isArray(value)||Object.prototype.toString.call(value)==="[object Object]";}
  function _merge(target,source){if(target===source){return target;}
  for(var key2 in source){if(!Object.prototype.hasOwnProperty.call(source,key2)){continue;}
  var sourceVal=source[key2];var targetVal=target[key2];if(typeof targetVal!=="undefined"&&typeof sourceVal==="undefined"){continue;}
  if(isObjectOrArrayOrFunction(targetVal)&&isObjectOrArrayOrFunction(sourceVal)){target[key2]=_merge(targetVal,sourceVal);}else{target[key2]=clone(sourceVal);}}
  return target;}
  function merge2(target){if(!isObjectOrArrayOrFunction(target)){target={};}
  for(var i3=1,l3=arguments.length;i3<l3;i3++){var source=arguments[i3];if(isObjectOrArrayOrFunction(source)){_merge(target,source);}}
  return target;}
  module.exports=merge2;});var require_defaultsPure=__commonJS((exports,module)=>{"use strict";module.exports=function defaultsPure(){var sources=Array.prototype.slice.call(arguments);return sources.reduceRight(function(acc,source){Object.keys(Object(source)).forEach(function(key2){if(source[key2]===void 0){return;}
  if(acc[key2]!==void 0){delete acc[key2];}
  acc[key2]=source[key2];});return acc;},{});};});var require_intersection=__commonJS((exports,module)=>{"use strict";function intersection(arr1,arr2){return arr1.filter(function(value,index4){return arr2.indexOf(value)>-1&&arr1.indexOf(value)===index4;});}
  module.exports=intersection;});var require_find=__commonJS((exports,module)=>{"use strict";module.exports=function find4(array,comparator){if(!Array.isArray(array)){return void 0;}
  for(var i3=0;i3<array.length;i3++){if(comparator(array[i3])){return array[i3];}}};});var require_valToNumber=__commonJS((exports,module)=>{"use strict";function valToNumber(v3){if(typeof v3==="number"){return v3;}else if(typeof v3==="string"){return parseFloat(v3);}else if(Array.isArray(v3)){return v3.map(valToNumber);}
  throw new Error("The value should be a number, a parsable string or an array of those.");}
  module.exports=valToNumber;});var require_omit=__commonJS((exports,module)=>{"use strict";function _objectWithoutPropertiesLoose13(source,excluded){if(source===null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2;var i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  module.exports=_objectWithoutPropertiesLoose13;});var require_objectHasKeys=__commonJS((exports,module)=>{"use strict";function objectHasKeys(obj){return obj&&Object.keys(obj).length>0;}
  module.exports=objectHasKeys;});var require_isValidUserToken=__commonJS((exports,module)=>{"use strict";module.exports=function isValidUserToken(userToken){if(userToken===null){return false;}
  return /^[a-zA-Z0-9_-]{1,64}$/.test(userToken);};});var require_RefinementList=__commonJS((exports,module)=>{"use strict";var defaultsPure=require_defaultsPure();var omit=require_omit();var objectHasKeys=require_objectHasKeys();var lib={addRefinement:function addRefinement(refinementList2,attribute,value){if(lib.isRefined(refinementList2,attribute,value)){return refinementList2;}
  var valueAsString=""+value;var facetRefinement=!refinementList2[attribute]?[valueAsString]:refinementList2[attribute].concat(valueAsString);var mod={};mod[attribute]=facetRefinement;return defaultsPure({},mod,refinementList2);},removeRefinement:function removeRefinement(refinementList2,attribute,value){if(value===void 0){return lib.clearRefinement(refinementList2,function(v3,f3){return attribute===f3;});}
  var valueAsString=""+value;return lib.clearRefinement(refinementList2,function(v3,f3){return attribute===f3&&valueAsString===v3;});},toggleRefinement:function toggleRefinement2(refinementList2,attribute,value){if(value===void 0)
  throw new Error("toggleRefinement should be used with a value");if(lib.isRefined(refinementList2,attribute,value)){return lib.removeRefinement(refinementList2,attribute,value);}
  return lib.addRefinement(refinementList2,attribute,value);},clearRefinement:function clearRefinement2(refinementList2,attribute,refinementType){if(attribute===void 0){if(!objectHasKeys(refinementList2)){return refinementList2;}
  return{};}else if(typeof attribute==="string"){return omit(refinementList2,[attribute]);}else if(typeof attribute==="function"){var hasChanged=false;var newRefinementList=Object.keys(refinementList2).reduce(function(memo,key2){var values=refinementList2[key2]||[];var facetList=values.filter(function(value){return!attribute(value,key2,refinementType);});if(facetList.length!==values.length){hasChanged=true;}
  memo[key2]=facetList;return memo;},{});if(hasChanged)
  return newRefinementList;return refinementList2;}},isRefined:function isRefined2(refinementList2,attribute,refinementValue){var containsRefinements=!!refinementList2[attribute]&&refinementList2[attribute].length>0;if(refinementValue===void 0||!containsRefinements){return containsRefinements;}
  var refinementValueAsString=""+refinementValue;return refinementList2[attribute].indexOf(refinementValueAsString)!==-1;}};module.exports=lib;});var require_SearchParameters=__commonJS((exports,module)=>{"use strict";var merge2=require_merge();var defaultsPure=require_defaultsPure();var intersection=require_intersection();var find4=require_find();var valToNumber=require_valToNumber();var omit=require_omit();var objectHasKeys=require_objectHasKeys();var isValidUserToken=require_isValidUserToken();var RefinementList7=require_RefinementList();function isEqualNumericRefinement(a3,b3){if(Array.isArray(a3)&&Array.isArray(b3)){return a3.length===b3.length&&a3.every(function(el,i3){return isEqualNumericRefinement(b3[i3],el);});}
  return a3===b3;}
  function findArray(array,searchedValue){return find4(array,function(currentValue){return isEqualNumericRefinement(currentValue,searchedValue);});}
  function SearchParameters(newParameters){var params=newParameters?SearchParameters._parseNumbers(newParameters):{};if(params.userToken!==void 0&&!isValidUserToken(params.userToken)){console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n  - Format: [a-zA-Z0-9_-]{1,64}");}
  this.facets=params.facets||[];this.disjunctiveFacets=params.disjunctiveFacets||[];this.hierarchicalFacets=params.hierarchicalFacets||[];this.facetsRefinements=params.facetsRefinements||{};this.facetsExcludes=params.facetsExcludes||{};this.disjunctiveFacetsRefinements=params.disjunctiveFacetsRefinements||{};this.numericRefinements=params.numericRefinements||{};this.tagRefinements=params.tagRefinements||[];this.hierarchicalFacetsRefinements=params.hierarchicalFacetsRefinements||{};var self2=this;Object.keys(params).forEach(function(paramName){var isKeyKnown=SearchParameters.PARAMETERS.indexOf(paramName)!==-1;var isValueDefined=params[paramName]!==void 0;if(!isKeyKnown&&isValueDefined){self2[paramName]=params[paramName];}});}
  SearchParameters.PARAMETERS=Object.keys(new SearchParameters());SearchParameters._parseNumbers=function(partialState){if(partialState instanceof SearchParameters)
  return partialState;var numbers={};var numberKeys=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];numberKeys.forEach(function(k3){var value=partialState[k3];if(typeof value==="string"){var parsedValue=parseFloat(value);numbers[k3]=isNaN(parsedValue)?value:parsedValue;}});if(Array.isArray(partialState.insideBoundingBox)){numbers.insideBoundingBox=partialState.insideBoundingBox.map(function(geoRect){if(Array.isArray(geoRect)){return geoRect.map(function(value){return parseFloat(value);});}
  return geoRect;});}
  if(partialState.numericRefinements){var numericRefinements={};Object.keys(partialState.numericRefinements).forEach(function(attribute){var operators=partialState.numericRefinements[attribute]||{};numericRefinements[attribute]={};Object.keys(operators).forEach(function(operator){var values=operators[operator];var parsedValues=values.map(function(v3){if(Array.isArray(v3)){return v3.map(function(vPrime){if(typeof vPrime==="string"){return parseFloat(vPrime);}
  return vPrime;});}else if(typeof v3==="string"){return parseFloat(v3);}
  return v3;});numericRefinements[attribute][operator]=parsedValues;});});numbers.numericRefinements=numericRefinements;}
  return merge2({},partialState,numbers);};SearchParameters.make=function makeSearchParameters(newParameters){var instance=new SearchParameters(newParameters);var hierarchicalFacets=newParameters.hierarchicalFacets||[];hierarchicalFacets.forEach(function(facet){if(facet.rootPath){var currentRefinement=instance.getHierarchicalRefinement(facet.name);if(currentRefinement.length>0&&currentRefinement[0].indexOf(facet.rootPath)!==0){instance=instance.clearRefinements(facet.name);}
  currentRefinement=instance.getHierarchicalRefinement(facet.name);if(currentRefinement.length===0){instance=instance.toggleHierarchicalFacetRefinement(facet.name,facet.rootPath);}}});return instance;};SearchParameters.validate=function(currentState,parameters){var params=parameters||{};if(currentState.tagFilters&&params.tagRefinements&&params.tagRefinements.length>0){return new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method.");}
  if(currentState.tagRefinements.length>0&&params.tagFilters){return new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method.");}
  if(currentState.numericFilters&&params.numericRefinements&&objectHasKeys(params.numericRefinements)){return new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters.");}
  if(objectHasKeys(currentState.numericRefinements)&&params.numericFilters){return new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters.");}
  return null;};SearchParameters.prototype={constructor:SearchParameters,clearRefinements:function clearRefinements4(attribute){var patch={numericRefinements:this._clearNumericRefinements(attribute),facetsRefinements:RefinementList7.clearRefinement(this.facetsRefinements,attribute,"conjunctiveFacet"),facetsExcludes:RefinementList7.clearRefinement(this.facetsExcludes,attribute,"exclude"),disjunctiveFacetsRefinements:RefinementList7.clearRefinement(this.disjunctiveFacetsRefinements,attribute,"disjunctiveFacet"),hierarchicalFacetsRefinements:RefinementList7.clearRefinement(this.hierarchicalFacetsRefinements,attribute,"hierarchicalFacet")};if(patch.numericRefinements===this.numericRefinements&&patch.facetsRefinements===this.facetsRefinements&&patch.facetsExcludes===this.facetsExcludes&&patch.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&patch.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements){return this;}
  return this.setQueryParameters(patch);},clearTags:function clearTags(){if(this.tagFilters===void 0&&this.tagRefinements.length===0)
  return this;return this.setQueryParameters({tagFilters:void 0,tagRefinements:[]});},setIndex:function setIndex(index4){if(index4===this.index)
  return this;return this.setQueryParameters({index:index4});},setQuery:function setQuery(newQuery){if(newQuery===this.query)
  return this;return this.setQueryParameters({query:newQuery});},setPage:function setPage(newPage){if(newPage===this.page)
  return this;return this.setQueryParameters({page:newPage});},setFacets:function setFacets(facets){return this.setQueryParameters({facets});},setDisjunctiveFacets:function setDisjunctiveFacets(facets){return this.setQueryParameters({disjunctiveFacets:facets});},setHitsPerPage:function setHitsPerPage(n2){if(this.hitsPerPage===n2)
  return this;return this.setQueryParameters({hitsPerPage:n2});},setTypoTolerance:function setTypoTolerance(typoTolerance){if(this.typoTolerance===typoTolerance)
  return this;return this.setQueryParameters({typoTolerance});},addNumericRefinement:function(attribute,operator,v3){var value=valToNumber(v3);if(this.isNumericRefined(attribute,operator,value))
  return this;var mod=merge2({},this.numericRefinements);mod[attribute]=merge2({},mod[attribute]);if(mod[attribute][operator]){mod[attribute][operator]=mod[attribute][operator].slice();mod[attribute][operator].push(value);}else{mod[attribute][operator]=[value];}
  return this.setQueryParameters({numericRefinements:mod});},getConjunctiveRefinements:function(facetName){if(!this.isConjunctiveFacet(facetName)){return[];}
  return this.facetsRefinements[facetName]||[];},getDisjunctiveRefinements:function(facetName){if(!this.isDisjunctiveFacet(facetName)){return[];}
  return this.disjunctiveFacetsRefinements[facetName]||[];},getHierarchicalRefinement:function(facetName){return this.hierarchicalFacetsRefinements[facetName]||[];},getExcludeRefinements:function(facetName){if(!this.isConjunctiveFacet(facetName)){return[];}
  return this.facetsExcludes[facetName]||[];},removeNumericRefinement:function(attribute,operator,paramValue){if(paramValue!==void 0){if(!this.isNumericRefined(attribute,operator,paramValue)){return this;}
  return this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(value,key2){return key2===attribute&&value.op===operator&&isEqualNumericRefinement(value.val,valToNumber(paramValue));})});}else if(operator!==void 0){if(!this.isNumericRefined(attribute,operator))
  return this;return this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(value,key2){return key2===attribute&&value.op===operator;})});}
  if(!this.isNumericRefined(attribute))
  return this;return this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(value,key2){return key2===attribute;})});},getNumericRefinements:function(facetName){return this.numericRefinements[facetName]||{};},getNumericRefinement:function(attribute,operator){return this.numericRefinements[attribute]&&this.numericRefinements[attribute][operator];},_clearNumericRefinements:function _clearNumericRefinements(attribute){if(attribute===void 0){if(!objectHasKeys(this.numericRefinements)){return this.numericRefinements;}
  return{};}else if(typeof attribute==="string"){return omit(this.numericRefinements,[attribute]);}else if(typeof attribute==="function"){var hasChanged=false;var numericRefinements=this.numericRefinements;var newNumericRefinements=Object.keys(numericRefinements).reduce(function(memo,key2){var operators=numericRefinements[key2];var operatorList={};operators=operators||{};Object.keys(operators).forEach(function(operator){var values=operators[operator]||[];var outValues=[];values.forEach(function(value){var predicateResult=attribute({val:value,op:operator},key2,"numeric");if(!predicateResult)
  outValues.push(value);});if(outValues.length!==values.length){hasChanged=true;}
  operatorList[operator]=outValues;});memo[key2]=operatorList;return memo;},{});if(hasChanged)
  return newNumericRefinements;return this.numericRefinements;}},addFacet:function addFacet(facet){if(this.isConjunctiveFacet(facet)){return this;}
  return this.setQueryParameters({facets:this.facets.concat([facet])});},addDisjunctiveFacet:function addDisjunctiveFacet(facet){if(this.isDisjunctiveFacet(facet)){return this;}
  return this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([facet])});},addHierarchicalFacet:function addHierarchicalFacet(hierarchicalFacet){if(this.isHierarchicalFacet(hierarchicalFacet.name)){throw new Error("Cannot declare two hierarchical facets with the same name: `"+hierarchicalFacet.name+"`");}
  return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([hierarchicalFacet])});},addFacetRefinement:function addFacetRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  if(RefinementList7.isRefined(this.facetsRefinements,facet,value))
  return this;return this.setQueryParameters({facetsRefinements:RefinementList7.addRefinement(this.facetsRefinements,facet,value)});},addExcludeRefinement:function addExcludeRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  if(RefinementList7.isRefined(this.facetsExcludes,facet,value))
  return this;return this.setQueryParameters({facetsExcludes:RefinementList7.addRefinement(this.facetsExcludes,facet,value)});},addDisjunctiveFacetRefinement:function addDisjunctiveFacetRefinement(facet,value){if(!this.isDisjunctiveFacet(facet)){throw new Error(facet+" is not defined in the disjunctiveFacets attribute of the helper configuration");}
  if(RefinementList7.isRefined(this.disjunctiveFacetsRefinements,facet,value))
  return this;return this.setQueryParameters({disjunctiveFacetsRefinements:RefinementList7.addRefinement(this.disjunctiveFacetsRefinements,facet,value)});},addTagRefinement:function addTagRefinement(tag){if(this.isTagRefined(tag))
  return this;var modification={tagRefinements:this.tagRefinements.concat(tag)};return this.setQueryParameters(modification);},removeFacet:function removeFacet(facet){if(!this.isConjunctiveFacet(facet)){return this;}
  return this.clearRefinements(facet).setQueryParameters({facets:this.facets.filter(function(f3){return f3!==facet;})});},removeDisjunctiveFacet:function removeDisjunctiveFacet(facet){if(!this.isDisjunctiveFacet(facet)){return this;}
  return this.clearRefinements(facet).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(f3){return f3!==facet;})});},removeHierarchicalFacet:function removeHierarchicalFacet(facet){if(!this.isHierarchicalFacet(facet)){return this;}
  return this.clearRefinements(facet).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(f3){return f3.name!==facet;})});},removeFacetRefinement:function removeFacetRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  if(!RefinementList7.isRefined(this.facetsRefinements,facet,value))
  return this;return this.setQueryParameters({facetsRefinements:RefinementList7.removeRefinement(this.facetsRefinements,facet,value)});},removeExcludeRefinement:function removeExcludeRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  if(!RefinementList7.isRefined(this.facetsExcludes,facet,value))
  return this;return this.setQueryParameters({facetsExcludes:RefinementList7.removeRefinement(this.facetsExcludes,facet,value)});},removeDisjunctiveFacetRefinement:function removeDisjunctiveFacetRefinement(facet,value){if(!this.isDisjunctiveFacet(facet)){throw new Error(facet+" is not defined in the disjunctiveFacets attribute of the helper configuration");}
  if(!RefinementList7.isRefined(this.disjunctiveFacetsRefinements,facet,value))
  return this;return this.setQueryParameters({disjunctiveFacetsRefinements:RefinementList7.removeRefinement(this.disjunctiveFacetsRefinements,facet,value)});},removeTagRefinement:function removeTagRefinement(tag){if(!this.isTagRefined(tag))
  return this;var modification={tagRefinements:this.tagRefinements.filter(function(t3){return t3!==tag;})};return this.setQueryParameters(modification);},toggleRefinement:function toggleRefinement2(facet,value){return this.toggleFacetRefinement(facet,value);},toggleFacetRefinement:function toggleFacetRefinement(facet,value){if(this.isHierarchicalFacet(facet)){return this.toggleHierarchicalFacetRefinement(facet,value);}else if(this.isConjunctiveFacet(facet)){return this.toggleConjunctiveFacetRefinement(facet,value);}else if(this.isDisjunctiveFacet(facet)){return this.toggleDisjunctiveFacetRefinement(facet,value);}
  throw new Error("Cannot refine the undeclared facet "+facet+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets");},toggleConjunctiveFacetRefinement:function toggleConjunctiveFacetRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  return this.setQueryParameters({facetsRefinements:RefinementList7.toggleRefinement(this.facetsRefinements,facet,value)});},toggleExcludeFacetRefinement:function toggleExcludeFacetRefinement(facet,value){if(!this.isConjunctiveFacet(facet)){throw new Error(facet+" is not defined in the facets attribute of the helper configuration");}
  return this.setQueryParameters({facetsExcludes:RefinementList7.toggleRefinement(this.facetsExcludes,facet,value)});},toggleDisjunctiveFacetRefinement:function toggleDisjunctiveFacetRefinement(facet,value){if(!this.isDisjunctiveFacet(facet)){throw new Error(facet+" is not defined in the disjunctiveFacets attribute of the helper configuration");}
  return this.setQueryParameters({disjunctiveFacetsRefinements:RefinementList7.toggleRefinement(this.disjunctiveFacetsRefinements,facet,value)});},toggleHierarchicalFacetRefinement:function toggleHierarchicalFacetRefinement(facet,value){if(!this.isHierarchicalFacet(facet)){throw new Error(facet+" is not defined in the hierarchicalFacets attribute of the helper configuration");}
  var separator=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet));var mod={};var upOneOrMultipleLevel=this.hierarchicalFacetsRefinements[facet]!==void 0&&this.hierarchicalFacetsRefinements[facet].length>0&&(this.hierarchicalFacetsRefinements[facet][0]===value||this.hierarchicalFacetsRefinements[facet][0].indexOf(value+separator)===0);if(upOneOrMultipleLevel){if(value.indexOf(separator)===-1){mod[facet]=[];}else{mod[facet]=[value.slice(0,value.lastIndexOf(separator))];}}else{mod[facet]=[value];}
  return this.setQueryParameters({hierarchicalFacetsRefinements:defaultsPure({},mod,this.hierarchicalFacetsRefinements)});},addHierarchicalFacetRefinement:function(facet,path){if(this.isHierarchicalFacetRefined(facet)){throw new Error(facet+" is already refined.");}
  if(!this.isHierarchicalFacet(facet)){throw new Error(facet+" is not defined in the hierarchicalFacets attribute of the helper configuration.");}
  var mod={};mod[facet]=[path];return this.setQueryParameters({hierarchicalFacetsRefinements:defaultsPure({},mod,this.hierarchicalFacetsRefinements)});},removeHierarchicalFacetRefinement:function(facet){if(!this.isHierarchicalFacetRefined(facet)){return this;}
  var mod={};mod[facet]=[];return this.setQueryParameters({hierarchicalFacetsRefinements:defaultsPure({},mod,this.hierarchicalFacetsRefinements)});},toggleTagRefinement:function toggleTagRefinement(tag){if(this.isTagRefined(tag)){return this.removeTagRefinement(tag);}
  return this.addTagRefinement(tag);},isDisjunctiveFacet:function(facet){return this.disjunctiveFacets.indexOf(facet)>-1;},isHierarchicalFacet:function(facetName){return this.getHierarchicalFacetByName(facetName)!==void 0;},isConjunctiveFacet:function(facet){return this.facets.indexOf(facet)>-1;},isFacetRefined:function isFacetRefined4(facet,value){if(!this.isConjunctiveFacet(facet)){return false;}
  return RefinementList7.isRefined(this.facetsRefinements,facet,value);},isExcludeRefined:function isExcludeRefined(facet,value){if(!this.isConjunctiveFacet(facet)){return false;}
  return RefinementList7.isRefined(this.facetsExcludes,facet,value);},isDisjunctiveFacetRefined:function isDisjunctiveFacetRefined(facet,value){if(!this.isDisjunctiveFacet(facet)){return false;}
  return RefinementList7.isRefined(this.disjunctiveFacetsRefinements,facet,value);},isHierarchicalFacetRefined:function isHierarchicalFacetRefined(facet,value){if(!this.isHierarchicalFacet(facet)){return false;}
  var refinements=this.getHierarchicalRefinement(facet);if(!value){return refinements.length>0;}
  return refinements.indexOf(value)!==-1;},isNumericRefined:function isNumericRefined(attribute,operator,value){if(value===void 0&&operator===void 0){return!!this.numericRefinements[attribute];}
  var isOperatorDefined=this.numericRefinements[attribute]&&this.numericRefinements[attribute][operator]!==void 0;if(value===void 0||!isOperatorDefined){return isOperatorDefined;}
  var parsedValue=valToNumber(value);var isAttributeValueDefined=findArray(this.numericRefinements[attribute][operator],parsedValue)!==void 0;return isOperatorDefined&&isAttributeValueDefined;},isTagRefined:function isTagRefined(tag){return this.tagRefinements.indexOf(tag)!==-1;},getRefinedDisjunctiveFacets:function getRefinedDisjunctiveFacets(){var self2=this;var disjunctiveNumericRefinedFacets=intersection(Object.keys(this.numericRefinements).filter(function(facet){return Object.keys(self2.numericRefinements[facet]).length>0;}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(facet){return self2.disjunctiveFacetsRefinements[facet].length>0;}).concat(disjunctiveNumericRefinedFacets).concat(this.getRefinedHierarchicalFacets());},getRefinedHierarchicalFacets:function getRefinedHierarchicalFacets(){var self2=this;return intersection(this.hierarchicalFacets.map(function(facet){return facet.name;}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(facet){return self2.hierarchicalFacetsRefinements[facet].length>0;}));},getUnrefinedDisjunctiveFacets:function(){var refinedFacets=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(f3){return refinedFacets.indexOf(f3)===-1;});},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function getQueryParams(){var managedParameters=this.managedParameters;var queryParams={};var self2=this;Object.keys(this).forEach(function(paramName){var paramValue=self2[paramName];if(managedParameters.indexOf(paramName)===-1&&paramValue!==void 0){queryParams[paramName]=paramValue;}});return queryParams;},setQueryParameter:function setParameter(parameter,value){if(this[parameter]===value)
  return this;var modification={};modification[parameter]=value;return this.setQueryParameters(modification);},setQueryParameters:function setQueryParameters(params){if(!params)
  return this;var error=SearchParameters.validate(this,params);if(error){throw error;}
  var self2=this;var nextWithNumbers=SearchParameters._parseNumbers(params);var previousPlainObject=Object.keys(this).reduce(function(acc,key2){acc[key2]=self2[key2];return acc;},{});var nextPlainObject=Object.keys(nextWithNumbers).reduce(function(previous,key2){var isPreviousValueDefined=previous[key2]!==void 0;var isNextValueDefined=nextWithNumbers[key2]!==void 0;if(isPreviousValueDefined&&!isNextValueDefined){return omit(previous,[key2]);}
  if(isNextValueDefined){previous[key2]=nextWithNumbers[key2];}
  return previous;},previousPlainObject);return new this.constructor(nextPlainObject);},resetPage:function(){if(this.page===void 0){return this;}
  return this.setPage(0);},_getHierarchicalFacetSortBy:function(hierarchicalFacet){return hierarchicalFacet.sortBy||["isRefined:desc","name:asc"];},_getHierarchicalFacetSeparator:function(hierarchicalFacet){return hierarchicalFacet.separator||" > ";},_getHierarchicalRootPath:function(hierarchicalFacet){return hierarchicalFacet.rootPath||null;},_getHierarchicalShowParentLevel:function(hierarchicalFacet){if(typeof hierarchicalFacet.showParentLevel==="boolean"){return hierarchicalFacet.showParentLevel;}
  return true;},getHierarchicalFacetByName:function(hierarchicalFacetName){return find4(this.hierarchicalFacets,function(f3){return f3.name===hierarchicalFacetName;});},getHierarchicalFacetBreadcrumb:function(facetName){if(!this.isHierarchicalFacet(facetName)){return[];}
  var refinement=this.getHierarchicalRefinement(facetName)[0];if(!refinement)
  return[];var separator=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facetName));var path=refinement.split(separator);return path.map(function(part){return part.trim();});},toString:function(){return JSON.stringify(this,null,2);}};module.exports=SearchParameters;});var require_orderBy=__commonJS((exports,module)=>{"use strict";function compareAscending(value,other){if(value!==other){var valIsDefined=value!==void 0;var valIsNull=value===null;var othIsDefined=other!==void 0;var othIsNull=other===null;if(!othIsNull&&value>other||valIsNull&&othIsDefined||!valIsDefined){return 1;}
  if(!valIsNull&&value<other||othIsNull&&valIsDefined||!othIsDefined){return-1;}}
  return 0;}
  function orderBy(collection,iteratees,orders){if(!Array.isArray(collection)){return[];}
  if(!Array.isArray(orders)){orders=[];}
  var result=collection.map(function(value,index4){return{criteria:iteratees.map(function(iteratee){return value[iteratee];}),index:index4,value};});result.sort(function comparer(object,other){var index4=-1;while(++index4<object.criteria.length){var res=compareAscending(object.criteria[index4],other.criteria[index4]);if(res){if(index4>=orders.length){return res;}
  if(orders[index4]==="desc"){return-res;}
  return res;}}
  return object.index-other.index;});return result.map(function(res){return res.value;});}
  module.exports=orderBy;});var require_compact=__commonJS((exports,module)=>{"use strict";module.exports=function compact(array){if(!Array.isArray(array)){return[];}
  return array.filter(Boolean);};});var require_findIndex=__commonJS((exports,module)=>{"use strict";module.exports=function find4(array,comparator){if(!Array.isArray(array)){return-1;}
  for(var i3=0;i3<array.length;i3++){if(comparator(array[i3])){return i3;}}
  return-1;};});var require_formatSort=__commonJS((exports,module)=>{"use strict";var find4=require_find();module.exports=function formatSort(sortBy2,defaults){var defaultInstructions=(defaults||[]).map(function(sort){return sort.split(":");});return sortBy2.reduce(function preparePredicate(out,sort){var sortInstruction=sort.split(":");var matchingDefault=find4(defaultInstructions,function(defaultInstruction){return defaultInstruction[0]===sortInstruction[0];});if(sortInstruction.length>1||!matchingDefault){out[0].push(sortInstruction[0]);out[1].push(sortInstruction[1]);return out;}
  out[0].push(matchingDefault[0]);out[1].push(matchingDefault[1]);return out;},[[],[]]);};});var require_generate_hierarchical_tree=__commonJS((exports,module)=>{"use strict";module.exports=generateTrees;var orderBy=require_orderBy();var find4=require_find();var prepareHierarchicalFacetSortBy=require_formatSort();function generateTrees(state){return function generate(hierarchicalFacetResult,hierarchicalFacetIndex){var hierarchicalFacet=state.hierarchicalFacets[hierarchicalFacetIndex];var hierarchicalFacetRefinement=state.hierarchicalFacetsRefinements[hierarchicalFacet.name]&&state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0]||"";var hierarchicalSeparator=state._getHierarchicalFacetSeparator(hierarchicalFacet);var hierarchicalRootPath=state._getHierarchicalRootPath(hierarchicalFacet);var hierarchicalShowParentLevel=state._getHierarchicalShowParentLevel(hierarchicalFacet);var sortBy2=prepareHierarchicalFacetSortBy(state._getHierarchicalFacetSortBy(hierarchicalFacet));var rootExhaustive=hierarchicalFacetResult.every(function(facetResult){return facetResult.exhaustive;});var generateTreeFn=generateHierarchicalTree(sortBy2,hierarchicalSeparator,hierarchicalRootPath,hierarchicalShowParentLevel,hierarchicalFacetRefinement);var results=hierarchicalFacetResult;if(hierarchicalRootPath){results=hierarchicalFacetResult.slice(hierarchicalRootPath.split(hierarchicalSeparator).length);}
  return results.reduce(generateTreeFn,{name:state.hierarchicalFacets[hierarchicalFacetIndex].name,count:null,isRefined:true,path:null,exhaustive:rootExhaustive,data:null});};}
  function generateHierarchicalTree(sortBy2,hierarchicalSeparator,hierarchicalRootPath,hierarchicalShowParentLevel,currentRefinement){return function generateTree(hierarchicalTree,hierarchicalFacetResult,currentHierarchicalLevel){var parent=hierarchicalTree;if(currentHierarchicalLevel>0){var level=0;parent=hierarchicalTree;while(level<currentHierarchicalLevel){var data=parent&&Array.isArray(parent.data)?parent.data:[];parent=find4(data,function(subtree){return subtree.isRefined;});level++;}}
  if(parent){var picked=Object.keys(hierarchicalFacetResult.data).map(function(facetValue){return[facetValue,hierarchicalFacetResult.data[facetValue]];}).filter(function(tuple){var facetValue=tuple[0];return onlyMatchingTree(facetValue,parent.path||hierarchicalRootPath,currentRefinement,hierarchicalSeparator,hierarchicalRootPath,hierarchicalShowParentLevel);});parent.data=orderBy(picked.map(function(tuple){var facetValue=tuple[0];var facetCount=tuple[1];return format(facetCount,facetValue,hierarchicalSeparator,currentRefinement,hierarchicalFacetResult.exhaustive);}),sortBy2[0],sortBy2[1]);}
  return hierarchicalTree;};}
  function onlyMatchingTree(facetValue,parentPath,currentRefinement,hierarchicalSeparator,hierarchicalRootPath,hierarchicalShowParentLevel){if(hierarchicalRootPath&&(facetValue.indexOf(hierarchicalRootPath)!==0||hierarchicalRootPath===facetValue)){return false;}
  return!hierarchicalRootPath&&facetValue.indexOf(hierarchicalSeparator)===-1||hierarchicalRootPath&&facetValue.split(hierarchicalSeparator).length-hierarchicalRootPath.split(hierarchicalSeparator).length===1||facetValue.indexOf(hierarchicalSeparator)===-1&&currentRefinement.indexOf(hierarchicalSeparator)===-1||currentRefinement.indexOf(facetValue)===0||facetValue.indexOf(parentPath+hierarchicalSeparator)===0&&(hierarchicalShowParentLevel||facetValue.indexOf(currentRefinement)===0);}
  function format(facetCount,facetValue,hierarchicalSeparator,currentRefinement,exhaustive){var parts=facetValue.split(hierarchicalSeparator);return{name:parts[parts.length-1].trim(),path:facetValue,count:facetCount,isRefined:currentRefinement===facetValue||currentRefinement.indexOf(facetValue+hierarchicalSeparator)===0,exhaustive,data:null};}});var require_SearchResults=__commonJS((exports,module)=>{"use strict";var merge2=require_merge();var defaultsPure=require_defaultsPure();var orderBy=require_orderBy();var compact=require_compact();var find4=require_find();var findIndex4=require_findIndex();var formatSort=require_formatSort();var generateHierarchicalTree=require_generate_hierarchical_tree();function getIndices(attributes){var indices={};attributes.forEach(function(val,idx){indices[val]=idx;});return indices;}
  function assignFacetStats(dest,facetStats,key2){if(facetStats&&facetStats[key2]){dest.stats=facetStats[key2];}}
  function findMatchingHierarchicalFacetFromAttributeName(hierarchicalFacets,hierarchicalAttributeName){return find4(hierarchicalFacets,function facetKeyMatchesAttribute(hierarchicalFacet){var facetNames=hierarchicalFacet.attributes||[];return facetNames.indexOf(hierarchicalAttributeName)>-1;});}
  function SearchResults(state,results){var mainSubResponse=results[0];this._rawResults=results;var self2=this;Object.keys(mainSubResponse).forEach(function(key2){self2[key2]=mainSubResponse[key2];});this.processingTimeMS=results.reduce(function(sum,result){return result.processingTimeMS===void 0?sum:sum+result.processingTimeMS;},0);this.disjunctiveFacets=[];this.hierarchicalFacets=state.hierarchicalFacets.map(function initFutureTree(){return[];});this.facets=[];var disjunctiveFacets=state.getRefinedDisjunctiveFacets();var facetsIndices=getIndices(state.facets);var disjunctiveFacetsIndices=getIndices(state.disjunctiveFacets);var nextDisjunctiveResult=1;var mainFacets=mainSubResponse.facets||{};Object.keys(mainFacets).forEach(function(facetKey){var facetValueObject=mainFacets[facetKey];var hierarchicalFacet=findMatchingHierarchicalFacetFromAttributeName(state.hierarchicalFacets,facetKey);if(hierarchicalFacet){var facetIndex=hierarchicalFacet.attributes.indexOf(facetKey);var idxAttributeName=findIndex4(state.hierarchicalFacets,function(f3){return f3.name===hierarchicalFacet.name;});self2.hierarchicalFacets[idxAttributeName][facetIndex]={attribute:facetKey,data:facetValueObject,exhaustive:mainSubResponse.exhaustiveFacetsCount};}else{var isFacetDisjunctive=state.disjunctiveFacets.indexOf(facetKey)!==-1;var isFacetConjunctive=state.facets.indexOf(facetKey)!==-1;var position;if(isFacetDisjunctive){position=disjunctiveFacetsIndices[facetKey];self2.disjunctiveFacets[position]={name:facetKey,data:facetValueObject,exhaustive:mainSubResponse.exhaustiveFacetsCount};assignFacetStats(self2.disjunctiveFacets[position],mainSubResponse.facets_stats,facetKey);}
  if(isFacetConjunctive){position=facetsIndices[facetKey];self2.facets[position]={name:facetKey,data:facetValueObject,exhaustive:mainSubResponse.exhaustiveFacetsCount};assignFacetStats(self2.facets[position],mainSubResponse.facets_stats,facetKey);}}});this.hierarchicalFacets=compact(this.hierarchicalFacets);disjunctiveFacets.forEach(function(disjunctiveFacet){var result=results[nextDisjunctiveResult];var facets=result&&result.facets?result.facets:{};var hierarchicalFacet=state.getHierarchicalFacetByName(disjunctiveFacet);Object.keys(facets).forEach(function(dfacet){var facetResults=facets[dfacet];var position;if(hierarchicalFacet){position=findIndex4(state.hierarchicalFacets,function(f3){return f3.name===hierarchicalFacet.name;});var attributeIndex=findIndex4(self2.hierarchicalFacets[position],function(f3){return f3.attribute===dfacet;});if(attributeIndex===-1){return;}
  self2.hierarchicalFacets[position][attributeIndex].data=merge2({},self2.hierarchicalFacets[position][attributeIndex].data,facetResults);}else{position=disjunctiveFacetsIndices[dfacet];var dataFromMainRequest=mainSubResponse.facets&&mainSubResponse.facets[dfacet]||{};self2.disjunctiveFacets[position]={name:dfacet,data:defaultsPure({},facetResults,dataFromMainRequest),exhaustive:result.exhaustiveFacetsCount};assignFacetStats(self2.disjunctiveFacets[position],result.facets_stats,dfacet);if(state.disjunctiveFacetsRefinements[dfacet]){state.disjunctiveFacetsRefinements[dfacet].forEach(function(refinementValue){if(!self2.disjunctiveFacets[position].data[refinementValue]&&state.disjunctiveFacetsRefinements[dfacet].indexOf(refinementValue)>-1){self2.disjunctiveFacets[position].data[refinementValue]=0;}});}}});nextDisjunctiveResult++;});state.getRefinedHierarchicalFacets().forEach(function(refinedFacet){var hierarchicalFacet=state.getHierarchicalFacetByName(refinedFacet);var separator=state._getHierarchicalFacetSeparator(hierarchicalFacet);var currentRefinement=state.getHierarchicalRefinement(refinedFacet);if(currentRefinement.length===0||currentRefinement[0].split(separator).length<2){return;}
  var result=results[nextDisjunctiveResult];var facets=result&&result.facets?result.facets:{};Object.keys(facets).forEach(function(dfacet){var facetResults=facets[dfacet];var position=findIndex4(state.hierarchicalFacets,function(f3){return f3.name===hierarchicalFacet.name;});var attributeIndex=findIndex4(self2.hierarchicalFacets[position],function(f3){return f3.attribute===dfacet;});if(attributeIndex===-1){return;}
  var defaultData={};if(currentRefinement.length>0){var root=currentRefinement[0].split(separator)[0];defaultData[root]=self2.hierarchicalFacets[position][attributeIndex].data[root];}
  self2.hierarchicalFacets[position][attributeIndex].data=defaultsPure(defaultData,facetResults,self2.hierarchicalFacets[position][attributeIndex].data);});nextDisjunctiveResult++;});Object.keys(state.facetsExcludes).forEach(function(facetName){var excludes=state.facetsExcludes[facetName];var position=facetsIndices[facetName];self2.facets[position]={name:facetName,data:mainSubResponse.facets[facetName],exhaustive:mainSubResponse.exhaustiveFacetsCount};excludes.forEach(function(facetValue){self2.facets[position]=self2.facets[position]||{name:facetName};self2.facets[position].data=self2.facets[position].data||{};self2.facets[position].data[facetValue]=0;});});this.hierarchicalFacets=this.hierarchicalFacets.map(generateHierarchicalTree(state));this.facets=compact(this.facets);this.disjunctiveFacets=compact(this.disjunctiveFacets);this._state=state;}
  SearchResults.prototype.getFacetByName=function(name){function predicate(facet){return facet.name===name;}
  return find4(this.facets,predicate)||find4(this.disjunctiveFacets,predicate)||find4(this.hierarchicalFacets,predicate);};function extractNormalizedFacetValues(results,attribute){function predicate(facet2){return facet2.name===attribute;}
  if(results._state.isConjunctiveFacet(attribute)){var facet=find4(results.facets,predicate);if(!facet)
  return[];return Object.keys(facet.data).map(function(name){return{name,count:facet.data[name],isRefined:results._state.isFacetRefined(attribute,name),isExcluded:results._state.isExcludeRefined(attribute,name)};});}else if(results._state.isDisjunctiveFacet(attribute)){var disjunctiveFacet=find4(results.disjunctiveFacets,predicate);if(!disjunctiveFacet)
  return[];return Object.keys(disjunctiveFacet.data).map(function(name){return{name,count:disjunctiveFacet.data[name],isRefined:results._state.isDisjunctiveFacetRefined(attribute,name)};});}else if(results._state.isHierarchicalFacet(attribute)){return find4(results.hierarchicalFacets,predicate);}}
  function recSort(sortFn,node){if(!node.data||node.data.length===0){return node;}
  var children=node.data.map(function(childNode){return recSort(sortFn,childNode);});var sortedChildren=sortFn(children);var newNode=merge2({},node,{data:sortedChildren});return newNode;}
  SearchResults.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function vanillaSortFn(order,data){return data.sort(order);}
  SearchResults.prototype.getFacetValues=function(attribute,opts){var facetValues=extractNormalizedFacetValues(this,attribute);if(!facetValues){return void 0;}
  var options=defaultsPure({},opts,{sortBy:SearchResults.DEFAULT_SORT});if(Array.isArray(options.sortBy)){var order=formatSort(options.sortBy,SearchResults.DEFAULT_SORT);if(Array.isArray(facetValues)){return orderBy(facetValues,order[0],order[1]);}
  return recSort(function(hierarchicalFacetValues){return orderBy(hierarchicalFacetValues,order[0],order[1]);},facetValues);}else if(typeof options.sortBy==="function"){if(Array.isArray(facetValues)){return facetValues.sort(options.sortBy);}
  return recSort(function(data){return vanillaSortFn(options.sortBy,data);},facetValues);}
  throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function");};SearchResults.prototype.getFacetStats=function(attribute){if(this._state.isConjunctiveFacet(attribute)){return getFacetStatsIfAvailable(this.facets,attribute);}else if(this._state.isDisjunctiveFacet(attribute)){return getFacetStatsIfAvailable(this.disjunctiveFacets,attribute);}
  return void 0;};function getFacetStatsIfAvailable(facetList,facetName){var data=find4(facetList,function(facet){return facet.name===facetName;});return data&&data.stats;}
  SearchResults.prototype.getRefinements=function(){var state=this._state;var results=this;var res=[];Object.keys(state.facetsRefinements).forEach(function(attributeName){state.facetsRefinements[attributeName].forEach(function(name){res.push(getRefinement2(state,"facet",attributeName,name,results.facets));});});Object.keys(state.facetsExcludes).forEach(function(attributeName){state.facetsExcludes[attributeName].forEach(function(name){res.push(getRefinement2(state,"exclude",attributeName,name,results.facets));});});Object.keys(state.disjunctiveFacetsRefinements).forEach(function(attributeName){state.disjunctiveFacetsRefinements[attributeName].forEach(function(name){res.push(getRefinement2(state,"disjunctive",attributeName,name,results.disjunctiveFacets));});});Object.keys(state.hierarchicalFacetsRefinements).forEach(function(attributeName){state.hierarchicalFacetsRefinements[attributeName].forEach(function(name){res.push(getHierarchicalRefinement(state,attributeName,name,results.hierarchicalFacets));});});Object.keys(state.numericRefinements).forEach(function(attributeName){var operators=state.numericRefinements[attributeName];Object.keys(operators).forEach(function(operator){operators[operator].forEach(function(value){res.push({type:"numeric",attributeName,name:value,numericValue:value,operator});});});});state.tagRefinements.forEach(function(name){res.push({type:"tag",attributeName:"_tags",name});});return res;};function getRefinement2(state,type,attributeName,name,resultsFacets){var facet=find4(resultsFacets,function(f3){return f3.name===attributeName;});var count=facet&&facet.data&&facet.data[name]?facet.data[name]:0;var exhaustive=facet&&facet.exhaustive||false;return{type,attributeName,name,count,exhaustive};}
  function getHierarchicalRefinement(state,attributeName,name,resultsFacets){var facetDeclaration=state.getHierarchicalFacetByName(attributeName);var separator=state._getHierarchicalFacetSeparator(facetDeclaration);var split=name.split(separator);var rootFacet=find4(resultsFacets,function(facet2){return facet2.name===attributeName;});var facet=split.reduce(function(intermediateFacet,part){var newFacet=intermediateFacet&&find4(intermediateFacet.data,function(f3){return f3.name===part;});return newFacet!==void 0?newFacet:intermediateFacet;},rootFacet);var count=facet&&facet.count||0;var exhaustive=facet&&facet.exhaustive||false;var path=facet&&facet.path||"";return{type:"hierarchical",attributeName,name:path,count,exhaustive};}
  module.exports=SearchResults;});var require_events=__commonJS((exports,module)=>{function EventEmitter2(){this._events=this._events||{};this._maxListeners=this._maxListeners||void 0;}
  module.exports=EventEmitter2;EventEmitter2.EventEmitter=EventEmitter2;EventEmitter2.prototype._events=void 0;EventEmitter2.prototype._maxListeners=void 0;EventEmitter2.defaultMaxListeners=10;EventEmitter2.prototype.setMaxListeners=function(n2){if(!isNumber(n2)||n2<0||isNaN(n2))
  throw TypeError("n must be a positive number");this._maxListeners=n2;return this;};EventEmitter2.prototype.emit=function(type){var er,handler,len,args,i3,listeners;if(!this._events)
  this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er;}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err;}}}
  handler=this._events[type];if(isUndefined(handler))
  return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args);}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i3=0;i3<len;i3++)
  listeners[i3].apply(this,args);}
  return true;};EventEmitter2.prototype.addListener=function(type,listener2){var m3;if(!isFunction(listener2))
  throw TypeError("listener must be a function");if(!this._events)
  this._events={};if(this._events.newListener)
  this.emit("newListener",type,isFunction(listener2.listener)?listener2.listener:listener2);if(!this._events[type])
  this._events[type]=listener2;else if(isObject(this._events[type]))
  this._events[type].push(listener2);else
  this._events[type]=[this._events[type],listener2];if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners)){m3=this._maxListeners;}else{m3=EventEmitter2.defaultMaxListeners;}
  if(m3&&m3>0&&this._events[type].length>m3){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace();}}}
  return this;};EventEmitter2.prototype.on=EventEmitter2.prototype.addListener;EventEmitter2.prototype.once=function(type,listener2){if(!isFunction(listener2))
  throw TypeError("listener must be a function");var fired=false;function g3(){this.removeListener(type,g3);if(!fired){fired=true;listener2.apply(this,arguments);}}
  g3.listener=listener2;this.on(type,g3);return this;};EventEmitter2.prototype.removeListener=function(type,listener2){var list,position,length,i3;if(!isFunction(listener2))
  throw TypeError("listener must be a function");if(!this._events||!this._events[type])
  return this;list=this._events[type];length=list.length;position=-1;if(list===listener2||isFunction(list.listener)&&list.listener===listener2){delete this._events[type];if(this._events.removeListener)
  this.emit("removeListener",type,listener2);}else if(isObject(list)){for(i3=length;i3-->0;){if(list[i3]===listener2||list[i3].listener&&list[i3].listener===listener2){position=i3;break;}}
  if(position<0)
  return this;if(list.length===1){list.length=0;delete this._events[type];}else{list.splice(position,1);}
  if(this._events.removeListener)
  this.emit("removeListener",type,listener2);}
  return this;};EventEmitter2.prototype.removeAllListeners=function(type){var key2,listeners;if(!this._events)
  return this;if(!this._events.removeListener){if(arguments.length===0)
  this._events={};else if(this._events[type])
  delete this._events[type];return this;}
  if(arguments.length===0){for(key2 in this._events){if(key2==="removeListener")
  continue;this.removeAllListeners(key2);}
  this.removeAllListeners("removeListener");this._events={};return this;}
  listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners);}else if(listeners){while(listeners.length)
  this.removeListener(type,listeners[listeners.length-1]);}
  delete this._events[type];return this;};EventEmitter2.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])
  ret=[];else if(isFunction(this._events[type]))
  ret=[this._events[type]];else
  ret=this._events[type].slice();return ret;};EventEmitter2.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))
  return 1;else if(evlistener)
  return evlistener.length;}
  return 0;};EventEmitter2.listenerCount=function(emitter,type){return emitter.listenerCount(type);};function isFunction(arg){return typeof arg==="function";}
  function isNumber(arg){return typeof arg==="number";}
  function isObject(arg){return typeof arg==="object"&&arg!==null;}
  function isUndefined(arg){return arg===void 0;}});var require_inherits=__commonJS((exports,module)=>{"use strict";function inherits(ctor,superCtor){ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}});}
  module.exports=inherits;});var require_DerivedHelper=__commonJS((exports,module)=>{"use strict";var events2=require_events();var inherits=require_inherits();function DerivedHelper(mainHelper,fn){this.main=mainHelper;this.fn=fn;this.lastResults=null;}
  inherits(DerivedHelper,events2.EventEmitter);DerivedHelper.prototype.detach=function(){this.removeAllListeners();this.main.detachDerivedHelper(this);};DerivedHelper.prototype.getModifiedState=function(parameters){return this.fn(parameters);};module.exports=DerivedHelper;});var require_requestBuilder=__commonJS((exports,module)=>{"use strict";var merge2=require_merge();var requestBuilder={_getQueries:function getQueries(index4,state){var queries=[];queries.push({indexName:index4,params:requestBuilder._getHitsSearchParams(state)});state.getRefinedDisjunctiveFacets().forEach(function(refinedFacet){queries.push({indexName:index4,params:requestBuilder._getDisjunctiveFacetSearchParams(state,refinedFacet)});});state.getRefinedHierarchicalFacets().forEach(function(refinedFacet){var hierarchicalFacet=state.getHierarchicalFacetByName(refinedFacet);var currentRefinement=state.getHierarchicalRefinement(refinedFacet);var separator=state._getHierarchicalFacetSeparator(hierarchicalFacet);if(currentRefinement.length>0&&currentRefinement[0].split(separator).length>1){queries.push({indexName:index4,params:requestBuilder._getDisjunctiveFacetSearchParams(state,refinedFacet,true)});}});return queries;},_getHitsSearchParams:function(state){var facets=state.facets.concat(state.disjunctiveFacets).concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state));var facetFilters=requestBuilder._getFacetFilters(state);var numericFilters=requestBuilder._getNumericFilters(state);var tagFilters=requestBuilder._getTagFilters(state);var additionalParams={facets,tagFilters};if(facetFilters.length>0){additionalParams.facetFilters=facetFilters;}
  if(numericFilters.length>0){additionalParams.numericFilters=numericFilters;}
  return merge2({},state.getQueryParams(),additionalParams);},_getDisjunctiveFacetSearchParams:function(state,facet,hierarchicalRootLevel){var facetFilters=requestBuilder._getFacetFilters(state,facet,hierarchicalRootLevel);var numericFilters=requestBuilder._getNumericFilters(state,facet);var tagFilters=requestBuilder._getTagFilters(state);var additionalParams={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters,analytics:false,clickAnalytics:false};var hierarchicalFacet=state.getHierarchicalFacetByName(facet);if(hierarchicalFacet){additionalParams.facets=requestBuilder._getDisjunctiveHierarchicalFacetAttribute(state,hierarchicalFacet,hierarchicalRootLevel);}else{additionalParams.facets=facet;}
  if(numericFilters.length>0){additionalParams.numericFilters=numericFilters;}
  if(facetFilters.length>0){additionalParams.facetFilters=facetFilters;}
  return merge2({},state.getQueryParams(),additionalParams);},_getNumericFilters:function(state,facetName){if(state.numericFilters){return state.numericFilters;}
  var numericFilters=[];Object.keys(state.numericRefinements).forEach(function(attribute){var operators=state.numericRefinements[attribute]||{};Object.keys(operators).forEach(function(operator){var values=operators[operator]||[];if(facetName!==attribute){values.forEach(function(value){if(Array.isArray(value)){var vs=value.map(function(v3){return attribute+operator+v3;});numericFilters.push(vs);}else{numericFilters.push(attribute+operator+value);}});}});});return numericFilters;},_getTagFilters:function(state){if(state.tagFilters){return state.tagFilters;}
  return state.tagRefinements.join(",");},_getFacetFilters:function(state,facet,hierarchicalRootLevel){var facetFilters=[];var facetsRefinements=state.facetsRefinements||{};Object.keys(facetsRefinements).forEach(function(facetName){var facetValues=facetsRefinements[facetName]||[];facetValues.forEach(function(facetValue){facetFilters.push(facetName+":"+facetValue);});});var facetsExcludes=state.facetsExcludes||{};Object.keys(facetsExcludes).forEach(function(facetName){var facetValues=facetsExcludes[facetName]||[];facetValues.forEach(function(facetValue){facetFilters.push(facetName+":-"+facetValue);});});var disjunctiveFacetsRefinements=state.disjunctiveFacetsRefinements||{};Object.keys(disjunctiveFacetsRefinements).forEach(function(facetName){var facetValues=disjunctiveFacetsRefinements[facetName]||[];if(facetName===facet||!facetValues||facetValues.length===0){return;}
  var orFilters=[];facetValues.forEach(function(facetValue){orFilters.push(facetName+":"+facetValue);});facetFilters.push(orFilters);});var hierarchicalFacetsRefinements=state.hierarchicalFacetsRefinements||{};Object.keys(hierarchicalFacetsRefinements).forEach(function(facetName){var facetValues=hierarchicalFacetsRefinements[facetName]||[];var facetValue=facetValues[0];if(facetValue===void 0){return;}
  var hierarchicalFacet=state.getHierarchicalFacetByName(facetName);var separator=state._getHierarchicalFacetSeparator(hierarchicalFacet);var rootPath=state._getHierarchicalRootPath(hierarchicalFacet);var attributeToRefine;var attributesIndex;if(facet===facetName){if(facetValue.indexOf(separator)===-1||!rootPath&&hierarchicalRootLevel===true||rootPath&&rootPath.split(separator).length===facetValue.split(separator).length){return;}
  if(!rootPath){attributesIndex=facetValue.split(separator).length-2;facetValue=facetValue.slice(0,facetValue.lastIndexOf(separator));}else{attributesIndex=rootPath.split(separator).length-1;facetValue=rootPath;}
  attributeToRefine=hierarchicalFacet.attributes[attributesIndex];}else{attributesIndex=facetValue.split(separator).length-1;attributeToRefine=hierarchicalFacet.attributes[attributesIndex];}
  if(attributeToRefine){facetFilters.push([attributeToRefine+":"+facetValue]);}});return facetFilters;},_getHitsHierarchicalFacetsAttributes:function(state){var out=[];return state.hierarchicalFacets.reduce(function getHitsAttributesForHierarchicalFacet(allAttributes,hierarchicalFacet){var hierarchicalRefinement=state.getHierarchicalRefinement(hierarchicalFacet.name)[0];if(!hierarchicalRefinement){allAttributes.push(hierarchicalFacet.attributes[0]);return allAttributes;}
  var separator=state._getHierarchicalFacetSeparator(hierarchicalFacet);var level=hierarchicalRefinement.split(separator).length;var newAttributes=hierarchicalFacet.attributes.slice(0,level+1);return allAttributes.concat(newAttributes);},out);},_getDisjunctiveHierarchicalFacetAttribute:function(state,hierarchicalFacet,rootLevel){var separator=state._getHierarchicalFacetSeparator(hierarchicalFacet);if(rootLevel===true){var rootPath=state._getHierarchicalRootPath(hierarchicalFacet);var attributeIndex=0;if(rootPath){attributeIndex=rootPath.split(separator).length;}
  return[hierarchicalFacet.attributes[attributeIndex]];}
  var hierarchicalRefinement=state.getHierarchicalRefinement(hierarchicalFacet.name)[0]||"";var parentLevel=hierarchicalRefinement.split(separator).length-1;return hierarchicalFacet.attributes.slice(0,parentLevel+1);},getSearchForFacetQuery:function(facetName,query,maxFacetHits,state){var stateForSearchForFacetValues=state.isDisjunctiveFacet(facetName)?state.clearRefinements(facetName):state;var searchForFacetSearchParameters={facetQuery:query,facetName};if(typeof maxFacetHits==="number"){searchForFacetSearchParameters.maxFacetHits=maxFacetHits;}
  return merge2({},requestBuilder._getHitsSearchParams(stateForSearchForFacetValues),searchForFacetSearchParameters);}};module.exports=requestBuilder;});var require_version=__commonJS((exports,module)=>{"use strict";module.exports="3.3.4";});var require_algoliasearch_helper2=__commonJS((exports,module)=>{"use strict";var SearchParameters=require_SearchParameters();var SearchResults=require_SearchResults();var DerivedHelper=require_DerivedHelper();var requestBuilder=require_requestBuilder();var events2=require_events();var inherits=require_inherits();var objectHasKeys=require_objectHasKeys();var version3=require_version();function AlgoliaSearchHelper(client2,index4,options){if(typeof client2.addAlgoliaAgent==="function"){client2.addAlgoliaAgent("JS Helper ("+version3+")");}
  this.setClient(client2);var opts=options||{};opts.index=index4;this.state=SearchParameters.make(opts);this.lastResults=null;this._queryId=0;this._lastQueryIdReceived=-1;this.derivedHelpers=[];this._currentNbQueries=0;}
  inherits(AlgoliaSearchHelper,events2.EventEmitter);AlgoliaSearchHelper.prototype.search=function(){this._search({onlyWithDerivedHelpers:false});return this;};AlgoliaSearchHelper.prototype.searchOnlyWithDerivedHelpers=function(){this._search({onlyWithDerivedHelpers:true});return this;};AlgoliaSearchHelper.prototype.getQuery=function(){var state=this.state;return requestBuilder._getHitsSearchParams(state);};AlgoliaSearchHelper.prototype.searchOnce=function(options,cb){var tempState=!options?this.state:this.state.setQueryParameters(options);var queries=requestBuilder._getQueries(tempState.index,tempState);var self2=this;this._currentNbQueries++;this.emit("searchOnce",{state:tempState});if(cb){this.client.search(queries).then(function(content){self2._currentNbQueries--;if(self2._currentNbQueries===0){self2.emit("searchQueueEmpty");}
  cb(null,new SearchResults(tempState,content.results),tempState);}).catch(function(err){self2._currentNbQueries--;if(self2._currentNbQueries===0){self2.emit("searchQueueEmpty");}
  cb(err,null,tempState);});return void 0;}
  return this.client.search(queries).then(function(content){self2._currentNbQueries--;if(self2._currentNbQueries===0)
  self2.emit("searchQueueEmpty");return{content:new SearchResults(tempState,content.results),state:tempState,_originalResponse:content};},function(e3){self2._currentNbQueries--;if(self2._currentNbQueries===0)
  self2.emit("searchQueueEmpty");throw e3;});};AlgoliaSearchHelper.prototype.searchForFacetValues=function(facet,query,maxFacetHits,userState){var clientHasSFFV=typeof this.client.searchForFacetValues==="function";if(!clientHasSFFV&&typeof this.client.initIndex!=="function"){throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");}
  var state=this.state.setQueryParameters(userState||{});var isDisjunctive=state.isDisjunctiveFacet(facet);var algoliaQuery=requestBuilder.getSearchForFacetQuery(facet,query,maxFacetHits,state);this._currentNbQueries++;var self2=this;this.emit("searchForFacetValues",{state,facet,query});var searchForFacetValuesPromise=clientHasSFFV?this.client.searchForFacetValues([{indexName:state.index,params:algoliaQuery}]):this.client.initIndex(state.index).searchForFacetValues(algoliaQuery);return searchForFacetValuesPromise.then(function addIsRefined(content){self2._currentNbQueries--;if(self2._currentNbQueries===0)
  self2.emit("searchQueueEmpty");content=Array.isArray(content)?content[0]:content;content.facetHits.forEach(function(f3){f3.isRefined=isDisjunctive?state.isDisjunctiveFacetRefined(facet,f3.value):state.isFacetRefined(facet,f3.value);});return content;},function(e3){self2._currentNbQueries--;if(self2._currentNbQueries===0)
  self2.emit("searchQueueEmpty");throw e3;});};AlgoliaSearchHelper.prototype.setQuery=function(q3){this._change({state:this.state.resetPage().setQuery(q3),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.clearRefinements=function(name){this._change({state:this.state.resetPage().clearRefinements(name),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.clearTags=function(){this._change({state:this.state.resetPage().clearTags(),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments);};AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addNumericRefinement=function(attribute,operator,value){this._change({state:this.state.resetPage().addNumericRefinement(attribute,operator,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().addFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments);};AlgoliaSearchHelper.prototype.addFacetExclusion=function(facet,value){this._change({state:this.state.resetPage().addExcludeRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments);};AlgoliaSearchHelper.prototype.addTag=function(tag){this._change({state:this.state.resetPage().addTagRefinement(tag),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeNumericRefinement=function(attribute,operator,value){this._change({state:this.state.resetPage().removeNumericRefinement(attribute,operator,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments);};AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement=function(facet){this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(facet),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().removeFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments);};AlgoliaSearchHelper.prototype.removeFacetExclusion=function(facet,value){this._change({state:this.state.resetPage().removeExcludeRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments);};AlgoliaSearchHelper.prototype.removeTag=function(tag){this._change({state:this.state.resetPage().removeTagRefinement(tag),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.toggleFacetExclusion=function(facet,value){this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments);};AlgoliaSearchHelper.prototype.toggleRefinement=function(facet,value){return this.toggleFacetRefinement(facet,value);};AlgoliaSearchHelper.prototype.toggleFacetRefinement=function(facet,value){this._change({state:this.state.resetPage().toggleFacetRefinement(facet,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments);};AlgoliaSearchHelper.prototype.toggleTag=function(tag){this._change({state:this.state.resetPage().toggleTagRefinement(tag),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.nextPage=function(){var page=this.state.page||0;return this.setPage(page+1);};AlgoliaSearchHelper.prototype.previousPage=function(){var page=this.state.page||0;return this.setPage(page-1);};function setCurrentPage(page){if(page<0)
  throw new Error("Page requested below 0.");this._change({state:this.state.setPage(page),isPageReset:false});return this;}
  AlgoliaSearchHelper.prototype.setCurrentPage=setCurrentPage;AlgoliaSearchHelper.prototype.setPage=setCurrentPage;AlgoliaSearchHelper.prototype.setIndex=function(name){this._change({state:this.state.resetPage().setIndex(name),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.setQueryParameter=function(parameter,value){this._change({state:this.state.resetPage().setQueryParameter(parameter,value),isPageReset:true});return this;};AlgoliaSearchHelper.prototype.setState=function(newState){this._change({state:SearchParameters.make(newState),isPageReset:false});return this;};AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent=function(newState){this.state=new SearchParameters(newState);return this;};AlgoliaSearchHelper.prototype.hasRefinements=function(attribute){if(objectHasKeys(this.state.getNumericRefinements(attribute))){return true;}else if(this.state.isConjunctiveFacet(attribute)){return this.state.isFacetRefined(attribute);}else if(this.state.isDisjunctiveFacet(attribute)){return this.state.isDisjunctiveFacetRefined(attribute);}else if(this.state.isHierarchicalFacet(attribute)){return this.state.isHierarchicalFacetRefined(attribute);}
  return false;};AlgoliaSearchHelper.prototype.isExcluded=function(facet,value){return this.state.isExcludeRefined(facet,value);};AlgoliaSearchHelper.prototype.isDisjunctiveRefined=function(facet,value){return this.state.isDisjunctiveFacetRefined(facet,value);};AlgoliaSearchHelper.prototype.hasTag=function(tag){return this.state.isTagRefined(tag);};AlgoliaSearchHelper.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments);};AlgoliaSearchHelper.prototype.getIndex=function(){return this.state.index;};function getCurrentPage(){return this.state.page;}
  AlgoliaSearchHelper.prototype.getCurrentPage=getCurrentPage;AlgoliaSearchHelper.prototype.getPage=getCurrentPage;AlgoliaSearchHelper.prototype.getTags=function(){return this.state.tagRefinements;};AlgoliaSearchHelper.prototype.getRefinements=function(facetName){var refinements=[];if(this.state.isConjunctiveFacet(facetName)){var conjRefinements=this.state.getConjunctiveRefinements(facetName);conjRefinements.forEach(function(r3){refinements.push({value:r3,type:"conjunctive"});});var excludeRefinements=this.state.getExcludeRefinements(facetName);excludeRefinements.forEach(function(r3){refinements.push({value:r3,type:"exclude"});});}else if(this.state.isDisjunctiveFacet(facetName)){var disjRefinements=this.state.getDisjunctiveRefinements(facetName);disjRefinements.forEach(function(r3){refinements.push({value:r3,type:"disjunctive"});});}
  var numericRefinements=this.state.getNumericRefinements(facetName);Object.keys(numericRefinements).forEach(function(operator){var value=numericRefinements[operator];refinements.push({value,operator,type:"numeric"});});return refinements;};AlgoliaSearchHelper.prototype.getNumericRefinement=function(attribute,operator){return this.state.getNumericRefinement(attribute,operator);};AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb=function(facetName){return this.state.getHierarchicalFacetBreadcrumb(facetName);};AlgoliaSearchHelper.prototype._search=function(options){var state=this.state;var states=[];var mainQueries=[];if(!options.onlyWithDerivedHelpers){mainQueries=requestBuilder._getQueries(state.index,state);states.push({state,queriesCount:mainQueries.length,helper:this});this.emit("search",{state,results:this.lastResults});}
  var derivedQueries=this.derivedHelpers.map(function(derivedHelper){var derivedState=derivedHelper.getModifiedState(state);var derivedStateQueries=requestBuilder._getQueries(derivedState.index,derivedState);states.push({state:derivedState,queriesCount:derivedStateQueries.length,helper:derivedHelper});derivedHelper.emit("search",{state:derivedState,results:derivedHelper.lastResults});return derivedStateQueries;});var queries=Array.prototype.concat.apply(mainQueries,derivedQueries);var queryId=this._queryId++;this._currentNbQueries++;try{this.client.search(queries).then(this._dispatchAlgoliaResponse.bind(this,states,queryId)).catch(this._dispatchAlgoliaError.bind(this,queryId));}catch(error){this.emit("error",{error});}};AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse=function(states,queryId,content){if(queryId<this._lastQueryIdReceived){return;}
  this._currentNbQueries-=queryId-this._lastQueryIdReceived;this._lastQueryIdReceived=queryId;if(this._currentNbQueries===0)
  this.emit("searchQueueEmpty");var results=content.results.slice();states.forEach(function(s3){var state=s3.state;var queriesCount=s3.queriesCount;var helper=s3.helper;var specificResults=results.splice(0,queriesCount);var formattedResponse=helper.lastResults=new SearchResults(state,specificResults);helper.emit("result",{results:formattedResponse,state});});};AlgoliaSearchHelper.prototype._dispatchAlgoliaError=function(queryId,error){if(queryId<this._lastQueryIdReceived){return;}
  this._currentNbQueries-=queryId-this._lastQueryIdReceived;this._lastQueryIdReceived=queryId;this.emit("error",{error});if(this._currentNbQueries===0)
  this.emit("searchQueueEmpty");};AlgoliaSearchHelper.prototype.containsRefinement=function(query,facetFilters,numericFilters,tagFilters){return query||facetFilters.length!==0||numericFilters.length!==0||tagFilters.length!==0;};AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements=function(facet){return this.state.disjunctiveRefinements[facet]&&this.state.disjunctiveRefinements[facet].length>0;};AlgoliaSearchHelper.prototype._change=function(event){var state=event.state;var isPageReset=event.isPageReset;if(state!==this.state){this.state=state;this.emit("change",{state:this.state,results:this.lastResults,isPageReset});}};AlgoliaSearchHelper.prototype.clearCache=function(){this.client.clearCache&&this.client.clearCache();return this;};AlgoliaSearchHelper.prototype.setClient=function(newClient){if(this.client===newClient)
  return this;if(typeof newClient.addAlgoliaAgent==="function"){newClient.addAlgoliaAgent("JS Helper ("+version3+")");}
  this.client=newClient;return this;};AlgoliaSearchHelper.prototype.getClient=function(){return this.client;};AlgoliaSearchHelper.prototype.derive=function(fn){var derivedHelper=new DerivedHelper(this,fn);this.derivedHelpers.push(derivedHelper);return derivedHelper;};AlgoliaSearchHelper.prototype.detachDerivedHelper=function(derivedHelper){var pos=this.derivedHelpers.indexOf(derivedHelper);if(pos===-1)
  throw new Error("Derived helper already detached");this.derivedHelpers.splice(pos,1);};AlgoliaSearchHelper.prototype.hasPendingRequests=function(){return this._currentNbQueries>0;};module.exports=AlgoliaSearchHelper;});var require_algoliasearch_helper=__commonJS((exports,module)=>{"use strict";var AlgoliaSearchHelper=require_algoliasearch_helper2();var SearchParameters=require_SearchParameters();var SearchResults=require_SearchResults();function algoliasearchHelper5(client2,index4,opts){return new AlgoliaSearchHelper(client2,index4,opts);}
  algoliasearchHelper5.version=require_version();algoliasearchHelper5.AlgoliaSearchHelper=AlgoliaSearchHelper;algoliasearchHelper5.SearchParameters=SearchParameters;algoliasearchHelper5.SearchResults=SearchResults;module.exports=algoliasearchHelper5;});var require_compiler=__commonJS((exports)=>{(function(Hogan2){var rIsWhitespace=/\S/,rQuot=/\"/g,rNewline=/\n/g,rCr=/\r/g,rSlash=/\\/g,rLineSep=/\u2028/,rParagraphSep=/\u2029/;Hogan2.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12};Hogan2.scan=function scan(text,delimiters){var len=text.length,IN_TEXT=0,IN_TAG_TYPE=1,IN_TAG=2,state=IN_TEXT,tagType=null,tag=null,buf="",tokens=[],seenTag=false,i3=0,lineStart=0,otag="{{",ctag="}}";function addBuf(){if(buf.length>0){tokens.push({tag:"_t",text:new String(buf)});buf="";}}
  function lineIsWhitespace(){var isAllWhitespace=true;for(var j3=lineStart;j3<tokens.length;j3++){isAllWhitespace=Hogan2.tags[tokens[j3].tag]<Hogan2.tags["_v"]||tokens[j3].tag=="_t"&&tokens[j3].text.match(rIsWhitespace)===null;if(!isAllWhitespace){return false;}}
  return isAllWhitespace;}
  function filterLine(haveSeenTag,noNewLine){addBuf();if(haveSeenTag&&lineIsWhitespace()){for(var j3=lineStart,next;j3<tokens.length;j3++){if(tokens[j3].text){if((next=tokens[j3+1])&&next.tag==">"){next.indent=tokens[j3].text.toString();}
  tokens.splice(j3,1);}}}else if(!noNewLine){tokens.push({tag:"\n"});}
  seenTag=false;lineStart=tokens.length;}
  function changeDelimiters(text2,index4){var close="="+ctag,closeIndex=text2.indexOf(close,index4),delimiters2=trim(text2.substring(text2.indexOf("=",index4)+1,closeIndex)).split(" ");otag=delimiters2[0];ctag=delimiters2[delimiters2.length-1];return closeIndex+close.length-1;}
  if(delimiters){delimiters=delimiters.split(" ");otag=delimiters[0];ctag=delimiters[1];}
  for(i3=0;i3<len;i3++){if(state==IN_TEXT){if(tagChange(otag,text,i3)){--i3;addBuf();state=IN_TAG_TYPE;}else{if(text.charAt(i3)=="\n"){filterLine(seenTag);}else{buf+=text.charAt(i3);}}}else if(state==IN_TAG_TYPE){i3+=otag.length-1;tag=Hogan2.tags[text.charAt(i3+1)];tagType=tag?text.charAt(i3+1):"_v";if(tagType=="="){i3=changeDelimiters(text,i3);state=IN_TEXT;}else{if(tag){i3++;}
  state=IN_TAG;}
  seenTag=i3;}else{if(tagChange(ctag,text,i3)){tokens.push({tag:tagType,n:trim(buf),otag,ctag,i:tagType=="/"?seenTag-otag.length:i3+ctag.length});buf="";i3+=ctag.length-1;state=IN_TEXT;if(tagType=="{"){if(ctag=="}}"){i3++;}else{cleanTripleStache(tokens[tokens.length-1]);}}}else{buf+=text.charAt(i3);}}}
  filterLine(seenTag,true);return tokens;};function cleanTripleStache(token){if(token.n.substr(token.n.length-1)==="}"){token.n=token.n.substring(0,token.n.length-1);}}
  function trim(s3){if(s3.trim){return s3.trim();}
  return s3.replace(/^\s*|\s*$/g,"");}
  function tagChange(tag,text,index4){if(text.charAt(index4)!=tag.charAt(0)){return false;}
  for(var i3=1,l3=tag.length;i3<l3;i3++){if(text.charAt(index4+i3)!=tag.charAt(i3)){return false;}}
  return true;}
  var allowedInSuper={_t:true,"\n":true,$:true,"/":true};function buildTree(tokens,kind,stack,customTags){var instructions=[],opener=null,tail=null,token=null;tail=stack[stack.length-1];while(tokens.length>0){token=tokens.shift();if(tail&&tail.tag=="<"&&!(token.tag in allowedInSuper)){throw new Error("Illegal content in < super tag.");}
  if(Hogan2.tags[token.tag]<=Hogan2.tags["$"]||isOpener(token,customTags)){stack.push(token);token.nodes=buildTree(tokens,token.tag,stack,customTags);}else if(token.tag=="/"){if(stack.length===0){throw new Error("Closing tag without opener: /"+token.n);}
  opener=stack.pop();if(token.n!=opener.n&&!isCloser(token.n,opener.n,customTags)){throw new Error("Nesting error: "+opener.n+" vs. "+token.n);}
  opener.end=token.i;return instructions;}else if(token.tag=="\n"){token.last=tokens.length==0||tokens[0].tag=="\n";}
  instructions.push(token);}
  if(stack.length>0){throw new Error("missing closing tag: "+stack.pop().n);}
  return instructions;}
  function isOpener(token,tags){for(var i3=0,l3=tags.length;i3<l3;i3++){if(tags[i3].o==token.n){token.tag="#";return true;}}}
  function isCloser(close,open,tags){for(var i3=0,l3=tags.length;i3<l3;i3++){if(tags[i3].c==close&&tags[i3].o==open){return true;}}}
  function stringifySubstitutions(obj){var items=[];for(var key2 in obj){items.push('"'+esc(key2)+'": function(c,p,t,i) {'+obj[key2]+"}");}
  return "{ "+items.join(",")+" }";}
  function stringifyPartials(codeObj){var partials=[];for(var key2 in codeObj.partials){partials.push('"'+esc(key2)+'":{name:"'+esc(codeObj.partials[key2].name)+'", '+stringifyPartials(codeObj.partials[key2])+"}");}
  return "partials: {"+partials.join(",")+"}, subs: "+stringifySubstitutions(codeObj.subs);}
  Hogan2.stringify=function(codeObj,text,options){return "{code: function (c,p,i) { "+Hogan2.wrapMain(codeObj.code)+" },"+stringifyPartials(codeObj)+"}";};var serialNo=0;Hogan2.generate=function(tree,text,options){serialNo=0;var context={code:"",subs:{},partials:{}};Hogan2.walk(tree,context);if(options.asString){return this.stringify(context,text,options);}
  return this.makeTemplate(context,text,options);};Hogan2.wrapMain=function(code){return 'var t=this;t.b(i=i||"");'+code+"return t.fl();";};Hogan2.template=Hogan2.Template;Hogan2.makeTemplate=function(codeObj,text,options){var template=this.makePartials(codeObj);template.code=new Function("c","p","i",this.wrapMain(codeObj.code));return new this.template(template,text,this,options);};Hogan2.makePartials=function(codeObj){var key2,template={subs:{},partials:codeObj.partials,name:codeObj.name};for(key2 in template.partials){template.partials[key2]=this.makePartials(template.partials[key2]);}
  for(key2 in codeObj.subs){template.subs[key2]=new Function("c","p","t","i",codeObj.subs[key2]);}
  return template;};function esc(s3){return s3.replace(rSlash,"\\\\").replace(rQuot,'\\"').replace(rNewline,"\\n").replace(rCr,"\\r").replace(rLineSep,"\\u2028").replace(rParagraphSep,"\\u2029");}
  function chooseMethod(s3){return~s3.indexOf(".")?"d":"f";}
  function createPartial(node,context){var prefix="<"+(context.prefix||"");var sym=prefix+node.n+serialNo++;context.partials[sym]={name:node.n,partials:{}};context.code+='t.b(t.rp("'+esc(sym)+'",c,p,"'+(node.indent||"")+'"));';return sym;}
  Hogan2.codegen={"#":function(node,context){context.code+="if(t.s(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,1),c,p,0,'+node.i+","+node.end+',"'+node.otag+" "+node.ctag+'")){t.rs(c,p,function(c,p,t){';Hogan2.walk(node.nodes,context);context.code+="});c.pop();}";},"^":function(node,context){context.code+="if(!t.s(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,1),c,p,1,0,0,"")){';Hogan2.walk(node.nodes,context);context.code+="};";},">":createPartial,"<":function(node,context){var ctx={partials:{},code:"",subs:{},inPartial:true};Hogan2.walk(node.nodes,ctx);var template=context.partials[createPartial(node,context)];template.subs=ctx.subs;template.partials=ctx.partials;},$:function(node,context){var ctx={subs:{},code:"",partials:context.partials,prefix:node.n};Hogan2.walk(node.nodes,ctx);context.subs[node.n]=ctx.code;if(!context.inPartial){context.code+='t.sub("'+esc(node.n)+'",c,p,i);';}},"\n":function(node,context){context.code+=write('"\\n"'+(node.last?"":" + i"));},_v:function(node,context){context.code+="t.b(t.v(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,0)));';},_t:function(node,context){context.code+=write('"'+esc(node.text)+'"');},"{":tripleStache,"&":tripleStache};function tripleStache(node,context){context.code+="t.b(t.t(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,0)));';}
  function write(s3){return "t.b("+s3+");";}
  Hogan2.walk=function(nodelist,context){var func;for(var i3=0,l3=nodelist.length;i3<l3;i3++){func=Hogan2.codegen[nodelist[i3].tag];func&&func(nodelist[i3],context);}
  return context;};Hogan2.parse=function(tokens,text,options){options=options||{};return buildTree(tokens,"",[],options.sectionTags||[]);};Hogan2.cache={};Hogan2.cacheKey=function(text,options){return[text,!!options.asString,!!options.disableLambda,options.delimiters,!!options.modelGet].join("||");};Hogan2.compile=function(text,options){options=options||{};var key2=Hogan2.cacheKey(text,options);var template=this.cache[key2];if(template){var partials=template.partials;for(var name in partials){delete partials[name].instance;}
  return template;}
  template=this.generate(this.parse(this.scan(text,options.delimiters),text,options),text,options);return this.cache[key2]=template;};})(typeof exports!=="undefined"?exports:Hogan);});var require_template=__commonJS((exports)=>{var Hogan2={};(function(Hogan3){Hogan3.Template=function(codeObj,text,compiler,options){codeObj=codeObj||{};this.r=codeObj.code||this.r;this.c=compiler;this.options=options||{};this.text=text||"";this.partials=codeObj.partials||{};this.subs=codeObj.subs||{};this.buf="";};Hogan3.Template.prototype={r:function(context,partials,indent){return "";},v:hoganEscape,t:coerceToString,render:function render(context,partials,indent){return this.ri([context],partials||{},indent);},ri:function(context,partials,indent){return this.r(context,partials,indent);},ep:function(symbol,partials){var partial=this.partials[symbol];var template=partials[partial.name];if(partial.instance&&partial.base==template){return partial.instance;}
  if(typeof template=="string"){if(!this.c){throw new Error("No compiler available.");}
  template=this.c.compile(template,this.options);}
  if(!template){return null;}
  this.partials[symbol].base=template;if(partial.subs){if(!partials.stackText)
  partials.stackText={};for(key in partial.subs){if(!partials.stackText[key]){partials.stackText[key]=this.activeSub!==void 0&&partials.stackText[this.activeSub]?partials.stackText[this.activeSub]:this.text;}}
  template=createSpecializedPartial(template,partial.subs,partial.partials,this.stackSubs,this.stackPartials,partials.stackText);}
  this.partials[symbol].instance=template;return template;},rp:function(symbol,context,partials,indent){var partial=this.ep(symbol,partials);if(!partial){return "";}
  return partial.ri(context,partials,indent);},rs:function(context,partials,section){var tail=context[context.length-1];if(!isArray(tail)){section(context,partials,this);return;}
  for(var i3=0;i3<tail.length;i3++){context.push(tail[i3]);section(context,partials,this);context.pop();}},s:function(val,ctx,partials,inverted,start,end,tags){var pass;if(isArray(val)&&val.length===0){return false;}
  if(typeof val=="function"){val=this.ms(val,ctx,partials,inverted,start,end,tags);}
  pass=!!val;if(!inverted&&pass&&ctx){ctx.push(typeof val=="object"?val:ctx[ctx.length-1]);}
  return pass;},d:function(key2,ctx,partials,returnFound){var found,names=key2.split("."),val=this.f(names[0],ctx,partials,returnFound),doModelGet=this.options.modelGet,cx38=null;if(key2==="."&&isArray(ctx[ctx.length-2])){val=ctx[ctx.length-1];}else{for(var i3=1;i3<names.length;i3++){found=findInScope(names[i3],val,doModelGet);if(found!==void 0){cx38=val;val=found;}else{val="";}}}
  if(returnFound&&!val){return false;}
  if(!returnFound&&typeof val=="function"){ctx.push(cx38);val=this.mv(val,ctx,partials);ctx.pop();}
  return val;},f:function(key2,ctx,partials,returnFound){var val=false,v3=null,found=false,doModelGet=this.options.modelGet;for(var i3=ctx.length-1;i3>=0;i3--){v3=ctx[i3];val=findInScope(key2,v3,doModelGet);if(val!==void 0){found=true;break;}}
  if(!found){return returnFound?false:"";}
  if(!returnFound&&typeof val=="function"){val=this.mv(val,ctx,partials);}
  return val;},ls:function(func,cx38,partials,text,tags){var oldTags=this.options.delimiters;this.options.delimiters=tags;this.b(this.ct(coerceToString(func.call(cx38,text)),cx38,partials));this.options.delimiters=oldTags;return false;},ct:function(text,cx38,partials){if(this.options.disableLambda){throw new Error("Lambda features disabled.");}
  return this.c.compile(text,this.options).render(cx38,partials);},b:function(s3){this.buf+=s3;},fl:function(){var r3=this.buf;this.buf="";return r3;},ms:function(func,ctx,partials,inverted,start,end,tags){var textSource,cx38=ctx[ctx.length-1],result=func.call(cx38);if(typeof result=="function"){if(inverted){return true;}else{textSource=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text;return this.ls(result,cx38,partials,textSource.substring(start,end),tags);}}
  return result;},mv:function(func,ctx,partials){var cx38=ctx[ctx.length-1];var result=func.call(cx38);if(typeof result=="function"){return this.ct(coerceToString(result.call(cx38)),cx38,partials);}
  return result;},sub:function(name,context,partials,indent){var f3=this.subs[name];if(f3){this.activeSub=name;f3(context,partials,this,indent);this.activeSub=false;}}};function findInScope(key2,scope,doModelGet){var val;if(scope&&typeof scope=="object"){if(scope[key2]!==void 0){val=scope[key2];}else if(doModelGet&&scope.get&&typeof scope.get=="function"){val=scope.get(key2);}}
  return val;}
  function createSpecializedPartial(instance,subs,partials,stackSubs,stackPartials,stackText){function PartialTemplate(){};PartialTemplate.prototype=instance;function Substitutions(){};Substitutions.prototype=instance.subs;var key2;var partial=new PartialTemplate();partial.subs=new Substitutions();partial.subsText={};partial.buf="";stackSubs=stackSubs||{};partial.stackSubs=stackSubs;partial.subsText=stackText;for(key2 in subs){if(!stackSubs[key2])
  stackSubs[key2]=subs[key2];}
  for(key2 in stackSubs){partial.subs[key2]=stackSubs[key2];}
  stackPartials=stackPartials||{};partial.stackPartials=stackPartials;for(key2 in partials){if(!stackPartials[key2])
  stackPartials[key2]=partials[key2];}
  for(key2 in stackPartials){partial.partials[key2]=stackPartials[key2];}
  return partial;}
  var rAmp=/&/g,rLt=/</g,rGt=/>/g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/;function coerceToString(val){return String(val===null||val===void 0?"":val);}
  function hoganEscape(str){str=coerceToString(str);return hChars.test(str)?str.replace(rAmp,"&amp;").replace(rLt,"&lt;").replace(rGt,"&gt;").replace(rApos,"&#39;").replace(rQuot,"&quot;"):str;}
  var isArray=Array.isArray||function(a3){return Object.prototype.toString.call(a3)==="[object Array]";};})(typeof exports!=="undefined"?exports:Hogan2);});var require_hogan=__commonJS((exports,module)=>{var Hogan2=require_compiler();Hogan2.Template=require_template().Template;Hogan2.template=Hogan2.Template;module.exports=Hogan2;});var require_formats=__commonJS((exports,module)=>{"use strict";var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:Format.RFC3986,formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+");},RFC3986:function(value){return String(value);}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};});var require_utils=__commonJS((exports,module)=>{"use strict";var formats=require_formats();var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var hexTable=function(){var array=[];for(var i3=0;i3<256;++i3){array.push("%"+((i3<16?"0":"")+i3.toString(16)).toUpperCase());}
  return array;}();var compactQueue=function compactQueue2(queue){while(queue.length>1){var item=queue.pop();var obj=item.obj[item.prop];if(isArray(obj)){var compacted=[];for(var j3=0;j3<obj.length;++j3){if(typeof obj[j3]!=="undefined"){compacted.push(obj[j3]);}}
  item.obj[item.prop]=compacted;}}};var arrayToObject=function arrayToObject2(source,options){var obj=options&&options.plainObjects?Object.create(null):{};for(var i3=0;i3<source.length;++i3){if(typeof source[i3]!=="undefined"){obj[i3]=source[i3];}}
  return obj;};var merge2=function merge3(target,source,options){if(!source){return target;}
  if(typeof source!=="object"){if(isArray(target)){target.push(source);}else if(target&&typeof target==="object"){if(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source)){target[source]=true;}}else{return[target,source];}
  return target;}
  if(!target||typeof target!=="object"){return[target].concat(source);}
  var mergeTarget=target;if(isArray(target)&&!isArray(source)){mergeTarget=arrayToObject(target,options);}
  if(isArray(target)&&isArray(source)){source.forEach(function(item,i3){if(has.call(target,i3)){var targetItem=target[i3];if(targetItem&&typeof targetItem==="object"&&item&&typeof item==="object"){target[i3]=merge3(targetItem,item,options);}else{target.push(item);}}else{target[i3]=item;}});return target;}
  return Object.keys(source).reduce(function(acc,key2){var value=source[key2];if(has.call(acc,key2)){acc[key2]=merge3(acc[key2],value,options);}else{acc[key2]=value;}
  return acc;},mergeTarget);};var assign=function assignSingleSource(target,source){return Object.keys(source).reduce(function(acc,key2){acc[key2]=source[key2];return acc;},target);};var decode=function(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if(charset==="iso-8859-1"){return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);}
  try{return decodeURIComponent(strWithoutPlus);}catch(e3){return strWithoutPlus;}};var encode=function encode2(str,defaultEncoder,charset,kind,format){if(str.length===0){return str;}
  var string=str;if(typeof str==="symbol"){string=Symbol.prototype.toString.call(str);}else if(typeof str!=="string"){string=String(str);}
  if(charset==="iso-8859-1"){return escape(string).replace(/%u[0-9a-f]{4}/gi,function($0){return "%26%23"+parseInt($0.slice(2),16)+"%3B";});}
  var out="";for(var i3=0;i3<string.length;++i3){var c3=string.charCodeAt(i3);if(c3===45||c3===46||c3===95||c3===126||c3>=48&&c3<=57||c3>=65&&c3<=90||c3>=97&&c3<=122||format===formats.RFC1738&&(c3===40||c3===41)){out+=string.charAt(i3);continue;}
  if(c3<128){out=out+hexTable[c3];continue;}
  if(c3<2048){out=out+(hexTable[192|c3>>6]+hexTable[128|c3&63]);continue;}
  if(c3<55296||c3>=57344){out=out+(hexTable[224|c3>>12]+hexTable[128|c3>>6&63]+hexTable[128|c3&63]);continue;}
  i3+=1;c3=65536+((c3&1023)<<10|string.charCodeAt(i3)&1023);out+=hexTable[240|c3>>18]+hexTable[128|c3>>12&63]+hexTable[128|c3>>6&63]+hexTable[128|c3&63];}
  return out;};var compact=function compact2(value){var queue=[{obj:{o:value},prop:"o"}];var refs=[];for(var i3=0;i3<queue.length;++i3){var item=queue[i3];var obj=item.obj[item.prop];var keys2=Object.keys(obj);for(var j3=0;j3<keys2.length;++j3){var key2=keys2[j3];var val=obj[key2];if(typeof val==="object"&&val!==null&&refs.indexOf(val)===-1){queue.push({obj,prop:key2});refs.push(val);}}}
  compactQueue(queue);return value;};var isRegExp=function isRegExp2(obj){return Object.prototype.toString.call(obj)==="[object RegExp]";};var isBuffer=function isBuffer2(obj){if(!obj||typeof obj!=="object"){return false;}
  return!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj));};var combine=function combine2(a3,b3){return[].concat(a3,b3);};var maybeMap=function maybeMap2(val,fn){if(isArray(val)){var mapped=[];for(var i3=0;i3<val.length;i3+=1){mapped.push(fn(val[i3]));}
  return mapped;}
  return fn(val);};module.exports={arrayToObject,assign,combine,compact,decode,encode,isBuffer,isRegExp,maybeMap,merge:merge2};});var require_stringify=__commonJS((exports,module)=>{"use strict";var utils72=require_utils();var formats=require_formats();var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+"[]";},comma:"comma",indices:function indices(prefix,key2){return prefix+"["+key2+"]";},repeat:function repeat(prefix){return prefix;}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray]);};var toISO=Date.prototype.toISOString;var defaultFormat=formats["default"];var defaults={addQueryPrefix:false,allowDots:false,charset:"utf-8",charsetSentinel:false,delimiter:"&",encode:true,encoder:utils72.encode,encodeValuesOnly:false,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:false,serializeDate:function serializeDate(date){return toISO.call(date);},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function isNonNullishPrimitive2(v3){return typeof v3==="string"||typeof v3==="number"||typeof v3==="boolean"||typeof v3==="symbol"||typeof v3==="bigint";};var stringify=function stringify2(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset){var obj=object;if(typeof filter==="function"){obj=filter(prefix,obj);}else if(obj instanceof Date){obj=serializeDate(obj);}else if(generateArrayPrefix==="comma"&&isArray(obj)){obj=utils72.maybeMap(obj,function(value2){if(value2 instanceof Date){return serializeDate(value2);}
  return value2;});}
  if(obj===null){if(strictNullHandling){return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,"key",format):prefix;}
  obj="";}
  if(isNonNullishPrimitive(obj)||utils72.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,"key",format);return[formatter(keyValue)+"="+formatter(encoder(obj,defaults.encoder,charset,"value",format))];}
  return[formatter(prefix)+"="+formatter(String(obj))];}
  var values=[];if(typeof obj==="undefined"){return values;}
  var objKeys;if(generateArrayPrefix==="comma"&&isArray(obj)){objKeys=[{value:obj.length>0?obj.join(",")||null:void 0}];}else if(isArray(filter)){objKeys=filter;}else{var keys2=Object.keys(obj);objKeys=sort?keys2.sort(sort):keys2;}
  for(var i3=0;i3<objKeys.length;++i3){var key2=objKeys[i3];var value=typeof key2==="object"&&key2.value!==void 0?key2.value:obj[key2];if(skipNulls&&value===null){continue;}
  var keyPrefix=isArray(obj)?typeof generateArrayPrefix==="function"?generateArrayPrefix(prefix,key2):prefix:prefix+(allowDots?"."+key2:"["+key2+"]");pushToArray(values,stringify2(value,keyPrefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset));}
  return values;};var normalizeStringifyOptions=function normalizeStringifyOptions2(opts){if(!opts){return defaults;}
  if(opts.encoder!==null&&opts.encoder!==void 0&&typeof opts.encoder!=="function"){throw new TypeError("Encoder has to be a function.");}
  var charset=opts.charset||defaults.charset;if(typeof opts.charset!=="undefined"&&opts.charset!=="utf-8"&&opts.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");}
  var format=formats["default"];if(typeof opts.format!=="undefined"){if(!has.call(formats.formatters,opts.format)){throw new TypeError("Unknown format option provided.");}
  format=opts.format;}
  var formatter=formats.formatters[format];var filter=defaults.filter;if(typeof opts.filter==="function"||isArray(opts.filter)){filter=opts.filter;}
  return{addQueryPrefix:typeof opts.addQueryPrefix==="boolean"?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:typeof opts.allowDots==="undefined"?defaults.allowDots:!!opts.allowDots,charset,charsetSentinel:typeof opts.charsetSentinel==="boolean"?opts.charsetSentinel:defaults.charsetSentinel,delimiter:typeof opts.delimiter==="undefined"?defaults.delimiter:opts.delimiter,encode:typeof opts.encode==="boolean"?opts.encode:defaults.encode,encoder:typeof opts.encoder==="function"?opts.encoder:defaults.encoder,encodeValuesOnly:typeof opts.encodeValuesOnly==="boolean"?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter,format,formatter,serializeDate:typeof opts.serializeDate==="function"?opts.serializeDate:defaults.serializeDate,skipNulls:typeof opts.skipNulls==="boolean"?opts.skipNulls:defaults.skipNulls,sort:typeof opts.sort==="function"?opts.sort:null,strictNullHandling:typeof opts.strictNullHandling==="boolean"?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(object,opts){var obj=object;var options=normalizeStringifyOptions(opts);var objKeys;var filter;if(typeof options.filter==="function"){filter=options.filter;obj=filter("",obj);}else if(isArray(options.filter)){filter=options.filter;objKeys=filter;}
  var keys2=[];if(typeof obj!=="object"||obj===null){return "";}
  var arrayFormat;if(opts&&opts.arrayFormat in arrayPrefixGenerators){arrayFormat=opts.arrayFormat;}else if(opts&&"indices"in opts){arrayFormat=opts.indices?"indices":"repeat";}else{arrayFormat="indices";}
  var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];if(!objKeys){objKeys=Object.keys(obj);}
  if(options.sort){objKeys.sort(options.sort);}
  for(var i3=0;i3<objKeys.length;++i3){var key2=objKeys[i3];if(options.skipNulls&&obj[key2]===null){continue;}
  pushToArray(keys2,stringify(obj[key2],key2,generateArrayPrefix,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.format,options.formatter,options.encodeValuesOnly,options.charset));}
  var joined=keys2.join(options.delimiter);var prefix=options.addQueryPrefix===true?"?":"";if(options.charsetSentinel){if(options.charset==="iso-8859-1"){prefix+="utf8=%26%2310003%3B&";}else{prefix+="utf8=%E2%9C%93&";}}
  return joined.length>0?prefix+joined:"";};});var require_parse=__commonJS((exports,module)=>{"use strict";var utils72=require_utils();var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:utils72.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var interpretNumericEntities=function(str){return str.replace(/&#(\d+);/g,function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10));});};var parseArrayValue=function(val,options){if(val&&typeof val==="string"&&options.comma&&val.indexOf(",")>-1){return val.split(",");}
  return val;};var isoSentinel="utf8=%26%2310003%3B";var charsetSentinel="utf8=%E2%9C%93";var parseValues=function parseQueryStringValues(str,options){var obj={};var cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,""):str;var limit=options.parameterLimit===Infinity?void 0:options.parameterLimit;var parts=cleanStr.split(options.delimiter,limit);var skipIndex=-1;var i3;var charset=options.charset;if(options.charsetSentinel){for(i3=0;i3<parts.length;++i3){if(parts[i3].indexOf("utf8=")===0){if(parts[i3]===charsetSentinel){charset="utf-8";}else if(parts[i3]===isoSentinel){charset="iso-8859-1";}
  skipIndex=i3;i3=parts.length;}}}
  for(i3=0;i3<parts.length;++i3){if(i3===skipIndex){continue;}
  var part=parts[i3];var bracketEqualsPos=part.indexOf("]=");var pos=bracketEqualsPos===-1?part.indexOf("="):bracketEqualsPos+1;var key2,val;if(pos===-1){key2=options.decoder(part,defaults.decoder,charset,"key");val=options.strictNullHandling?null:"";}else{key2=options.decoder(part.slice(0,pos),defaults.decoder,charset,"key");val=utils72.maybeMap(parseArrayValue(part.slice(pos+1),options),function(encodedVal){return options.decoder(encodedVal,defaults.decoder,charset,"value");});}
  if(val&&options.interpretNumericEntities&&charset==="iso-8859-1"){val=interpretNumericEntities(val);}
  if(part.indexOf("[]=")>-1){val=isArray(val)?[val]:val;}
  if(has.call(obj,key2)){obj[key2]=utils72.combine(obj[key2],val);}else{obj[key2]=val;}}
  return obj;};var parseObject=function(chain,val,options,valuesParsed){var leaf=valuesParsed?val:parseArrayValue(val,options);for(var i3=chain.length-1;i3>=0;--i3){var obj;var root=chain[i3];if(root==="[]"&&options.parseArrays){obj=[].concat(leaf);}else{obj=options.plainObjects?Object.create(null):{};var cleanRoot=root.charAt(0)==="["&&root.charAt(root.length-1)==="]"?root.slice(1,-1):root;var index4=parseInt(cleanRoot,10);if(!options.parseArrays&&cleanRoot===""){obj={0:leaf};}else if(!isNaN(index4)&&root!==cleanRoot&&String(index4)===cleanRoot&&index4>=0&&(options.parseArrays&&index4<=options.arrayLimit)){obj=[];obj[index4]=leaf;}else{obj[cleanRoot]=leaf;}}
  leaf=obj;}
  return leaf;};var parseKeys=function parseQueryStringKeys(givenKey,val,options,valuesParsed){if(!givenKey){return;}
  var key2=options.allowDots?givenKey.replace(/\.([^.[]+)/g,"[$1]"):givenKey;var brackets=/(\[[^[\]]*])/;var child=/(\[[^[\]]*])/g;var segment=options.depth>0&&brackets.exec(key2);var parent=segment?key2.slice(0,segment.index):key2;var keys2=[];if(parent){if(!options.plainObjects&&has.call(Object.prototype,parent)){if(!options.allowPrototypes){return;}}
  keys2.push(parent);}
  var i3=0;while(options.depth>0&&(segment=child.exec(key2))!==null&&i3<options.depth){i3+=1;if(!options.plainObjects&&has.call(Object.prototype,segment[1].slice(1,-1))){if(!options.allowPrototypes){return;}}
  keys2.push(segment[1]);}
  if(segment){keys2.push("["+key2.slice(segment.index)+"]");}
  return parseObject(keys2,val,options,valuesParsed);};var normalizeParseOptions=function normalizeParseOptions2(opts){if(!opts){return defaults;}
  if(opts.decoder!==null&&opts.decoder!==void 0&&typeof opts.decoder!=="function"){throw new TypeError("Decoder has to be a function.");}
  if(typeof opts.charset!=="undefined"&&opts.charset!=="utf-8"&&opts.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");}
  var charset=typeof opts.charset==="undefined"?defaults.charset:opts.charset;return{allowDots:typeof opts.allowDots==="undefined"?defaults.allowDots:!!opts.allowDots,allowPrototypes:typeof opts.allowPrototypes==="boolean"?opts.allowPrototypes:defaults.allowPrototypes,arrayLimit:typeof opts.arrayLimit==="number"?opts.arrayLimit:defaults.arrayLimit,charset,charsetSentinel:typeof opts.charsetSentinel==="boolean"?opts.charsetSentinel:defaults.charsetSentinel,comma:typeof opts.comma==="boolean"?opts.comma:defaults.comma,decoder:typeof opts.decoder==="function"?opts.decoder:defaults.decoder,delimiter:typeof opts.delimiter==="string"||utils72.isRegExp(opts.delimiter)?opts.delimiter:defaults.delimiter,depth:typeof opts.depth==="number"||opts.depth===false?+opts.depth:defaults.depth,ignoreQueryPrefix:opts.ignoreQueryPrefix===true,interpretNumericEntities:typeof opts.interpretNumericEntities==="boolean"?opts.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof opts.parameterLimit==="number"?opts.parameterLimit:defaults.parameterLimit,parseArrays:opts.parseArrays!==false,plainObjects:typeof opts.plainObjects==="boolean"?opts.plainObjects:defaults.plainObjects,strictNullHandling:typeof opts.strictNullHandling==="boolean"?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(str,opts){var options=normalizeParseOptions(opts);if(str===""||str===null||typeof str==="undefined"){return options.plainObjects?Object.create(null):{};}
  var tempObj=typeof str==="string"?parseValues(str,options):str;var obj=options.plainObjects?Object.create(null):{};var keys2=Object.keys(tempObj);for(var i3=0;i3<keys2.length;++i3){var key2=keys2[i3];var newObj=parseKeys(key2,tempObj[key2],options,typeof str==="string");obj=utils72.merge(obj,newObj,options);}
  return utils72.compact(obj);};});var require_lib=__commonJS((exports,module)=>{"use strict";var stringify=require_stringify();var parse=require_parse();var formats=require_formats();module.exports={formats,parse,stringify};});var require_classnames=__commonJS((exports,module)=>{/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
  */(function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i3=0;i3<arguments.length;i3++){var arg=arguments[i3];if(!arg)
  continue;var argType=typeof arg;if(argType==="string"||argType==="number"){classes.push(arg);}else if(Array.isArray(arg)&&arg.length){var inner=classNames.apply(null,arg);if(inner){classes.push(inner);}}else if(argType==="object"){for(var key2 in arg){if(hasOwn.call(arg,key2)&&arg[key2]){classes.push(key2);}}}}
  return classes.join(" ");}
  if(typeof module!=="undefined"&&module.exports){classNames.default=classNames;module.exports=classNames;}else if(typeof define==="function"&&typeof define.amd==="object"&&define.amd){define("classnames",[],function(){return classNames;});}else{window.classNames=classNames;}})();});var require_prism=__commonJS((exports,module)=>{var _self=typeof window!=="undefined"?window:typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope?self:{};var Prism2=function(_self2){var lang=/\blang(?:uage)?-([\w-]+)\b/i;var uniqueId=0;var _3={manual:_self2.Prism&&_self2.Prism.manual,disableWorkerMessageHandler:_self2.Prism&&_self2.Prism.disableWorkerMessageHandler,util:{encode:function encode(tokens){if(tokens instanceof Token){return new Token(tokens.type,encode(tokens.content),tokens.alias);}else if(Array.isArray(tokens)){return tokens.map(encode);}else{return tokens.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ");}},type:function(o3){return Object.prototype.toString.call(o3).slice(8,-1);},objId:function(obj){if(!obj["__id"]){Object.defineProperty(obj,"__id",{value:++uniqueId});}
  return obj["__id"];},clone:function deepClone(o3,visited){visited=visited||{};var clone,id;switch(_3.util.type(o3)){case "Object":id=_3.util.objId(o3);if(visited[id]){return visited[id];}
  clone={};visited[id]=clone;for(var key2 in o3){if(o3.hasOwnProperty(key2)){clone[key2]=deepClone(o3[key2],visited);}}
  return clone;case "Array":id=_3.util.objId(o3);if(visited[id]){return visited[id];}
  clone=[];visited[id]=clone;o3.forEach(function(v3,i3){clone[i3]=deepClone(v3,visited);});return clone;default:return o3;}},getLanguage:function(element){while(element&&!lang.test(element.className)){element=element.parentElement;}
  if(element){return(element.className.match(lang)||[,"none"])[1].toLowerCase();}
  return "none";},currentScript:function(){if(typeof document==="undefined"){return null;}
  if("currentScript"in document&&1<2){return document.currentScript;}
  try{throw new Error();}catch(err){var src=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack)||[])[1];if(src){var scripts=document.getElementsByTagName("script");for(var i3 in scripts){if(scripts[i3].src==src){return scripts[i3];}}}
  return null;}},isActive:function(element,className,defaultActivation){var no="no-"+className;while(element){var classList=element.classList;if(classList.contains(className)){return true;}
  if(classList.contains(no)){return false;}
  element=element.parentElement;}
  return!!defaultActivation;}},languages:{extend:function(id,redef){var lang2=_3.util.clone(_3.languages[id]);for(var key2 in redef){lang2[key2]=redef[key2];}
  return lang2;},insertBefore:function(inside,before,insert,root){root=root||_3.languages;var grammar=root[inside];var ret={};for(var token in grammar){if(grammar.hasOwnProperty(token)){if(token==before){for(var newToken in insert){if(insert.hasOwnProperty(newToken)){ret[newToken]=insert[newToken];}}}
  if(!insert.hasOwnProperty(token)){ret[token]=grammar[token];}}}
  var old=root[inside];root[inside]=ret;_3.languages.DFS(_3.languages,function(key2,value){if(value===old&&key2!=inside){this[key2]=ret;}});return ret;},DFS:function DFS(o3,callback,type,visited){visited=visited||{};var objId=_3.util.objId;for(var i3 in o3){if(o3.hasOwnProperty(i3)){callback.call(o3,i3,o3[i3],type||i3);var property=o3[i3],propertyType=_3.util.type(property);if(propertyType==="Object"&&!visited[objId(property)]){visited[objId(property)]=true;DFS(property,callback,null,visited);}else if(propertyType==="Array"&&!visited[objId(property)]){visited[objId(property)]=true;DFS(property,callback,i3,visited);}}}}},plugins:{},highlightAll:function(async,callback){_3.highlightAllUnder(document,async,callback);},highlightAllUnder:function(container,async,callback){var env={callback,container,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};_3.hooks.run("before-highlightall",env);env.elements=Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));_3.hooks.run("before-all-elements-highlight",env);for(var i3=0,element;element=env.elements[i3++];){_3.highlightElement(element,async===true,env.callback);}},highlightElement:function(element,async,callback){var language=_3.util.getLanguage(element);var grammar=_3.languages[language];element.className=element.className.replace(lang,"").replace(/\s+/g," ")+" language-"+language;var parent=element.parentElement;if(parent&&parent.nodeName.toLowerCase()==="pre"){parent.className=parent.className.replace(lang,"").replace(/\s+/g," ")+" language-"+language;}
  var code=element.textContent;var env={element,language,grammar,code};function insertHighlightedCode(highlightedCode){env.highlightedCode=highlightedCode;_3.hooks.run("before-insert",env);env.element.innerHTML=env.highlightedCode;_3.hooks.run("after-highlight",env);_3.hooks.run("complete",env);callback&&callback.call(env.element);}
  _3.hooks.run("before-sanity-check",env);if(!env.code){_3.hooks.run("complete",env);callback&&callback.call(env.element);return;}
  _3.hooks.run("before-highlight",env);if(!env.grammar){insertHighlightedCode(_3.util.encode(env.code));return;}
  if(async&&_self2.Worker){var worker=new Worker(_3.filename);worker.onmessage=function(evt){insertHighlightedCode(evt.data);};worker.postMessage(JSON.stringify({language:env.language,code:env.code,immediateClose:true}));}else{insertHighlightedCode(_3.highlight(env.code,env.grammar,env.language));}},highlight:function(text,grammar,language){var env={code:text,grammar,language};_3.hooks.run("before-tokenize",env);env.tokens=_3.tokenize(env.code,env.grammar);_3.hooks.run("after-tokenize",env);return Token.stringify(_3.util.encode(env.tokens),env.language);},tokenize:function(text,grammar){var rest=grammar.rest;if(rest){for(var token in rest){grammar[token]=rest[token];}
  delete grammar.rest;}
  var tokenList=new LinkedList();addAfter(tokenList,tokenList.head,text);matchGrammar(text,tokenList,grammar,tokenList.head,0);return toArray3(tokenList);},hooks:{all:{},add:function(name,callback){var hooks2=_3.hooks.all;hooks2[name]=hooks2[name]||[];hooks2[name].push(callback);},run:function(name,env){var callbacks=_3.hooks.all[name];if(!callbacks||!callbacks.length){return;}
  for(var i3=0,callback;callback=callbacks[i3++];){callback(env);}}},Token};_self2.Prism=_3;function Token(type,content,alias,matchedStr){this.type=type;this.content=content;this.alias=alias;this.length=(matchedStr||"").length|0;}
  Token.stringify=function stringify(o3,language){if(typeof o3=="string"){return o3;}
  if(Array.isArray(o3)){var s3="";o3.forEach(function(e3){s3+=stringify(e3,language);});return s3;}
  var env={type:o3.type,content:stringify(o3.content,language),tag:"span",classes:["token",o3.type],attributes:{},language};var aliases=o3.alias;if(aliases){if(Array.isArray(aliases)){Array.prototype.push.apply(env.classes,aliases);}else{env.classes.push(aliases);}}
  _3.hooks.run("wrap",env);var attributes="";for(var name in env.attributes){attributes+=" "+name+'="'+(env.attributes[name]||"").replace(/"/g,"&quot;")+'"';}
  return "<"+env.tag+' class="'+env.classes.join(" ")+'"'+attributes+">"+env.content+"</"+env.tag+">";};function matchGrammar(text,tokenList,grammar,startNode,startPos,rematch){for(var token in grammar){if(!grammar.hasOwnProperty(token)||!grammar[token]){continue;}
  var patterns=grammar[token];patterns=Array.isArray(patterns)?patterns:[patterns];for(var j3=0;j3<patterns.length;++j3){if(rematch&&rematch.cause==token+","+j3){return;}
  var patternObj=patterns[j3],inside=patternObj.inside,lookbehind=!!patternObj.lookbehind,greedy=!!patternObj.greedy,lookbehindLength=0,alias=patternObj.alias;if(greedy&&!patternObj.pattern.global){var flags=patternObj.pattern.toString().match(/[imsuy]*$/)[0];patternObj.pattern=RegExp(patternObj.pattern.source,flags+"g");}
  var pattern=patternObj.pattern||patternObj;for(var currentNode=startNode.next,pos=startPos;currentNode!==tokenList.tail;pos+=currentNode.value.length,currentNode=currentNode.next){if(rematch&&pos>=rematch.reach){break;}
  var str=currentNode.value;if(tokenList.length>text.length){return;}
  if(str instanceof Token){continue;}
  var removeCount=1;if(greedy&&currentNode!=tokenList.tail.prev){pattern.lastIndex=pos;var match=pattern.exec(text);if(!match){break;}
  var from=match.index+(lookbehind&&match[1]?match[1].length:0);var to=match.index+match[0].length;var p3=pos;p3+=currentNode.value.length;while(from>=p3){currentNode=currentNode.next;p3+=currentNode.value.length;}
  p3-=currentNode.value.length;pos=p3;if(currentNode.value instanceof Token){continue;}
  for(var k3=currentNode;k3!==tokenList.tail&&(p3<to||typeof k3.value==="string");k3=k3.next){removeCount++;p3+=k3.value.length;}
  removeCount--;str=text.slice(pos,p3);match.index-=pos;}else{pattern.lastIndex=0;var match=pattern.exec(str);}
  if(!match){continue;}
  if(lookbehind){lookbehindLength=match[1]?match[1].length:0;}
  var from=match.index+lookbehindLength,matchStr=match[0].slice(lookbehindLength),to=from+matchStr.length,before=str.slice(0,from),after=str.slice(to);var reach=pos+str.length;if(rematch&&reach>rematch.reach){rematch.reach=reach;}
  var removeFrom=currentNode.prev;if(before){removeFrom=addAfter(tokenList,removeFrom,before);pos+=before.length;}
  removeRange(tokenList,removeFrom,removeCount);var wrapped=new Token(token,inside?_3.tokenize(matchStr,inside):matchStr,alias,matchStr);currentNode=addAfter(tokenList,removeFrom,wrapped);if(after){addAfter(tokenList,currentNode,after);}
  if(removeCount>1){matchGrammar(text,tokenList,grammar,currentNode.prev,pos,{cause:token+","+j3,reach});}}}}}
  function LinkedList(){var head={value:null,prev:null,next:null};var tail={value:null,prev:head,next:null};head.next=tail;this.head=head;this.tail=tail;this.length=0;}
  function addAfter(list,node,value){var next=node.next;var newNode={value,prev:node,next};node.next=newNode;next.prev=newNode;list.length++;return newNode;}
  function removeRange(list,node,count){var next=node.next;for(var i3=0;i3<count&&next!==list.tail;i3++){next=next.next;}
  node.next=next;next.prev=node;list.length-=i3;}
  function toArray3(list){var array=[];var node=list.head.next;while(node!==list.tail){array.push(node.value);node=node.next;}
  return array;}
  if(!_self2.document){if(!_self2.addEventListener){return _3;}
  if(!_3.disableWorkerMessageHandler){_self2.addEventListener("message",function(evt){var message=JSON.parse(evt.data),lang2=message.language,code=message.code,immediateClose=message.immediateClose;_self2.postMessage(_3.highlight(code,_3.languages[lang2],lang2));if(immediateClose){_self2.close();}},false);}
  return _3;}
  var script=_3.util.currentScript();if(script){_3.filename=script.src;if(script.hasAttribute("data-manual")){_3.manual=true;}}
  function highlightAutomaticallyCallback(){if(!_3.manual){_3.highlightAll();}}
  if(!_3.manual){var readyState=document.readyState;if(readyState==="loading"||readyState==="interactive"&&script&&script.defer){document.addEventListener("DOMContentLoaded",highlightAutomaticallyCallback);}else{if(window.requestAnimationFrame){window.requestAnimationFrame(highlightAutomaticallyCallback);}else{window.setTimeout(highlightAutomaticallyCallback,16);}}}
  return _3;}(_self);if(typeof module!=="undefined"&&module.exports){module.exports=Prism2;}
  if(typeof global!=="undefined"){global.Prism=Prism2;}
  Prism2.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:true,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:true,greedy:true,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:true},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:true,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism2.languages.markup["tag"].inside["attr-value"].inside["entity"]=Prism2.languages.markup["entity"];Prism2.languages.markup["doctype"].inside["internal-subset"].inside=Prism2.languages.markup;Prism2.hooks.add("wrap",function(env){if(env.type==="entity"){env.attributes["title"]=env.content.replace(/&amp;/,"&");}});Object.defineProperty(Prism2.languages.markup.tag,"addInlined",{value:function addInlined(tagName,lang){var includedCdataInside={};includedCdataInside["language-"+lang]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:true,inside:Prism2.languages[lang]};includedCdataInside["cdata"]=/^<!\[CDATA\[|\]\]>$/i;var inside={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:includedCdataInside}};inside["language-"+lang]={pattern:/[\s\S]+/,inside:Prism2.languages[lang]};var def={};def[tagName]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return tagName;}),"i"),lookbehind:true,greedy:true,inside};Prism2.languages.insertBefore("markup","cdata",def);}});Prism2.languages.html=Prism2.languages.markup;Prism2.languages.mathml=Prism2.languages.markup;Prism2.languages.svg=Prism2.languages.markup;Prism2.languages.xml=Prism2.languages.extend("markup",{});Prism2.languages.ssml=Prism2.languages.xml;Prism2.languages.atom=Prism2.languages.xml;Prism2.languages.rss=Prism2.languages.xml;(function(Prism3){var string=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;Prism3.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:true,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:true}}},url:{pattern:RegExp("\\burl\\((?:"+string.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:true,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+string.source+"$"),alias:"url"}}},selector:RegExp(`[^{}\\s](?:[^{};"']|`+string.source+")*?(?=\\s*\\{)"),string:{pattern:string,greedy:true},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/};Prism3.languages.css["atrule"].inside.rest=Prism3.languages.css;var markup=Prism3.languages.markup;if(markup){markup.tag.addInlined("style","css");Prism3.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism3.languages.css}},alias:"language-css"}},markup.tag);}})(Prism2);Prism2.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:true},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:true,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism2.languages.javascript=Prism2.languages.extend("clike",{"class-name":[Prism2.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:true}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:true},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:true}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism2.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;Prism2.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:true,greedy:true},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:true,inside:Prism2.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism2.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:true,inside:Prism2.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:true,inside:Prism2.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism2.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:true,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:true,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism2.languages.javascript}},string:/[\s\S]+/}}});if(Prism2.languages.markup){Prism2.languages.markup.tag.addInlined("script","javascript");}
  Prism2.languages.js=Prism2.languages.javascript;(function(){if(typeof self==="undefined"||!self.Prism||!self.document){return;}
  var Prism3=window.Prism;var LOADING_MESSAGE="Loading…";var FAILURE_MESSAGE=function(status,message){return "✖ Error "+status+" while fetching file: "+message;};var FAILURE_EMPTY_MESSAGE="✖ Error: File does not exist or is empty";var EXTENSIONS={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};var STATUS_ATTR="data-src-status";var STATUS_LOADING="loading";var STATUS_LOADED="loaded";var STATUS_FAILED="failed";var SELECTOR="pre[data-src]:not(["+STATUS_ATTR+'="'+STATUS_LOADED+'"]):not(['+STATUS_ATTR+'="'+STATUS_LOADING+'"])';var lang=/\blang(?:uage)?-([\w-]+)\b/i;function setLanguageClass(element,language){var className=element.className;className=className.replace(lang," ")+" language-"+language;element.className=className.replace(/\s+/g," ").trim();}
  Prism3.hooks.add("before-highlightall",function(env){env.selector+=", "+SELECTOR;});Prism3.hooks.add("before-sanity-check",function(env){var pre=env.element;if(pre.matches(SELECTOR)){env.code="";pre.setAttribute(STATUS_ATTR,STATUS_LOADING);var code=pre.appendChild(document.createElement("CODE"));code.textContent=LOADING_MESSAGE;var src=pre.getAttribute("data-src");var language=env.language;if(language==="none"){var extension=(/\.(\w+)$/.exec(src)||[,"none"])[1];language=EXTENSIONS[extension]||extension;}
  setLanguageClass(code,language);setLanguageClass(pre,language);var autoloader=Prism3.plugins.autoloader;if(autoloader){autoloader.loadLanguages(language);}
  var xhr=new XMLHttpRequest();xhr.open("GET",src,true);xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status<400&&xhr.responseText){pre.setAttribute(STATUS_ATTR,STATUS_LOADED);code.textContent=xhr.responseText;Prism3.highlightElement(code);}else{pre.setAttribute(STATUS_ATTR,STATUS_FAILED);if(xhr.status>=400){code.textContent=FAILURE_MESSAGE(xhr.status,xhr.statusText);}else{code.textContent=FAILURE_EMPTY_MESSAGE;}}}};xhr.send(null);}});Prism3.plugins.fileHighlight={highlight:function highlight3(container){var elements=(container||document).querySelectorAll(SELECTOR);for(var i3=0,element;element=elements[i3++];){Prism3.highlightElement(element);}}};var logged=false;Prism3.fileHighlight=function(){if(!logged){console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.");logged=true;}
  Prism3.plugins.fileHighlight.highlight.apply(this,arguments);};})();});const initCopyToCB=(event)=>{const copyIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>';const copiedIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>';const copyText="Copy to clipboard";const copiedText="Copied!";function addCopyButtons(clipboard2){const highlights=document.querySelectorAll(".ods-content .box-code .highlight");highlights.forEach((highlight3)=>{const pres=highlight3.querySelectorAll('pre[data-lang="html"], pre[data-lang="css"]');pres.forEach((pre)=>{var codeBlock=pre.querySelector("code");const button2=document.createElement("button");button2.className="button button-copy is-rounded is-secondary has-tooltip-left";button2.dataset["tooltip"]=copyText;button2.type="button";button2.innerHTML=copyIcon;button2.addEventListener("click",(event2)=>{clipboard2.writeText(codeBlock.innerText).then(()=>{button2.blur();button2.innerHTML=copiedIcon;button2.dataset["tooltip"]=copiedText;button2.classList.add("copied");setTimeout(()=>{button2.innerHTML=copyIcon;button2.dataset["tooltip"]=copyText;button2.classList.remove("copied");},2e3);}).catch((error)=>{button2.innerText="Error";console.error(error);});});highlight3.appendChild(button2);});});}
  if(navigator&&navigator.clipboard){addCopyButtons(navigator.clipboard);}else{const script=document.createElement("script");script.src="https://cdn.jsdelivr.net/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js";script.defer=true;script.onload=function(){addCopyButtons(clipboard);};document.head.appendChild(script);}};const initCopyColorToCB=(event)=>{const copyText="Copy color to clipboard";const copiedText="Copied!";function addCopyButtons(clipboard2){const divs=document.querySelectorAll(".ods-content .theme-colors .color");divs.forEach((containerParent)=>{var containerEl=containerParent.querySelectorAll(".highlight > pre")[0];containerParent.setAttribute("role","button");containerParent.dataset["tooltip"]=copyText;containerParent.classList.add("has-tooltip-top");var codeBlock=containerEl.querySelector("code");containerParent.addEventListener("click",()=>{clipboard2.writeText(codeBlock.innerText).then(()=>{containerParent.blur();containerParent.dataset["tooltip"]=copiedText;containerParent.classList.add("copied");setTimeout(()=>{containerParent.dataset["tooltip"]=copyText;containerParent.classList.remove("copied");},1e3);}).catch((error)=>{button.innerText="Error";console.error(error);});});});}
  if(navigator&&navigator.clipboard){addCopyButtons(navigator.clipboard);}else{const script=document.createElement("script");script.src="https://cdn.jsdelivr.net/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js";script.defer=true;script.onload=function(){addCopyButtons(clipboard);};document.head.appendChild(script);}};function capitalize(text){return text.toString().charAt(0).toUpperCase()+text.toString().slice(1);}
  var capitalize_default=capitalize;var nextMicroTask=Promise.resolve();var defer=function defer3(callback){var progress=null;var cancelled=false;var fn=function fn2(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}
  if(progress!==null){return;}
  progress=nextMicroTask.then(function(){progress=null;if(cancelled){cancelled=false;return;}
  callback.apply(void 0,args);});};fn.wait=function(){if(progress===null){throw new Error("The deferred function should be called before calling `wait()`");}
  return progress;};fn.cancel=function(){if(progress===null){return;}
  cancelled=true;};return fn;};var defer_default=defer;function isDomElement3(object){return object instanceof HTMLElement||Boolean(object)&&object.nodeType>0;}
  var isDomElement_default=isDomElement3;function getContainerNode(selectorOrHTMLElement){var isSelectorString=typeof selectorOrHTMLElement==="string";var domElement=isSelectorString?document.querySelector(selectorOrHTMLElement):selectorOrHTMLElement;if(!isDomElement_default(domElement)){var errorMessage="Container must be `string` or `HTMLElement`.";if(isSelectorString){errorMessage+=" Unable to find ".concat(selectorOrHTMLElement);}
  throw new Error(errorMessage);}
  return domElement;}
  var getContainerNode_default=getContainerNode;function uniq4(array){return array.filter(function(value,index4,self2){return self2.indexOf(value)===index4;});}
  var uniq_default=uniq4;const hogan=__toModule(require_hogan());function _typeof13(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof13=function _typeof15(obj2){return typeof obj2;};}else{_typeof13=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof13(obj);}
  function ownKeys36(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread36(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys36(Object(source),true).forEach(function(key2){_defineProperty49(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys36(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty49(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function transformHelpersToHogan(){var helpers3=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var compileOptions=arguments.length>1?arguments[1]:void 0;var data=arguments.length>2?arguments[2]:void 0;return Object.keys(helpers3).reduce(function(acc,helperKey){return _objectSpread36({},acc,_defineProperty49({},helperKey,function(){var _this=this;return function(text){var render=function render2(value){return hogan.default.compile(value,compileOptions).render(_this);};return helpers3[helperKey].call(data,text,render);};}));},{});}
  function renderTemplate2(_ref){var templates=_ref.templates,templateKey=_ref.templateKey,compileOptions=_ref.compileOptions,helpers3=_ref.helpers,data=_ref.data,bindEvent=_ref.bindEvent;var template=templates[templateKey];var templateType=_typeof13(template);var isTemplateString=templateType==="string";var isTemplateFunction=templateType==="function";if(!isTemplateString&&!isTemplateFunction){throw new Error("Template must be 'string' or 'function', was '".concat(templateType,"' (key: ").concat(templateKey,")"));}
  if(isTemplateFunction){return template(data,bindEvent);}
  var transformedHelpers=transformHelpersToHogan(helpers3,compileOptions,data);return hogan.default.compile(template,compileOptions).render(_objectSpread36({},data,{helpers:transformedHelpers})).replace(/[ \n\r\t\f\xA0]+/g,function(spaces){return spaces.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ");}).trim();}
  var renderTemplate_default=renderTemplate2;function find(items,predicate){var value;for(var i3=0;i3<items.length;i3++){value=items[i3];if(predicate(value,i3,items)){return value;}}
  return void 0;}
  var find_default=find;function getObjectType2(object){return Object.prototype.toString.call(object).slice(8,-1);}
  var getObjectType_default=getObjectType2;function checkRendering(rendering,usage){if(rendering===void 0||typeof rendering!=="function"){throw new Error("The render function is not valid (received type ".concat(getObjectType_default(rendering),").\n\n").concat(usage));}}
  var checkRendering_default=checkRendering;function noop3(){}
  var noop_default=noop3;var deprecate=function deprecate2(fn){return fn;};var warn=noop_default;var _warning=noop_default;if(true){warn=function warn2(message){console.warn("[InstantSearch.js]: ".concat(message.trim()));};deprecate=function deprecate2(fn,message){var hasAlreadyPrinted=false;return function(){if(!hasAlreadyPrinted){hasAlreadyPrinted=true;warn(message);}
  return fn.apply(void 0,arguments);};};_warning=function warning(condition,message){if(condition){return;}
  var hasAlreadyPrinted=_warning.cache[message];if(!hasAlreadyPrinted){_warning.cache[message]=true;warn(message);}};_warning.cache={};}
  var keys=Object.keys;function _toConsumableArray9(arr){return _arrayWithoutHoles9(arr)||_iterableToArray9(arr)||_nonIterableSpread9();}
  function _nonIterableSpread9(){throw new TypeError("Invalid attempt to spread non-iterable instance");}
  function _iterableToArray9(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")
  return Array.from(iter);}
  function _arrayWithoutHoles9(arr){if(Array.isArray(arr)){for(var i3=0,arr2=new Array(arr.length);i3<arr.length;i3++){arr2[i3]=arr[i3];}
  return arr2;}}
  function _slicedToArray8(arr,i3){return _arrayWithHoles8(arr)||_iterableToArrayLimit8(arr,i3)||_nonIterableRest8();}
  function _nonIterableRest8(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}
  function _iterableToArrayLimit8(arr,i3){if(!(Symbol.iterator in Object(arr)||Object.prototype.toString.call(arr)==="[object Arguments]")){return;}
  var _arr=[];var _n=true;var _d=false;var _e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i3&&_arr.length===i3)
  break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)
  _i["return"]();}finally{if(_d)
  throw _e;}}
  return _arr;}
  function _arrayWithHoles8(arr){if(Array.isArray(arr))
  return arr;}
  function getWidgetNames(connectorName){switch(connectorName){case "range":return[];case "menu":return["menu","menuSelect"];default:return[connectorName];}}
  var stateToWidgetsMap={query:{connectors:["connectSearchBox"],widgets:["ais.searchBox","ais.autocomplete","ais.voiceSearch"]},refinementList:{connectors:["connectRefinementList"],widgets:["ais.refinementList"]},menu:{connectors:["connectMenu"],widgets:["ais.menu"]},hierarchicalMenu:{connectors:["connectHierarchicalMenu"],widgets:["ais.hierarchicalMenu"]},numericMenu:{connectors:["connectNumericMenu"],widgets:["ais.numericMenu"]},ratingMenu:{connectors:["connectRatingMenu"],widgets:["ais.ratingMenu"]},range:{connectors:["connectRange"],widgets:["ais.rangeInput","ais.rangeSlider","ais.range"]},toggle:{connectors:["connectToggleRefinement"],widgets:["ais.toggleRefinement"]},geoSearch:{connectors:["connectGeoSearch"],widgets:["ais.geoSearch"]},sortBy:{connectors:["connectSortBy"],widgets:["ais.sortBy"]},page:{connectors:["connectPagination"],widgets:["ais.pagination","ais.infiniteHits"]},hitsPerPage:{connectors:["connectHitsPerPage"],widgets:["ais.hitsPerPage"]},configure:{connectors:["connectConfigure"],widgets:["ais.configure"]},places:{connectors:[],widgets:["ais.places"]}};function checkIndexUiState(_ref){var index4=_ref.index,indexUiState=_ref.indexUiState;var mountedWidgets=index4.getWidgets().map(function(widget){return widget.$$type;}).filter(Boolean);var missingWidgets=keys(indexUiState).reduce(function(acc,parameter){var widgetUiState=stateToWidgetsMap[parameter];if(!widgetUiState){return acc;}
  var requiredWidgets=widgetUiState.widgets;if(requiredWidgets&&!requiredWidgets.some(function(requiredWidget){return mountedWidgets.includes(requiredWidget);})){acc.push([parameter,{connectors:widgetUiState.connectors,widgets:widgetUiState.widgets.map(function(widgetIdentifier){return widgetIdentifier.split("ais.")[1];})}]);}
  return acc;},[]);_warning(missingWidgets.length===0,'The UI state for the index "'.concat(index4.getIndexId(),'" is not consistent with the widgets mounted.\n\nThis can happen when the UI state is specified via `initialUiState`, `routing` or `setUiState` but that the widgets responsible for this state were not added. This results in those query parameters not being sent to the API.\n\nTo fully reflect the state, some widgets need to be added to the index "').concat(index4.getIndexId(),'":\n\n').concat(missingWidgets.map(function(_ref23){var _ref42;var _ref33=_slicedToArray8(_ref23,2),stateParameter=_ref33[0],widgets2=_ref33[1].widgets;return "- `".concat(stateParameter,"` needs one of these widgets: ").concat((_ref42=[]).concat.apply(_ref42,_toConsumableArray9(widgets2.map(function(name){return getWidgetNames(name);}))).map(function(name){return '"'.concat(name,'"');}).join(", "));}).join("\n"),'\n\nIf you do not wish to display widgets but still want to support their search parameters, you can mount "virtual widgets" that don\'t render anything:\n\n```\n').concat(missingWidgets.filter(function(_ref5){var _ref6=_slicedToArray8(_ref5,2),_stateParameter=_ref6[0],connectors=_ref6[1].connectors;return connectors.length>0;}).map(function(_ref7){var _ref8=_slicedToArray8(_ref7,2),_stateParameter=_ref8[0],_ref8$=_ref8[1],connectors=_ref8$.connectors,widgets2=_ref8$.widgets;var capitalizedWidget=capitalize_default(widgets2[0]);var connectorName=connectors[0];return "const virtual".concat(capitalizedWidget," = ").concat(connectorName,"(() => null);");}).join("\n"),"\n\nsearch.addWidgets([\n  ").concat(missingWidgets.filter(function(_ref9){var _ref10=_slicedToArray8(_ref9,2),_stateParameter=_ref10[0],connectors=_ref10[1].connectors;return connectors.length>0;}).map(function(_ref11){var _ref12=_slicedToArray8(_ref11,2),_stateParameter=_ref12[0],widgets2=_ref12[1].widgets;var capitalizedWidget=capitalize_default(widgets2[0]);return "virtual".concat(capitalizedWidget,"({ /* ... */ })");}).join(",\n  "),"\n]);\n```\n\nIf you're using custom widgets that do set these query parameters, we recommend using connectors instead.\n\nSee https://www.algolia.com/doc/guides/building-search-ui/widgets/customize-an-existing-widget/js/#customize-the-complete-ui-of-the-widgets"));}
  function getPropertyByPath(object,path){var parts=Array.isArray(path)?path:path.split(".");return parts.reduce(function(current,key2){return current&&current[key2];},object);}
  var getPropertyByPath_default=getPropertyByPath;function _typeof12(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof12=function _typeof15(obj2){return typeof obj2;};}else{_typeof12=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof12(obj);}
  function getTag(value){if(value===null){return value===void 0?"[object Undefined]":"[object Null]";}
  return Object.prototype.toString.call(value);}
  function isObjectLike(value){return _typeof12(value)==="object"&&value!==null;}
  function isPlainObject3(value){if(!isObjectLike(value)||getTag(value)!=="[object Object]"){return false;}
  if(Object.getPrototypeOf(value)===null){return true;}
  var proto=value;while(Object.getPrototypeOf(proto)!==null){proto=Object.getPrototypeOf(proto);}
  return Object.getPrototypeOf(value)===proto;}
  var isPlainObject_default=isPlainObject3;function isPrimitive(obj){return obj!==Object(obj);}
  function isEqual2(first,second){if(first===second){return true;}
  if(isPrimitive(first)||isPrimitive(second)||typeof first==="function"||typeof second==="function"){return first===second;}
  if(Object.keys(first).length!==Object.keys(second).length){return false;}
  for(var _i=0,_Object$keys=Object.keys(first);_i<_Object$keys.length;_i++){var key2=_Object$keys[_i];if(!(key2 in second)){return false;}
  if(!isEqual2(first[key2],second[key2])){return false;}}
  return true;}
  var isEqual_default=isEqual2;var htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var regexUnescapedHtml=/[&<>"']/g;var regexHasUnescapedHtml=RegExp(regexUnescapedHtml.source);function escape3(value){return value&&regexHasUnescapedHtml.test(value)?value.replace(regexUnescapedHtml,function(character){return htmlEscapes[character];}):value;}
  var escape_default=escape3;var htmlEscapes2={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};var regexEscapedHtml=/&(amp|quot|lt|gt|#39);/g;var regexHasEscapedHtml=RegExp(regexEscapedHtml.source);function unescape3(value){return value&&regexHasEscapedHtml.test(value)?value.replace(regexEscapedHtml,function(character){return htmlEscapes2[character];}):value;}
  function _extends15(){_extends15=Object.assign||function(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3];for(var key2 in source){if(Object.prototype.hasOwnProperty.call(source,key2)){target[key2]=source[key2];}}}
  return target;};return _extends15.apply(this,arguments);}
  function ownKeys31(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread31(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys31(Object(source),true).forEach(function(key2){_defineProperty44(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys31(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty44(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var TAG_PLACEHOLDER={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"};var TAG_REPLACEMENT={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function replaceTagsAndEscape(value){return escape_default(value).replace(new RegExp(TAG_PLACEHOLDER.highlightPreTag,"g"),TAG_REPLACEMENT.highlightPreTag).replace(new RegExp(TAG_PLACEHOLDER.highlightPostTag,"g"),TAG_REPLACEMENT.highlightPostTag);}
  function recursiveEscape(input){if(isPlainObject_default(input)&&typeof input.value!=="string"){return Object.keys(input).reduce(function(acc,key2){return _objectSpread31({},acc,_defineProperty44({},key2,recursiveEscape(input[key2])));},{});}
  if(Array.isArray(input)){return input.map(recursiveEscape);}
  return _objectSpread31({},input,{value:replaceTagsAndEscape(input.value)});}
  function escapeHits(hits3){if(hits3.__escaped===void 0){hits3=hits3.map(function(_ref){var hit=_extends15({},_ref);if(hit._highlightResult){hit._highlightResult=recursiveEscape(hit._highlightResult);}
  if(hit._snippetResult){hit._snippetResult=recursiveEscape(hit._snippetResult);}
  return hit;});hits3.__escaped=true;}
  return hits3;}
  function concatHighlightedParts(parts){var highlightPreTag=TAG_REPLACEMENT.highlightPreTag,highlightPostTag=TAG_REPLACEMENT.highlightPostTag;return parts.map(function(part){return part.isHighlighted?highlightPreTag+part.value+highlightPostTag:part.value;}).join("");}
  function getHighlightedParts(highlightedValue){var highlightPostTag=TAG_REPLACEMENT.highlightPostTag,highlightPreTag=TAG_REPLACEMENT.highlightPreTag;var splitByPreTag=highlightedValue.split(highlightPreTag);var firstValue=splitByPreTag.shift();var elements=!firstValue?[]:[{value:firstValue,isHighlighted:false}];splitByPreTag.forEach(function(split){var splitByPostTag=split.split(highlightPostTag);elements.push({value:splitByPostTag[0],isHighlighted:true});if(splitByPostTag[1]!==""){elements.push({value:splitByPostTag[1],isHighlighted:false});}});return elements;}
  var hasAlphanumeric=new RegExp(/\w/i);function getHighlightFromSiblings(parts,i3){var _parts,_parts2;var current=parts[i3];var isNextHighlighted=((_parts=parts[i3+1])===null||_parts===void 0?void 0:_parts.isHighlighted)||true;var isPreviousHighlighted=((_parts2=parts[i3-1])===null||_parts2===void 0?void 0:_parts2.isHighlighted)||true;if(!hasAlphanumeric.test(unescape3(current.value))&&isPreviousHighlighted===isNextHighlighted){return isPreviousHighlighted;}
  return current.isHighlighted;}
  function ownKeys37(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread37(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys37(Object(source),true).forEach(function(key2){_defineProperty50(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys37(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty50(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function reverseHighlightedParts(parts){if(!parts.some(function(part){return part.isHighlighted;})){return parts.map(function(part){return _objectSpread37({},part,{isHighlighted:false});});}
  return parts.map(function(part,i3){return _objectSpread37({},part,{isHighlighted:!getHighlightFromSiblings(parts,i3)});});}
  function findIndex(array,comparator){if(!Array.isArray(array)){return-1;}
  for(var i3=0;i3<array.length;i3++){if(comparator(array[i3])){return i3;}}
  return-1;}
  var findIndex_default=findIndex;function ownKeys34(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread34(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys34(Object(source),true).forEach(function(key2){_defineProperty47(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys34(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty47(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function _objectWithoutProperties8(source,excluded){if(source==null)
  return{};var target=_objectWithoutPropertiesLoose8(source,excluded);var key2,i3;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i3=0;i3<sourceSymbolKeys.length;i3++){key2=sourceSymbolKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;if(!Object.prototype.propertyIsEnumerable.call(source,key2))
  continue;target[key2]=source[key2];}}
  return target;}
  function _objectWithoutPropertiesLoose8(source,excluded){if(source==null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2,i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  var mergeWithRest=function mergeWithRest2(left,right){var facets=right.facets,disjunctiveFacets=right.disjunctiveFacets,facetsRefinements=right.facetsRefinements,facetsExcludes=right.facetsExcludes,disjunctiveFacetsRefinements=right.disjunctiveFacetsRefinements,numericRefinements=right.numericRefinements,tagRefinements=right.tagRefinements,hierarchicalFacets=right.hierarchicalFacets,hierarchicalFacetsRefinements=right.hierarchicalFacetsRefinements,ruleContexts=right.ruleContexts,rest=_objectWithoutProperties8(right,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return left.setQueryParameters(rest);};var mergeFacets=function mergeFacets2(left,right){return right.facets.reduce(function(_3,name){return _3.addFacet(name);},left);};var mergeDisjunctiveFacets=function mergeDisjunctiveFacets2(left,right){return right.disjunctiveFacets.reduce(function(_3,name){return _3.addDisjunctiveFacet(name);},left);};var mergeHierarchicalFacets=function mergeHierarchicalFacets2(left,right){return left.setQueryParameters({hierarchicalFacets:right.hierarchicalFacets.reduce(function(facets,facet){var index4=findIndex_default(facets,function(_3){return _3.name===facet.name;});if(index4===-1){return facets.concat(facet);}
  var nextFacets=facets.slice();nextFacets.splice(index4,1,facet);return nextFacets;},left.hierarchicalFacets)});};var mergeTagRefinements=function mergeTagRefinements2(left,right){return right.tagRefinements.reduce(function(_3,value){return _3.addTagRefinement(value);},left);};var mergeFacetRefinements=function mergeFacetRefinements2(left,right){return left.setQueryParameters({facetsRefinements:_objectSpread34({},left.facetsRefinements,{},right.facetsRefinements)});};var mergeFacetsExcludes=function mergeFacetsExcludes2(left,right){return left.setQueryParameters({facetsExcludes:_objectSpread34({},left.facetsExcludes,{},right.facetsExcludes)});};var mergeDisjunctiveFacetsRefinements=function mergeDisjunctiveFacetsRefinements2(left,right){return left.setQueryParameters({disjunctiveFacetsRefinements:_objectSpread34({},left.disjunctiveFacetsRefinements,{},right.disjunctiveFacetsRefinements)});};var mergeNumericRefinements=function mergeNumericRefinements2(left,right){return left.setQueryParameters({numericRefinements:_objectSpread34({},left.numericRefinements,{},right.numericRefinements)});};var mergeHierarchicalFacetsRefinements=function mergeHierarchicalFacetsRefinements2(left,right){return left.setQueryParameters({hierarchicalFacetsRefinements:_objectSpread34({},left.hierarchicalFacetsRefinements,{},right.hierarchicalFacetsRefinements)});};var mergeRuleContexts=function mergeRuleContexts2(left,right){var ruleContexts=uniq_default([].concat(left.ruleContexts).concat(right.ruleContexts).filter(Boolean));if(ruleContexts.length>0){return left.setQueryParameters({ruleContexts});}
  return left;};var merge=function merge2(){for(var _len=arguments.length,parameters=new Array(_len),_key=0;_key<_len;_key++){parameters[_key]=arguments[_key];}
  return parameters.reduce(function(left,right){var hierarchicalFacetsRefinementsMerged=mergeHierarchicalFacetsRefinements(left,right);var hierarchicalFacetsMerged=mergeHierarchicalFacets(hierarchicalFacetsRefinementsMerged,right);var tagRefinementsMerged=mergeTagRefinements(hierarchicalFacetsMerged,right);var numericRefinementsMerged=mergeNumericRefinements(tagRefinementsMerged,right);var disjunctiveFacetsRefinementsMerged=mergeDisjunctiveFacetsRefinements(numericRefinementsMerged,right);var facetsExcludesMerged=mergeFacetsExcludes(disjunctiveFacetsRefinementsMerged,right);var facetRefinementsMerged=mergeFacetRefinements(facetsExcludesMerged,right);var disjunctiveFacetsMerged=mergeDisjunctiveFacets(facetRefinementsMerged,right);var ruleContextsMerged=mergeRuleContexts(disjunctiveFacetsMerged,right);var facetsMerged=mergeFacets(ruleContextsMerged,right);return mergeWithRest(facetsMerged,right);});};var mergeSearchParameters_default=merge;var resolveSearchParameters2=function resolveSearchParameters3(current){var parent=current.getParent();var states=[current.getHelper().state];while(parent!==null){states=[parent.getHelper().state].concat(states);parent=parent.getParent();}
  return states;};var resolveSearchParameters_default=resolveSearchParameters2;var createDocumentationLink=function createDocumentationLink2(_ref){var name=_ref.name,_ref$connector=_ref.connector,connector=_ref$connector===void 0?false:_ref$connector;return["https://www.algolia.com/doc/api-reference/widgets/",name,"/js/",connector?"#connector":""].join("");};var createDocumentationMessageGenerator=function createDocumentationMessageGenerator2(){for(var _len=arguments.length,widgets2=new Array(_len),_key=0;_key<_len;_key++){widgets2[_key]=arguments[_key];}
  var links=widgets2.map(function(widget){return createDocumentationLink(widget);}).join(", ");return function(message){return[message,"See documentation: ".concat(links)].filter(Boolean).join("\n\n");};};function ownKeys32(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread32(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys32(Object(source),true).forEach(function(key2){_defineProperty45(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys32(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty45(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var addAbsolutePosition=function addAbsolutePosition2(hits3,page,hitsPerPage2){return hits3.map(function(hit,idx){return _objectSpread32({},hit,{__position:hitsPerPage2*page+idx+1});});};function ownKeys33(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread33(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys33(Object(source),true).forEach(function(key2){_defineProperty46(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys33(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty46(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var addQueryID=function addQueryID2(hits3,queryID){if(!queryID){return hits3;}
  return hits3.map(function(hit){return _objectSpread33({},hit,{__queryID:queryID});});};function _typeof11(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof11=function _typeof15(obj2){return typeof obj2;};}else{_typeof11=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof11(obj);}
  var buildPayload=function buildPayload2(_ref){var index4=_ref.index,widgetType=_ref.widgetType,methodName=_ref.methodName,args=_ref.args;if(args.length===1&&_typeof11(args[0])==="object"){return args[0];}
  var eventType=args[0];var hits3=args[1];var eventName=args[2];if(!hits3){if(true){throw new Error("You need to pass hit or hits as the second argument like:\n  ".concat(methodName,"(eventType, hit);\n  "));}else{return null;}}
  if((eventType==="click"||eventType==="conversion")&&!eventName){if(true){throw new Error("You need to pass eventName as the third argument for 'click' or 'conversion' events like:\n  ".concat(methodName,"('click', hit, 'Product Purchased');\n\n  To learn more about event naming: https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/in-depth/clicks-conversions-best-practices/\n  "));}else{return null;}}
  var hitsArray=Array.isArray(hits3)?hits3:[hits3];if(hitsArray.length===0){return null;}
  var queryID=hitsArray[0].__queryID;var objectIDs=hitsArray.map(function(hit){return hit.objectID;});var positions=hitsArray.map(function(hit){return hit.__position;});if(eventType==="view"){return{insightsMethod:"viewedObjectIDs",widgetType,eventType,payload:{eventName:eventName||"Hits Viewed",index:index4,objectIDs}};}else if(eventType==="click"){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType,eventType,payload:{eventName,index:index4,queryID,objectIDs,positions}};}else if(eventType==="conversion"){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType,eventType,payload:{eventName,index:index4,queryID,objectIDs}};}else if(true){throw new Error('eventType("'.concat(eventType,'") is not supported.\n    If you want to send a custom payload, you can pass one object: ').concat(methodName,"(customPayload);\n    "));}else{return null;}};function createSendEventForHits(_ref23){var instantSearchInstance=_ref23.instantSearchInstance,index4=_ref23.index,widgetType=_ref23.widgetType;var sendEventForHits=function sendEventForHits2(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}
  var payload=buildPayload({widgetType,index:index4,methodName:"sendEvent",args});if(payload){instantSearchInstance.sendEventToInsights(payload);}};return sendEventForHits;}
  function createBindEventForHits(_ref33){var index4=_ref33.index,widgetType=_ref33.widgetType;var bindEventForHits=function bindEventForHits2(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}
  var payload=buildPayload({widgetType,index:index4,methodName:"bindEvent",args});return payload?"data-insights-event=".concat(btoa(JSON.stringify(payload))):"";};return bindEventForHits;}
  const algoliasearch_helper4=__toModule(require_algoliasearch_helper());function ownKeys51(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread51(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys51(Object(source),true).forEach(function(key2){_defineProperty65(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys51(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty65(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function _toConsumableArray12(arr){return _arrayWithoutHoles12(arr)||_iterableToArray12(arr)||_nonIterableSpread12();}
  function _nonIterableSpread12(){throw new TypeError("Invalid attempt to spread non-iterable instance");}
  function _iterableToArray12(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")
  return Array.from(iter);}
  function _arrayWithoutHoles12(arr){if(Array.isArray(arr)){for(var i3=0,arr2=new Array(arr.length);i3<arr.length;i3++){arr2[i3]=arr[i3];}
  return arr2;}}
  function _objectWithoutProperties10(source,excluded){if(source==null)
  return{};var target=_objectWithoutPropertiesLoose10(source,excluded);var key2,i3;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i3=0;i3<sourceSymbolKeys.length;i3++){key2=sourceSymbolKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;if(!Object.prototype.propertyIsEnumerable.call(source,key2))
  continue;target[key2]=source[key2];}}
  return target;}
  function _objectWithoutPropertiesLoose10(source,excluded){if(source==null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2,i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  var withUsage33=createDocumentationMessageGenerator({name:"index-widget"});function isIndexWidget(widget){return widget.$$type==="ais.index";}
  function privateHelperSetState(helper,_ref){var state=_ref.state,isPageReset=_ref.isPageReset,_uiState=_ref._uiState;if(state!==helper.state){helper.state=state;helper.emit("change",{state:helper.state,results:helper.lastResults,isPageReset,_uiState});}}
  function getLocalWidgetsUiState(widgets2,widgetStateOptions){var initialUiState=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return widgets2.filter(function(widget){return!isIndexWidget(widget);}).reduce(function(uiState,widget){if(!widget.getWidgetUiState&&!widget.getWidgetState){return uiState;}
  if(widget.getWidgetUiState){return widget.getWidgetUiState(uiState,widgetStateOptions);}
  return widget.getWidgetState(uiState,widgetStateOptions);},initialUiState);}
  function getLocalWidgetsSearchParameters(widgets2,widgetSearchParametersOptions){var initialSearchParameters=widgetSearchParametersOptions.initialSearchParameters,rest=_objectWithoutProperties10(widgetSearchParametersOptions,["initialSearchParameters"]);return widgets2.filter(function(widget){return!isIndexWidget(widget);}).reduce(function(state,widget){if(!widget.getWidgetSearchParameters){return state;}
  return widget.getWidgetSearchParameters(state,rest);},initialSearchParameters);}
  function resetPageFromWidgets(widgets2){var indexWidgets=widgets2.filter(isIndexWidget);if(indexWidgets.length===0){return;}
  indexWidgets.forEach(function(widget){var widgetHelper=widget.getHelper();privateHelperSetState(widgetHelper,{state:widgetHelper.state.resetPage(),isPageReset:true});resetPageFromWidgets(widget.getWidgets());});}
  function resolveScopedResultsFromWidgets(widgets2){var indexWidgets=widgets2.filter(isIndexWidget);return indexWidgets.reduce(function(scopedResults,current){return scopedResults.concat.apply(scopedResults,[{indexId:current.getIndexId(),results:current.getResults(),helper:current.getHelper()}].concat(_toConsumableArray12(resolveScopedResultsFromWidgets(current.getWidgets()))));},[]);}
  var index3=function index4(props){if(props===void 0||props.indexName===void 0){throw new Error(withUsage33("The `indexName` option is required."));}
  var indexName=props.indexName,_props$indexId=props.indexId,indexId=_props$indexId===void 0?indexName:_props$indexId;var localWidgets=[];var localUiState={};var localInstantSearchInstance=null;var localParent=null;var helper=null;var derivedHelper=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function getIndexName(){return indexName;},getIndexId:function getIndexId(){return indexId;},getHelper:function getHelper(){return helper;},getResults:function getResults(){return derivedHelper&&derivedHelper.lastResults;},getScopedResults:function getScopedResults(){var widgetParent=this.getParent();var widgetSiblings=widgetParent?widgetParent.getWidgets():[this];return resolveScopedResultsFromWidgets(widgetSiblings);},getParent:function getParent(){return localParent;},createURL:function createURL(nextState){return localInstantSearchInstance._createURL(_defineProperty65({},indexId,getLocalWidgetsUiState(localWidgets,{searchParameters:nextState,helper})));},getWidgets:function getWidgets(){return localWidgets;},addWidgets:function addWidgets(widgets2){var _this=this;if(!Array.isArray(widgets2)){throw new Error(withUsage33("The `addWidgets` method expects an array of widgets."));}
  if(widgets2.some(function(widget){return typeof widget.init!=="function"&&typeof widget.render!=="function";})){throw new Error(withUsage33("The widget definition expects a `render` and/or an `init` method."));}
  localWidgets=localWidgets.concat(widgets2);if(localInstantSearchInstance&&Boolean(widgets2.length)){privateHelperSetState(helper,{state:getLocalWidgetsSearchParameters(localWidgets,{uiState:localUiState,initialSearchParameters:helper.state}),_uiState:localUiState});widgets2.forEach(function(widget){if(widget.getRenderState){var renderState=widget.getRenderState(localInstantSearchInstance.renderState[_this.getIndexId()]||{},{uiState:localInstantSearchInstance._initialUiState,helper:_this.getHelper(),parent:_this,instantSearchInstance:localInstantSearchInstance,state:helper.state,renderState:localInstantSearchInstance.renderState,templatesConfig:localInstantSearchInstance.templatesConfig,createURL:_this.createURL,scopedResults:[],searchMetadata:{isSearchStalled:localInstantSearchInstance._isSearchStalled}});storeRenderState({renderState,instantSearchInstance:localInstantSearchInstance,parent:_this});}});widgets2.forEach(function(widget){if(widget.init){widget.init({helper,parent:_this,uiState:localInstantSearchInstance._initialUiState,instantSearchInstance:localInstantSearchInstance,state:helper.state,renderState:localInstantSearchInstance.renderState,templatesConfig:localInstantSearchInstance.templatesConfig,createURL:_this.createURL,scopedResults:[],searchMetadata:{isSearchStalled:localInstantSearchInstance._isSearchStalled}});}});localInstantSearchInstance.scheduleSearch();}
  return this;},removeWidgets:function removeWidgets(widgets2){if(!Array.isArray(widgets2)){throw new Error(withUsage33("The `removeWidgets` method expects an array of widgets."));}
  if(widgets2.some(function(widget){return typeof widget.dispose!=="function";})){throw new Error(withUsage33("The widget definition expects a `dispose` method."));}
  localWidgets=localWidgets.filter(function(widget){return widgets2.indexOf(widget)===-1;});if(localInstantSearchInstance&&Boolean(widgets2.length)){var nextState=widgets2.reduce(function(state,widget){var next=widget.dispose({helper,state});return next||state;},helper.state);localUiState=getLocalWidgetsUiState(localWidgets,{searchParameters:nextState,helper});helper.setState(getLocalWidgetsSearchParameters(localWidgets,{uiState:localUiState,initialSearchParameters:nextState}));if(localWidgets.length){localInstantSearchInstance.scheduleSearch();}}
  return this;},init:function init(_ref23){var _this2=this;var instantSearchInstance=_ref23.instantSearchInstance,parent=_ref23.parent,uiState=_ref23.uiState;if(helper!==null){return;}
  localInstantSearchInstance=instantSearchInstance;localParent=parent;localUiState=uiState[indexId]||{};var mainHelper=instantSearchInstance.mainHelper;var parameters=getLocalWidgetsSearchParameters(localWidgets,{uiState:localUiState,initialSearchParameters:new algoliasearch_helper4.default.SearchParameters({index:indexName})});helper=algoliasearch_helper4.default({},parameters.index,parameters);helper.search=function(){if(instantSearchInstance.onStateChange){instantSearchInstance.onStateChange({uiState:instantSearchInstance.mainIndex.getWidgetUiState({}),setUiState:instantSearchInstance.setUiState.bind(instantSearchInstance)});return mainHelper;}
  return mainHelper.search();};helper.searchWithoutTriggeringOnStateChange=function(){return mainHelper.search();};helper.searchForFacetValues=function(facetName,facetValue,maxFacetHits,userState){var state=helper.state.setQueryParameters(userState);return mainHelper.searchForFacetValues(facetName,facetValue,maxFacetHits,state);};derivedHelper=mainHelper.derive(function(){return mergeSearchParameters_default.apply(void 0,_toConsumableArray12(resolveSearchParameters_default(_this2)));});helper.on("change",function(_ref33){var isPageReset=_ref33.isPageReset;if(isPageReset){resetPageFromWidgets(localWidgets);}});derivedHelper.on("search",function(){instantSearchInstance.scheduleStalledRender();if(true){checkIndexUiState({index:_this2,indexUiState:localUiState});}});derivedHelper.on("result",function(_ref42){var results=_ref42.results;instantSearchInstance.scheduleRender();helper.lastResults=results;});localWidgets.forEach(function(widget){if(widget.getRenderState){var renderState=widget.getRenderState(instantSearchInstance.renderState[_this2.getIndexId()]||{},{uiState,helper,parent:_this2,instantSearchInstance,state:helper.state,renderState:instantSearchInstance.renderState,templatesConfig:instantSearchInstance.templatesConfig,createURL:_this2.createURL,scopedResults:[],searchMetadata:{isSearchStalled:instantSearchInstance._isSearchStalled}});storeRenderState({renderState,instantSearchInstance,parent:_this2});}});localWidgets.forEach(function(widget){_warning(!widget.getWidgetState||Boolean(widget.getWidgetUiState),"The `getWidgetState` method is renamed `getWidgetUiState` and will no longer exist under that name in InstantSearch.js 5.x. Please use `getWidgetUiState` instead.");if(widget.init){widget.init({uiState,helper,parent:_this2,instantSearchInstance,state:helper.state,renderState:instantSearchInstance.renderState,templatesConfig:instantSearchInstance.templatesConfig,createURL:_this2.createURL,scopedResults:[],searchMetadata:{isSearchStalled:instantSearchInstance._isSearchStalled}});}});helper.on("change",function(event){var state=event.state;var _uiState=event._uiState;localUiState=getLocalWidgetsUiState(localWidgets,{searchParameters:state,helper},_uiState||{});if(!instantSearchInstance.onStateChange){instantSearchInstance.onInternalStateChange();}});},render:function render(_ref5){var _this3=this;var instantSearchInstance=_ref5.instantSearchInstance;if(!this.getResults()){return;}
  localWidgets.forEach(function(widget){if(widget.getRenderState){var renderState=widget.getRenderState(instantSearchInstance.renderState[_this3.getIndexId()]||{},{helper:_this3.getHelper(),parent:_this3,instantSearchInstance,results:_this3.getResults(),scopedResults:_this3.getScopedResults(),state:_this3.getResults()._state,renderState:instantSearchInstance.renderState,templatesConfig:instantSearchInstance.templatesConfig,createURL:_this3.createURL,searchMetadata:{isSearchStalled:instantSearchInstance._isSearchStalled}});storeRenderState({renderState,instantSearchInstance,parent:_this3});}});localWidgets.forEach(function(widget){if(widget.render){widget.render({helper,parent:_this3,instantSearchInstance,results:_this3.getResults(),scopedResults:_this3.getScopedResults(),state:_this3.getResults()._state,renderState:instantSearchInstance.renderState,templatesConfig:instantSearchInstance.templatesConfig,createURL:_this3.createURL,searchMetadata:{isSearchStalled:instantSearchInstance._isSearchStalled}});}});},dispose:function dispose(){localWidgets.forEach(function(widget){if(widget.dispose){widget.dispose({helper,state:helper.state});}});localInstantSearchInstance=null;localParent=null;helper.removeAllListeners();helper=null;derivedHelper.detach();derivedHelper=null;},getWidgetUiState:function getWidgetUiState(uiState){return localWidgets.filter(isIndexWidget).reduce(function(previousUiState,innerIndex){return innerIndex.getWidgetUiState(previousUiState);},_objectSpread51({},uiState,_defineProperty65({},this.getIndexId(),localUiState)));},getWidgetState:function getWidgetState(uiState){_warning(false,"The `getWidgetState` method is renamed `getWidgetUiState` and will no longer exist under that name in InstantSearch.js 5.x. Please use `getWidgetUiState` instead.");return this.getWidgetUiState(uiState);},getWidgetSearchParameters:function getWidgetSearchParameters(searchParameters,_ref6){var uiState=_ref6.uiState;return getLocalWidgetsSearchParameters(localWidgets,{uiState,initialSearchParameters:searchParameters});},refreshUiState:function refreshUiState(){localUiState=getLocalWidgetsUiState(localWidgets,{searchParameters:this.getHelper().state,helper:this.getHelper()});}};};var index_default=index3;function storeRenderState(_ref7){var renderState=_ref7.renderState,instantSearchInstance=_ref7.instantSearchInstance,parent=_ref7.parent;var parentIndexName=parent?parent.getIndexId():instantSearchInstance.mainIndex.getIndexId();instantSearchInstance.renderState=_objectSpread51({},instantSearchInstance.renderState,_defineProperty65({},parentIndexName,_objectSpread51({},instantSearchInstance.renderState[parentIndexName],{},renderState)));}
  var version_default="4.13.2";var NAMESPACE="ais";var component=function component2(componentName){return function(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},descendantName=_ref.descendantName,modifierName=_ref.modifierName;var descendent=descendantName?"-".concat(descendantName):"";var modifier=modifierName?"--".concat(modifierName):"";return "".concat(NAMESPACE,"-").concat(componentName).concat(descendent).concat(modifier);};};var suit2=component("Highlight");function highlight(_ref){var attribute=_ref.attribute,_ref$highlightedTagNa=_ref.highlightedTagName,highlightedTagName=_ref$highlightedTagNa===void 0?"mark":_ref$highlightedTagNa,hit=_ref.hit,_ref$cssClasses=_ref.cssClasses,cssClasses=_ref$cssClasses===void 0?{}:_ref$cssClasses;var _ref23=getPropertyByPath_default(hit._highlightResult,attribute)||{},_ref2$value=_ref23.value,attributeValue=_ref2$value===void 0?"":_ref2$value;var className=suit2({descendantName:"highlighted"})+(cssClasses.highlighted?" ".concat(cssClasses.highlighted):"");return attributeValue.replace(new RegExp(TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(highlightedTagName,' class="').concat(className,'">')).replace(new RegExp(TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(highlightedTagName,">"));}
  var suit4=component("ReverseHighlight");function reverseHighlight2(_ref){var attribute=_ref.attribute,_ref$highlightedTagNa=_ref.highlightedTagName,highlightedTagName=_ref$highlightedTagNa===void 0?"mark":_ref$highlightedTagNa,hit=_ref.hit,_ref$cssClasses=_ref.cssClasses,cssClasses=_ref$cssClasses===void 0?{}:_ref$cssClasses;var _ref23=getPropertyByPath_default(hit._highlightResult,attribute)||{},_ref2$value=_ref23.value,attributeValue=_ref2$value===void 0?"":_ref2$value;var className=suit4({descendantName:"highlighted"})+(cssClasses.highlighted?" ".concat(cssClasses.highlighted):"");var reverseHighlightedValue=concatHighlightedParts(reverseHighlightedParts(getHighlightedParts(attributeValue)));return reverseHighlightedValue.replace(new RegExp(TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(highlightedTagName,' class="').concat(className,'">')).replace(new RegExp(TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(highlightedTagName,">"));}
  var suit8=component("Snippet");function snippet2(_ref){var attribute=_ref.attribute,_ref$highlightedTagNa=_ref.highlightedTagName,highlightedTagName=_ref$highlightedTagNa===void 0?"mark":_ref$highlightedTagNa,hit=_ref.hit,_ref$cssClasses=_ref.cssClasses,cssClasses=_ref$cssClasses===void 0?{}:_ref$cssClasses;var _ref23=getPropertyByPath_default(hit._snippetResult,attribute)||{},_ref2$value=_ref23.value,attributeValue=_ref2$value===void 0?"":_ref2$value;var className=suit8({descendantName:"highlighted"})+(cssClasses.highlighted?" ".concat(cssClasses.highlighted):"");return attributeValue.replace(new RegExp(TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(highlightedTagName,' class="').concat(className,'">')).replace(new RegExp(TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(highlightedTagName,">"));}
  var suit6=component("ReverseSnippet");function reverseSnippet2(_ref){var attribute=_ref.attribute,_ref$highlightedTagNa=_ref.highlightedTagName,highlightedTagName=_ref$highlightedTagNa===void 0?"mark":_ref$highlightedTagNa,hit=_ref.hit,_ref$cssClasses=_ref.cssClasses,cssClasses=_ref$cssClasses===void 0?{}:_ref$cssClasses;var _ref23=getPropertyByPath_default(hit._snippetResult,attribute)||{},_ref2$value=_ref23.value,attributeValue=_ref2$value===void 0?"":_ref2$value;var className=suit6({descendantName:"highlighted"})+(cssClasses.highlighted?" ".concat(cssClasses.highlighted):"");var reverseHighlightedValue=concatHighlightedParts(reverseHighlightedParts(getHighlightedParts(attributeValue)));return reverseHighlightedValue.replace(new RegExp(TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(highlightedTagName,' class="').concat(className,'">')).replace(new RegExp(TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(highlightedTagName,">"));}
  function _typeof8(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof8=function _typeof15(obj2){return typeof obj2;};}else{_typeof8=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof8(obj);}
  function writeDataAttributes(_ref){var method=_ref.method,payload=_ref.payload;if(_typeof8(payload)!=="object"){throw new Error("The insights helper expects the payload to be an object.");}
  var serializedPayload;try{serializedPayload=btoa(JSON.stringify(payload));}catch(error){throw new Error("Could not JSON serialize the payload object.");}
  return 'data-insights-method="'.concat(method,'" data-insights-payload="').concat(serializedPayload,'"');}
  function insights3(method,payload){_warning(false,"`insights` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/");return writeDataAttributes({method,payload});}
  var ANONYMOUS_TOKEN_COOKIE_KEY="_ALGOLIA";function getCookie(name){var prefix="".concat(name,"=");var cookies=document.cookie.split(";");for(var i3=0;i3<cookies.length;i3++){var cookie=cookies[i3];while(cookie.charAt(0)===" "){cookie=cookie.substring(1);}
  if(cookie.indexOf(prefix)===0){return cookie.substring(prefix.length,cookie.length);}}
  return void 0;}
  function getInsightsAnonymousUserTokenInternal(){return getCookie(ANONYMOUS_TOKEN_COOKIE_KEY);}
  function getInsightsAnonymousUserToken(){_warning(false,"`getInsightsAnonymousUserToken` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/");return getInsightsAnonymousUserTokenInternal();}
  function ownKeys28(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread28(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys28(Object(source),true).forEach(function(key2){_defineProperty40(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys28(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty40(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function hoganHelpers(_ref){var numberLocale=_ref.numberLocale;return{formatNumber:function formatNumber(value,render){return Number(render(value)).toLocaleString(numberLocale);},highlight:function highlight3(options,render){try{var highlightOptions=JSON.parse(options);return render(highlight(_objectSpread28({},highlightOptions,{hit:this})));}catch(error){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }');}},reverseHighlight:function reverseHighlight3(options,render){try{var reverseHighlightOptions=JSON.parse(options);return render(reverseHighlight2(_objectSpread28({},reverseHighlightOptions,{hit:this})));}catch(error){throw new Error('\n  The reverseHighlight helper expects a JSON object of the format:\n  { "attribute": "name", "highlightedTagName": "mark" }');}},snippet:function snippet3(options,render){try{var snippetOptions=JSON.parse(options);return render(snippet2(_objectSpread28({},snippetOptions,{hit:this})));}catch(error){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }');}},reverseSnippet:function reverseSnippet3(options,render){try{var reverseSnippetOptions=JSON.parse(options);return render(reverseSnippet2(_objectSpread28({},reverseSnippetOptions,{hit:this})));}catch(error){throw new Error('\n  The reverseSnippet helper expects a JSON object of the format:\n  { "attribute": "name", "highlightedTagName": "mark" }');}},insights:function insights7(options,render){try{var _JSON$parse=JSON.parse(options),method=_JSON$parse.method,payload=_JSON$parse.payload;return render(insights3(method,_objectSpread28({objectIDs:[this.objectID]},payload)));}catch(error){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }');}}};}
  function ownKeys30(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread30(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys30(Object(source),true).forEach(function(key2){_defineProperty43(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys30(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty43(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function _objectWithoutProperties7(source,excluded){if(source==null)
  return{};var target=_objectWithoutPropertiesLoose7(source,excluded);var key2,i3;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i3=0;i3<sourceSymbolKeys.length;i3++){key2=sourceSymbolKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;if(!Object.prototype.propertyIsEnumerable.call(source,key2))
  continue;target[key2]=source[key2];}}
  return target;}
  function _objectWithoutPropertiesLoose7(source,excluded){if(source==null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2,i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  function getIndexStateWithoutConfigure(uiState){var configure3=uiState.configure,trackedUiState=_objectWithoutProperties7(uiState,["configure"]);return trackedUiState;}
  function simpleStateMapping(){return{stateToRoute:function stateToRoute(uiState){return Object.keys(uiState).reduce(function(state,indexId){return _objectSpread30({},state,_defineProperty43({},indexId,getIndexStateWithoutConfigure(uiState[indexId])));},{});},routeToState:function routeToState(){var routeState=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(routeState).reduce(function(state,indexId){return _objectSpread30({},state,_defineProperty43({},indexId,getIndexStateWithoutConfigure(routeState[indexId])));},{});}};}
  const qs=__toModule(require_lib());function _classCallCheck10(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
  function _defineProperties10(target,props){for(var i3=0;i3<props.length;i3++){var descriptor=props[i3];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)
  descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
  function _createClass10(Constructor,protoProps,staticProps){if(protoProps)
  _defineProperties10(Constructor.prototype,protoProps);if(staticProps)
  _defineProperties10(Constructor,staticProps);return Constructor;}
  function _defineProperty42(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var defaultCreateURL2=function defaultCreateURL3(_ref){var qsModule=_ref.qsModule,routeState=_ref.routeState,location2=_ref.location;var protocol=location2.protocol,hostname=location2.hostname,_location$port=location2.port,port=_location$port===void 0?"":_location$port,pathname=location2.pathname,hash=location2.hash;var queryString=qsModule.stringify(routeState);var portWithPrefix=port===""?"":":".concat(port);if(!queryString){return "".concat(protocol,"//").concat(hostname).concat(portWithPrefix).concat(pathname).concat(hash);}
  return "".concat(protocol,"//").concat(hostname).concat(portWithPrefix).concat(pathname,"?").concat(queryString).concat(hash);};var defaultParseURL=function defaultParseURL2(_ref23){var qsModule=_ref23.qsModule,location2=_ref23.location;return qsModule.parse(location2.search.slice(1),{arrayLimit:99});};var setWindowTitle=function setWindowTitle2(title){if(title){window.document.title=title;}};var BrowserHistory=function(){function BrowserHistory2(){var _ref33=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},windowTitle=_ref33.windowTitle,_ref3$writeDelay=_ref33.writeDelay,writeDelay=_ref3$writeDelay===void 0?400:_ref3$writeDelay,_ref3$createURL=_ref33.createURL,createURL=_ref3$createURL===void 0?defaultCreateURL2:_ref3$createURL,_ref3$parseURL=_ref33.parseURL,parseURL=_ref3$parseURL===void 0?defaultParseURL:_ref3$parseURL;_classCallCheck10(this,BrowserHistory2);_defineProperty42(this,"windowTitle",void 0);_defineProperty42(this,"writeDelay",void 0);_defineProperty42(this,"_createURL",void 0);_defineProperty42(this,"parseURL",void 0);_defineProperty42(this,"writeTimer",void 0);this.windowTitle=windowTitle;this.writeTimer=void 0;this.writeDelay=writeDelay;this._createURL=createURL;this.parseURL=parseURL;var title=this.windowTitle&&this.windowTitle(this.read());setWindowTitle(title);}
  _createClass10(BrowserHistory2,[{key:"read",value:function read(){return this.parseURL({qsModule:qs.default,location:window.location});}},{key:"write",value:function write(routeState){var _this=this;var url=this.createURL(routeState);var title=this.windowTitle&&this.windowTitle(routeState);if(this.writeTimer){window.clearTimeout(this.writeTimer);}
  this.writeTimer=window.setTimeout(function(){setWindowTitle(title);window.history.pushState(routeState,title||"",url);_this.writeTimer=void 0;},this.writeDelay);}},{key:"onUpdate",value:function onUpdate(callback){var _this2=this;this._onPopState=function(event){if(_this2.writeTimer){window.clearTimeout(_this2.writeTimer);_this2.writeTimer=void 0;}
  var routeState=event.state;if(!routeState){callback(_this2.read());}else{callback(routeState);}};window.addEventListener("popstate",this._onPopState);}},{key:"createURL",value:function createURL(routeState){return this._createURL({qsModule:qs.default,routeState,location:window.location});}},{key:"dispose",value:function dispose(){if(this._onPopState){window.removeEventListener("popstate",this._onPopState);}
  if(this.writeTimer){window.clearTimeout(this.writeTimer);}
  this.write({});}}]);return BrowserHistory2;}();function history_default(props){return new BrowserHistory(props);}
  function ownKeys39(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread39(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys39(Object(source),true).forEach(function(key2){_defineProperty52(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys39(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty52(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var createRouterMiddleware2=function createRouterMiddleware3(){var props=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var _props$router=props.router,router=_props$router===void 0?history_default():_props$router,_props$stateMapping=props.stateMapping,stateMapping=_props$stateMapping===void 0?simpleStateMapping():_props$stateMapping;return function(_ref){var instantSearchInstance=_ref.instantSearchInstance;function topLevelCreateURL(nextState){var uiState=Object.keys(nextState).reduce(function(acc,indexId){return _objectSpread39({},acc,_defineProperty52({},indexId,nextState[indexId]));},instantSearchInstance.mainIndex.getWidgetUiState({}));var route=stateMapping.stateToRoute(uiState);return router.createURL(route);}
  instantSearchInstance._createURL=topLevelCreateURL;instantSearchInstance._initialUiState=_objectSpread39({},instantSearchInstance._initialUiState,{},stateMapping.routeToState(router.read()));var lastRouteState=void 0;return{onStateChange:function onStateChange(_ref23){var uiState=_ref23.uiState;var routeState=stateMapping.stateToRoute(uiState);if(lastRouteState===void 0||!isEqual_default(lastRouteState,routeState)){router.write(routeState);lastRouteState=routeState;}},subscribe:function subscribe(){router.onUpdate(function(route){instantSearchInstance.setUiState(stateMapping.routeToState(route));});},unsubscribe:function unsubscribe(){router.dispose();}};};};function extractPayload(widgets2,instantSearchInstance,payload){var parent=instantSearchInstance.mainIndex;var initOptions={instantSearchInstance,parent,scopedResults:[],state:parent.getHelper().state,helper:parent.getHelper(),createURL:parent.createURL,uiState:instantSearchInstance._initialUiState,renderState:instantSearchInstance.renderState,templatesConfig:instantSearchInstance.templatesConfig,searchMetadata:{isSearchStalled:instantSearchInstance._isSearchStalled}};widgets2.forEach(function(widget){var widgetParams={};if(widget.getWidgetRenderState){var renderState=widget.getWidgetRenderState(initOptions);if(renderState&&renderState.widgetParams){widgetParams=renderState.widgetParams;}}
  var params=Object.keys(widgetParams).filter(function(key2){return widgetParams[key2]!==void 0;});payload.widgets.push({type:widget.$$type,widgetType:widget.$$widgetType,params});if(widget.$$type==="ais.index"){extractPayload(widget.getWidgets(),instantSearchInstance,payload);}});}
  function isMetadataEnabled(){return typeof window!=="undefined"&&window.navigator.userAgent.indexOf("Algolia Crawler")>-1;}
  function createMetadataMiddleware2(){return function(_ref){var instantSearchInstance=_ref.instantSearchInstance;var payload={widgets:[]};var payloadContainer=document.createElement("meta");var refNode=document.querySelector("head");payloadContainer.name="instantsearch:widgets";return{onStateChange:function onStateChange(){},subscribe:function subscribe(){setTimeout(function(){extractPayload(instantSearchInstance.mainIndex.getWidgets(),instantSearchInstance,payload);payloadContainer.content=JSON.stringify(payload);refNode.appendChild(payloadContainer);},0);},unsubscribe:function unsubscribe(){var _payloadContainer$par;(_payloadContainer$par=payloadContainer.parentNode)===null||_payloadContainer$par===void 0?void 0:_payloadContainer$par.removeChild(payloadContainer);}};};}
  const algoliasearch_helper3=__toModule(require_algoliasearch_helper());const events=__toModule(require_events());function _typeof9(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof9=function _typeof15(obj2){return typeof obj2;};}else{_typeof9=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof9(obj);}
  function _classCallCheck9(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
  function _defineProperties9(target,props){for(var i3=0;i3<props.length;i3++){var descriptor=props[i3];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)
  descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
  function _createClass9(Constructor,protoProps,staticProps){if(protoProps)
  _defineProperties9(Constructor.prototype,protoProps);if(staticProps)
  _defineProperties9(Constructor,staticProps);return Constructor;}
  function _possibleConstructorReturn8(self2,call){if(call&&(_typeof9(call)==="object"||typeof call==="function")){return call;}
  return _assertThisInitialized8(self2);}
  function _getPrototypeOf8(o3){_getPrototypeOf8=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf10(o4){return o4.__proto__||Object.getPrototypeOf(o4);};return _getPrototypeOf8(o3);}
  function _assertThisInitialized8(self2){if(self2===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
  return self2;}
  function _inherits8(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}
  subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)
  _setPrototypeOf8(subClass,superClass);}
  function _setPrototypeOf8(o3,p3){_setPrototypeOf8=Object.setPrototypeOf||function _setPrototypeOf10(o4,p4){o4.__proto__=p4;return o4;};return _setPrototypeOf8(o3,p3);}
  function _defineProperty39(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var withUsage24=createDocumentationMessageGenerator({name:"instantsearch"});function defaultCreateURL(){return "#";}
  var InstantSearch2=function(_EventEmitter){_inherits8(InstantSearch3,_EventEmitter);function InstantSearch3(options){var _this;_classCallCheck9(this,InstantSearch3);_this=_possibleConstructorReturn8(this,_getPrototypeOf8(InstantSearch3).call(this));_defineProperty39(_assertThisInitialized8(_this),"client",void 0);_defineProperty39(_assertThisInitialized8(_this),"indexName",void 0);_defineProperty39(_assertThisInitialized8(_this),"insightsClient",void 0);_defineProperty39(_assertThisInitialized8(_this),"onStateChange",null);_defineProperty39(_assertThisInitialized8(_this),"helper",void 0);_defineProperty39(_assertThisInitialized8(_this),"mainHelper",void 0);_defineProperty39(_assertThisInitialized8(_this),"mainIndex",void 0);_defineProperty39(_assertThisInitialized8(_this),"started",void 0);_defineProperty39(_assertThisInitialized8(_this),"templatesConfig",void 0);_defineProperty39(_assertThisInitialized8(_this),"renderState",{});_defineProperty39(_assertThisInitialized8(_this),"_stalledSearchDelay",void 0);_defineProperty39(_assertThisInitialized8(_this),"_searchStalledTimer",void 0);_defineProperty39(_assertThisInitialized8(_this),"_isSearchStalled",void 0);_defineProperty39(_assertThisInitialized8(_this),"_initialUiState",void 0);_defineProperty39(_assertThisInitialized8(_this),"_createURL",void 0);_defineProperty39(_assertThisInitialized8(_this),"_searchFunction",void 0);_defineProperty39(_assertThisInitialized8(_this),"_mainHelperSearch",void 0);_defineProperty39(_assertThisInitialized8(_this),"middleware",[]);_defineProperty39(_assertThisInitialized8(_this),"sendEventToInsights",void 0);_defineProperty39(_assertThisInitialized8(_this),"scheduleSearch",defer_default(function(){if(_this.started){_this.mainHelper.search();}}));_defineProperty39(_assertThisInitialized8(_this),"scheduleRender",defer_default(function(){if(!_this.mainHelper.hasPendingRequests()){clearTimeout(_this._searchStalledTimer);_this._searchStalledTimer=null;_this._isSearchStalled=false;}
  _this.mainIndex.render({instantSearchInstance:_assertThisInitialized8(_this)});_this.emit("render");}));_defineProperty39(_assertThisInitialized8(_this),"onInternalStateChange",function(){var nextUiState=_this.mainIndex.getWidgetUiState({});_this.middleware.forEach(function(m3){m3.onStateChange({uiState:nextUiState});});});var _options$indexName=options.indexName,indexName=_options$indexName===void 0?null:_options$indexName,numberLocale=options.numberLocale,_options$initialUiSta=options.initialUiState,initialUiState=_options$initialUiSta===void 0?{}:_options$initialUiSta,_options$routing=options.routing,routing=_options$routing===void 0?null:_options$routing,searchFunction=options.searchFunction,_options$stalledSearc=options.stalledSearchDelay,stalledSearchDelay=_options$stalledSearc===void 0?200:_options$stalledSearc,_options$searchClient=options.searchClient,searchClient=_options$searchClient===void 0?null:_options$searchClient,_options$insightsClie=options.insightsClient,insightsClient=_options$insightsClie===void 0?null:_options$insightsClie,_options$onStateChang=options.onStateChange,onStateChange=_options$onStateChang===void 0?null:_options$onStateChang;if(indexName===null){throw new Error(withUsage24("The `indexName` option is required."));}
  if(searchClient===null){throw new Error(withUsage24("The `searchClient` option is required."));}
  if(typeof searchClient.search!=="function"){throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");}
  if(typeof searchClient.addAlgoliaAgent==="function"){searchClient.addAlgoliaAgent("instantsearch.js (".concat(version_default,")"));}
  _warning(insightsClient===null,"`insightsClient` property has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/");if(insightsClient&&typeof insightsClient!=="function"){throw new Error(withUsage24("The `insightsClient` option should be a function."));}
  _warning(!options.searchParameters,"The `searchParameters` option is deprecated and will not be supported in InstantSearch.js 4.x.\n\nYou can replace it with the `configure` widget:\n\n```\nsearch.addWidgets([\n  configure(".concat(JSON.stringify(options.searchParameters,null,2),")\n]);\n```\n\nSee ").concat(createDocumentationLink({name:"configure"})));_this.client=searchClient;_this.insightsClient=insightsClient;_this.indexName=indexName;_this.helper=null;_this.mainHelper=null;_this.mainIndex=index_default({indexName});_this.onStateChange=onStateChange;_this.started=false;_this.templatesConfig={helpers:hoganHelpers({numberLocale}),compileOptions:{}};_this._stalledSearchDelay=stalledSearchDelay;_this._searchStalledTimer=null;_this._isSearchStalled=false;_this._createURL=defaultCreateURL;_this._initialUiState=initialUiState;if(searchFunction){_this._searchFunction=searchFunction;}
  _this.sendEventToInsights=noop_default;if(routing){var routerOptions=typeof routing==="boolean"?void 0:routing;_this.use(createRouterMiddleware2(routerOptions));}
  if(isMetadataEnabled()){_this.use(createMetadataMiddleware2());}
  return _this;}
  _createClass9(InstantSearch3,[{key:"use",value:function use(){var _this2=this;for(var _len=arguments.length,middleware=new Array(_len),_key=0;_key<_len;_key++){middleware[_key]=arguments[_key];}
  var newMiddlewareList=middleware.map(function(fn){var newMiddleware=fn({instantSearchInstance:_this2});_this2.middleware.push(newMiddleware);return newMiddleware;});if(this.started){newMiddlewareList.forEach(function(m3){m3.subscribe();});}
  return this;}},{key:"EXPERIMENTAL_use",value:function EXPERIMENTAL_use(){_warning(false,"The middleware API is now considered stable, so we recommend replacing `EXPERIMENTAL_use` with `use` before upgrading to the next major version.");return this.use.apply(this,arguments);}},{key:"addWidget",value:function addWidget(widget){_warning(false,"addWidget will still be supported in 4.x releases, but not further. It is replaced by `addWidgets([widget])`");return this.addWidgets([widget]);}},{key:"addWidgets",value:function addWidgets(widgets2){if(!Array.isArray(widgets2)){throw new Error(withUsage24("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));}
  if(widgets2.some(function(widget){return typeof widget.init!=="function"&&typeof widget.render!=="function";})){throw new Error(withUsage24("The widget definition expects a `render` and/or an `init` method."));}
  this.mainIndex.addWidgets(widgets2);return this;}},{key:"removeWidget",value:function removeWidget(widget){_warning(false,"removeWidget will still be supported in 4.x releases, but not further. It is replaced by `removeWidgets([widget])`");return this.removeWidgets([widget]);}},{key:"removeWidgets",value:function removeWidgets(widgets2){if(!Array.isArray(widgets2)){throw new Error(withUsage24("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));}
  if(widgets2.some(function(widget){return typeof widget.dispose!=="function";})){throw new Error(withUsage24("The widget definition expects a `dispose` method."));}
  this.mainIndex.removeWidgets(widgets2);return this;}},{key:"start",value:function start(){var _this3=this;if(this.started){throw new Error(withUsage24("The `start` method has already been called once."));}
  var mainHelper=algoliasearch_helper3.default(this.client,this.indexName);mainHelper.search=function(){return mainHelper.searchOnlyWithDerivedHelpers();};if(this._searchFunction){var fakeClient={search:function search(){return new Promise(noop_default);}};this._mainHelperSearch=mainHelper.search.bind(mainHelper);mainHelper.search=function(){var mainIndexHelper=_this3.mainIndex.getHelper();var searchFunctionHelper=algoliasearch_helper3.default(fakeClient,mainIndexHelper.state.index,mainIndexHelper.state);searchFunctionHelper.once("search",function(_ref){var state=_ref.state;mainIndexHelper.overrideStateWithoutTriggeringChangeEvent(state);_this3._mainHelperSearch();});searchFunctionHelper.on("change",function(_ref23){var state=_ref23.state;mainIndexHelper.setState(state);});_this3._searchFunction(searchFunctionHelper);return mainHelper;};}
  mainHelper.on("error",function(_ref33){var error=_ref33.error;_this3.emit("error",{error});});this.mainHelper=mainHelper;this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState});this.middleware.forEach(function(m3){m3.subscribe();});mainHelper.search();this.helper=this.mainIndex.getHelper();this.started=true;}},{key:"dispose",value:function dispose(){this.scheduleSearch.cancel();this.scheduleRender.cancel();clearTimeout(this._searchStalledTimer);this.removeWidgets(this.mainIndex.getWidgets());this.mainIndex.dispose();this.started=false;this.removeAllListeners();this.mainHelper.removeAllListeners();this.mainHelper=null;this.helper=null;this.middleware.forEach(function(m3){m3.unsubscribe();});}},{key:"scheduleStalledRender",value:function scheduleStalledRender(){var _this4=this;if(!this._searchStalledTimer){this._searchStalledTimer=setTimeout(function(){_this4._isSearchStalled=true;_this4.scheduleRender();},this._stalledSearchDelay);}}},{key:"setUiState",value:function setUiState(uiState){if(!this.mainHelper){throw new Error(withUsage24("The `start` method needs to be called before `setUiState`."));}
  this.mainIndex.refreshUiState();var nextUiState=typeof uiState==="function"?uiState(this.mainIndex.getWidgetUiState({})):uiState;var setIndexHelperState=function setIndexHelperState2(indexWidget){if(true){checkIndexUiState({index:indexWidget,indexUiState:nextUiState[indexWidget.getIndexId()]});}
  indexWidget.getHelper().overrideStateWithoutTriggeringChangeEvent(indexWidget.getWidgetSearchParameters(indexWidget.getHelper().state,{uiState:nextUiState[indexWidget.getIndexId()]}));indexWidget.getWidgets().filter(isIndexWidget).forEach(setIndexHelperState2);};setIndexHelperState(this.mainIndex);this.scheduleSearch();this.onInternalStateChange();}},{key:"createURL",value:function createURL(){var nextState=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started){throw new Error(withUsage24("The `start` method needs to be called before `createURL`."));}
  return this._createURL(nextState);}},{key:"refresh",value:function refresh(){if(!this.mainHelper){throw new Error(withUsage24("The `start` method needs to be called before `refresh`."));}
  this.mainHelper.clearCache().search();}}]);return InstantSearch3;}(events.default);var InstantSearch_default=InstantSearch2;function _objectWithoutProperties6(source,excluded){if(source==null)
  return{};var target=_objectWithoutPropertiesLoose6(source,excluded);var key2,i3;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i3=0;i3<sourceSymbolKeys.length;i3++){key2=sourceSymbolKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;if(!Object.prototype.propertyIsEnumerable.call(source,key2))
  continue;target[key2]=source[key2];}}
  return target;}
  function _objectWithoutPropertiesLoose6(source,excluded){if(source==null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2,i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  function getStateWithoutPage2(state){var _ref=state||{},page=_ref.page,rest=_objectWithoutProperties6(_ref,["page"]);return rest;}
  var KEY="ais.infiniteHits";function hasSessionStorage(){return typeof window!=="undefined"&&typeof window.sessionStorage!=="undefined";}
  function createInfiniteHitsSessionStorageCache(){return{read:function read(_ref23){var state=_ref23.state;if(!hasSessionStorage()){return null;}
  try{var cache=JSON.parse(window.sessionStorage.getItem(KEY));return cache&&isEqual_default(cache.state,getStateWithoutPage2(state))?cache.hits:null;}catch(error){if(error instanceof SyntaxError){try{window.sessionStorage.removeItem(KEY);}catch(err){}}
  return null;}},write:function write(_ref33){var state=_ref33.state,hits3=_ref33.hits;if(!hasSessionStorage()){return;}
  try{window.sessionStorage.setItem(KEY,JSON.stringify({state:getStateWithoutPage2(state),hits:hits3}));}catch(error){}}};}
  var instantsearch2=function instantsearch3(options){return new InstantSearch_default(options);};instantsearch2.version=version_default;instantsearch2.snippet=snippet2;instantsearch2.reverseSnippet=reverseSnippet2;instantsearch2.highlight=highlight;instantsearch2.reverseHighlight=reverseHighlight2;instantsearch2.insights=insights3;instantsearch2.getInsightsAnonymousUserToken=getInsightsAnonymousUserToken;instantsearch2.createInfiniteHitsSessionStorageCache=createInfiniteHitsSessionStorageCache;Object.defineProperty(instantsearch2,"widgets",{get:function get(){throw new ReferenceError(`"instantsearch.widgets" are not available from the ES build.
  
  To import the widgets:
  
  import { searchBox } from 'instantsearch.js/es/widgets'`);}});Object.defineProperty(instantsearch2,"connectors",{get:function get(){throw new ReferenceError(`"instantsearch.connectors" are not available from the ES build.
  
  To import the connectors:
  
  import { connectSearchBox } from 'instantsearch.js/es/connectors'`);}});var es_default=instantsearch2;var n;var l2;var u;var i;var t;var r;var o={};var f=[];var e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(n2,l3){for(var u3 in l3)
  n2[u3]=l3[u3];return n2;}
  function s2(n2){var l3=n2.parentNode;l3&&l3.removeChild(n2);}
  function a(n2,l3,u3){var i3,t3,r3,o3=arguments,f3={};for(r3 in l3)
  "key"==r3?i3=l3[r3]:"ref"==r3?t3=l3[r3]:f3[r3]=l3[r3];if(arguments.length>3)
  for(u3=[u3],r3=3;r3<arguments.length;r3++)
  u3.push(o3[r3]);if(null!=u3&&(f3.children=u3),"function"==typeof n2&&null!=n2.defaultProps)
  for(r3 in n2.defaultProps)
  void 0===f3[r3]&&(f3[r3]=n2.defaultProps[r3]);return v(n2,f3,i3,t3,null);}
  function v(l3,u3,i3,t3,r3){var o3={type:l3,props:u3,key:i3,ref:t3,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r3?++n.__v:r3};return null!=n.vnode&&n.vnode(o3),o3;}
  function y2(n2){return n2.children;}
  function p(n2,l3){this.props=n2,this.context=l3;}
  function d(n2,l3){if(null==l3)
  return n2.__?d(n2.__,n2.__.__k.indexOf(n2)+1):null;for(var u3;l3<n2.__k.length;l3++)
  if(null!=(u3=n2.__k[l3])&&null!=u3.__e)
  return u3.__e;return "function"==typeof n2.type?d(n2):null;}
  function _(n2){var l3,u3;if(null!=(n2=n2.__)&&null!=n2.__c){for(n2.__e=n2.__c.base=null,l3=0;l3<n2.__k.length;l3++)
  if(null!=(u3=n2.__k[l3])&&null!=u3.__e){n2.__e=n2.__c.base=u3.__e;break;}
  return _(n2);}}
  function k(l3){(!l3.__d&&(l3.__d=true)&&u.push(l3)&&!m.__r++||t!==n.debounceRendering)&&((t=n.debounceRendering)||i)(m);}
  function m(){for(var n2;m.__r=u.length;)
  n2=u.sort(function(n3,l3){return n3.__v.__b-l3.__v.__b;}),u=[],n2.some(function(n3){var l3,u3,i3,t3,r3,o3;n3.__d&&(r3=(t3=(l3=n3).__v).__e,(o3=l3.__P)&&(u3=[],(i3=c({},t3)).__v=t3.__v+1,T(o3,t3,i3,l3.__n,void 0!==o3.ownerSVGElement,null!=t3.__h?[r3]:null,u3,null==r3?d(t3):r3,t3.__h),j(u3,t3),t3.__e!=r3&&_(t3)));});}
  function b(n2,l3,u3,i3,t3,r3,e3,c3,s3,a3){var h3,p3,_3,k3,m3,b3,w3,A3=i3&&i3.__k||f,P2=A3.length;for(u3.__k=[],h3=0;h3<l3.length;h3++)
  if(null!=(k3=u3.__k[h3]=null==(k3=l3[h3])||"boolean"==typeof k3?null:"string"==typeof k3||"number"==typeof k3?v(null,k3,null,null,k3):Array.isArray(k3)?v(y2,{children:k3},null,null,null):k3.__b>0?v(k3.type,k3.props,k3.key,null,k3.__v):k3)){if(k3.__=u3,k3.__b=u3.__b+1,null===(_3=A3[h3])||_3&&k3.key==_3.key&&k3.type===_3.type)
  A3[h3]=void 0;else
  for(p3=0;p3<P2;p3++){if((_3=A3[p3])&&k3.key==_3.key&&k3.type===_3.type){A3[p3]=void 0;break;}
  _3=null;}
  T(n2,k3,_3=_3||o,t3,r3,e3,c3,s3,a3),m3=k3.__e,(p3=k3.ref)&&_3.ref!=p3&&(w3||(w3=[]),_3.ref&&w3.push(_3.ref,null,k3),w3.push(p3,k3.__c||m3,k3)),null!=m3?(null==b3&&(b3=m3),"function"==typeof k3.type&&null!=k3.__k&&k3.__k===_3.__k?k3.__d=s3=g(k3,s3,n2):s3=x(n2,k3,_3,A3,m3,s3),a3||"option"!==u3.type?"function"==typeof u3.type&&(u3.__d=s3):n2.value=""):s3&&_3.__e==s3&&s3.parentNode!=n2&&(s3=d(_3));}
  for(u3.__e=b3,h3=P2;h3--;)
  null!=A3[h3]&&("function"==typeof u3.type&&null!=A3[h3].__e&&A3[h3].__e==u3.__d&&(u3.__d=d(i3,h3+1)),L(A3[h3],A3[h3]));if(w3)
  for(h3=0;h3<w3.length;h3++)
  I(w3[h3],w3[++h3],w3[++h3]);}
  function g(n2,l3,u3){var i3,t3;for(i3=0;i3<n2.__k.length;i3++)
  (t3=n2.__k[i3])&&(t3.__=n2,l3="function"==typeof t3.type?g(t3,l3,u3):x(u3,t3,t3,n2.__k,t3.__e,l3));return l3;}
  function x(n2,l3,u3,i3,t3,r3){var o3,f3,e3;if(void 0!==l3.__d)
  o3=l3.__d,l3.__d=void 0;else if(null==u3||t3!=r3||null==t3.parentNode)
  n:if(null==r3||r3.parentNode!==n2)
  n2.appendChild(t3),o3=null;else{for(f3=r3,e3=0;(f3=f3.nextSibling)&&e3<i3.length;e3+=2)
  if(f3==t3)
  break n;n2.insertBefore(t3,r3),o3=r3;}
  return void 0!==o3?o3:t3.nextSibling;}
  function A(n2,l3,u3,i3,t3){var r3;for(r3 in u3)
  "children"===r3||"key"===r3||r3 in l3||C(n2,r3,null,u3[r3],i3);for(r3 in l3)
  t3&&"function"!=typeof l3[r3]||"children"===r3||"key"===r3||"value"===r3||"checked"===r3||u3[r3]===l3[r3]||C(n2,r3,l3[r3],u3[r3],i3);}
  function P(n2,l3,u3){"-"===l3[0]?n2.setProperty(l3,u3):n2[l3]=null==u3?"":"number"!=typeof u3||e.test(l3)?u3:u3+"px";}
  function C(n2,l3,u3,i3,t3){var r3;n:if("style"===l3)
  if("string"==typeof u3)
  n2.style.cssText=u3;else{if("string"==typeof i3&&(n2.style.cssText=i3=""),i3)
  for(l3 in i3)
  u3&&l3 in u3||P(n2.style,l3,"");if(u3)
  for(l3 in u3)
  i3&&u3[l3]===i3[l3]||P(n2.style,l3,u3[l3]);}
  else if("o"===l3[0]&&"n"===l3[1])
  r3=l3!==(l3=l3.replace(/Capture$/,"")),l3=l3.toLowerCase()in n2?l3.toLowerCase().slice(2):l3.slice(2),n2.l||(n2.l={}),n2.l[l3+r3]=u3,u3?i3||n2.addEventListener(l3,r3?H:$,r3):n2.removeEventListener(l3,r3?H:$,r3);else if("dangerouslySetInnerHTML"!==l3){if(t3)
  l3=l3.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l3&&"list"!==l3&&"form"!==l3&&"download"!==l3&&l3 in n2)
  try{n2[l3]=null==u3?"":u3;break n;}catch(n3){}
  "function"==typeof u3||(null!=u3&&(false!==u3||"a"===l3[0]&&"r"===l3[1])?n2.setAttribute(l3,u3):n2.removeAttribute(l3));}}
  function $(l3){this.l[l3.type+false](n.event?n.event(l3):l3);}
  function H(l3){this.l[l3.type+true](n.event?n.event(l3):l3);}
  function T(l3,u3,i3,t3,r3,o3,f3,e3,s3){var a3,v3,h3,d3,_3,k3,m3,g3,w3,x3,A3,P2=u3.type;if(void 0!==u3.constructor)
  return null;null!=i3.__h&&(s3=i3.__h,e3=u3.__e=i3.__e,u3.__h=null,o3=[e3]),(a3=n.__b)&&a3(u3);try{n:if("function"==typeof P2){if(g3=u3.props,w3=(a3=P2.contextType)&&t3[a3.__c],x3=a3?w3?w3.props.value:a3.__:t3,i3.__c?m3=(v3=u3.__c=i3.__c).__=v3.__E:("prototype"in P2&&P2.prototype.render?u3.__c=v3=new P2(g3,x3):(u3.__c=v3=new p(g3,x3),v3.constructor=P2,v3.render=M),w3&&w3.sub(v3),v3.props=g3,v3.state||(v3.state={}),v3.context=x3,v3.__n=t3,h3=v3.__d=true,v3.__h=[]),null==v3.__s&&(v3.__s=v3.state),null!=P2.getDerivedStateFromProps&&(v3.__s==v3.state&&(v3.__s=c({},v3.__s)),c(v3.__s,P2.getDerivedStateFromProps(g3,v3.__s))),d3=v3.props,_3=v3.state,h3)
  null==P2.getDerivedStateFromProps&&null!=v3.componentWillMount&&v3.componentWillMount(),null!=v3.componentDidMount&&v3.__h.push(v3.componentDidMount);else{if(null==P2.getDerivedStateFromProps&&g3!==d3&&null!=v3.componentWillReceiveProps&&v3.componentWillReceiveProps(g3,x3),!v3.__e&&null!=v3.shouldComponentUpdate&&false===v3.shouldComponentUpdate(g3,v3.__s,x3)||u3.__v===i3.__v){v3.props=g3,v3.state=v3.__s,u3.__v!==i3.__v&&(v3.__d=false),v3.__v=u3,u3.__e=i3.__e,u3.__k=i3.__k,v3.__h.length&&f3.push(v3);break n;}
  null!=v3.componentWillUpdate&&v3.componentWillUpdate(g3,v3.__s,x3),null!=v3.componentDidUpdate&&v3.__h.push(function(){v3.componentDidUpdate(d3,_3,k3);});}
  v3.context=x3,v3.props=g3,v3.state=v3.__s,(a3=n.__r)&&a3(u3),v3.__d=false,v3.__v=u3,v3.__P=l3,a3=v3.render(v3.props,v3.state,v3.context),v3.state=v3.__s,null!=v3.getChildContext&&(t3=c(c({},t3),v3.getChildContext())),h3||null==v3.getSnapshotBeforeUpdate||(k3=v3.getSnapshotBeforeUpdate(d3,_3)),A3=null!=a3&&a3.type===y2&&null==a3.key?a3.props.children:a3,b(l3,Array.isArray(A3)?A3:[A3],u3,i3,t3,r3,o3,f3,e3,s3),v3.base=u3.__e,u3.__h=null,v3.__h.length&&f3.push(v3),m3&&(v3.__E=v3.__=null),v3.__e=false;}else
  null==o3&&u3.__v===i3.__v?(u3.__k=i3.__k,u3.__e=i3.__e):u3.__e=z(i3.__e,u3,i3,t3,r3,o3,f3,s3);(a3=n.diffed)&&a3(u3);}catch(l4){u3.__v=null,(s3||null!=o3)&&(u3.__e=e3,u3.__h=!!s3,o3[o3.indexOf(e3)]=null),n.__e(l4,u3,i3);}}
  function j(l3,u3){n.__c&&n.__c(u3,l3),l3.some(function(u4){try{l3=u4.__h,u4.__h=[],l3.some(function(n2){n2.call(u4);});}catch(l4){n.__e(l4,u4.__v);}});}
  function z(n2,l3,u3,i3,t3,r3,e3,c3){var a3,v3,h3,y3,p3=u3.props,d3=l3.props,_3=l3.type,k3=0;if("svg"===_3&&(t3=true),null!=r3){for(;k3<r3.length;k3++)
  if((a3=r3[k3])&&(a3===n2||(_3?a3.localName==_3:3==a3.nodeType))){n2=a3,r3[k3]=null;break;}}
  if(null==n2){if(null===_3)
  return document.createTextNode(d3);n2=t3?document.createElementNS("http://www.w3.org/2000/svg",_3):document.createElement(_3,d3.is&&d3),r3=null,c3=false;}
  if(null===_3)
  p3===d3||c3&&n2.data===d3||(n2.data=d3);else{if(r3=r3&&f.slice.call(n2.childNodes),v3=(p3=u3.props||o).dangerouslySetInnerHTML,h3=d3.dangerouslySetInnerHTML,!c3){if(null!=r3)
  for(p3={},y3=0;y3<n2.attributes.length;y3++)
  p3[n2.attributes[y3].name]=n2.attributes[y3].value;(h3||v3)&&(h3&&(v3&&h3.__html==v3.__html||h3.__html===n2.innerHTML)||(n2.innerHTML=h3&&h3.__html||""));}
  if(A(n2,d3,p3,t3,c3),h3)
  l3.__k=[];else if(k3=l3.props.children,b(n2,Array.isArray(k3)?k3:[k3],l3,u3,i3,t3&&"foreignObject"!==_3,r3,e3,n2.firstChild,c3),null!=r3)
  for(k3=r3.length;k3--;)
  null!=r3[k3]&&s2(r3[k3]);c3||("value"in d3&&void 0!==(k3=d3.value)&&(k3!==n2.value||"progress"===_3&&!k3)&&C(n2,"value",k3,p3.value,false),"checked"in d3&&void 0!==(k3=d3.checked)&&k3!==n2.checked&&C(n2,"checked",k3,p3.checked,false));}
  return n2;}
  function I(l3,u3,i3){try{"function"==typeof l3?l3(u3):l3.current=u3;}catch(l4){n.__e(l4,i3);}}
  function L(l3,u3,i3){var t3,r3,o3;if(n.unmount&&n.unmount(l3),(t3=l3.ref)&&(t3.current&&t3.current!==l3.__e||I(t3,null,u3)),i3||"function"==typeof l3.type||(i3=null!=(r3=l3.__e)),l3.__e=l3.__d=void 0,null!=(t3=l3.__c)){if(t3.componentWillUnmount)
  try{t3.componentWillUnmount();}catch(l4){n.__e(l4,u3);}
  t3.base=t3.__P=null;}
  if(t3=l3.__k)
  for(o3=0;o3<t3.length;o3++)
  t3[o3]&&L(t3[o3],u3,i3);null!=r3&&s2(r3);}
  function M(n2,l3,u3){return this.constructor(n2,u3);}
  function N(l3,u3,i3){var t3,r3,e3;n.__&&n.__(l3,u3),r3=(t3="function"==typeof i3)?null:i3&&i3.__k||u3.__k,e3=[],T(u3,l3=(!t3&&i3||u3).__k=a(y2,null,[l3]),r3||o,o,void 0!==u3.ownerSVGElement,!t3&&i3?[i3]:r3?null:u3.firstChild?f.slice.call(u3.childNodes):null,e3,!t3&&i3?i3:r3?r3.__e:u3.firstChild,t3),j(e3,l3);}
  n={__e:function(n2,l3){for(var u3,i3,t3;l3=l3.__;)
  if((u3=l3.__c)&&!u3.__)
  try{if((i3=u3.constructor)&&null!=i3.getDerivedStateFromError&&(u3.setState(i3.getDerivedStateFromError(n2)),t3=u3.__d),null!=u3.componentDidCatch&&(u3.componentDidCatch(n2),t3=u3.__d),t3)
  return u3.__E=u3;}catch(l4){n2=l4;}
  throw n2;},__v:0},l2=function(n2){return null!=n2&&void 0===n2.constructor;},p.prototype.setState=function(n2,l3){var u3;u3=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c({},this.state),"function"==typeof n2&&(n2=n2(c({},u3),this.props)),n2&&c(u3,n2),null!=n2&&this.__v&&(l3&&this.__h.push(l3),k(this));},p.prototype.forceUpdate=function(n2){this.__v&&(this.__e=true,n2&&this.__h.push(n2),k(this));},p.prototype.render=y2,u=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,m.__r=0,r=0;function _typeof7(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof7=function _typeof15(obj2){return typeof obj2;};}else{_typeof7=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof7(obj);}
  function _extends13(){_extends13=Object.assign||function(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3];for(var key2 in source){if(Object.prototype.hasOwnProperty.call(source,key2)){target[key2]=source[key2];}}}
  return target;};return _extends13.apply(this,arguments);}
  function _classCallCheck7(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
  function _defineProperties7(target,props){for(var i3=0;i3<props.length;i3++){var descriptor=props[i3];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)
  descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
  function _createClass7(Constructor,protoProps,staticProps){if(protoProps)
  _defineProperties7(Constructor.prototype,protoProps);if(staticProps)
  _defineProperties7(Constructor,staticProps);return Constructor;}
  function _possibleConstructorReturn7(self2,call){if(call&&(_typeof7(call)==="object"||typeof call==="function")){return call;}
  return _assertThisInitialized7(self2);}
  function _assertThisInitialized7(self2){if(self2===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
  return self2;}
  function _getPrototypeOf7(o3){_getPrototypeOf7=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf10(o4){return o4.__proto__||Object.getPrototypeOf(o4);};return _getPrototypeOf7(o3);}
  function _inherits7(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}
  subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)
  _setPrototypeOf7(subClass,superClass);}
  function _setPrototypeOf7(o3,p3){_setPrototypeOf7=Object.setPrototypeOf||function _setPrototypeOf10(o4,p4){o4.__proto__=p4;return o4;};return _setPrototypeOf7(o3,p3);}
  var Template14=function(_Component){_inherits7(Template17,_Component);function Template17(){_classCallCheck7(this,Template17);return _possibleConstructorReturn7(this,_getPrototypeOf7(Template17).apply(this,arguments));}
  _createClass7(Template17,[{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps){return!isEqual_default(this.props.data,nextProps.data)||this.props.templateKey!==nextProps.templateKey||!isEqual_default(this.props.rootProps,nextProps.rootProps);}},{key:"render",value:function render(){var RootTagName=this.props.rootTagName;var useCustomCompileOptions=this.props.useCustomCompileOptions[this.props.templateKey];var compileOptions=useCustomCompileOptions?this.props.templatesConfig.compileOptions:{};var content=renderTemplate_default({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent});if(content===null){return null;}
  return a(RootTagName,_extends13({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:content}}));}}]);return Template17;}(p);Template14.defaultProps={data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}};var Template_default=Template14;const algoliasearch_helper2=__toModule(require_algoliasearch_helper());function ownKeys8(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread8(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys8(Object(source),true).forEach(function(key2){_defineProperty18(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys8(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty18(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var withUsage4=createDocumentationMessageGenerator({name:"configure",connector:true});function getInitialSearchParameters(state,widgetParams){return state.setQueryParameters(Object.keys(widgetParams.searchParameters).reduce(function(acc,key2){return _objectSpread8({},acc,_defineProperty18({},key2,void 0));},{}));}
  var connectConfigure2=function connectConfigure4(){var renderFn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:noop_default;var unmountFn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop_default;return function(widgetParams){if(!widgetParams||!isPlainObject_default(widgetParams.searchParameters)){throw new Error(withUsage4("The `searchParameters` option expects an object."));}
  var connectorState={};function refine(helper){return function(searchParameters){var actualState=getInitialSearchParameters(helper.state,widgetParams);var nextSearchParameters=mergeSearchParameters_default(actualState,new algoliasearch_helper2.default.SearchParameters(searchParameters));widgetParams.searchParameters=searchParameters;helper.setState(nextSearchParameters).search();};}
  return{$$type:"ais.configure",init:function init(initOptions){var instantSearchInstance=initOptions.instantSearchInstance;renderFn(_objectSpread8({},this.getWidgetRenderState(initOptions),{instantSearchInstance}),true);},render:function render(renderOptions){var instantSearchInstance=renderOptions.instantSearchInstance;renderFn(_objectSpread8({},this.getWidgetRenderState(renderOptions),{instantSearchInstance}),false);},dispose:function dispose(_ref){var state=_ref.state;unmountFn();return getInitialSearchParameters(state,widgetParams);},getRenderState:function getRenderState(renderState,renderOptions){var _renderState$configur;var widgetRenderState=this.getWidgetRenderState(renderOptions);return _objectSpread8({},renderState,{configure:_objectSpread8({},widgetRenderState,{widgetParams:_objectSpread8({},widgetRenderState.widgetParams,{searchParameters:mergeSearchParameters_default(new algoliasearch_helper2.default.SearchParameters((_renderState$configur=renderState.configure)===null||_renderState$configur===void 0?void 0:_renderState$configur.widgetParams.searchParameters),new algoliasearch_helper2.default.SearchParameters(widgetRenderState.widgetParams.searchParameters)).getQueryParams()})})});},getWidgetRenderState:function getWidgetRenderState(_ref23){var helper=_ref23.helper;if(!connectorState.refine){connectorState.refine=refine(helper);}
  return{refine:connectorState.refine,widgetParams};},getWidgetSearchParameters:function getWidgetSearchParameters(state,_ref33){var uiState=_ref33.uiState;return mergeSearchParameters_default(state,new algoliasearch_helper2.default.SearchParameters(_objectSpread8({},uiState.configure,{},widgetParams.searchParameters)));},getWidgetUiState:function getWidgetUiState(uiState){return _objectSpread8({},uiState,{configure:_objectSpread8({},uiState.configure,{},widgetParams.searchParameters)});}};};};var connectConfigure_default=connectConfigure2;function ownKeys44(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread44(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys44(Object(source),true).forEach(function(key2){_defineProperty57(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys44(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty57(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var configure=function configure3(widgetParams){var makeWidget=connectConfigure_default(noop_default);return _objectSpread44({},makeWidget({searchParameters:widgetParams}),{$$widgetType:"ais.configure"});};var configure_default=configure;function _typeof4(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof4=function _typeof15(obj2){return typeof obj2;};}else{_typeof4=function _typeof15(obj2){return obj2&&typeof Symbol==="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2;};}
  return _typeof4(obj);}
  function _classCallCheck4(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
  function _defineProperties4(target,props){for(var i3=0;i3<props.length;i3++){var descriptor=props[i3];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)
  descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
  function _createClass4(Constructor,protoProps,staticProps){if(protoProps)
  _defineProperties4(Constructor.prototype,protoProps);if(staticProps)
  _defineProperties4(Constructor,staticProps);return Constructor;}
  function _possibleConstructorReturn4(self2,call){if(call&&(_typeof4(call)==="object"||typeof call==="function")){return call;}
  return _assertThisInitialized4(self2);}
  function _getPrototypeOf4(o3){_getPrototypeOf4=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf10(o4){return o4.__proto__||Object.getPrototypeOf(o4);};return _getPrototypeOf4(o3);}
  function _assertThisInitialized4(self2){if(self2===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
  return self2;}
  function _inherits4(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}
  subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)
  _setPrototypeOf4(subClass,superClass);}
  function _setPrototypeOf4(o3,p3){_setPrototypeOf4=Object.setPrototypeOf||function _setPrototypeOf10(o4,p4){o4.__proto__=p4;return o4;};return _setPrototypeOf4(o3,p3);}
  function _defineProperty11(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var SearchBox2=function(_Component){_inherits4(SearchBox4,_Component);function SearchBox4(){var _getPrototypeOf22;var _this;_classCallCheck4(this,SearchBox4);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}
  _this=_possibleConstructorReturn4(this,(_getPrototypeOf22=_getPrototypeOf4(SearchBox4)).call.apply(_getPrototypeOf22,[this].concat(args)));_defineProperty11(_assertThisInitialized4(_this),"state",{query:_this.props.query,focused:false});_defineProperty11(_assertThisInitialized4(_this),"onInput",function(event){var _this$props=_this.props,searchAsYouType=_this$props.searchAsYouType,refine=_this$props.refine,onChange=_this$props.onChange;var query=event.target.value;if(searchAsYouType){refine(query);}
  _this.setState({query});onChange(event);});_defineProperty11(_assertThisInitialized4(_this),"onSubmit",function(event){var _this$props2=_this.props,searchAsYouType=_this$props2.searchAsYouType,refine=_this$props2.refine,onSubmit=_this$props2.onSubmit;event.preventDefault();event.stopPropagation();_this.input.blur();if(!searchAsYouType){refine(_this.state.query);}
  onSubmit(event);return false;});_defineProperty11(_assertThisInitialized4(_this),"onReset",function(event){var _this$props3=_this.props,refine=_this$props3.refine,onReset=_this$props3.onReset;var query="";_this.input.focus();refine(query);_this.setState({query});onReset(event);});_defineProperty11(_assertThisInitialized4(_this),"onBlur",function(){_this.setState({focused:false});});_defineProperty11(_assertThisInitialized4(_this),"onFocus",function(){_this.setState({focused:true});});return _this;}
  _createClass4(SearchBox4,[{key:"resetInput",value:function resetInput(){this.setState({query:""});}},{key:"componentWillReceiveProps",value:function componentWillReceiveProps(nextProps){if(!this.state.focused&&nextProps.query!==this.state.query){this.setState({query:nextProps.query});}}},{key:"render",value:function render(){var _this2=this;var _this$props4=this.props,cssClasses=_this$props4.cssClasses,placeholder=_this$props4.placeholder,autofocus=_this$props4.autofocus,showSubmit=_this$props4.showSubmit,showReset=_this$props4.showReset,showLoadingIndicator=_this$props4.showLoadingIndicator,templates=_this$props4.templates,isSearchStalled=_this$props4.isSearchStalled;return a("div",{className:cssClasses.root},a("form",{action:"",role:"search",className:cssClasses.form,noValidate:true,onSubmit:this.onSubmit,onReset:this.onReset},a("input",{ref:function ref(inputRef){return _this2.input=inputRef;},value:this.state.query,disabled:this.props.disabled,className:cssClasses.input,type:"search",placeholder,autoFocus:autofocus,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),a(Template_default,{templateKey:"submit",rootTagName:"button",rootProps:{className:cssClasses.submit,type:"submit",title:"Submit the search query.",hidden:!showSubmit},templates,data:{cssClasses}}),a(Template_default,{templateKey:"reset",rootTagName:"button",rootProps:{className:cssClasses.reset,type:"reset",title:"Clear the search query.",hidden:!(showReset&&this.state.query.trim()&&!isSearchStalled)},templates,data:{cssClasses}}),showLoadingIndicator&&a(Template_default,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:cssClasses.loadingIndicator,hidden:!isSearchStalled},templates,data:{cssClasses}})));}}]);return SearchBox4;}(p);_defineProperty11(SearchBox2,"defaultProps",{query:"",showSubmit:true,showReset:true,showLoadingIndicator:true,autofocus:false,searchAsYouType:true,isSearchStalled:false,disabled:false,onChange:noop_default,onSubmit:noop_default,onReset:noop_default,refine:noop_default});var SearchBox_default=SearchBox2;function ownKeys29(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread29(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys29(Object(source),true).forEach(function(key2){_defineProperty41(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys29(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty41(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var getSelectedHits=function getSelectedHits2(hits3,selectedObjectIDs){return selectedObjectIDs.map(function(objectID){var hit=find_default(hits3,function(h3){return h3.objectID===objectID;});if(typeof hit==="undefined"){throw new Error('Could not find objectID "'.concat(objectID,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));}
  return hit;});};var getQueryID=function getQueryID2(selectedHits){var queryIDs=uniq_default(selectedHits.map(function(hit){return hit.__queryID;}));if(queryIDs.length>1){throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");}
  var queryID=queryIDs[0];if(typeof queryID!=="string"){throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");}
  return queryID;};var getPositions=function getPositions2(selectedHits){return selectedHits.map(function(hit){return hit.__position;});};var inferPayload=function inferPayload2(_ref){var method=_ref.method,results=_ref.results,hits3=_ref.hits,objectIDs=_ref.objectIDs;var index4=results.index;var selectedHits=getSelectedHits(hits3,objectIDs);var queryID=getQueryID(selectedHits);switch(method){case "clickedObjectIDsAfterSearch":{var positions=getPositions(selectedHits);return{index:index4,queryID,objectIDs,positions};}
  case "convertedObjectIDsAfterSearch":return{index:index4,queryID,objectIDs};default:throw new Error('Unsupported method passed to insights: "'.concat(method,'".'));}};var wrapInsightsClient=function wrapInsightsClient2(aa2,results,hits3){return function(method,payload){_warning(false,"`insights` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/");if(!aa2){var withInstantSearchUsage=createDocumentationMessageGenerator({name:"instantsearch"});throw new Error(withInstantSearchUsage("The `insightsClient` option has not been provided to `instantsearch`."));}
  if(!Array.isArray(payload.objectIDs)){throw new TypeError("Expected `objectIDs` to be an array.");}
  var inferredPayload=inferPayload({method,results,hits:hits3,objectIDs:payload.objectIDs});aa2(method,_objectSpread29({},inferredPayload,{},payload));};};function withInsights(connector){var wrapRenderFn=function wrapRenderFn2(renderFn){return function(renderOptions,isFirstRender){var results=renderOptions.results,hits3=renderOptions.hits,instantSearchInstance=renderOptions.instantSearchInstance;if(results&&hits3&&instantSearchInstance){var insights7=wrapInsightsClient(instantSearchInstance.insightsClient,results,hits3);return renderFn(_objectSpread29({},renderOptions,{insights:insights7}),isFirstRender);}
  return renderFn(renderOptions,isFirstRender);};};return function(renderFn,unmountFn){return connector(wrapRenderFn(renderFn),unmountFn);};}
  function ownKeys14(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread14(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys14(Object(source),true).forEach(function(key2){_defineProperty24(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys14(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty24(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  function _toConsumableArray6(arr){return _arrayWithoutHoles6(arr)||_iterableToArray6(arr)||_nonIterableSpread6();}
  function _nonIterableSpread6(){throw new TypeError("Invalid attempt to spread non-iterable instance");}
  function _iterableToArray6(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")
  return Array.from(iter);}
  function _arrayWithoutHoles6(arr){if(Array.isArray(arr)){for(var i3=0,arr2=new Array(arr.length);i3<arr.length;i3++){arr2[i3]=arr[i3];}
  return arr2;}}
  function _objectWithoutProperties3(source,excluded){if(source==null)
  return{};var target=_objectWithoutPropertiesLoose3(source,excluded);var key2,i3;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i3=0;i3<sourceSymbolKeys.length;i3++){key2=sourceSymbolKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;if(!Object.prototype.propertyIsEnumerable.call(source,key2))
  continue;target[key2]=source[key2];}}
  return target;}
  function _objectWithoutPropertiesLoose3(source,excluded){if(source==null)
  return{};var target={};var sourceKeys=Object.keys(source);var key2,i3;for(i3=0;i3<sourceKeys.length;i3++){key2=sourceKeys[i3];if(excluded.indexOf(key2)>=0)
  continue;target[key2]=source[key2];}
  return target;}
  var withUsage10=createDocumentationMessageGenerator({name:"infinite-hits",connector:true});function getStateWithoutPage(state){var _ref=state||{},page=_ref.page,rest=_objectWithoutProperties3(_ref,["page"]);return rest;}
  function getInMemoryCache(){var cachedHits=null;var cachedState=void 0;return{read:function read(_ref23){var state=_ref23.state;return isEqual_default(cachedState,getStateWithoutPage(state))?cachedHits:null;},write:function write(_ref33){var state=_ref33.state,hits3=_ref33.hits;cachedState=getStateWithoutPage(state);cachedHits=hits3;}};}
  function extractHitsFromCachedHits(cachedHits){return Object.keys(cachedHits).map(Number).sort(function(a3,b3){return a3-b3;}).reduce(function(acc,page){return acc.concat(cachedHits[page]);},[]);}
  var connectInfiniteHits=function connectInfiniteHits4(renderFn){var unmountFn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop_default;checkRendering_default(renderFn,withUsage10());return function(widgetParams){var _ref42=widgetParams||{},_ref4$escapeHTML=_ref42.escapeHTML,escapeHTML=_ref4$escapeHTML===void 0?true:_ref4$escapeHTML,_ref4$transformItems=_ref42.transformItems,transformItems=_ref4$transformItems===void 0?function(items){return items;}:_ref4$transformItems,_ref4$cache=_ref42.cache,cache=_ref4$cache===void 0?getInMemoryCache():_ref4$cache;var showPrevious;var showMore;var sendEvent;var bindEvent;var getFirstReceivedPage=function getFirstReceivedPage2(state,cachedHits){var _state$page=state.page,page=_state$page===void 0?0:_state$page;var pages=Object.keys(cachedHits).map(Number);if(pages.length===0){return page;}else{return Math.min.apply(Math,[page].concat(_toConsumableArray6(pages)));}};var getLastReceivedPage=function getLastReceivedPage2(state,cachedHits){var _state$page2=state.page,page=_state$page2===void 0?0:_state$page2;var pages=Object.keys(cachedHits).map(Number);if(pages.length===0){return page;}else{return Math.max.apply(Math,[page].concat(_toConsumableArray6(pages)));}};var getShowPrevious=function getShowPrevious2(helper,cachedHits){return function(){helper.overrideStateWithoutTriggeringChangeEvent(_objectSpread14({},helper.state,{page:getFirstReceivedPage(helper.state,cachedHits)-1})).searchWithoutTriggeringOnStateChange();};};var getShowMore=function getShowMore2(helper,cachedHits){return function(){helper.setPage(getLastReceivedPage(helper.state,cachedHits)+1).search();};};return{$$type:"ais.infiniteHits",init:function init(initOptions){renderFn(_objectSpread14({},this.getWidgetRenderState(initOptions),{instantSearchInstance:initOptions.instantSearchInstance}),true);},render:function render(renderOptions){var instantSearchInstance=renderOptions.instantSearchInstance;var widgetRenderState=this.getWidgetRenderState(renderOptions);sendEvent("view",widgetRenderState.currentPageHits);renderFn(_objectSpread14({},widgetRenderState,{instantSearchInstance}),false);},getRenderState:function getRenderState(renderState,renderOptions){return _objectSpread14({},renderState,{infiniteHits:this.getWidgetRenderState(renderOptions)});},getWidgetRenderState:function getWidgetRenderState(_ref5){var results=_ref5.results,helper=_ref5.helper,state=_ref5.state,instantSearchInstance=_ref5.instantSearchInstance;var isFirstPage;var currentPageHits=[];var cachedHits=cache.read({state})||{};if(!results){showPrevious=getShowPrevious(helper,cachedHits);showMore=getShowMore(helper,cachedHits);sendEvent=createSendEventForHits({instantSearchInstance,index:helper.getIndex(),widgetType:this.$$type});bindEvent=createBindEventForHits({index:helper.getIndex(),widgetType:this.$$type});isFirstPage=helper.state.page===void 0||getFirstReceivedPage(helper.state,cachedHits)===0;}else{var _state$page3=state.page,_page=_state$page3===void 0?0:_state$page3;if(escapeHTML&&results.hits.length>0){results.hits=escapeHits(results.hits);}
  var initialEscaped=results.hits.__escaped;results.hits=addAbsolutePosition(results.hits,results.page,results.hitsPerPage);results.hits=addQueryID(results.hits,results.queryID);results.hits=transformItems(results.hits);results.hits.__escaped=initialEscaped;if(cachedHits[_page]===void 0){cachedHits[_page]=results.hits;cache.write({state,hits:cachedHits});}
  currentPageHits=results.hits;isFirstPage=getFirstReceivedPage(state,cachedHits)===0;}
  var hits3=extractHitsFromCachedHits(cachedHits);var isLastPage=results?results.nbPages<=getLastReceivedPage(state,cachedHits)+1:true;return{hits:hits3,currentPageHits,sendEvent,bindEvent,results,showPrevious,showMore,isFirstPage,isLastPage,widgetParams};},dispose:function dispose(_ref6){var state=_ref6.state;unmountFn();var stateWithoutPage=state.setQueryParameter("page",void 0);if(!escapeHTML){return stateWithoutPage;}
  return stateWithoutPage.setQueryParameters(Object.keys(TAG_PLACEHOLDER).reduce(function(acc,key2){return _objectSpread14({},acc,_defineProperty24({},key2,void 0));},{}));},getWidgetUiState:function getWidgetUiState(uiState,_ref7){var searchParameters=_ref7.searchParameters;var page=searchParameters.page||0;if(!page){return uiState;}
  return _objectSpread14({},uiState,{page:page+1});},getWidgetSearchParameters:function getWidgetSearchParameters(searchParameters,_ref8){var uiState=_ref8.uiState;var widgetSearchParameters=searchParameters;if(escapeHTML){widgetSearchParameters=searchParameters.setQueryParameters(TAG_PLACEHOLDER);}
  var page=uiState.page?uiState.page-1:0;return widgetSearchParameters.setQueryParameter("page",page);}};};};var connectInfiniteHits_default=connectInfiniteHits;var defaultTemplates_default11={reset:'\n<svg class="{{cssClasses.resetIcon}}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="10" height="10">\n  <path d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"></path>\n</svg>\n  ',submit:'\n<svg class="{{cssClasses.submitIcon}}" xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 40 40">\n  <path d="M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"></path>\n</svg>\n  ',loadingIndicator:'\n<svg class="{{cssClasses.loadingIcon}}" width="16" height="16" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#444">\n  <g fill="none" fillRule="evenodd">\n    <g transform="translate(1 1)" strokeWidth="2">\n      <circle strokeOpacity=".5" cx="18" cy="18" r="18" />\n      <path d="M36 18c0-9.94-8.06-18-18-18">\n        <animateTransform\n          attributeName="transform"\n          type="rotate"\n          from="0 18 18"\n          to="360 18 18"\n          dur="1s"\n          repeatCount="indefinite"\n        />\n      </path>\n    </g>\n  </g>\n</svg>\n  '};function ownKeys23(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread23(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys23(Object(source),true).forEach(function(key2){_defineProperty34(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys23(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty34(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var withUsage19=createDocumentationMessageGenerator({name:"search-box",connector:true});function connectSearchBox(renderFn){var unmountFn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop_default;checkRendering_default(renderFn,withUsage19());return function(){var widgetParams=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var queryHook=widgetParams.queryHook;function clear(helper){return function(){helper.setQuery("").search();};}
  var _clear=function _clear2(){};function _cachedClear(){_clear();}
  return{$$type:"ais.searchBox",init:function init(initOptions){var instantSearchInstance=initOptions.instantSearchInstance;renderFn(_objectSpread23({},this.getWidgetRenderState(initOptions),{instantSearchInstance}),true);},render:function render(renderOptions){var instantSearchInstance=renderOptions.instantSearchInstance;renderFn(_objectSpread23({},this.getWidgetRenderState(renderOptions),{instantSearchInstance}),false);},dispose:function dispose(_ref){var state=_ref.state;unmountFn();return state.setQueryParameter("query",void 0);},getRenderState:function getRenderState(renderState,renderOptions){return _objectSpread23({},renderState,{searchBox:this.getWidgetRenderState(renderOptions)});},getWidgetRenderState:function getWidgetRenderState(_ref23){var helper=_ref23.helper,searchMetadata=_ref23.searchMetadata;if(!this._refine){var setQueryAndSearch=function setQueryAndSearch2(query){if(query!==helper.state.query){helper.setQuery(query).search();}};this._refine=function(query){if(queryHook){queryHook(query,setQueryAndSearch);return;}
  setQueryAndSearch(query);};}
  _clear=clear(helper);return{query:helper.state.query||"",refine:this._refine,clear:_cachedClear,widgetParams,isSearchStalled:searchMetadata.isSearchStalled};},getWidgetUiState:function getWidgetUiState(uiState,_ref33){var searchParameters=_ref33.searchParameters;var query=searchParameters.query||"";if(query===""||uiState&&uiState.query===query){return uiState;}
  return _objectSpread23({},uiState,{query});},getWidgetSearchParameters:function getWidgetSearchParameters(searchParameters,_ref42){var uiState=_ref42.uiState;return searchParameters.setQueryParameter("query",uiState.query||"");}};};}
  const classnames33=__toModule(require_classnames());function ownKeys66(object,enumerableOnly){var keys2=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)
  symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys2.push.apply(keys2,symbols);}
  return keys2;}
  function _objectSpread66(target){for(var i3=1;i3<arguments.length;i3++){var source=arguments[i3]!=null?arguments[i3]:{};if(i3%2){ownKeys66(Object(source),true).forEach(function(key2){_defineProperty80(target,key2,source[key2]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys66(Object(source)).forEach(function(key2){Object.defineProperty(target,key2,Object.getOwnPropertyDescriptor(source,key2));});}}
  return target;}
  function _defineProperty80(obj,key2,value){if(key2 in obj){Object.defineProperty(obj,key2,{value,enumerable:true,configurable:true,writable:true});}else{obj[key2]=value;}
  return obj;}
  var withUsage47=createDocumentationMessageGenerator({name:"search-box"});var suit48=component("SearchBox");var renderer20=function renderer25(_ref){var containerNode=_ref.containerNode,cssClasses=_ref.cssClasses,placeholder=_ref.placeholder,templates=_ref.templates,autofocus=_ref.autofocus,searchAsYouType=_ref.searchAsYouType,showReset=_ref.showReset,showSubmit=_ref.showSubmit,showLoadingIndicator=_ref.showLoadingIndicator;return function(_ref23){var refine=_ref23.refine,query=_ref23.query,isSearchStalled=_ref23.isSearchStalled;N(a(SearchBox_default,{query,placeholder,autofocus,refine,searchAsYouType,templates,showSubmit,showReset,showLoadingIndicator,isSearchStalled,cssClasses}),containerNode);};};function searchBox(widgetParams){var _ref33=widgetParams||{},container=_ref33.container,_ref3$placeholder=_ref33.placeholder,placeholder=_ref3$placeholder===void 0?"":_ref3$placeholder,_ref3$cssClasses=_ref33.cssClasses,userCssClasses=_ref3$cssClasses===void 0?{}:_ref3$cssClasses,_ref3$autofocus=_ref33.autofocus,autofocus=_ref3$autofocus===void 0?false:_ref3$autofocus,_ref3$searchAsYouType=_ref33.searchAsYouType,searchAsYouType=_ref3$searchAsYouType===void 0?true:_ref3$searchAsYouType,_ref3$showReset=_ref33.showReset,showReset=_ref3$showReset===void 0?true:_ref3$showReset,_ref3$showSubmit=_ref33.showSubmit,showSubmit=_ref3$showSubmit===void 0?true:_ref3$showSubmit,_ref3$showLoadingIndi=_ref33.showLoadingIndicator,showLoadingIndicator=_ref3$showLoadingIndi===void 0?true:_ref3$showLoadingIndi,queryHook=_ref33.queryHook,templates=_ref33.templates;if(!container){throw new Error(withUsage47("The `container` option is required."));}
  var containerNode=getContainerNode_default(container);var cssClasses={root:classnames33.default(suit48(),userCssClasses.root),form:classnames33.default(suit48({descendantName:"form"}),userCssClasses.form),input:classnames33.default(suit48({descendantName:"input"}),userCssClasses.input),submit:classnames33.default(suit48({descendantName:"submit"}),userCssClasses.submit),submitIcon:classnames33.default(suit48({descendantName:"submitIcon"}),userCssClasses.submitIcon),reset:classnames33.default(suit48({descendantName:"reset"}),userCssClasses.reset),resetIcon:classnames33.default(suit48({descendantName:"resetIcon"}),userCssClasses.resetIcon),loadingIndicator:classnames33.default(suit48({descendantName:"loadingIndicator"}),userCssClasses.loadingIndicator),loadingIcon:classnames33.default(suit48({descendantName:"loadingIcon"}),userCssClasses.loadingIcon)};var specializedRenderer=renderer20({containerNode,cssClasses,placeholder,templates:_objectSpread66({},defaultTemplates_default11,{},templates),autofocus,searchAsYouType,showReset,showSubmit,showLoadingIndicator});var makeWidget=connectSearchBox(specializedRenderer,function(){return N(null,containerNode);});return _objectSpread66({},makeWidget({queryHook}),{$$widgetType:"ais.searchBox"});}
  var connectInfiniteHitsWithInsights2=withInsights(connectInfiniteHits_default);var connectInfiniteHitsWithInsights_default=connectInfiniteHitsWithInsights2;var ALGOLIA_INSIGHTS_SRC="https://cdn.jsdelivr.net/npm/search-insights@1.3.1";!function(e3,a3,t3,n2,s3,i3,c3){e3.AlgoliaAnalyticsObject=s3,e3[s3]=e3[s3]||function(){(e3[s3].queue=e3[s3].queue||[]).push(arguments);},i3=a3.createElement(t3),c3=a3.getElementsByTagName(t3)[0],i3.async=1,i3.src=n2,c3.parentNode.insertBefore(i3,c3);}(window,document,"script",ALGOLIA_INSIGHTS_SRC,"aa");aa("init",{appId:"LE77SHMNUX",apiKey:"63933f0420a85da698f715b54c639bed"});const lite=__toModule(require_algoliasearchLite());function initSearch(){const search=es_default({indexName:"prod_codelibrary",searchClient:lite.default("LE77SHMNUX","63933f0420a85da698f715b54c639bed"),hitsPerPage:5,routing:true,searchFunction(helper){const container=document.querySelector("#algolia-results");container.style.display=helper.state.query===""?"none":"block";helper.search();},insightsClient:window.aa});search.addWidgets([searchBox({container:"#algolia-box",autofocus:false,placeholder:"Search for content"})]);const renderHits=(renderOptions,isFirstRender)=>{const{hits:hits3,widgetParams,insights:insights7}=renderOptions;if(renderOptions.results==void 0){return;}
  widgetParams.container.innerHTML=`
              ${hits3.length>0?`
                  <div class="ais-Hits-list">
                    ${hits3.map((hit)=>`
                          <a class="ais-Hits-item" data-rel-path="${hit.relpermalink}" data-object-id="${hit.objectID}" href="${hit.relpermalink}">
                              <div class="hit-head">
                                  <div class="level">
                                      <div class="level-left">
                                          <span class="hit-section">${hit._highlightResult.section.value}</span>
                                          <span class="hit-separator">/</span>
                                          <span class="hit-title">${es_default.highlight({attribute:"title",hit})}</span>
                                      </div>
                                  </div>
                              </div>
                              <div class="hit-content">
                                  <p class="hit-summary">
                                      ${hit.print}
                                  </p>
                                  <span class="hit-tags">
                                          Tags: ${hit._highlightResult.tags.map((tag)=>`${tag.value}`).join(", ")}
                                  </span>
                              </div>
                          </a>
                        `).join("")}
                  </div>
                `:`
                  <div id="no-results-message">
                      <p>We didn't find any results for the search <em>"${renderOptions.results.query}"</em>.</p>
                  </div>
              `}
              <div class="algolia-docsearch-footer">
                Search by <a class="algolia-docsearch-footer--logo" href="https://www.algolia.com/docsearch">Algolia</a>
              </div>
              `;const anchors=widgetParams.container.querySelectorAll(".ais-Hits-item");anchors.forEach((anchor)=>{anchor.addEventListener("click",(event)=>{const objectID=anchor.getAttribute("data-object-id");const relpath=anchor.getAttribute("data-rel-path");insights7("clickedObjectIDsAfterSearch",{eventName:relpath,objectIDs:[objectID]});});});};const customHits=connectInfiniteHitsWithInsights_default(renderHits);search.addWidgets([customHits({container:document.querySelector("#algolia-results"),transformItems:(items)=>{items.forEach((item)=>{if(item._snippetResult.description.matchLevel!="none"){item.print=item._snippetResult.description.value;}else{if(item._snippetResult.content.matchLevel!="none"){item.print=item._snippetResult.content.value;}else{if(item._snippetResult.description.value==""){item.print=item._snippetResult.content.value;}else{item.print=item._snippetResult.description.value;}}}});return items;}}),configure_default({clickAnalytics:true})]);search.start();}
  var van11y_default=()=>{"use strict";const TABS_JS="js-tabs";const TABS_JS_LIST="js-tablist";const TABS_JS_LISTITEM="js-tablist__item";const TABS_JS_LISTLINK="js-tablist__link";const TABS_JS_CONTENT="js-tabcontent";const TABS_JS_LINK_TO_TAB="js-link-to-tab";const TABS_DATA_PREFIX_CLASS="data-tabs-prefix-class";const TABS_DATA_HX="data-hx";const TABS_DATA_GENERATED_HX_CLASS="data-tabs-generated-hx-class";const TABS_DATA_EXISTING_HX="data-existing-hx";const TABS_DATA_SELECTED_TAB="data-selected";const TABS_PREFIX_IDS="label_";const TABS_STYLE="van11ytabs";const TABS_LIST_STYLE="van11ytabs__list";const TABS_LISTITEM_STYLE="van11ytabs__item";const TABS_LINK_STYLE="van11ytabs__link";const TABS_CONTENT_STYLE="van11ytabs__content";const TABS_IS_ACTIVE_STYLE="is-active";const TABS_HX_DEFAULT_CLASS="invisible";const TABS_ROLE_TABLIST="tablist";const TABS_ROLE_TAB="tab";const TABS_ROLE_TABPANEL="tabpanel";const TABS_ROLE_PRESENTATION="presentation";const ATTR_ROLE="role";const ATTR_LABELLEDBY="aria-labelledby";const ATTR_HIDDEN="aria-hidden";const ATTR_CONTROLS="aria-controls";const ATTR_SELECTED="aria-selected";const DELAY_HASH_UPDATE=1e3;let hash=window.location.hash.replace("#","");const findById=(id)=>document.getElementById(id);const addClass=(el,className)=>{if(el.classList){el.classList.add(className);}else{el.className+=" "+className;}};const removeClass=(el,className)=>{if(el.classList){el.classList.remove(className);}else{el.className=el.className.replace(new RegExp("(^|\\b)"+className.split(" ").join("|")+"(\\b|$)","gi")," ");}};const setActive=(el)=>{addClass(el,TABS_IS_ACTIVE_STYLE);addClass(el.parentNode,TABS_IS_ACTIVE_STYLE);};const setInactive=(el)=>{removeClass(el,TABS_IS_ACTIVE_STYLE);removeClass(el.parentNode,TABS_IS_ACTIVE_STYLE);};const hasClass=(el,className)=>{if(el.classList){return el.classList.contains(className);}else{return new RegExp("(^| )"+className+"( |$)","gi").test(el.className);}};const setAttributes=(node,attrs)=>{Object.keys(attrs).forEach((attribute)=>{node.setAttribute(attribute,attrs[attribute]);});};const unSelectLinks=(elts)=>{elts.forEach((link_node)=>{setAttributes(link_node,{[ATTR_SELECTED]:"false",tabindex:"-1"});setInactive(link_node);});};const unSelectContents=(elts)=>{elts.forEach((content_node)=>{content_node.setAttribute(ATTR_HIDDEN,true);setInactive(content_node);});};const selectLink=(el)=>{let destination=findById(el.getAttribute(ATTR_CONTROLS));setAttributes(el,{[ATTR_SELECTED]:"true",tabindex:"0"});addClass(el,"is-active");addClass(el.parentNode,"is-active");destination.removeAttribute(ATTR_HIDDEN);addClass(destination,"is-active");addClass(destination.parentNode,"is-active");setTimeout(function(){el.focus();},0);setTimeout(function(){history.pushState(null,null,location.pathname+location.search+"#"+el.getAttribute(ATTR_CONTROLS));},DELAY_HASH_UPDATE);};const selectLinkInList=(itemsList,linkList,contentList,param)=>{let indice_trouve;itemsList.forEach((itemNode,index4)=>{if(itemNode.querySelector("."+TABS_JS_LISTLINK).getAttribute(ATTR_SELECTED)==="true"){indice_trouve=index4;}});unSelectLinks(linkList);unSelectContents(contentList);if(param==="next"){selectLink(linkList[indice_trouve+1]);setTimeout(function(){linkList[indice_trouve+1].focus();},0);}
  if(param==="prev"){selectLink(linkList[indice_trouve-1]);setTimeout(function(){linkList[indice_trouve-1].focus();},0);}};let searchParent=(el,parentClass)=>{let found=false;let parentElement=el.parentNode;while(parentElement&&found===false){if(hasClass(parentElement,parentClass)===true){found=true;}else{parentElement=parentElement.parentNode;}}
  if(found===true){return parentElement.getAttribute("id");}else{return "";}};const $listTabs=(node=document)=>[].slice.call(node.querySelectorAll("."+TABS_JS));const attach=(node)=>{$listTabs(node).forEach((tabs_node)=>{let iLisible=Math.random().toString(32).slice(2,12);let prefixClassName=tabs_node.hasAttribute(TABS_DATA_PREFIX_CLASS)===true?tabs_node.getAttribute(TABS_DATA_PREFIX_CLASS)+"-":"";let hx=tabs_node.hasAttribute(TABS_DATA_HX)===true?tabs_node.getAttribute(TABS_DATA_HX):"";let hxGeneratedClass=tabs_node.hasAttribute(TABS_DATA_GENERATED_HX_CLASS)===true?tabs_node.getAttribute(TABS_DATA_GENERATED_HX_CLASS):TABS_HX_DEFAULT_CLASS;let existingHx=tabs_node.hasAttribute(TABS_DATA_EXISTING_HX)===true?tabs_node.getAttribute(TABS_DATA_EXISTING_HX):"";let $tabList=[].slice.call(tabs_node.querySelectorAll("."+TABS_JS_LIST));let $tabListItems=[].slice.call(tabs_node.querySelectorAll("."+TABS_JS_LISTITEM));let $tabListLinks=[].slice.call(tabs_node.querySelectorAll("."+TABS_JS_LISTLINK));let $tabListPanels=[].slice.call(tabs_node.querySelectorAll("."+TABS_JS_CONTENT));let noTabSelected=true;addClass(tabs_node,prefixClassName+TABS_STYLE);tabs_node.setAttribute("id",TABS_STYLE+iLisible);$tabList.forEach((tabList)=>{addClass(tabList,prefixClassName+TABS_LIST_STYLE);setAttributes(tabList,{[ATTR_ROLE]:TABS_ROLE_TABLIST,id:TABS_LIST_STYLE+iLisible});});$tabListItems.forEach((tabListItem,index4)=>{addClass(tabListItem,prefixClassName+TABS_LISTITEM_STYLE);setAttributes(tabListItem,{[ATTR_ROLE]:TABS_ROLE_PRESENTATION,id:TABS_LISTITEM_STYLE+iLisible+"-"+(index4+1)});});$tabListLinks.forEach((tabListLink)=>{let idHref=tabListLink.getAttribute("href").replace("#","");let panelControlled=findById(idHref);let linkText=tabListLink.innerText;let panelSelected=tabListLink.hasAttribute(TABS_DATA_SELECTED_TAB)===true;addClass(tabListLink,prefixClassName+TABS_LINK_STYLE);setAttributes(tabListLink,{id:TABS_PREFIX_IDS+idHref,[ATTR_ROLE]:TABS_ROLE_TAB,[ATTR_CONTROLS]:idHref,tabindex:"-1",[ATTR_SELECTED]:"false"});setInactive(tabListLink);setAttributes(panelControlled,{[ATTR_HIDDEN]:"true",[ATTR_ROLE]:TABS_ROLE_TABPANEL,[ATTR_LABELLEDBY]:TABS_PREFIX_IDS+idHref});addClass(panelControlled,prefixClassName+TABS_CONTENT_STYLE);setInactive(panelControlled);if(panelSelected&&noTabSelected){noTabSelected=false;setAttributes(tabListLink,{tabindex:"0",[ATTR_SELECTED]:"true"});addClass(tabListLink,"is-active");setAttributes(panelControlled,{[ATTR_HIDDEN]:"false"});addClass(panelControlled,"is-active");}
  if(hx!==""){let hx_node=document.createElement(hx);hx_node.setAttribute("class",hxGeneratedClass);hx_node.setAttribute("tabindex","0");hx_node.innerHTML=linkText;panelControlled.insertBefore(hx_node,panelControlled.firstChild);}
  if(existingHx!==""){let $hx_existing=[].slice.call(panelControlled.querySelectorAll(existingHx+":first-child"));$hx_existing.forEach((hx_item)=>{hx_item.setAttribute("tabindex","0");});}
  tabListLink.removeAttribute("href");});if(hash!==""){let nodeHashed=findById(hash);if(nodeHashed!==null){if(tabs_node.querySelector("#"+hash)!==null){if(hasClass(nodeHashed,TABS_JS_CONTENT)===true){unSelectLinks($tabListLinks);unSelectContents($tabListPanels);nodeHashed.removeAttribute(ATTR_HIDDEN);setActive(nodeHashed);let linkHashed=findById(TABS_PREFIX_IDS+hash);setAttributes(linkHashed,{tabindex:"0",[ATTR_SELECTED]:"true"});setActive(linkHashed);noTabSelected=false;}else{let panelParentId=searchParent(nodeHashed,TABS_JS_CONTENT);if(panelParentId!==""){unSelectLinks($tabListLinks);unSelectContents($tabListPanels);let panelParent=findById(panelParentId);panelParent.removeAttribute(ATTR_HIDDEN);setActive(panelParent);let linkParent=findById(TABS_PREFIX_IDS+panelParentId);setAttributes(linkParent,{tabindex:"0",[ATTR_SELECTED]:"true"});setActive(linkParent);noTabSelected=false;}}}}}
  if(noTabSelected===true){setAttributes($tabListLinks[0],{tabindex:"0",[ATTR_SELECTED]:"true"});setActive($tabListLinks[0]);let panelFirst=findById($tabListLinks[0].getAttribute(ATTR_CONTROLS));panelFirst.removeAttribute(ATTR_HIDDEN);setActive(panelFirst);}});};["click","keydown"].forEach((eventName)=>{document.body.addEventListener(eventName,(e3)=>{let parentLink=searchParent(e3.target,TABS_JS_LISTLINK);if((hasClass(e3.target,TABS_JS_LISTLINK)===true||parentLink!=="")&&eventName==="click"){let linkSelected=hasClass(e3.target,TABS_JS_LISTLINK)===true?e3.target:findById(parentLink);let parentTabId=searchParent(e3.target,TABS_JS);let parentTab=findById(parentTabId);let $parentListLinks=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTLINK));let $parentListContents=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_CONTENT));unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(linkSelected);e3.preventDefault();}
  if((hasClass(e3.target,TABS_JS_LISTLINK)===true||parentLink!=="")&&eventName==="keydown"){let parentTabId=searchParent(e3.target,TABS_JS);let parentTab=findById(parentTabId);let $parentListItems=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTITEM));let $parentListLinks=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTLINK));let $parentListContents=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_CONTENT));let firstLink=$parentListItems[0].querySelector("."+TABS_JS_LISTLINK);let lastLink=$parentListItems[$parentListItems.length-1].querySelector("."+TABS_JS_LISTLINK);if(e3.keyCode===36){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(firstLink);e3.preventDefault();}else if(e3.keyCode===35){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(lastLink);e3.preventDefault();}else if((e3.keyCode===37||e3.keyCode===38)&&!e3.ctrlKey){if(firstLink.getAttribute(ATTR_SELECTED)==="true"){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(lastLink);e3.preventDefault();}else{selectLinkInList($parentListItems,$parentListLinks,$parentListContents,"prev");e3.preventDefault();}}else if((e3.keyCode===40||e3.keyCode===39)&&!e3.ctrlKey){if(lastLink.getAttribute(ATTR_SELECTED)==="true"){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(firstLink);e3.preventDefault();}else{selectLinkInList($parentListItems,$parentListLinks,$parentListContents,"next");e3.preventDefault();}}}
  let parentTabPanelId=searchParent(e3.target,TABS_JS_CONTENT);if(parentTabPanelId!==""&&eventName==="keydown"){let linkSelected=findById(findById(parentTabPanelId).getAttribute(ATTR_LABELLEDBY));let parentTabId=searchParent(e3.target,TABS_JS);let parentTab=findById(parentTabId);let $parentListItems=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTITEM));let $parentListLinks=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTLINK));let $parentListContents=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_CONTENT));let firstLink=$parentListItems[0].querySelector("."+TABS_JS_LISTLINK);let lastLink=$parentListItems[$parentListItems.length-1].querySelector("."+TABS_JS_LISTLINK);if(e3.keyCode===38&&e3.ctrlKey){setTimeout(function(){linkSelected.focus();},0);e3.preventDefault();}
  if(e3.keyCode===33&&e3.ctrlKey){linkSelected.focus();e3.preventDefault();if(firstLink.getAttribute(ATTR_SELECTED)==="true"){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(lastLink);}else{selectLinkInList($parentListItems,$parentListLinks,$parentListContents,"prev");}}
  if(e3.keyCode===34&&e3.ctrlKey){linkSelected.focus();e3.preventDefault();if(lastLink.getAttribute(ATTR_SELECTED)==="true"){unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(firstLink);}else{selectLinkInList($parentListItems,$parentListLinks,$parentListContents,"next");}}}
  let parentLinkToPanelId=searchParent(e3.target,TABS_JS_LINK_TO_TAB);if((hasClass(e3.target,TABS_JS_LINK_TO_TAB)===true||parentLinkToPanelId!=="")&&eventName==="click"){let panelSelectedId=hasClass(e3.target,TABS_JS_LINK_TO_TAB)===true?e3.target.getAttribute("href").replace("#",""):findById(parentLinkToPanelId).replace("#","");let panelSelected=findById(panelSelectedId);let buttonPanelSelected=findById(panelSelected.getAttribute(ATTR_LABELLEDBY));let parentTabId=searchParent(e3.target,TABS_JS);let parentTab=findById(parentTabId);let $parentListLinks=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_LISTLINK));let $parentListContents=[].slice.call(parentTab.querySelectorAll("."+TABS_JS_CONTENT));unSelectLinks($parentListLinks);unSelectContents($parentListContents);selectLink(buttonPanelSelected);e3.preventDefault();}},true);});const onLoad=()=>{attach();document.removeEventListener("DOMContentLoaded",onLoad);};document.addEventListener("DOMContentLoaded",onLoad);window.van11yAccessibleTabPanelAria=attach;};function responsiveNavbar(){document.addEventListener("DOMContentLoaded",()=>{const $navbarBurgers=Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"),0);if($navbarBurgers.length>0){$navbarBurgers.forEach((el)=>{el.addEventListener("click",()=>{const target=el.dataset.target;const $target=document.getElementById(target);el.classList.toggle("is-active");$target.classList.toggle("is-active");});});}});}
  const prismjs=__toModule(require_prism());window.addEventListener("DOMContentLoaded",initCopyToCB,{once:true});window.addEventListener("DOMContentLoaded",initCopyColorToCB,{once:true});initSearch();prismjs.default.highlightAll();responsiveNavbar();van11y_default();})();