1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,448805,(e,t,r)=>{t.exports=function(e,t){this.v=e,this.k=t},t.exports.__esModule=!0,t.exports.default=t.exports},21711,(e,t,r)=>{function n(e,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}t.exports=n=function(e,t,r,i){function o(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r,i,o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},817080,(e,t,r)=>{var n=e.r(21711);function i(){var e,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(t,i,o,a){var s=Object.create((i&&i.prototype instanceof l?i:l).prototype);return n(s,"_invoke",function(t,n,i){var o,a,s,u=0,l=i||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,a=0,s=e,p.n=r,c}};function d(t,n){for(a=t,s=n,r=0;!f&&u&&!i&&r<l.length;r++){var i,o=l[r],d=p.p,h=o[2];t>3?(i=h===n)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=t<2&&d<o[1])?(a=0,p.v=n,p.n=o[1]):d<h&&(i=t<3||o[0]>n||n>h)&&(o[4]=t,o[5]=n,p.n=h,a=0))}if(i||t>1)return c;throw f=!0,n}return function(i,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),a=l,s=h;(r=a<2?e:s)||!f;){o||(a?a<3?(a>1&&(p.n=-1),d(a,s)):p.n=s:p.v=s);try{if(u=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((r=(f=p.n<0)?s:t.call(n,p))!==c)break}catch(t){o=e,a=1,s=t}finally{u=1}}return{value:r,done:f}}}(t,o,a),!0),s}var c={};function l(){}function f(){}function p(){}r=Object.getPrototypeOf;var d=p.prototype=l.prototype=Object.create([][a]?r(r([][a]())):(n(r={},a,function(){return this}),r));function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=p,n(d,"constructor",p),n(p,"constructor",f),f.displayName="GeneratorFunction",n(p,s,"GeneratorFunction"),n(d),n(d,s,"Generator"),n(d,a,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:u,m:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},306194,(e,t,r)=>{var n=e.r(448805),i=e.r(21711);t.exports=function e(t,r){var o;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,i,a){function s(){return new r(function(i,o){!function e(i,o,a,s){try{var u=t[i](o),c=u.value;return c instanceof n?r.resolve(c.v).then(function(t){e("next",t,a,s)},function(t){e("throw",t,a,s)}):r.resolve(c).then(function(e){u.value=e,a(u)},function(t){return e("throw",t,a,s)})}catch(e){s(e)}}(e,a,i,o)})}return o=o?o.then(s,s):s()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},277794,(e,t,r)=>{var n=e.r(817080),i=e.r(306194);t.exports=function(e,t,r,o,a){return new i(n().w(e,t,r,o),a||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},955534,(e,t,r)=>{var n=e.r(277794);t.exports=function(e,t,r,i,o){var a=n(e,t,r,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},458479,(e,t,r)=>{t.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},t.exports.__esModule=!0,t.exports.default=t.exports},751345,(e,t,r)=>{function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}
1,t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},64239,(e,t,r)=>{var n=e.r(751345).default;t.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},259994,(e,t,r)=>{var n=e.r(448805),i=e.r(817080),o=e.r(955534),a=e.r(277794),s=e.r(306194),u=e.r(458479),c=e.r(64239);function l(){"use strict";var e=i(),r=e.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function h(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,i,o){return t.resultName=i,r(n.d,c(e),o)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(t.exports=l=function(){return{wrap:function(t,r,n,i){return e.w(h(t),r,n,i&&i.reverse())},isGeneratorFunction:p,mark:e.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,i){return(p(t)?a:o)(h(e),t,r,n,i)},keys:u,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},968680,(e,t,r)=>{var n=e.r(259994)();t.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},105524,(e,t,r)=>{!function(n,i){"use strict";if("function"==typeof define&&define.amd){let n;void 0!==(n=i(e.r,r,t))&&e.v(n)}else t.exports?t.exports=i():n.log=i()}(e.e,function(){"use strict";var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?e:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(u.call(this),this[e].apply(this,arguments))}}function l(n,i,o){var u;return"debug"===(u=n)&&(u="log"),typeof console!==t&&("trace"===u&&r?s:void 0!==console[u]?a(console,u):void 0!==console.log?a(console,"log"):e)||c.apply(this,arguments)}function f(e,r){var a,s,c,f=this,p="loglevel";function d(){var e;if(typeof window!==t&&p){try{e=window.localStorage[p]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(p),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===f.levels[e]&&(e=void 0),e}}function h(e){var t=e;if("string"==typeof t&&void 0!==f.levels[t.toUpperCase()]&&(t=f.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=f.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?p+=":"+e:"symbol"==typeof e&&(p=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=r||l,f.getLevel=function(){return null!=c?c:null!=s?s:a},f.setLevel=function(e,r){return c=h(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&p){try{window.localStorage[p]=r;return}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"="+r+";"}catch(e){}}}(c),u.call(f)},f.setDefaultLevel=function(e){s=h(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){if(c=null,typeof window!==t&&p){try{window.localStorage.removeItem(p)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}u.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(o!==f&&(a=h(o.getLevel())),u.call(f),o===f)for(var e in i)i[e].rebuild()},a=h(o?o.getLevel():"WARN");var y=d();null!=y&&(c=h(y)),u.call(f)}(o=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,o.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=p),o},o.getLoggers=function(){return i},o.default=o,o})},913167,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(t,r,n){var i=this.constructor,o=e.call(this,t)||this;return o.name=i.name,o.httpBody=r,o.httpStatus=n,Object.setPrototypeOf(o,i.prototype),o}return n.__extends(t,e),t}(Error)},194559,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},168540,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},604806,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},533934,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},805249,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},819434,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},442046,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},210674,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},916041,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.importResults=r,i.payload=n,i}return n.__extends(t,e),t}(n.__importDefault(e.r(913167)).default)},975342,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ImportError=r.TypesenseError=r.ServerError=r.RequestUnauthorized=r.RequestMalformed=r.ObjectUnprocessable=r.ObjectNotFound=r.ObjectAlreadyExists=r.MissingConfigurationError=r.HTTPError=void 0;var n=e.r(824627);r.HTTPError=n.__importDefault(e.r(194559)).default,r.MissingConfigurationError=n.__importDefault(e.r(168540)).default,r.ObjectAlreadyExists=n.__importDefault(e.r(604806)).default,r.ObjectNotFound=n.__importDefault(e.r(533934)).default,r.ObjectUnprocessable=n.__importDefault(e.r(805249)).default,r.RequestMalformed=n.__importDefault(e.r(819434)).default,r.RequestUnauthorized=n.__importDefault(e.r(442046)).default,r.ServerError=n.__importDefault(e.r(210674)).default,r.ImportError=n.__importDefault(e.r(916041)).default,r.TypesenseError=n.__importDefault(e.r(913167)).default},706921,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importStar(e.r(105524)),o=e.r(975342);r.default=function(){function e(e){var t=this;this.nodes=e.nodes||[],this.nodes=this.nodes.map(function(e){return t.setDefaultPathInNode(e)}).map(function(e){return t.setDefaultPortInNode(e)}).map(function(e){return n.__assign({},e)}),null==e.randomizeNodes&&(e.randomizeNodes=!0),!0===e.randomizeNodes&&this.shuffleArray(this.nodes),this.nearestNode=e.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=e.connectionTimeoutSeconds||e.timeoutSeconds||5,this.healthcheckIntervalSeconds=e.healthcheckIntervalSeconds||60,this.numRetries=(void 0!==e.numRetries&&e.numRetries>=0?e.numRetries:this.nodes.length+ +(null!=this.nearestNode))||3,this.retryIntervalSeconds=e.retryIntervalSeconds||.1,this.apiKey=e.apiKey,this.sendApiKeyAsQueryParam=e.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=e.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=e.useServerSideSearchCache||!1,this.axiosAdapter=e.axiosAdapter,this.logger=e.logger||i,this.logLevel=e.logLevel||"w
1arn",this.logger.setLevel(this.logLevel),this.additionalHeaders=e.additionalHeaders,this.httpAgent=e.httpAgent,this.httpsAgent=e.httpsAgent,this.paramsSerializer=e.paramsSerializer,this.showDeprecationWarnings(e),this.validate()}return e.prototype.validate=function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new o.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new o.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new o.MissingConfigurationError("Ensure that apiKey is set");return!0},e.prototype.validateNodes=function(){var e=this;return this.nodes.some(function(t){return e.isNodeMissingAnyParameters(t)})},e.prototype.isNodeMissingAnyParameters=function(e){return!["protocol","host","port","path"].every(function(t){return e.hasOwnProperty(t)})&&null==e.url},e.prototype.setDefaultPathInNode=function(e){return null==e||e.hasOwnProperty("path")||(e.path=""),e},e.prototype.setDefaultPortInNode=function(e){if(null!=e&&!e.hasOwnProperty("port")&&e.hasOwnProperty("protocol"))switch(e.protocol){case"https":e.port=443;break;case"http":e.port=80}return e},e.prototype.showDeprecationWarnings=function(e){e.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),e.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),e.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},e.prototype.shuffleArray=function(e){for(var t,r=e.length-1;r>0;r--){var n=Math.floor(Math.random()*(r+1));t=[e[n],e[r]],e[r]=t[0],e[n]=t[1]}},e}()},145329,(e,t,r)=>{"use strict";let n,i,o,a;var s,u,c,l,f=e.i(390462);function p(e,t){return function(){return e.apply(t,arguments)}}let{toString:d}=Object.prototype,{getPrototypeOf:h}=Object,{iterator:y,toStringTag:m}=Symbol,g=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),v=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),b=(e,t,r)=>e===Object.prototype||!r&&null===t,_=(e,t)=>{let r=e,n=[];for(;null!=r&&-1===n.indexOf(r);){n.push(r);let i=h(r);if(b(r,i,r===e))break;if(g(r,t))return!0;r=i}return!1},S=(n=Object.create(null),e=>{let t=d.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),w=e=>(e=e.toLowerCase(),t=>S(t)===e),O=e=>t=>typeof t===e,{isArray:P}=Array,R=O("undefined");function E(e){return null!==e&&!R(e)&&null!==e.constructor&&!R(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let C=w("ArrayBuffer"),j=O("string"),A=O("function"),x=O("number"),T=e=>null!==e&&"object"==typeof e,N=e=>{if(!T(e))return!1;let t=h(e);return(null===t||t===Object.prototype||null===h(t))&&!_(e,m)&&!_(e,y)},I=w("Date"),D=w("File"),k=w("Blob"),U=w("FileList"),F=w("Set"),L="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,M=void 0!==L.FormData?L.FormData:void 0,q=w("URLSearchParams"),[H,W,B,$]=["ReadableStream","Request","Response","Headers"].map(w);function z(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),P(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(E(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}function G(e,t){let r;if(E(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let K="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,J=e=>!R(e)&&e!==K,V=(i="u">typeof Uint8Array&&h(Uint8Array),e=>i&&e instanceof i),Q=w("HTMLFormElement"),{propertyIsEnumerable:X}=Object.prototype,Y=w("RegExp"),Z=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};z(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},ee=w("AsyncFunction"),et=(s="function"==typeof setImmediate,u=A(K.postMessage),s?setImmediate:u?(c=`axios@${Math.random()}`,l=[],K.addEventListener("message",({source:e,data:t})=>{e===K&&t===c&&l.length&&l.shift()()},!1),e=>{l.push(e),K.postMessage(c,"*")}):e=>setTimeout(e)),er="u">typeof queueMicrotask?queueMicrotask.bind(K):void 0!==f.default&&f.default.nextTick||et,en=e=>null!=e&&A(e[y]);var ei={isArray:P,isArrayBuffer:C,isBuffer:E,isFormData:e=>{if(!e)return!1;if(M&&e instanceof M)return!0;let t=h(e);if(!t||t===Object.prototype||!A(e.append))return!1;let r=S(e);return"formdata"===r||"object"===r&&A(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&C(e.buffer)},isString:j,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:T,isPlainObject:N,isEmptyObject:e=>{if(!T(e)||E(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:H,isRequest:W,isResponse:B,isHeaders:$,isUndefined:R,isDate:I,isFile:D,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:k,isRegExp:Y,isFunction:A,isStream:e=>T(e)&&A(e.pipe),isURLSearchParams:q,isTypedArray:V,isFileList:U,forEach:z,merge:function e(...t){let{caseless:r,skipUndefined:n}=J(this)&&this||{},i={},o=(t,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;let a=r&&"string"==typeof o&&G(i,o)||o,s=g(i,a)?i[a]:void 0;N(s)&&N(t)?i[a]=e(s,t):N(t)?i[a]=e({},t):P(t)?i[a]=t.slice():n&&R(t)||(i[a]=t)};for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!r||E(r)||(z(r,o),"object"!=typeof r||P(r)))continue;let n=Object.getOwnPropertySymbols(r);for(let e=0;e<n.length;e++){let t=n[e];X.call(r,t)&&o(r[t],t)}}return i},extend:(e,t,r,{allOwnKeys:n}={})=>(z(t,(t,n)=>{r&&A(t)?Object.defineProperty(e,n,{__proto__:null,value:p(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
1configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&h(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:S,kindOfTest:w,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(P(e))return e;let t=e.length;if(!x(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[y]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Q,hasOwnProperty:g,hasOwnProp:g,hasOwnInPrototypeChain:_,getSafeProp:(e,t)=>null!=e&&_(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;let t=h(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(v(t))return!1;let r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&!0===r.writable})})(e))return e;let r=Object.create(null),n=Object.create(null),i=[],o=e;for(;null!=o&&-1===i.indexOf(o);){i.push(o);let a=o===e?t:h(o);if(b(o,a,o===e))break;let s=Object.getOwnPropertyNames(o);for(let t of(Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(o)),s))!v(t)&&(g(n,t)||(r[t]=e[t],n[t]=!0));o=a}return r},reduceDescriptors:Z,freezeMethods:e=>{Z(e,(t,r)=>{if(A(e)&&["arguments","caller","callee"].includes(r))return!1;if(A(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(P(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:G,global:K,isContextDefined:J,isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&"FormData"===e[m]&&e[y])},toJSONObject:e=>{let t=new WeakSet,r=e=>{if(T(e)){if(t.has(e))return;if(E(e))return e;if(!("toJSON"in e)){let n;if(t.add(e),F(e))for(let t of(n=[],e)){let e=r(t);R(e)||n.push(e)}else n=P(e)?[]:{},z(e,(e,t)=>{let i=r(e);R(i)||(n[t]=i)});return t.delete(e),n}}return e};return r(e)},isAsyncFn:ee,isThenable:e=>e&&(T(e)||A(e))&&A(e.then)&&A(e.catch),setImmediate:et,asap:er,isIterable:en,isSafeIterable:e=>null!=e&&_(e,y)&&en(e)};let eo=ei.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ea=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),es=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function eu(e,t){return ei.isArray(e)?e.map(e=>eu(e,t)):function(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}(String(e).replace(t,""))}function ec(e){let t=Object.create(null);return ei.forEach(e.toJSON(),(e,r)=>{t[r]=eu(e,es)}),t}let el=Symbol("internals");function ef(e){return e&&String(e).trim().toLowerCase()}function ep(e){return!1===e||null==e?e:ei.isArray(e)?e.map(ep):eu(String(e),ea)}let ed=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function eh(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}function ey(e,t,r,n,i){if(ei.isFunction(n))return n.call(this,t,r);if(i&&(t=r),ei.isString(t)){if(ei.isString(n))return -1!==t.indexOf(n);if(ei.isRegExp(n))return n.test(t)}}class em{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=ef(t);if(!i)return;let o=ei.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=ep(e))}let o=(e,t)=>
1ei.forEach(e,(e,r)=>i(e,r,t));if(ei.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{let n;if(ei.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var a;let r,n,i,s;o((s={},(a=e)&&a.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim();let t=ei.hasOwnProp(s,r);!r||t&&ei.hasOwnProp(eo,r)||("set-cookie"===r?t?s[r].push(n):s[r]=[n]:s[r]=t?s[r]+", "+n:n)}),s),t)}else if(ei.isObject(e)&&ei.isSafeIterable(e)){let r=Object.create(null),n,i;for(let t of e){if(!ei.isArray(t))throw TypeError("Object iterator must return a key-value pair");i=t[0],ei.hasOwnProp(r,i)?(n=r[i],r[i]=ei.isArray(n)?[...n,t[1]]:[n,t[1]]):r[i]=t[1]}o(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=ef(e)){let r=ei.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(ei.isFunction(t))return t.call(this,e,r);if(ei.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ef(e)){let r=ei.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||ey(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=ef(e)){let i=ei.findKey(r,e);i&&(!t||ey(r,r[i],i,t))&&(delete r[i],n=!0)}}return ei.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||ey(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return ei.forEach(this,(n,i)=>{let o=ei.findKey(r,i);if(o){t[o]=ep(n),delete t[i];return}let a=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();a!==i&&delete t[i],t[a]=ep(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ei.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ei.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){let e=this.get("set-cookie");return ei.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){let t=Object.create(null),r=String(e),n=0,i=!1,o=!1;function a(e){let i=eh(r.slice(n,e)),o=i.indexOf("=");if(o<1)return;let a=eh(i.slice(0,o));if(!ed.test(a))return;let s=a.toLowerCase();if("__proto__"===s||"constructor"===s||"prototype"===s)return;let u=eh(i.slice(o+1));t[s]=function(e){let t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let r="";for(let n=1;n<t;n++){let i=e.charCodeAt(n);if(34===i||92===i&&(n+=1)>=t)return e;r+=e[n]}return r}(u)}for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);i?o?o=!1:92===t?o=!0:34===t&&(i=!1):34===t?i=!0:(44===t||59===t)&&(a(e),n=e+1)}return a(r.length),t}(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[el]=this[el]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=ef(e);if(!t[n]){let i;i=ei.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{__proto__:null,value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return ei.isArray(e)?e.forEach(n):n(e),this}}em.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ei.reduceDescriptors(em.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),ei.freezeMethods(em);let eg="[REDACTED ****]";function ev(e){try{return String(e)}catch(e){return""}}class eb extends Error{static from(e,t,r,n,i,o){let a=e.message;!a&&ei.isArray(e.errors)&&e.errors.length&&(a=e.errors.map(e=>{try{return e&&e.message?ev(e.message):ev(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError");let s=new eb(a,t||e.code,r,n,i);return Object.defineProperty(s,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,
1configurable:!0}),s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){let e,t,r,n=this.config,i=n&&ei.hasOwnProp(n,"redact")?n.redact:void 0,o=ei.isArray(i)&&i.length>0?(e=new Set(i.map(e=>String(e).toLowerCase())),t=[],(r=n=>{let i;if(null===n||"object"!=typeof n||ei.isBuffer(n))return n;if(-1===t.indexOf(n)){if(n instanceof em&&(n=n.toJSON()),t.push(n),ei.isArray(n))i=[],n.forEach((e,t)=>{let n=r(e);ei.isUndefined(n)||(i[t]=n)});else{if(!ei.isPlainObject(n)&&function(e){if(ei.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ei.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(n))return t.pop(),n;for(let[t,o]of(i=Object.create(null),Object.entries(n))){let n=e.has(t.toLowerCase())?eg:r(o);ei.isUndefined(n)||(i[t]=n)}}return t.pop(),i}})(n)):ei.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}}function e_(e){return ei.isPlainObject(e)||ei.isArray(e)}function eS(e){return ei.endsWith(e,"[]")?e.slice(0,-2):e}function ew(e,t,r){return e?e.concat(t).map(function(e,t){return e=eS(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}eb.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",eb.ERR_BAD_OPTION="ERR_BAD_OPTION",eb.ECONNABORTED="ECONNABORTED",eb.ETIMEDOUT="ETIMEDOUT",eb.ECONNREFUSED="ECONNREFUSED",eb.ERR_NETWORK="ERR_NETWORK",eb.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",eb.ERR_DEPRECATED="ERR_DEPRECATED",eb.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",eb.ERR_BAD_REQUEST="ERR_BAD_REQUEST",eb.ERR_CANCELED="ERR_CANCELED",eb.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",eb.ERR_INVALID_URL="ERR_INVALID_URL",eb.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let eO=ei.toFlatObject(ei,{},null,function(e){return/^is[A-Z]/.test(e)});function eP(e,t,r){if(!ei.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(e,t)=>{let n=ei.getSafeProp(r,e);return ei.isUndefined(n)?t:n},i=n("metaTokens",!0),o=n("visitor")||h,a=n("dots",!1),s=n("indexes",!1),u=n("Blob")||"u">typeof Blob&&Blob,c=n("maxDepth",100),l=u&&ei.isSpecCompliantForm(t),f=[];if(!ei.isFunction(o))throw TypeError("visitor must be a function");function p(e){if(null===e)return"";if(ei.isDate(e))return e.toISOString();if(ei.isBoolean(e))return e.toString();if(!l&&ei.isBlob(e))throw new eb("Blob is not supported. Use a Buffer instead.");if(ei.isArrayBuffer(e)||ei.isTypedArray(e)){if(l&&"function"==typeof u)return new u([e]);throw new eb("Blob is not supported. Use a Buffer instead.",eb.ERR_NOT_SUPPORT)}return e}function d(e){if(e>c)throw new eb("Object is too deeply nested ("+e+" levels). Max depth: "+c,eb.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,r,n){let o=e;if(ei.isReactNative(t)&&ei.isReactNativeBlob(e))return t.append(ew(n,r,a),p(e)),!1;if(e&&!n&&"object"==typeof e)if(ei.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=function(e,t){if(c===1/0)return JSON.stringify(e);let r=[];return JSON.stringify(e,function(e,t){if(!ei.isObject(t))return t;for(;r.length&&r[r.length-1]!==this;)r.pop();return r.push(t),d(1+r.length-1),t})}(e,0);else{var u;if(ei.isArray(e)&&(u=e,ei.isArray(u)&&!u.some(e_))||(ei.isFileList(e)||ei.endsWith(r,"[]"))&&(o=ei.toArray(e)))return r=eS(r),o.forEach(function(e,n){ei.isUndefined(e)||null===e||t.append(!0===s?ew([r],n,a):null===s?r:r+"[]",p(e))}),!1}return!!e_(e)||(t.append(ew(n,r,a),p(e)),!1)}let y=Object.assign(eO,{defaultVisitor:h,convertValue:p,isVisitable:e_});if(!ei.isObject(e))throw TypeError("data must be an object");return!function e(r,n,i=0){if(!ei.isUndefined(r)){if(d(i),-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));
1f.push(r),ei.forEach(r,function(r,a){!0===(!(ei.isUndefined(r)||null===r)&&o.call(t,r,ei.isString(a)?a.trim():a,n,y))&&e(r,n?n.concat(a):[a],i+1)}),f.pop()}}(e),t}function eR(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function eE(e,t){this._pairs=[],e&&eP(e,this,t)}let eC=eE.prototype;function ej(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eA(e,t,r){let n;if(!t)return e;e=e||"";let i=ei.isFunction(r)?{serialize:r}:r,o=ei.getSafeProp(i,"encode")||ej,a=ei.getSafeProp(i,"serialize");if(n=a?a(t,i):ei.isURLSearchParams(t)?t.toString():new eE(t,i).toString(o)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}eC.append=function(e,t){this._pairs.push([e,t])},eC.toString=function(e){let t=e?t=>e.call(this,t,eR):eR;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let ex=Symbol("internals");function eT(e){return e?e.length:0}function eN(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function eI(e,t){let r=e.handlers,n=eT(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(e,n){r[e.index]!==e.handler&&t.handlerEntries.delete(n)}):t.handlerEntries.clear()),t.handlersLength=n}class eD{constructor(){this.handlers=[],this[ex]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,r){let n={fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null},i=this[ex];null==this.handlers&&(this.handlers=[]),eI(this,i);let o=i.nextId++;return this.handlers.push(n),i.handlerEntries.set(o,{handler:n,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,o}eject(e){let t=this[ex];eI(this,t);let r=t.handlerEntries.get(e);if(r){if(t.handlerEntries.delete(e),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(eN(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],eI(this,this[ex]))}forEach(e){let t=this[ex];eI(this,t),t.iterationDepth++;try{ei.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(eI(this,t),eN(this.handlers),t.handlersLength=eT(this.handlers))}}}var ek={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},eU="u">typeof URLSearchParams?URLSearchParams:eE,eF="u">typeof FormData?FormData:null,eL="u">typeof Blob?Blob:null;let eM="u">typeof window&&"u">typeof document,eq="object"==typeof navigator&&navigator||void 0,eH=eM&&(!eq||0>["ReactNative","NativeScript","NS"].indexOf(eq.product)),eW="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eB=eM&&window.location.href||"http://localhost";var e$={...Object.freeze({__proto__:null,hasBrowserEnv:eM,hasStandardBrowserEnv:eH,hasStandardBrowserWebWorkerEnv:eW,navigator:eq,origin:eB}),isBrowser:!0,classes:{URLSearchParams:eU,FormData:eF,Blob:eL},protocols:["http","https","file","blob","url","data"]};function ez(e){if(e>100)throw new eb("FormData field is too deeply nested ("+e+" levels). Max depth: 100",eb.ERR_FORM_DATA_DEPTH_EXCEEDED)}function eG(e){if(ei.isFormData(e)&&ei.isFunction(e.entries)){let t={};return ei.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){ez(i);let o=t[i++];if("__proto__"===o)return!0;let a=Number.isFinite(+o),s=i>=t.length;return(o=!o&&ei.isArray(n)?n.length:o,s)?ei.hasOwnProp(n,o)?n[o]=ei.isArray(n[o])?n[o].concat(r):[n[o],r]:n[o]=r:(ei.hasOwnProp(n,o)&&ei.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&ei.isArray(n[o])&&(n[o]=function(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o]))),!a}(function(e){let t,r=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;for(;null!==(t=n.exec(e));)ez(r.length),r.push("[]"===t[0]?"":t[1]||t[0]);return r}(e),r,t,0)}),t}return null}let eK=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),eJ=(e,t)=>
1null!=e&&ei.hasOwnProp(e,t)?e[t]:void 0,eV={transitional:ek,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=ei.isObject(e);if(o&&ei.isHTMLForm(e)&&(e=new FormData(e)),ei.isFormData(e))return i?JSON.stringify(eG(e)):e;if(ei.isArrayBuffer(e)||ei.isBuffer(e)||ei.isStream(e)||ei.isFile(e)||ei.isBlob(e)||ei.isReadableStream(e))return e;if(ei.isArrayBufferView(e))return e.buffer;if(ei.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){let t=eJ(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return eP(e,new e$.classes.URLSearchParams,{visitor:function(e,t,r,n){return e$.isNode&&ei.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t}).toString();if((r=ei.isFileList(e))||n.indexOf("multipart/form-data")>-1){let n=eJ(this,"env"),i=n&&n.FormData;return eP(r?{"files[]":e}:e,i&&new i,t)}}if(o||i){t.setContentType("application/json",!1);var a=e;if(ei.isString(a))try{return(0,JSON.parse)(a),ei.trim(a)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(a)}return e}],transformResponse:[function(e){let t=eJ(this,"transitional")||eV.transitional,r=t&&t.forcedJSONParsing,n=eJ(this,"responseType"),i="json"===n;if(ei.isResponse(e)||ei.isReadableStream(e))return e;if(e&&ei.isString(e)&&(r&&!n||i)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,eJ(this,"parseReviver"))}catch(e){if(!r&&i){if("SyntaxError"===e.name)throw eb.from(e,eb.ERR_BAD_RESPONSE,this,null,eJ(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:e$.classes.FormData,Blob:e$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function eQ(e,t){let r=this||eV,n=t||r,i=em.from(n.headers),o=n.data;return ei.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eX(e){return!!(e&&e.__CANCEL__)}ei.forEach(eK,e=>{eV.headers[e]={}});class eY extends eb{constructor(e,t,r){super(null==e?"canceled":e,eb.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}}function eZ(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new eb("Request failed with status code "+r.status,r.status>=400&&r.status<500?eb.ERR_BAD_REQUEST:eb.ERR_BAD_RESPONSE,r.config,r.request,r))}let e0=/[\t\n\r]/g;function e1(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&32>=e.charCodeAt(t);)t++;return e.slice(t).replace(e0,"")}function e2(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}let e4=(e,t,r=3)=>{var n,i,o;let a,s,u,c,l,f,p,d,h,y,m=0,g=(i=250,s=Array(n=n=50),u=Array(n),c=0,l=0,i=void 0!==i?i:1e3,function(e){let t=Date.now(),r=u[l];a||(a=t),s[c]=e,u[c]=t;let o=l,f=0;for(;o!==c;)f+=s[o++],o%=n;if((c=(c+1)%n)===l&&(l=(l+1)%n),t-a<i)return;let p=r&&t-r;return p?Math.round(1e3*f/p):void 0});return o=r=>{if(!r||!ei.isNumber(r.loaded))return;let n=r.loaded,i=r.lengthComputable?r.total:void 0,o=Math.max(0,null!=i?Math.min(n,i):n),a=Math.max(0,o-m),s=g(a);m=Math.max(m,o),e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:s||void 0,estimated:s&&i?(i-o)/s:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})},d=0,h=1e3/r,y=(e,t=Date.now())=>{d=t,f=null,p&&(clearTimeout(p),p=null),o(...e)},[(...e)=>{let t=Date.now(),r=t-d;r>=h?y(e,t):(f=e,p||(p=setTimeout(()=>{p=null,y(f)},h-r)))},()=>f&&y(f),(...e)=>y(e)]},e3=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},e7=(e,t=ei.asap)=>(...r)=>t(()=>e(...r));var e8=e$.hasStandardBrowserEnv?(o=new URL(e$.origin),a=e$.navigator&&/(msie|trident)/i.test(e$.navigator.userAgent),e=>(e=new URL(e,e$.origin),o.protocol===e.protocol&&o.host===e.host&&(a||o.port===e.port))):()=>!0,e6=e$.hasStandardBrowserEnv?{write(e,t,r,n,i,o,a){if("u"<typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];ei.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),ei.isString(n)&&s.push(`path=${n}`),ei.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),ei.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie.split(";");for(let r=0;r<t.length;r++){let n=t[r].replace(/^\s+/,""),i=n.indexOf("=");if(-1!==i&&n.slice(0,i)===e)try{return decodeURIComponent(n.slice(i+1))}catch(e){return n.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};let e5=/^https?:(?!\/\/)/i;function e9(e,t){if("string"==typeof e){let n=e1(e);if(e5.test(n)){var r;let e,i,o;throw new eb(`Invalid URL ${JSON.stringify((o=(-1===(i=(e=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${eg}@`)).indexOf("#"))?e:e.slice(0,i)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${eg}`),-1===i?o:`${o}#${!(r=e.slice(i+1))?r:r.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,r="")=>`${t}${r}${eg}`)}`))}: missing "//" after protocol`,eb.ERR_INVALID_URL,t)}}}function te(e,t,r,n){e9(t,n);let i=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));if(e&&(i||!1===r)){e9(e,n);if(!t)return e;let r=e.length;for(;r>0&&47===e.charCodeAt(r-1);)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}return t}let tt=e=>e instanceof em?{...e}:e;function tr(e,t){var r;e=e||{},t=t||{};let n=Object.create(null);function i(e,t,r,n){return ei.isPlainObject(e)&&ei.isPlainObject(t)?ei.merge.call({caseless:n},e,t):ei.isPlainObject(t)?ei.merge({},t):ei.isArray(t)?t.slice():t}function o(e,t,r,n){return ei.isUndefined(t)?ei.isUndefined(e)?void 0:i(void 0,e,r,n):i(e,t,r,n)}function a(e,t){if(!ei.isUndefined(t))return i(void 0,t)}function s(e,t){return ei.isUndefined(t)?ei.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function u(r,n,o){return ei.hasOwnProp(t,o)?i(r,n):ei.hasOwnProp(e,o)?i(void 0,r):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});let c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutErrorMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:u,headers:(e,t,r)=>o(tt(e),tt(t),r,!0)};
1return ei.forEach((r={...e,...t},Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(r).concat(Object.getOwnPropertySymbols(r).filter(e=>Object.getOwnPropertyDescriptor(r,e).enumerable)):Object.keys(r)),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;let i=ei.hasOwnProp(c,r)?c[r]:o,a=i(ei.hasOwnProp(e,r)?e[r]:void 0,ei.hasOwnProp(t,r)?t[r]:void 0,r);ei.isUndefined(a)&&i!==u||(n[r]=a)}),ei.hasOwnProp(t,"validateStatus")&&ei.isUndefined(t.validateStatus)&&!1===function(r){let n=ei.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ei.isUndefined(n)){if(!ei.isPlainObject(n))return;else if(ei.hasOwnProp(n,r))return n[r]}let i=ei.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ei.isPlainObject(i)&&ei.hasOwnProp(i,r))return i[r]}("validateStatusUndefinedResolves")&&(ei.hasOwnProp(e,"validateStatus")?n.validateStatus=i(void 0,e.validateStatus):delete n.validateStatus),n}let tn=["content-type","content-length"];function ti(e){let t=tr({},e),r=e=>ei.hasOwnProp(t,e)?t[e]:void 0,n=r("data"),i=r("withXSRFToken"),o=r("xsrfHeaderName"),a=r("xsrfCookieName"),s=r("headers"),u=r("auth"),c=r("baseURL"),l=r("allowAbsoluteUrls"),f=r("url");if(t.headers=s=em.from(s),t.url=eA(te(c,f,l,t),r("params"),r("paramsSerializer")),u){let t=ei.getSafeProp(u,"username")||"",r=ei.getSafeProp(u,"password")||"";try{s.set("Authorization","Basic "+btoa(t+":"+(r?encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw eb.from(t,eb.ERR_BAD_OPTION_VALUE,e)}}if(ei.isFormData(n)){let e=ei.getSafeProp(n,"getHeaders");if(e$.hasStandardBrowserEnv||e$.hasStandardBrowserWebWorkerEnv||ei.isReactNative(n))s.setContentType(void 0);else{var p,d;ei.isFunction(e)&&(p=s,d=e.call(n),"content-only"!==r("formDataHeaderPolicy")?p.set(d):Object.entries(d||{}).forEach(([e,t])=>{tn.includes(e.toLowerCase())&&p.set(e,t)}))}}if(e$.hasStandardBrowserEnv&&(ei.isFunction(i)&&(i=i(t)),!0===i||null==i&&e8(t.url))){let e=o&&a&&e6.read(a);e&&s.set(o,e)}return t}var to="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,a,s,u,c=ti(e),l=c.data,f=em.from(c.headers).normalize(),{responseType:p,onUploadProgress:d,onDownloadProgress:h}=c;function y(){a&&a(),s&&s(),c.cancelToken&&c.cancelToken.unsubscribe(n),c.signal&&c.signal.removeEventListener("abort",n)}let m=new XMLHttpRequest;function g(n){if(!m)return;if(0===m.status&&"file"!==(e2(e1(c.url))||e2(e$.origin))&&!(m.responseURL&&m.responseURL.startsWith("file:"))){r(new eb("Request aborted",eb.ECONNABORTED,e,m)),y(),m=null;return}try{n?u&&u(n):s&&s()}catch(e){setTimeout(()=>{throw e})}if(!m)return;let i=em.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());eZ(function(e){t(e),y()},function(e){r(e),y()},{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:i,config:e,request:m}),m=null}m.open(c.method.toUpperCase(),c.url,!0),m.timeout=c.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||4!==m.readyState||(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new eb("Request aborted",eb.ECONNABORTED,e,m)),y(),m=null)},m.onerror=function(t){let n=new eb(t&&t.message?t.message:"Network Error",eb.ERR_NETWORK,e,m);n.event=t||null,r(n),y(),m=null},m.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",n=c.transitional||ek;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),r(new eb(t,n.clarifyTimeoutError?eb.ETIMEDOUT:eb.ECONNABORTED,e,m)),y(),m=null},void 0===l&&f.setContentType(null),"setRequestHeader"in m&&ei.forEach(ec(f),function(e,t){m.setRequestHeader(t,e)}),ei.isUndefined(c.withCredentials)||(m.withCredentials=!!c.withCredentials),p&&"json"!==p&&(m.responseType=c.responseType),h&&([o,s,u]=e4(h,!0),m.addEventListener("progress",o)),d&&m.upload&&([i,a]=e4(d),m.upload.addEventListener("progress",i),m.upload.addEventListener("loadend",a)),(c.cancelToken||c.signal)&&(n=t=>{m&&(r(!t||t.type?new eY(null,e,m):t),m.abort(),y(),m=null)},c.cancelToken&&c.cancelToken.subscribe(n),c.signal&&(c.signal.aborted?n():c.signal.addEventListener("abort",n)));let v=e2(c.url);if(v&&!e$.protocols.includes(v)){r(new eb("Unsupported protocol "+v+":",eb.ERR_BAD_REQUEST,e)),y();return}m.send(l||null)})};let ta=function*(e,t){let r,n=e.byteLength;if(n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},ts=async function*(e,t){for await(let r of tu(e))yield*ta(r,t)},tu=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},tc=(e,t,r,n)=>{let i,o=ts(e,t),a=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},tl=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,tf=(e,t,r)=>t+2<r&&tl(e.charCodeAt(t+1))&&tl(e.charCodeAt(t+2)),tp=e=>e<=57?e-48:(223&e)-55,td=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,th=e=>9===e||10===e||12===e||13===e||32===e,ty=e=>{var t;let r,n,i=e.length,o=0,a=0,s=!1;for(let t=0;t<i;t++){let r=e.charCodeAt(t);if(37===r&&tf(e,t,i)&&(r=16*tp(e.charCodeAt(t+1))+tp(e.charCodeAt(t+2)),t+=2),!th(r)){if(61===r){a++;continue}if(!td(r)||a>0){s=!0;continue}o++}}if(s||a>2||a>0&&(o+a)%4!=0||o%4==1){let t,r;return t=e.length,r=0,t>0&&61===e.charCodeAt(t-1)&&(r++,t>1&&61===e.charCodeAt(t-2)&&r++),Math.floor((t-r)*3/4)}return r=Math.floor((t=o)/4),3*r+(2==(n=t%4)?1:2*(3===n))}
1,tm="1.20.0",tg={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:tv}=ei,tb=e=>{if(!ei.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},t_=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tS=e=>{let t,r=void 0!==ei.global&&null!==ei.global?ei.global:globalThis,{ReadableStream:n,TextEncoder:i}=r,{fetch:o,Request:a,Response:s}=e=ei.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response},e),u=o?tv(o):"function"==typeof fetch,c=tv(a),l=tv(s);if(!u)return!1;let f=u&&tv(n),p=u&&("function"==typeof i?(t=new i,e=>t.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer())),d=c&&f&&t_(()=>{let e=!1,t=new a(e$.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),h=l&&f&&t_(()=>ei.isReadableStream(new s("").body)),y={stream:h&&(e=>e.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{y[e]||(y[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new eb(`Response type '${e}' is not supported`,eb.ERR_NOT_SUPPORT,r)})});let m=async e=>{if(null==e)return 0;if(ei.isBlob(e))return e.size;if(ei.isSpecCompliantForm(e)){let t=new a(e$.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ei.isArrayBufferView(e)||ei.isArrayBuffer(e)?e.byteLength:(ei.isURLSearchParams(e)&&(e+=""),ei.isString(e))?(await p(e)).byteLength:void 0},g=async(e,t)=>{let r=ei.toFiniteNumber(e.getContentLength());return null==r?m(t):r};return async e=>{let t,{url:r,method:n,data:u,signal:l,cancelToken:p,timeout:v,onDownloadProgress:b,onUploadProgress:_,responseType:S,headers:w,withCredentials:O="same-origin",fetchOptions:P,maxContentLength:R,maxBodyLength:E,maxRedirects:C}=ti(e),j=ei.isNumber(R)&&R>-1,A=ei.isNumber(E)&&E>-1,x=o||fetch;S=S?(S+"").toLowerCase():"text";let T=((e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let r=new AbortController,n=!1,i=function(e){if(!n){n=!0,a();let t=e instanceof Error?e:this.reason;r.abort(t instanceof eb?t:new eY(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new eb(`timeout of ${t}ms exceeded`,eb.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>{if(!n){if(e.aborted)return void i.call(e);e.addEventListener("abort",i,{once:!0})}});let{signal:s}=r;return s.unsubscribe=()=>ei.asap(a),s})([l,p&&p.toAbortSignal()],v),N=null,I=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),D=null,k=()=>new eb("Request body larger than maxBodyLength limit",eb.ERR_BAD_REQUEST,e,N);try{var U,F;let o,l,p,v,L=(l="auth",ei.hasOwnProp(e,l)?e[l]:void 0);if(L){let e=ei.getSafeProp(L,"username")||"",t=ei.getSafeProp(L,"password")||"";o={username:e,password:t}}if(p=(U=r).indexOf("://"),v=U,-1!==p&&(v=v.slice(p+3)),v.includes("@")||v.includes(":")){let e=new URL(r,e$.origin);if(!o&&(e.username||e.password)){let t=tb(e.username),r=tb(e.password);o={username:t,password:r}}(e.username||e.password)&&(e.username="",e.password="",r=e.href)}if(o){let e;w.delete("authorization"),w.set("Authorization","Basic "+btoa((e=(o.username||"")+":"+(o.password||""),encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))}if(j&&"string"==typeof r&&r.startsWith("data:")){let t;if(F=r,t="string"==typeof F?F.indexOf("#"):-1,((e,t)=>{if(!e||"string"!=typeof e||!e.startsWith("data:"))return 0;let r=e.indexOf(",");if(r<0)return 0;let n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let o=0;for(let e=0,t=i.length;e<t;e++){let r=i.charCodeAt(e);if(37===r&&tf(i,e,t))o+=1,e+=2;else if(r<128)o+=1;else if(r<2048)o+=2;else if(r>=55296&&r<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o})(-1===t?F:F.slice(0,t),ty)>R)throw new eb("maxContentLength size of "+R+" exceeded",eb.ERR_BAD_RESPONSE,e,N)}if(A&&"get"!==n&&"head"!==n){let e=await m(u);if("number"==typeof e&&isFinite(e)&&(t=e,e>E))throw k()}let M=A&&(ei.isReadableStream(u)||ei.isStream(u)),q=(e,t,r)=>tc(e,65536,e=>{if(A&&e>E)throw D=k();t&&t(e)},r);
1if(d&&"get"!==n&&"head"!==n&&(_||M)){if(t=null==t?await g(w,u):t,0!==t||M){let e,n=new a(r,{method:"POST",body:u,duplex:"half"});if(ei.isFormData(u)&&(e=n.headers.get("content-type"))&&w.setContentType(e),n.body){let[e,r]=_&&e3(t,e4(e7(_)))||[];u=q(n.body,e,r)}}}else if(M&&!c&&f&&"get"!==n&&"head"!==n)u=q(u);else if(M&&c&&!d&&"get"!==n&&"head"!==n)throw new eb("Stream request bodies are not supported by the current fetch implementation",eb.ERR_NOT_SUPPORT,e,N);ei.isString(O)||(O=O?"include":"omit");let H=c&&"credentials"in a.prototype;if(ei.isFormData(u)){let e=w.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&w.delete("content-type")}w.set("User-Agent","axios/"+tm,!1);let W=null==P?P:Object.assign(Object.create(null),P);W&&(delete W.body,delete W.headers,delete W.method,delete W.signal,delete W.duplex,delete W.credentials);let B=Object.assign(Object.create(null),W,{signal:T,method:n.toUpperCase(),headers:ec(w.normalize()),body:u,duplex:"half",credentials:H?O:void 0});c&&(ei.forEach(tg,(e,t)=>{void 0===B[t]&&(B[t]=e)}),void 0===B.signal&&(B.signal=null),void 0===B.body&&(B.body=null)),0===C&&(B.redirect="manual",W&&(W.redirect="manual")),N=c&&new a(r,B);let $=await (c?x(N,W):x(r,B)),z=em.from($.headers);if(j){let t=ei.toFiniteNumber(z.getContentLength());if(null!=t&&t>R)throw new eb("maxContentLength size of "+R+" exceeded",eb.ERR_BAD_RESPONSE,e,N)}let G=h&&("stream"===S||"response"===S);if(h&&$.body&&(b||j||G&&I)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=$[e]});let r=ei.toFiniteNumber(z.getContentLength()),[n,i]=b&&e3(r,e4(e7(b),!0))||[];$=new s(tc($.body,65536,t=>{if(j&&t>R)throw new eb("maxContentLength size of "+R+" exceeded",eb.ERR_BAD_RESPONSE,e,N);n&&n(t)},()=>{i&&i(),I&&I()}),t)}S=S||"text";let K=await y[ei.findKey(y,S)||"text"]($,e);if(j&&!h&&!G){let t;if(null!=K&&("number"==typeof K.byteLength?t=K.byteLength:"number"==typeof K.size?t=K.size:"string"==typeof K&&(t="function"==typeof i?new i().encode(K).byteLength:K.length)),"number"==typeof t&&t>R)throw new eb("maxContentLength size of "+R+" exceeded",eb.ERR_BAD_RESPONSE,e,N)}return!G&&I&&I(),await new Promise((t,r)=>{eZ(t,r,{data:K,headers:em.from($.headers),status:$.status,statusText:$.statusText,config:e,request:N})})}catch(t){if(I&&I(),T&&T.aborted&&T.reason instanceof eb){let r=T.reason;throw r.config=e,N&&(r.request=N),t!==r&&Object.defineProperty(r,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),r}if(D)throw N&&!D.request&&(D.request=N),D;if(t instanceof eb)throw N&&!t.request&&(t.request=N),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){let r=new eb("Network Error",eb.ERR_NETWORK,e,N,t&&t.response);throw Object.defineProperty(r,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),r}throw eb.from(t,t&&t.code,e,N,t&&t.response)}}},tw=new Map,tO=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,o=[n,i,r],a=o.length,s,u,c=tw;for(;a--;)s=o[a],void 0===(u=c.get(s))&&c.set(s,u=a?new Map:tS(t)),c=u;return u};tO();let tP={http:null,xhr:to,fetch:{get:tO}};ei.forEach(tP,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});let tR=e=>`- ${e}`,tE=e=>ei.isFunction(e)||null===e||!1===e;var tC=function(e,t){let r,n,{length:i}=e=ei.isArray(e)?e:[e],o={};for(let a=0;a<i;a++){let i;if(n=r=e[a],!tE(r)&&void 0===(n=tP[(i=String(r)).toLowerCase()]))throw new eb(`Unknown adapter '${i}'`);if(n&&(ei.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new eb("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(tR).join("\n"):" "+tR(e[0]):"as no adapter specified"),eb.ERR_NOT_SUPPORT)}return n};function tj(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eY(null,e)}function tA(e){let t=ei.toSafeFlatObject(e);return tj(t),t.headers=em.from(ei.getSafeProp(t,"headers")),t.data=eQ.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tC(t.adapter||eV.adapter,t)(t).then(function(e){tj(t),t.response=e;try{e.data=eQ.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=em.from(e.headers),e},function(e){if(!eX(e)&&(tj(t),e&&e.response)){t.response=e.response;try{e.response.data=eQ.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=em.from(e.response.headers)}return Promise.reject(e)})}let tx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tT={};tx.transitional=function(e,t,r){function n(e,t){return"[Axios v"+tm+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>
1{if(!1===e)throw new eb(n(i," has been removed"+(t?" in "+t:"")),eb.ERR_DEPRECATED);return t&&!tT[i]&&(tT[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},tx.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var tN=function(e,t,r){if("object"!=typeof e||null===e)throw new eb("options must be an object",eb.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new eb("option "+o+" must be "+r,eb.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new eb("Unknown option "+o,eb.ERR_BAD_OPTION)}};class tI{constructor(e){this.defaults=e||{},this.interceptors={request:new eD,response:new eD}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack,n="";if("string"==typeof r){let e=r.indexOf("\n");n=-1===e?"":r.slice(e+1)}if(e.stack){if(n){let t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),i=-1===r?"":n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=tr(this.defaults,t);void 0!==i&&tN(i,{silentJSONParsing:tx.transitional(tx.boolean),forcedJSONParsing:tx.transitional(tx.boolean),clarifyTimeoutError:tx.transitional(tx.boolean),legacyInterceptorReqResOrdering:tx.transitional(tx.boolean),advertiseZstdAcceptEncoding:tx.transitional(tx.boolean),validateStatusUndefinedResolves:tx.transitional(tx.boolean)},!1),null!=o&&(ei.isFunction(o)?t.paramsSerializer={serialize:o}:tN(o,{encode:tx.function,serialize:tx.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tN(t,{baseUrl:tx.spelling("baseURL"),withXsrfToken:tx.spelling("withXSRFToken")},!0),t.method=(ei.getSafeProp(t,"method")||ei.getSafeProp(this.defaults,"method")||"get").toLowerCase();let s=a&&ei.merge(a.common,a[t.method]);a&&ei.forEach(eK.concat("common"),e=>{delete a[e]}),t.headers=em.concat(s,a);let u=[],c=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;c=c&&e.synchronous;let r=t.transitional||ek;r&&r.legacyInterceptorReqResOrdering?u.unshift(e.fulfilled,e.rejected):u.push(e.fulfilled,e.rejected)});let l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let f=0;if(!c){let e=[tA.bind(this),void 0];for(e.unshift(...u),e.push(...l),n=e.length,r=Promise.resolve(t);f<n;)r=r.then(e[f++],e[f++]);return r}n=u.length;let p=t;for(;f<n;){let e=u[f++],t=u[f++];try{p=e?e(p):p}catch(e){if(!t){r=Promise.reject(e);break}try{let n=t.call(this,e);ei.isThenable(n)&&(r=Promise.resolve(n).then(()=>tA.call(this,p)))}catch(e){r=Promise.reject(e)}break}}if(!r)try{r=tA.call(this,p)}catch(e){r=Promise.reject(e)}for(f=0,n=l.length;f<n;)r=r.then(l[f++],l[f++]);return r}getUri(e){return eA(te((e=tr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}ei.forEach(["delete","get","head","options"],function(e){tI.prototype[e]=function(t,r){return this.request(tr(r||{},{method:e,url:t,data:r&&ei.hasOwnProp(r,"data")?r.data:void 0}))}}),ei.forEach(["post","put","patch","query"],function(e){function t(t){return function(r,n,i){return this.request(tr(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tI.prototype[e]=t(),"query"!==e&&(tI.prototype[e+"Form"]=t(!0))});class tD{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eY(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
1subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tD(function(t){e=t}),cancel:e}}}let tk={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tk).forEach(([e,t])=>{void 0===tk[t]&&(tk[t]=e)});let tU=function e(t){let r=new tI(t),n=p(tI.prototype.request,r);return ei.extend(n,tI.prototype,r,{allOwnKeys:!0}),ei.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(tr(t,r))},n}(eV);tU.Axios=tI,tU.CanceledError=eY,tU.CancelToken=tD,tU.isCancel=eX,tU.VERSION=tm,tU.toFormData=eP,tU.AxiosError=eb,tU.Cancel=tU.CanceledError,tU.all=function(e){return Promise.all(e)},tU.spread=function(e){return function(t){return e.apply(null,t)}},tU.isAxiosError=function(e){return ei.isObject(e)&&!0===e.isAxiosError},tU.mergeConfig=tr,tU.AxiosHeaders=em,tU.formToJSON=e=>eG(ei.isHTMLForm(e)?new FormData(e):e),tU.getAdapter=tC,tU.HttpStatusCode=tk,tU.default=tU,t.exports=tU},4868,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.arrayableParams=void 0,r.arrayableParams={query_by:"query_by",query_by_weights:"query_by_weights",facet_by:"facet_by",group_by:"group_by",include_fields:"include_fields",exclude_fields:"exclude_fields",highlight_fields:"highlight_fields",highlight_full_fields:"highlight_full_fields",pinned_hits:"pinned_hits",hidden_hits:"hidden_hits",infix:"infix",override_tags:"override_tags",num_typos:"num_typos",prefix:"prefix",synonym_sets:"synonym_sets",sort_by:"sort_by"}},5729,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.normalizeArrayableParams=function(e){var t=n.__assign({},e);if(!Object.keys(i.arrayableParams).filter(function(e){return Array.isArray(t[e])}).map(function(e){return t[e]=t[e].join(","),e}).length&&o(t))return t;if(!o(t))throw Error("Failed to normalize arrayable params: ".concat(JSON.stringify(t)));return t},r.toErrorWithMessage=function(e){if("object"==typeof e&&null!==e&&"message"in e&&"string"==typeof e.message)return e;try{if("string"==typeof e)return Error(e);return Error(JSON.stringify(e))}catch(t){return Error(String(e))}};var n=e.r(824627),i=e.r(4868);function o(e){return Object.keys(i.arrayableParams).filter(function(t){return void 0!==e[t]}).every(function(t){return!Array.isArray(e[t])})}},234064,(e,t,r)=>{"use strict";var n=e.i(390462);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),o=i.__importDefault(e.r(145329)),a={},s={},u=e.r(975342),c=i.__importDefault(e.r(913167)),l=e.r(5729),f=void 0!==n.default&&null!=n.default.versions&&null!=n.default.versions.node&&"u"<typeof window;r.default=function(){function e(e){this.configuration=e,this.apiKey=this.configuration.apiKey,this.nodes=null==this.configuration.nodes?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=null==this.configuration.nearestNode?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return e.prototype.get=function(e){return i.__awaiter(this,arguments,void 0,function(e,t,r){void 0===t&&(t={});var n=void 0===r?{}
1:r,o=n.abortSignal,a=void 0===o?null:o,s=n.responseType,u=void 0===s?void 0:s,c=n.streamConfig,l=void 0===c?void 0:c,f=n.isStreamingRequest;return i.__generator(this,function(r){return[2,this.performRequest("get",e,{queryParameters:t,abortSignal:a,responseType:u,streamConfig:l,isStreamingRequest:f})]})})},e.prototype.delete=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),i.__generator(this,function(r){return[2,this.performRequest("delete",e,{queryParameters:t,isStreamingRequest:!1})]})})},e.prototype.post=function(e){return i.__awaiter(this,arguments,void 0,function(e,t,r,n,o){void 0===t&&(t={}),void 0===r&&(r={}),void 0===n&&(n={});var a=void 0===o?{}:o,s=a.abortSignal,u=void 0===s?null:s,c=a.responseType,l=void 0===c?void 0:c,f=a.streamConfig,p=void 0===f?void 0:f,d=a.isStreamingRequest;return i.__generator(this,function(i){return[2,this.performRequest("post",e,{queryParameters:r,bodyParameters:t,additionalHeaders:n,abortSignal:u,responseType:l,streamConfig:p,isStreamingRequest:d})]})})},e.prototype.put=function(e){return i.__awaiter(this,arguments,void 0,function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),i.__generator(this,function(n){return[2,this.performRequest("put",e,{queryParameters:r,bodyParameters:t,isStreamingRequest:!1})]})})},e.prototype.patch=function(e){return i.__awaiter(this,arguments,void 0,function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),i.__generator(this,function(n){return[2,this.performRequest("patch",e,{queryParameters:r,bodyParameters:t,isStreamingRequest:!1})]})})},e.prototype.getAdapter=function(){if(this.configuration.axiosAdapter)return"function"==typeof this.configuration.axiosAdapter?this.configuration.axiosAdapter:"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent?o.default.getAdapter(this.configuration.axiosAdapter).bind(globalThis):o.default.getAdapter(this.configuration.axiosAdapter)},e.prototype.performRequest=function(e,t,r){return i.__awaiter(this,arguments,void 0,function(e,t,r){var n,u,c,l,p,d,h,y,m,g,v,b=r.queryParameters,_=void 0===b?null:b,S=r.bodyParameters,w=void 0===S?null:S,O=r.additionalHeaders,P=void 0===O?{}:O,R=r.abortSignal,E=void 0===R?null:R,C=r.responseType,j=void 0===C?void 0:C,A=r.skipConnectionTimeout,x=void 0!==A&&A,T=r.enableKeepAlive,N=void 0===T?void 0:T,I=r.streamConfig,D=void 0===I?void 0:I,k=r.isStreamingRequest;return i.__generator(this,function(r){switch(r.label){case 0:this.configuration.validate(),k&&(this.logger.debug("Request: Performing streaming request to ".concat(t)),!f&&"u">typeof fetch&&(this.logger.debug("Using fetch adapter for browser streaming"),j="stream")),n=Date.now(),c=!1,this.logger.debug("Request #".concat(n,": Performing ").concat(e.toUpperCase()," request: ").concat(t)),l=function(r){var l,d,h,b,S,O;return i.__generator(this,function(R){switch(R.label){case 0:if(l=p.getNextNode(n),p.logger.debug("Request #".concat(n,": Attempting ").concat(e.toUpperCase()," request Try #").concat(r," to Node ").concat(l.index)),E&&E.aborted)return[2,{value:Promise.reject(Error("Request aborted by caller."))}];d=void 0,R.label=1;case 1:return R.trys.push([1,3,5,6]),(h={method:e,url:p.uriFor(t,l),headers:Object.assign({},p.defaultHeaders(),P,p.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,validateStatus:function(e){return e>0},transformResponse:[function(e,t){var r=e;return void 0!==t&&"string"==typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(r=JSON.parse(e)),r}]}).adapter=k&&!f?"fetch":p.getAdapter(),!0!==x&&(h.timeout=1e3*p.connectionTimeoutSeconds),_&&0!==Object.keys(_).length&&(h.params=_),p.sendApiKeyAsQueryParam&&(h.params=h.params||{},h.params["x-typesense-api-key"]=p.apiKey),p.configuration.httpAgent?(p.logger.debug("Request #".concat(n,": Using custom httpAgent")),h.httpAgent=p.configuration.httpAgent):!0===N&&(f?(p.logger.debug("Request #".concat(n,": Enabling KeepAlive")),h.httpAgent=new a.Agent({keepAlive:!0})):p.logger.warn("Request #".concat(n,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),p.configuration.httpsAgent?(p.logger.debug("Request #".concat(n,": Using custom httpsAgent")),h.httpsAgent=p.configuration.httpsAgent):!0===N&&(f?(p.logger.debug("Request #".concat(n,": Enabling keepAlive")),h.httpsAgent=new s.Agent({keepAlive:!0})):p.logger.warn("Request #".concat(n,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),p.configuration.paramsSerializer&&(p.logger.debug("Request #".concat(n,": Using custom paramsSerializer")),h.paramsSerializer
1=p.configuration.paramsSerializer),w&&("string"==typeof w&&0!==w.length||"object"==typeof w&&0!==Object.keys(w).length)&&(h.data=w),E&&(b=o.default.CancelToken.source(),d=function(){c=!0,b.cancel()},E.addEventListener("abort",d),h.cancelToken=b.token),k?(h.responseType="stream",f||(h.headers=i.__assign(i.__assign({},h.headers),{Accept:"text/event-stream"}))):j&&(h.responseType=j),[4,(0,o.default)(h)];case 2:if((S=R.sent()).status>=1&&S.status<=499&&p.setNodeHealthcheck(l,!0),p.logger.debug("Request #".concat(n,": Request to Node ").concat(l.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300){if(k)return[2,{value:p.handleStreamingResponse(S,D)}];return[2,{value:Promise.resolve(S.data)}]}if(S.status<500)return[2,{value:Promise.reject(p.customErrorForResponse(S,null==(y=S.data)?void 0:y.message,h.data))}];throw p.customErrorForResponse(S,null==(m=S.data)?void 0:m.message,h.data);case 3:if(O=R.sent(),c||p.setNodeHealthcheck(l,!1),u=O,p.logger.warn("Request #".concat(n,": Request to Node ").concat(l.index,' failed due to "').concat(null!=(g=null==O?void 0:O.code)?g:""," ").concat(O.message).concat(null==O.response?"":" - "+JSON.stringify(null==(v=O.response)?void 0:v.data),'"')),c)return[2,{value:Promise.reject(Error("Request aborted by caller."))}];if(k&&p.invokeOnErrorCallback(O,D),!(r<p.numRetriesPerRequest+1))return p.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,{value:Promise.reject(u)}];return p.logger.warn("Request #".concat(n,": Sleeping for ").concat(p.retryIntervalSeconds,"s and then retrying request...")),[4,p.timer(p.retryIntervalSeconds)];case 4:return R.sent(),[3,6];case 5:return E&&d&&E.removeEventListener("abort",d),[7];case 6:return[2]}})},p=this,d=1,r.label=1;case 1:if(!(d<=this.numRetriesPerRequest+1))return[3,4];return[5,l(d)];case 2:if("object"==typeof(h=r.sent()))return[2,h.value];r.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(u)]}})})},e.prototype.processStreamingLine=function(e){if(!e.trim()||"data: [DONE]"===e)return null;if(e.startsWith("data: "))return this.processDataLine(e.slice(6).trim());if(e.trim().startsWith("{"))try{var t=JSON.parse(e.trim());if(t&&"object"==typeof t)return t.conversation_id||(t.conversation_id="unknown"),t.message||""===t.message||(t.message=""),t;return{conversation_id:"unknown",message:JSON.stringify(t)}}catch(e){}return{conversation_id:"unknown",message:e.trim()}},e.prototype.processDataLine=function(e){if(!e)return null;if(e.startsWith("{"))try{var t=JSON.parse(e);if(t&&"object"==typeof t)return t.conversation_id||(t.conversation_id="unknown"),t.message||""===t.message||(t.message=""),t;return{conversation_id:"unknown",message:JSON.stringify(t)}}catch(e){}return{conversation_id:"unknown",message:e}},e.prototype.handleStreamingResponse=function(e,t){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return(this.logger.debug("Handling streaming response. Env
1ironment: ".concat(f?"Node.js":"Browser")),f&&e.data)?[2,this.handleNodeStreaming(e,t)]:f?(this.logger.debug("Processing non-streaming response"),this.invokeOnCompleteCallback(e.data,t),[2,Promise.resolve(e.data)]):[2,this.handleBrowserStreaming(e,t)]})})},e.prototype.handleNodeStreaming=function(e,t){var r=this;return this.logger.debug("Processing Node.js stream"),new Promise(function(n,i){var o=e.data,a=[],s="";o.on("data",function(e){var n;try{var o=e.toString(),u=(s+=o).split("\n");s=null!=(n=u.pop())?n:"",r.processStreamLines(u,a,t)}catch(e){i(e)}}),o.on("end",function(){if(s.trim().length>0){var i=s.split("\n");r.processStreamLines(i,a,t)}r.finalizeStreamResult(a,n,e,t)}),o.on("error",function(e){r.logger.error("Stream error: ".concat(e)),r.invokeOnErrorCallback(e,t),i(e)})})},e.prototype.handleBrowserStreaming=function(e,t){var r=this;return this.logger.debug("Processing browser stream"),new Promise(function(n,o){return i.__awaiter(r,void 0,void 0,function(){return i.__generator(this,function(r){try{if(e.data&&"function"==typeof e.data.getReader)return[2,this.handleBrowserReadableStream(e.data,n,o,e,t)];if("string"==typeof e.data)return[2,this.handleBrowserStringResponse(e.data,n,e,t)];if("object"==typeof e.data&&null!==e.data)return this.logger.debug("No stream found, but data object is available"),this.invokeOnCompleteCallback(e.data,t),[2,n(e.data)];return this.logger.error("No usable data found in response"),[2,o(Error("No usable data found in response"))]}catch(e){this.logger.error("Error processing streaming response: ".concat(e)),this.invokeOnErrorCallback(e,t),o(e)}return[2]})})})},e.prototype.handleBrowserReadableStream=function(e,t,r,n,o){return i.__awaiter(this,void 0,void 0,function(){var a,s,u,c,l,f,p,d,h,y;return i.__generator(this,function(i){switch(i.label){case 0:this.logger.debug("Found ReadableStream in response.data"),a=e.getReader(),s=[],u="",i.label=1;case 1:i.trys.push([1,5,,6]),i.label=2;case 2:return[4,a.read()];case 3:if(l=(c=i.sent()).done,f=c.value,l)return this.logger.debug("Stream reading complete"),u.trim()&&(p=u.split("\n"),this.processStreamLines(p,s,o)),[3,4];return d=new TextDecoder().decode(f),this.logger.debug("Received chunk: ".concat(d.length," bytes")),u+=d,u=(h=u.split("\n")).pop()||"",this.processStreamLines(h,s,o),[3,2];case 4:return this.finalizeStreamResult(s,t,n,o),[3,6];case 5:return y=i.sent(),this.logger.error("Stream error: ".concat(y)),this.invokeOnErrorCallback(y,o),r(y),[3,6];case 6:return[2]}})})},e.prototype.handleBrowserStringResponse=function(e,t,r,n){this.logger.debug("Processing text response as stream data");var i=[],o=e.split("\n");if(this.processStreamLines(o,i,n),i.length>0){var a=this.combineStreamingChunks(i);this.invokeOnCompleteCallback(a,n),t(a)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(r.data,n),t(r.data)},e.prototype.processStreamLines=function(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.trim()&&"data: [DONE]"!==i){var o=this.processStreamingLine(i);null!==o&&(this.invokeOnChunkCallback(o,r),t.push(o))}}},e.prototype.finalizeStreamResult=function(e,t,r,n){if(e.length>0){var i=this.combineStreamingChunks(e);this.logger.debug("Stream processing complete"),this.invokeOnCompleteCallback(i,n),t(i)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(r.data,n),t(r.data)},e.prototype.combineStreamingChunks=function(e){if(0===e.length)return{};if(1===e.length)return e[0];var t=this.getMessageChunks(e);if(t.length>0)return this.combineMessageChunks(e,t);var r=e[e.length-1];if(!this.isCompleteSearchResponse(r))throw Error("Last chunk is not a complete search response");return r},e.prototype.getMessageChunks=function(e){return e.filter(this.isChunkMessage)},e.prototype.isChunkMessage=function(e){return"object"==typeof e&&null!==e&&"message"in e&&"conversation_id"in e},e.prototype.combineMessageChunks=function(e,t){this.logger.debug("Found ".concat(t.length," message chunks to combine"));var r=e[e.length-1];if(this.isCompleteSearchResponse(r))return r;var n=e.find(this.isCompleteSearchResponse);
1if(!n)throw Error("No metadata chunk found");return n},e.prototype.isCompleteSearchResponse=function(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0&&("results"in e||"found"in e||"hits"in e||"page"in e||"search_time_ms"in e)},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map(function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")}).join(" || ")));for(var t=this.nodes[0],r=0;r<=this.nodes.length;r++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(t=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var r=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return r&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),r},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,!0)),this.nodes.forEach(function(t,r){t.index=r,e.setNodeHealthcheck(t,!0)})},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e["X-TYPESENSE-API-KEY"]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,new Promise(function(t){return setTimeout(t,1e3*e)})]})})},e.prototype.customErrorForResponse=function(e,t,r){var n="Request failed with HTTP code ".concat(e.status);"string"==typeof t&&""!==t.trim()&&(n+=" | Server said: ".concat(t));new c.default(n,r,e.status);return 400===e.status?new u.RequestMalformed(n,r,e.status):401===e.status?new u.RequestUnauthorized(n,r,e.status):404===e.status?new u.ObjectNotFound(n,r,e.status):409===e.status?new u.ObjectAlreadyExists(n,r,e.status):422===e.status?new u.ObjectUnprocessable(n,r,e.status):e.status>=500&&e.status<=599?new u.ServerError(n,r,e.status):new u.HTTPError(n,r,e.status)},e.prototype.invokeOnChunkCallback=function(e,t){if(null==t?void 0:t.onChunk)try{t.onChunk(e)}catch(e){this.logger.warn("Error in onChunk callback: ".concat(e))}},e.prototype.invokeOnCompleteCallback=function(e,t){if(null==t?void 0:t.onComplete)try{t.onComplete(e)}catch(e){this.logger.warn("Error in onComplete callback: ".concat(e))}},e.prototype.invokeOnErrorCallback=function(e,t){if(null==t?void 0:t.onError){var r=(0,l.toErrorWithMessage)(e);try{t.onError(r)}catch(e){this.logger.warn("Error in onError callback: ".concat(e))}}},e}()},392227,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i="/collections";r.default=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.post(i,e,t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,arguments,void 0,function(e){return void 0===e&&(e={}),n.__generator(this,function(t){return[2,this.apiCall.get(i,e)]})})},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return i}
1,enumerable:!1,configurable:!0}),e}()},919583,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(){this.responseCache=new Map,this.responsePromiseCache=new Map}return e.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},e.prototype.perform=function(e,t,r,i){return n.__awaiter(this,void 0,void 0,function(){var o,a,s,u,c,l,f,p,d,h,y,m,g,v,b,_,S,w,O,P,R;return n.__generator(this,function(n){switch(n.label){case 0:if(s=void 0===(a=(o=i||{}).cacheResponseForSeconds)?120:a,c=void 0===(u=o.maxSize)?100:u,l=void 0===i||s<=0||c<=0,f=r.path,p=r.queryParams,d=r.body,h=r.headers,y=r.streamConfig,m=r.abortSignal,g=r.responseType,v=r.isStreamingRequest,l)return[2,this.executeRequest(e,t,f,p,d,h,{abortSignal:m,responseType:g,streamConfig:y,isStreamingRequest:v})];if(b=JSON.stringify(r),_=this.responseCache.get(b),S=Date.now(),_){if(S-_.requestTimestamp<1e3*s)return this.responseCache.delete(b),this.responseCache.set(b,_),[2,_.response];this.responseCache.delete(b)}if(w=this.responsePromiseCache.get(b)){if(S-w.requestTimestamp<1e3*s)return this.responsePromiseCache.delete(b),this.responsePromiseCache.set(b,w),[2,w.responsePromise];this.responsePromiseCache.delete(b)}return O=this.executeRequest(e,t,f,p,d,h,{abortSignal:m,responseType:g,streamConfig:y,isStreamingRequest:v}),this.responsePromiseCache.set(b,{requestTimestamp:S,responsePromise:O}),[4,O];case 1:return P=n.sent(),this.responseCache.set(b,{requestTimestamp:S,response:P}),this.responseCache.size>c&&(R=this.responseCache.keys().next().value)&&this.responseCache.delete(R),this.responsePromiseCache.size>c&&(R=this.responsePromiseCache.keys().next().value)&&this.responsePromiseCache.delete(R),[2,P]}})})},e.prototype.executeRequest=function(e,t,r,n,i,o,a){void 0===n&&(n={});var s=e[t];switch(t){case"get":return s.call(e,r,n,{abortSignal:null==a?void 0:a.abortSignal,responseType:null==a?void 0:a.responseType,streamConfig:null==a?void 0:a.streamConfig,isStreamingRequest:null==a?void 0:a.isStreamingRequest});case"delete":return s.call(e,r,n);case"post":return s.call(e,r,i,n,o||{},{abortSignal:null==a?void 0:a.abortSignal,responseType:null==a?void 0:a.responseType,streamConfig:null==a?void 0:a.streamConfig,isStreamingRequest:null==a?void 0:a.isStreamingRequest});case"put":case"patch":return s.call(e,r,i,n);default:throw Error("Unsupported method: ".concat(String(t)))}},e}()},19895,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SearchOnlyDocuments=void 0;var n=e.r(824627),i=n.__importDefault(e.r(919583)),o=n.__importDefault(e.r(392227)),a=e.r(5729),s="/documents";r.SearchOnlyDocuments=function(){function e(e,t,r){this.collectionName=e,this.apiCall=t,this.configuration=r,this.requestWithCache=new i.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.search=function(e){return n.__awaiter(this,arguments,void 0,function(e,t){var r,i,o,s,u,c,l=void 0===t?{}:t,f=l.cacheSearchResultsForSeconds,p=void 0===f?this.configuration.cacheSearchResultsForSeconds:f,d=l.abortSignal,h=void 0===d?null:d;return n.__generator(this,function(t){return r={},!0===this.configuration.useServerSideSearchCache&&(r.use_cache=!0),o=(i=(0,a.normalizeArrayableParams)(e)).streamConfig,s=n.__rest(i,["streamConfig"]),c=!0===(u=n.__assign(n.__assign({},r),s)).conversation_stream,[2,this.requestWithCache.perform(this.apiCall,"get",{path:this.endpointPath("search"),queryParams:u,streamConfig:o,abortSignal:h,isStreamingRequest:c},{cacheResponseForSeconds:p})]})})},e.prototype.endpointPath=function(e){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(s).concat(void 0===e?"":"/"+e)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}()},750408,(e,t,r)=>{"use strict";var n=e.i(390462);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),o=e.r(975342),a=e.r(19895),s=void 0!==n.default&&null!=n.default.versions&&null!=n.default.versions.node;r.default=function(e){function t(t,r,n){return e.call(this,t,r,n)||this}return i.__extends(t,e),t.prototype.create=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),i.__generator(this,function(r){if(!e)throw Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,t)]})})},t.prototype.upsert=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),i.__generator(this,function(r){if(!e)throw Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"upsert"}))]})})},t.prototype.update=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),i.__generator(this,function(r){if(!e)throw Error("No document provided");return null!=t.filter_by?[2,this.apiCall.patch(this.endpointPath(),e,Object.assign({},t))]:[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"update"}))]})})},t.prototype.delete=function(){return i.__awaiter(this,arguments,void 0,function(e){return void 0===e&&(e={}),i.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},t.prototype.createMany=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),i.__generator(this,function(r){return this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"),[2,this.import(e,t)]})})},t.prototype.import=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){var r,n,a,u,c;return void 0===t&&(t={}),i.__generator(this,function(l){switch(l.label){case 0:if(r=i.__assign({throwOnFail:!0},t),Array.isArray(e)){if(0===e.length)throw new o.RequestMalformed("No documents provided");try{n=e.map(function(e){return JSON.stringify(e)}).join("\n")}catch(e){if(e instanceof RangeError&&e.message.includes("Too many properties to enumerate"))throw Error("".concat(e,"\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n "));throw Error(e)}}else{var f;if(null==(f=n=e)||""===f||0===f.length)throw new o.RequestMalformed("No documents provided")}return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:r,bodyParameters:n,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!s})];case 1:if(a=l.sent(),!Array.isArray(e))return[2,a];if(!((c=(u=a.split("\n").map(function(e){return JSON.parse(e)})).filter(function(e){return!1===e.success})).length>0)||!r.throwOnFail)return[2,u];throw new o.ImportError("".concat(u.length-c.length," documents imported successfully, ").concat(c.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),u,{documentsInJSONLFormat:n,options:r,failedItems:c,successCount:u.length-c.length})}})})},t.prototype.importStream=function(e){return i.__awaiter(this,arguments,void 0,function(e,t){var r,n,a;return void 0===t&&(t={}),i.__generator(this,function(u){switch(u.label){case 0:return r=i.__assign({throwOnFail:!0},t),[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:r,bodyParameters:e,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!s})];case 1:if(!((a=(n=u.sent().split("\n").map(function(e){return JSON.parse(e)})).filter(function(e){return!1===e.success})).length>0)||!r.throwOnFail)return[2,n];throw new o.ImportError("".concat(n.length-a.length," documents imported successfully, ").concat(a.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),n,{documentsInJSONLFormat:e,options:r,failedItems:a,successCount:n.length-a.length})}})})}
1,t.prototype.export=function(){return i.__awaiter(this,arguments,void 0,function(e){return void 0===e&&(e={}),i.__generator(this,function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]})})},t.prototype.exportStream=function(){return i.__awaiter(this,arguments,void 0,function(e){return void 0===e&&(e={}),i.__generator(this,function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]})})},t}(a.SearchOnlyDocuments)},511078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(392227));r.default=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(i.default.RESOURCEPATH,"/").concat(this.collectionName).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/overrides"},enumerable:!1,configurable:!0}),e}()},705624,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(392227)),o=n.__importDefault(e.r(511078));r.default=function(){function e(e,t,r){this.collectionName=e,this.overrideId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.overrideId))},e}()},962875,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(392227));r.default=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return e.hasWarnedDeprecation||(console.warn("[typesense] 'synonyms' APIs are deprecated starting with Typesense Server v30. Please migrate to synonym sets ('synonym_sets')."),e.hasWarnedDeprecation=!0),"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/synonyms"},enumerable:!1,configurable:!0}),e.hasWarnedDeprecation=!1,e}()},846615,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(392227)),o=n.__importDefault(e.r(962875));r.default=function(){function e(e,t,r){this.collectionName=e,this.synonymId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return e.hasWarnedDeprecation||(console.warn("[typesense] 'synonym' APIs are deprecated starting with Typesense Server v30. Please migrate to synonym sets 'synonym_sets'."),e.hasWarnedDeprecation=!0),"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymId))},e.hasWarnedDeprecation=!1,e}()},729440,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.Document=void 0;var n=e.r(824627),i=n.__importDefault(e.r(392227)),o=n.__importDefault(e.r(750408));r.Document=function(){function e(e,t,r){this.collectionName=e,this.documentId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},e.prototype.update=function(e){return n.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),n.__generator(this,function(r){return[2,this.apiCall.patch(this.endpointPath(),e,t)]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.documentId))},e}()},505897,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(392227)),o=n.__importDefault(e.r(750408)),a=e.r(975342),s=n.__importDefault(e.r(511078)),u=n.__importDefault(e.r(705624)),c=n.__importDefault(e.r(962875)),l=n.__importDefault(e.r(846615)),f=e.r(729440);r.default=function(){function e(e,t,r){this.name=e,this.apiCall=t,this.configuration=r,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=e,this.apiCall=t,this.configuration=r,this._documents=new o.default(this.name,this.apiCall,this.configuration),this._overrides=new s.default(this.name,this.apiCall),this._synonyms=new c.default(this.name,this.apiCall)}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.patch(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,arguments,void 0,function(e){return void 0===e&&(e={}),n.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},e.prototype.exists=function(){return n.__awaiter(this,void 0,void 0,function(){var e;return n.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return t.sent(),[2,!0];case 2:if((e=t.sent())instanceof a.ObjectNotFound)return[2,!1];throw e;case 3:return[2]}})})},e.prototype.documents=function(e){return e?(void 0===this.individualDocuments[e]&&(this.individualDocuments[e]=new f.Document(this.name,e,this.apiCall)),this.individualDocuments[e]):this._documents},e.prototype.overrides=function(e){return void 0===e?this._overrides:(void 0===this.individualOverrides[e]&&(this.individualOverrides[e]=new u.default(this.name,e,this.apiCall)),this.individualOverrides[e])},e.prototype.synonyms=function(e){return void 0===e?this._synonyms:(void 0===this.individualSynonyms[e]&&(this.individualSynonyms[e]=new l.default(this.name,e,this.apiCall)),this.individualSynonyms[e])},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},831166,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i="/aliases";r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(i)]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH,"/").concat(encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return i},enumerable:!1,configurable:!0}),e}()},801560,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(831166));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},199460,(e,t,r)=>{"use strict";var n=e.i(751368);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),o={},a=e.r(5729),s="/keys";r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(t){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return[2,this.apiCall.post(e.RESOURCEPATH,t)]})})},e.prototype.retrieve=function(){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(e){return[2,this.apiCall.get(s)]})})},e.prototype.generateScopedSearchKey=function(e,t){var r=JSON.stringify((0,a.normalizeArrayableParams)(t)),i=n.Buffer.from((0,o.createHmac)("sha256",e).update(r).digest("base64")),s=e.substr(0,4),u="".concat(i).concat(s).concat(r);return n.Buffer.from(u).toString("base64")},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}()},734310,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(199460));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},117144,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/debug")]})})},e}()},627086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/metrics.json")]})})},e}()},70429,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/stats.json")]})})},e}()},403817,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/health")]})})},e}()},738150,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i="/operations";r.default=function(){function e(e){this.apiCall=e}return e.prototype.perform=function(e){return n.__awaiter(this,arguments,void 0,function(e,t){return void 0===t&&(t={}),n.__generator(this,function(r){return[2,this.apiCall.post("".concat(i,"/").concat(e),{},t)]})})},e.prototype.getSchemaChanges=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("".concat(i,"/schema_changes"))]})})},e}()},151335,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(919583)),o=e.r(5729);r.default=function(){function e(e,t,r){void 0===r&&(r=!1),this.apiCall=e,this.configuration=t,this.useTextContentType=r,this.requestWithCache=new i.default,this.logger=this.apiCall.logger}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.perform=function(e,t,r){return n.__awaiter(this,void 0,void 0,function(){var i,a,s,u,c,l,f;return n.__generator(this,function(p){return i=t?n.__assign({},t):{},a=null!=(f=null==r?void 0:r.cacheSearchResultsForSeconds)?f:this.configuration.cacheSearchResultsForSeconds,!0===this.configuration.useServerSideSearchCache&&(i.use_cache=!0),!0===e.union&&this.hasAnySearchObjectPagination(e)&&this.logger.warn("Individual `searches` pagination parameters are ignored when `union: true` is set. Use a top-level pagination parameter instead. See https://typesense.org/docs/29.0/api/federated-multi-search.html#union-search"),s={union:e.union,searches:e.searches.map(o.normalizeArrayableParams)},u=i.streamConfig,c=n.__rest(i,["streamConfig"]),l=(0,o.normalizeArrayableParams)(c),[2,this.requestWithCache.perform(this.apiCall,"post",{path:"/multi_search",body:s,queryParams:l,headers:this.useTextContentType?{"content-type":"text/plain"}:{},streamConfig:u,abortSignal:null==r?void 0:r.abortSignal,isStreamingRequest:this.isStreamingRequest(i)},void 0!==a?{cacheResponseForSeconds:a}:void 0)]})})},e.prototype.isStreamingRequest=function(e){return void 0!==e.streamConfig},e.prototype.hasAnySearchObjectPagination=function(e){return e.searches.some(function(e){return void 0!==e.page||void 0!==e.per_page||void 0!==e.offset||void 0!==e.limit||void 0!==e.limit_hits})},e}()},402627,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=e.r(5729);r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,o;return n.__generator(this,function(n){return"object"==typeof t.value&&"searches"in t.value?(r=t.value.searches.map(function(e){return(0,i.normalizeArrayableParams)(e)}),[2,this.apiCall.put(this.endpointPath(e),{value:{searches:r}})]):(o=(0,i.normalizeArrayableParams)(t.value),[2,this.apiCall.put(this.endpointPath(e),{value:o})])})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/presets"},enumerable:!1,configurable:!0}),e}()},903523,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(402627));r.default=function(){function e(e,t){this.presetId=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.presetId))},e}()},186559,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/rules"}
1,enumerable:!1,configurable:!0}),e}()},294715,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(186559));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},874871,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.retrieve=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.get(this.endpointPath(),e)]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/events"},enumerable:!1,configurable:!0}),e}()},394570,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(186559)),o=n.__importDefault(e.r(294715)),a=n.__importDefault(e.r(874871));r.default=function(){function e(e){this.apiCall=e,this.individualAnalyticsRules={},this.apiCall=e,this._analyticsRules=new i.default(this.apiCall),this._analyticsEvents=new a.default(this.apiCall)}return e.prototype.rules=function(t){return(e.hasWarnedDeprecation||(console.warn("[typesense] 'analyticsV1' is deprecated starting with Typesense Server v30 and will be removed in a future release. Please use 'analytics' instead."),e.hasWarnedDeprecation=!0),void 0===t)?this._analyticsRules:(void 0===this.individualAnalyticsRules[t]&&(this.individualAnalyticsRules[t]=new o.default(t,this.apiCall)),this.individualAnalyticsRules[t])},e.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics"},enumerable:!1,configurable:!0}),e.hasWarnedDeprecation=!1,e}()},258976,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e,{},{})]})})},e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(e){return n.__awaiter(this,void 0,void 0,function(){var t;return n.__generator(this,function(r){return t={},e&&(t.rule_tag=e),[2,this.apiCall.get(this.endpointPath(),t)]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/rules"},enumerable:!1,configurable:!0}),e}()},644378,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(258976));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},551059,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(258976)),o=n.__importDefault(e.r(644378)),a=n.__importDefault(e.r(874871));r.default=function(){function e(e){this.apiCall=e,this.individualAnalyticsRules={},this.apiCall=e,this._analyticsRules=new i.default(this.apiCall),this._analyticsEvents=new a.default(this.apiCall)}return e.prototype.rules=function(e){return void 0===e?this._analyticsRules:(void 0===this.individualAnalyticsRules[e]&&(this.individualAnalyticsRules[e]=new o.default(e,this.apiCall)),this.individualAnalyticsRules[e])},e.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics"},enumerable:!1,configurable:!0}),e}()},325317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stopwords"},enumerable:!1,configurable:!0}),e}()},932699,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(325317));r.default=function(){function e(e,t){this.stopwordId=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.stopwordId))},e}()},421239,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/conversations/models"},enumerable:!1,configurable:!0}),e}()},350022,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(421239));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},999053,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(421239)),o=n.__importDefault(e.r(350022)),a="/conversations";r.default=function(){function e(e){this.apiCall=e,this.individualConversationModels={},this.apiCall=e,this._conversationsModels=new i.default(this.apiCall)}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(a)]})})},e.prototype.models=function(e){return void 0===e?this._conversationsModels:(void 0===this.individualConversationModels[e]&&(this.individualConversationModels[e]=new o.default(e,this.apiCall)),this.individualConversationModels[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a}
1,enumerable:!1,configurable:!0}),e}()},980884,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(999053));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},729677,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,i;return n.__generator(this,function(n){switch(n.label){case 0:return r=Array.isArray(t)?t.map(function(e){return JSON.stringify(e)}).join("\n"):t,[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:{id:e},bodyParameters:r,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0})];case 1:return i=n.sent(),[2,Array.isArray(t)?i.split("\n").map(function(e){return JSON.parse(e)}):i]}})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return void 0===t?"".concat(e.RESOURCEPATH):"".concat(e.RESOURCEPATH,"/").concat(encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stemming/dictionaries"},enumerable:!1,configurable:!0}),e}()},236488,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(729677));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},924565,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(729677)),o=n.__importDefault(e.r(236488));r.default=function(){function e(e){this.apiCall=e,this.individualStemmingDictionaries={},this.apiCall=e,this._stemmingDictionaries=new i.default(this.apiCall)}return e.prototype.dictionaries=function(e){return void 0===e?this._stemmingDictionaries:(void 0===this.individualStemmingDictionaries[e]&&(this.individualStemmingDictionaries[e]=new o.default(e,this.apiCall)),this.individualStemmingDictionaries[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stemming"},enumerable:!1,configurable:!0}),e}()},767745,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(){return e.RESOURCEPATH},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/nl_search_models"},enumerable:!1,configurable:!0}),e}()},318307,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(767745));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},579305,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.get(e.RESOURCEPATH)]})})},e.RESOURCEPATH="/synonym_sets",e}()},672969,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(579305));r.default=function(){function e(e,t){this.synonymSetName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(e){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymSetName),"/items").concat(void 0===e?"":"/"+encodeURIComponent(e))},e}()},165886,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(579305));r.default=function(){function e(e,t,r){this.synonymSetName=e,this.itemId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymSetName),"/items/").concat(encodeURIComponent(this.itemId))},e}()},789238,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(579305)),o=n.__importDefault(e.r(672969)),a=n.__importDefault(e.r(165886));r.default=function(){function e(e,t){this.synonymSetName=e,this.apiCall=t,this.individualItems={},this._items=new o.default(this.synonymSetName,t)}return e.prototype.upsert=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.items=function(e){return void 0===e?this._items:(void 0===this.individualItems[e]&&(this.individualItems[e]=new a.default(this.synonymSetName,e,this.apiCall)),this.individualItems[e])},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymSetName))},e}()},771871,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.get(e.RESOURCEPATH)]})})},e.RESOURCEPATH="/curation_sets",e}()},45523,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(771871));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(e){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name),"/items").concat(void 0===e?"":"/"+encodeURIComponent(e))},e}()},736965,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(771871));r.default=function(){function e(e,t,r){this.name=e,this.itemId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.upsert=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name),"/items/").concat(encodeURIComponent(this.itemId))},e}()},764e3,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(771871)),o=n.__importDefault(e.r(45523)),a=n.__importDefault(e.r(736965));r.default=function(){function e(e,t){this.name=e,this.apiCall=t,this.individualItems={},this._items=new o.default(this.name,t)}return e.prototype.upsert=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.items=function(e){return void 0===e?this._items:(void 0===this.individualItems[e]&&(this.individualItems[e]=new a.default(this.name,e,this.apiCall)),this.individualItems[e])},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},589799,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(706921)),o=n.__importDefault(e.r(234064)),a=n.__importDefault(e.r(392227)),s=n.__importDefault(e.r(505897)),u=n.__importDefault(e.r(831166)),c=n.__importDefault(e.r(801560)),l=n.__importDefault(e.r(199460)),f=n.__importDefault(e.r(734310)),p=n.__importDefault(e.r(117144)),d=n.__importDefault(e.r(627086)),h=n.__importDefault(e.r(70429)),y=n.__importDefault(e.r(403817)),m=n.__importDefault(e.r(738150)),g=n.__importDefault(e.r(151335)),v=n.__importDefault(e.r(402627)),b=n.__importDefault(e.r(903523)),_=n.__importDefault(e.r(394570)),S=n.__importDefault(e.r(551059)),w=n.__importDefault(e.r(325317)),O=n.__importDefault(e.r(932699)),P=n.__importDefault(e.r(999053)),R=n.__importDefault(e.r(980884)),E=n.__importDefault(e.r(924565)),C=n.__importDefault(e.r(767745)),j=n.__importDefault(e.r(318307)),A=n.__importDefault(e.r(579305)),x=n.__importDefault(e.r(789238)),T=n.__importDefault(e.r(771871)),N=n.__importDefault(e.r(764e3));r.default=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!=(t=e.sendApiKeyAsQueryParam)&&t,this.configuration=new i.default(e),this.apiCall=new o.default(this.configuration),this.debug=new p.default(this.apiCall),this.metrics=new d.default(this.apiCall),this.stats=new h.default(this.apiCall),this.health=new y.default(this.apiCall),this.operations=new m.default(this.apiCall),this.multiSearch=new g.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new v.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new S.default(this.apiCall),this.analyticsV1=new _.default(this.apiCall),this.stemming=new E.default(this.apiCall),this._conversations=new P.default(this.apiCall),this.individualConversations={},this._nlSearchModels=new C.default(this.apiCall),this.individualNLSearchModels={},this._synonymSets=new A.default(this.apiCall),this.individualSynonymSets={},this._curationSets=new T.default(this.apiCall),this.individualCurationSets={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new f.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new b.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new O.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new R.default(e,this.apiCall)),this.individualConversations[e])},e.prototype.nlSearchModels=function(e){return void 0===e?this._nlSearchModels:(void 0===this.individualNLSearchModels[e]&&(this.individualNLSearchModels[e]=new j.default(e,this.apiCall)),this.individualNLSearchModels[e])},e.prototype.synonymSets=function(e){return void 0===e?this._synonymSets:(void 0===this.individualSynonymSets[e]&&(this.individualSynonymSets[e]=new x.default(e,this.apiCall)),this.individualSynonymSets[e])},e.prototype.curationSets=function(e){return void 0===e?this._curationSets:(void 0===this.individualCurationSets[e]&&(this.individualCurationSets[e]=new N.default(e,this.apiCall)),this.individualCurationSets[e])},e}()},626511,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.SearchOnlyCollection=void 0;var n=e.r(19895);r.SearchOnlyCollection=function(){function e(e,t,r){this.name=e,this.apiCall=t,this.configuration=r,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}()},350459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(706921)),o=n.__importDefault(e.r(234064)),a=n.__importDefault(e.r(151335)),s=e.r(626511);r.default=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null==(t=e.sendApiKeyAsQueryParam)||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new i.default(e),this.apiCall=new o.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach(function(e){e[0],e[1].documents().clearCache()})},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}()},357530,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Errors=r.SearchClient=r.Client=void 0;var n=e.r(824627),i=n.__importDefault(e.r(589799));r.Client=i.default;var o=n.__importDefault(e.r(350459));r.SearchClient=o.default;var a=n.__importStar(e.r(975342));r.Errors=a,r.default={Client:i.default,SearchClient:o.default,Errors:a}},649431,70115,125651,944626,e=>{"use strict";var t,r,n,i,o=e.i(839262);let a="_text_match(bucket_size: 5):desc",s={[o.GLOBAL_COLLECTION]:{query_by:"title,searchTerms,mediumName,description,excerpt,content,contentText,location,caseNumber,complainant,conclusion,complaint,pfuStatement,oldContent,vvpPointTitles,subjectTitles,typeSearchTerms",query_by_weights:"20,16,14,12,11,10,10,9,8,7,6,5,4,3,2,2,1",sort_by:`${a},typeBoost:desc,sortTimestamp:desc`},[o.SINGLE_INDEX_COLLECTIONS.case]:{query_by:"searchTerms,mediumName,caseNumber,complainant,subjectTitles,genreTitles,conclusion,complaint,pfuStatement,oldContent,notes,mediumReply,solutionAttempt,responses",query_by_weights:"15,14,12,12,8,6,6,5,5,4,3,3,3,3",sort_by:`${a},sortTimestamp:desc`,include_fields:"id,objectID,_id,caseNumber,complainant,mediumName,subjects,processedAt,status,isViolation,vvpPoints,isFlagCase,singleFlagCaseLabel,flagCaseDescription",highlight_fields:"none"},[o.SINGLE_INDEX_COLLECTIONS.decision]:{query_by:"title,conclusion",query_by_weights:"10,5",sort_by:`${a},sortTimestamp:desc`},[o.SINGLE_INDEX_COLLECTIONS.guide]:{query_by:"title,subjectTitles,content",query_by_weights:"10,6,4",sort_by:`${a},sortTimestamp:desc`},[o.SINGLE_INDEX_COLLECTIONS.registry]:{query_by:"title,authorityName",query_by_weights:"10,5",sort_by:`${a},sortTimestamp:desc`},[o.SINGLE_INDEX_COLLECTIONS.template]:{query_by:"title,about",query_by_weights:"10,5",sort_by:`${a},sortTimestamp:desc`}},u=/^_eval\((.*)\):(asc|desc)$/,c=/^\((.*)\):(\d+)$/,l=e=>{let t=[],r=0,n="";for(let i of e){if(("("===i||"["===i)&&(r+=1),(")"===i||"]"===i)&&(r-=1),","===i&&0===r){t.push(n.trim()),n="";continue}n+=i}return n.trim()&&t.push(n.trim()),t},f=/^(?:pfu[\s-]*(?:sak)?|sak)?[\s-]*(\d{2,4})\s*[-/\s]\s*(\d{1,4})\s*([a-z]{0,3})$/i,p=/^(?:pfu[\s-]*(?:sak)?|sak)?[\s-]*(\d{5})\s*([a-z]{0,3})$/i,d=(e,t,r)=>`${e}-${t}${r.toUpperCase()}`,h="/sort/",y=[o.GLOBAL_COLLECTION,o.SINGLE_INDEX_COLLECTIONS.case];e.s(["withCaseNumberSortTier",0,(e,t)=>{let[r=e,n]=e.split(h),i=s[r],o=n??i?.sort_by??"",a=((e,t,r)=>{if(!r||!y.includes(e))return t;let n=(e=>
1{let t=e.trim(),r=t.match(f);if(r){let[,e="",t="",n=""]=r,i=[d(e,t.padStart(3,"0"),n),d(e,t,n)];return{caseNumber:i[0],candidates:[...new Set(i)]}}let n=t.match(p);if(n){let[,e="",t=""]=n,r=[d(e.slice(0,2),e.slice(2),t),d(e.slice(-2),e.slice(0,-2),t)];return{caseNumber:r[0],candidates:[...new Set(r)]}}return null})(r);return n?((e,t)=>{let r=l(t),n=r.findIndex(e=>u.test(e));if(-1===n)return[`_eval(${e}):desc`,...(r.length>2?r.filter(e=>"typeBoost:desc"!==e):r).slice(0,2)].join(",");let i=r.slice();return i[n]=((e,t)=>{let[,r="",n="desc"]=t.match(u)??[],i=r.startsWith("[")&&r.endsWith("]")?l(r.slice(1,-1)):[`(${r}):1`],o=Math.max(...i.map(e=>Number(e.match(c)?.[2]??0)))+1;return`_eval([(${e}):${o},${i.join(",")}]):${n}`})(e,r[n]),i.join(",")})((({candidates:e})=>e.map(e=>`caseNumber:=${e}`).join(" || "))(n),t):t})(r,o,t);return a===o?e:`${r}${h}${a}`}],649431);var m=e.i(790193);function g(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){g(o,n,i,a,s,"next",e)}function s(e){g(o,n,i,a,s,"throw",e)}a(void 0)})}}function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var _=e.i(133890);function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(0,_.default)(n.key),n)}}function w(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var O=e.i(968680),P=w(function e(){var t,r,n,i,o,a,s,u,c,l,f,p,d,h,y,m,g,v,_,S,w,O,P,R=this,E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this.server=E.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!=(t=this.server.cacheSearchResultsForSeconds)?t:120,this.additionalSearchParameters=null!=(r=E.additionalSearchParameters)?r:{},this.additionalSearchParameters.query_by=null!=(n=null!=(i=this.additionalSearchParameters.queryBy)?i:this.additionalSearchParameters.query_by)?n:"",this.additionalSearchParameters.preset=null!=(o=null!=(a=this.additionalSearchParameters.preset)?a:this.additionalSearchParameters.preset)?o:"",this.additionalSearchParameters.sort_by=null!=(s=null!=(u=this.additionalSearchParameters.sortBy)?u:this.additionalSearchParameters.sort_by)?s:"",this.additionalSearchParameters.highlight_full_fields=null!=(c=null!=(l=this.additionalSearchParameters.highlightFullFields)?l:this.additionalSearchParameters.highlight_full_fields)?c:this.additionalSearchParameters.query_by,this.geoLocationField=null!=(f=E.geoLocationField)?f:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!=(p=E.facetableFieldsWithSpecialCharacters)?p:[],this.collectionSpecificSearchParameters=null!=(d=E.collectionSpecificSearchParameters)?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach(function(e){var t,r,n,i,o,a,s=R.collectionSpecificSearchParameters[e];s.query_by=null!=(t=s.queryBy)?t:s.query_by,s.preset=null!=(r=s.preset)?r:s.preset,s.sort_by=null!=(n=s.sortBy)?n:s.sort_by,s.highlight_full_fields=null!=(i=null!=(o=null!=(a=s.highlightFullFields)?a:s.highlight_full_fields)?o:R.additionalSearchParameters.highlight_full_fields)?i:s.query_by,Object.keys(s).forEach(function(e){return void 0===s[e]?delete s[e]:{}})}),this.renderingContent=E.renderingContent,this.flattenGroupedHits=null==(h=E.flattenGroupedHits)||h,this.facetByOptions=null!=(y=E.facetByOptions)?y:{},this.filterByOptions=null!=(m=E.filterByOptions)?m:{},this.sortByOptions=null!=(g=E.sortByOptions)?g:{},this.collectionSpecificFacetByOptions=null!=(v=E.collectionSpecificFacetByOptions)?v:{},this.collectionSpecificFilterByOptions=null!=(_=E.collectionSpecificFilterByOptions)?_:{},this.collectionSpecificSortByOptions=null!=(S=E.collectionSpecificSortByOptions)?S:{},this.union=null!=(w=E.union)&&w,this.useOverrideTags=null!=(O=E.useOverrideTags)&&O,this.flipNegativeRefinementOperator=null!=(P=E.flipNegativeRefinementOperator)&&P},[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some(function(e){return e.queryBy}))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camel
1Cased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some(function(e){return 0===(e.query_by||"").length&&0===(e.preset||"").length})))throw Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}]),R=e.i(357530),E=e.i(750149);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){if(e){if("string"==typeof e)return C(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||j(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=["q","conversation","conversation_id","conversation_model_id"],T=w(function e(t,r,n){b(this,e),this.instantsearchRequests=t,this.typesenseClient=r,this.configuration=n,this.additionalSearchParameters=n.additionalSearchParameters,this.collectionSpecificSearchParameters=n.collectionSpecificSearchParameters},[{key:"_shouldUseExactMatchForField",value:function(e,t){var r,n;return(null==(r=this.configuration.collectionSpecificFilterByOptions)||null==(r=r[t])||null==(r=r[e])?void 0:r.exactMatch)!==!1&&(null==(n=this.configuration.filterByOptions)||null==(n=n[e])?void 0:n.exactMatch)!==!1}},{key:"_adaptFacetFilters",value:function(e,t){var r=this,n="";return e?n=e.map(function(e){if(Array.isArray(e)){var n={};e.forEach(function(e){var t=r._parseFacetFilter(e),i=t.fieldName,o=t.fieldValue;n[i]=n[i]||[],n[i].push(o)}),Object.keys(n).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(n).join(",")));var i=Object.keys(n)[0],o=A(n[i].reduce(function(e,t){return t.startsWith("-")&&!r._isNumber(t)?e[0].push(t.substring(1)):e[1].push(t),e},[[],[]]),2),a=o[0],s=o[1],u=[];if(s.length>0){var c=r._shouldUseExactMatchForField(i,t)?":=":":";u.push("".concat(i).concat(c,"[").concat(s.map(function(e){return r._escapeFacetValue(e)}).join(","),"]"))}if(a.length>0){var l=r._shouldUseExactMatchForField(i,t)?":!=":":!";r.configuration.flipNegativeRefinementOperator?u.push("(".concat(a.map(function(e){return"".concat(i).concat(l).concat(r._escapeFacetValue(e))}).join(" || "),")")):u.push("".concat(i).concat(l,"[").concat(a.map(function(e){return r._escapeFacetValue(e)}).join(","),"]"))}return u.filter(function(e){return e}).join(" && ")}var f,p=r._parseFacetFilter(e),d=p.fieldName,h=p.fieldValue;if(h.startsWith("-")&&!r._isNumber(h)){var y=r._shouldUseExactMatchForField(d,t)?":!=":":!";f="".concat(d).concat(y,"[").concat(r._escapeFacetValue(h.substring(1)),"]")}else{var m=r._shouldUseExactMatchForField(d,t)?":=":":";f="".concat(d).concat(m,"[").concat(r._escapeFacetValue(h),"]")}return f}).join(" && "):n}},{key:"_parseFacetFilter",value:function(e){if((null==(t=this.configuration.facetableFieldsWithSpecialCharacters)?void 0:t.length)>0){var t,r,n,i,o,a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(r=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(n=e.match(r)))return{fieldName:i="".concat(n[1]),fieldValue:o="".concat(n[2])}}return r=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(n=e.match(r))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(i="".concat(n[1]).concat(n[2]),o="".concat(n[3])),{fieldName:i,fieldValue:o}}},{key:"_escapeFacetValue",value:function(e){return"boolean"==typeof e||"true"===e||"false"===e||this._isNumber(e)?e:"`".concat(e,"`")}},{key:"_isNumber",value:function(e){return Number.isInteger(e%1)||!!(e%1)}},{key:"_adaptNumericFilters",value:function(e){var t=this,r="";if(!e)return r;var n={};e.forEach(function(e){var r=t._parseNumericFilter(e),i=r.fieldName,o=r.operator,a=r.fieldValue;n[i]=n[i]||{},n[i][o]=a});var i=[];
1return Object.keys(n).forEach(function(e){null!=n[e]["<="]&&null!=n[e][">="]?i.push("".concat(e,":=[").concat(n[e][">="],"..").concat(n[e]["<="],"]")):null!=n[e]["<="]?i.push("".concat(e,":<=").concat(n[e]["<="])):null!=n[e][">="]?i.push("".concat(e,":>=").concat(n[e][">="])):null!=n[e]["="]?i.push("".concat(e,":=").concat(n[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(n[e])))}),r=i.join(" && ")}},{key:"_parseNumericFilter",value:function(e){if((null==(t=this.configuration.facetableFieldsWithSpecialCharacters)?void 0:t.length)>0){var t,r,n,i,o,a,s=this.configuration.facetableFieldsWithSpecialCharacters.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(r=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(n=e.match(r))){var u=A(n,4);return i=u[1],{fieldName:i,operator:o=u[2],fieldValue:a=u[3]}}}if(r=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(n=e.match(r)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=A(n,4);i=c[1],o=c[2],a=c[3]}return{fieldName:i,operator:o,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(e){var t,r,n,i,o=e.insideBoundingBox,a=e.aroundRadius,s=e.aroundLatLng,u=e.insidePolygon;if(o){if(Array.isArray(o)){var c=A(o.flat(),4);t=c[0],r=c[1],n=c[2],i=c[3]}else{var l=A(o.split(","),4);t=l[0],r=l[1],n=l[2],i=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(t,", ").concat(r,", ").concat(t,", ").concat(i,", ").concat(n,", ").concat(i,", ").concat(n,", ").concat(r,")")}if(s||a){if(!a||"all"===a)throw Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(a)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(s,", ").concat(f,")")}if(u){var p=u;return Array.isArray(u)&&(p=u.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(p,")")}}},{key:"_splitByTopLevelAnd",value:function(e){for(var t=[],r="",n=!1,i=0;i<e.length;i+=1){var o=e[i],a=e[i+1];if("`"===o&&(n=!n),!n&&"&"===o&&"&"===a){""!==r.trim()&&t.push(r.trim()),r="",i+=1;continue}r+=o}return""!==r.trim()&&t.push(r.trim()),t}},{key:"_splitListValues",value:function(e){for(var t=[],r="",n=!1,i=0;i<e.length;i+=1){var o=e[i];if("`"===o&&(n=!n),!n&&","===o){""!==r.trim()&&t.push(r.trim()),r="";continue}r+=o}return""!==r.trim()&&t.push(r.trim()),t}},{key:"_parseListClause",value:function(e){var t=e.trim(),r=t.indexOf("["),n=t.lastIndexOf("]");if(-1===r||-1===n||n!==t.length-1)return null;var i=t.slice(0,r).trim(),o=t.slice(r+1,n),a=[":!=",":=",":!",":"].find(function(e){return i.endsWith(e)});if(!a)return null;var s=i.slice(0,i.length-a.length).trim();return s?{fieldName:s,operator:a,values:this._splitListValues(o)}:null}},{key:"_mergeSameFieldExclusionListClauses",value:function(e){var t=this;if(!e)return e;var r=this._splitByTopLevelAnd(e),n={},i=[];return r.forEach(function(e,r){var o=t._parseListClause(e);if(!o)return void i.push({clauseIndex:r,clause:e});var a=":!"===o.operator||":!="===o.operator?"exclude":null;if(null==a)return void i.push({clauseIndex:r,clause:e});var s="".concat(o.fieldName,"|").concat(a);n[s]||(n[s]={clauseIndex:r,fieldName:o.fieldName,operator:o.operator,normalizedOperator:a,values:[]}),o.values.forEach(function(e){n[s].values.includes(e)||n[s].values.push(e)})}),Object.values(n).forEach(function(e){i.push({clauseIndex:e.clauseIndex,clause:"".concat(e.fieldName).concat(e.operator,"[").concat(e.values.join(","),"]")})}),i.sort(function(e,t){return e.clauseIndex-t.clauseIndex}).map(function(e){return e.clause}).join(" && ")}},{key:"_adaptFilters",value:function(e,t){var r=[];e.filters&&r.push(e.filters),r.push(this._adaptFacetFilters(e.facetFilters,t)),r.push(this._adaptNumericFilters(e.numericFilters)),r.push(this._adaptGeoFilter(e));var n=r.filter(function(e){return e&&""!==e}).join(" && ");return this.configuration.flipNegativeRefinementOperator?this._mergeSameFieldExclusionListClauses(n):n}},{key:"_adaptIndexName",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(e,t){var r=this;return[e].flat().map(function(e){var n;return null!=(n=r.configuration.collectionSpecificFacetByOptions)&&null!=(n=n[t])&&n[e]?"".concat(e).concat(r.configuration.collectionSpecificFacetByOptions[t][e]):r.configuration.facetByOptions[e]?"".concat(e).concat(r.configuration.facetByOptions[e]):e}).join(",")}},{key:"_adaptRulesContextsToOverrideTags",value:function(e){return e.join(",")}},{key:"_buildSearchParameters",value:function(e){for(var t,r,n=e.params,i=e.indexName,o=this._adaptIndexName(i),a={},s=0,u=Object.entries(this.additionalSearchParameters);s<u.length;s++){var c=A(u[s],2),l=c[0],f=c[1];a[this._camelToSnakeCase(l)]=f}if(this.collectionSpecificSearchParameters[o])for(var p=0,d=Object.entries(this.collectionSpecificSearchParameters[o]);p<d.length;p++){var h=A(d[p],2),y=h[0],m=h[1];a[this._camelToSnakeCase(y)]=m}var g=Object.assign({},a),v=this._adaptSortBy(i);Object.assign(g,{collection:o,q:""===n.query||void 0===n.query?"*":n.query,facet_by:a.facet_by||this._adaptFacetBy(n.facets,o),filter_by:this._adaptFilters(n,o)||a.filter_by,sort_by:v||a.sort_by,max_facet_values:n.maxValuesPerFacet,page:(n.page||0)+1}),null!=n.hitsPerPage&&(g.per_page=n.hitsPerPage),n.facetQuery&&(g.facet_query="".concat(n.facetName,":").concat(n.facetQuery),g.per_page=0),n.ruleContexts&&n.ruleContexts.length>0&&(g[this.configuration.useOverrideTags?"override_tags":"curation_tags"]=this._adaptRulesContextsToOverrideTags(n.ruleContexts)),n.typesenseVectorQuery&&(g.vector_query=n.typesenseVectorQuery);var b=(null==(t=this.configuration.collectionSpecificSortByOptions)||null==(t=t[o])?void 0:t[g.sort_by])||
1(null==(r=this.configuration.sortByOptions)?void 0:r[g.sort_by]);return(null==b?void 0:b.enable_overrides)!=null&&(g.enable_overrides=b.enable_overrides),Object.fromEntries(Object.entries(g).filter(function(e){var t=A(e,2),r=(t[0],t[1]);return null!=r&&""!==r}))}},{key:"_camelToSnakeCase",value:function(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(t=v(O.default.mark(function e(){var t,r,n,i,o,a,s,u,c=this;return O.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.instantsearchRequests.map(function(e){return c._buildSearchParameters(e)}),r={},((null==(s=t[0])?void 0:s.conversation)===!0||(null==(u=t[0])?void 0:u.conversation)==="true")&&(i=(n=t[0]).q,o=n.conversation,r={q:i,conversation:o,conversation_id:n.conversation_id,conversation_model_id:n.conversation_model_id},t=t.map(function(e){return e.q,e.conversation,e.conversation_id,e.conversation_model_id,(0,E.default)(e,x)})),a={searches:t},this.configuration.union&&(a.union=this.configuration.union,["page","per_page","offset","limit","limit_hits"].forEach(function(e){null!=t[0][e]&&(r[e]=t[0][e])})),e.abrupt("return",this.typesenseClient.multiSearch.perform(a,r));case 6:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})}],[{key:"INDEX_NAME_MATCHING_REGEX",get:function(){return RegExp("^(.+?)(?=(/sort/(.*))|$)")}},{key:"DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX",get:function(){return RegExp("(.*)((?!:).):(?!:)(.*)")}},{key:"DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX",get:function(){return RegExp("(.*?)(<=|>=|>|<|=)(.*)")}}]),N=e.i(624977);function I(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=e.i(640404),k={_adaptHighlightTag:function(e,t,r){return e.replace(RegExp("<mark>","g"),t||"<mark>").replace(RegExp("</mark>","g"),r||"</mark>")},_adaptNumberOfPages:function(){var e=this.typesenseResponse.union_request_params?this.typesenseResponse.union_request_params[0]:this.typesenseResponse.request_params,t=(null==e?void 0:e.per_page)||10,r=this.typesenseResponse.found/t;return Number.isFinite(r)?Math.ceil(r):1}};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){(0,D.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var L=w(function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};b(this,e),this.typesenseResponse=t,this.instantsearchRequest=r,this.configuration=n,this.allTypesenseResults=i,this.fullTypesenseResponse=o},[{key:"_adaptGroupedHits",value:function(e){var t=this,r=[];return r=e.map(function(e){var r=t._adaptHits(e.hits);return r.forEach(function(t){t.group_key=t._group_key=e.group_key,e.found&&(t._group_found=e.found)}),r}),r=this.configuration.flattenGroupedHits?r.flat():r.map(function(e){return F(F({},e[0]),{},{_grouped_hits:e})})}},{key:"_adaptHits",value:function(e){var t=this;return e.map(function(e){var r=F({},e.document);r.objectID=e.document.id,r._snippetResult=t._adaptHighlightResult(e,"snippet"),r._highlightResult=t._adaptHighlightResult(e,"value"),r._rawTypesenseHit=e,t.fullTypesenseResponse.conversation&&(r._rawTypesenseConversation=t.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance","collection","search_index"].forEach(function(t){Object.keys(e).includes(t)&&!Object.keys(r).includes(t)&&(r[t]=e[t])});var n=r[t.configuration.geoLocationField];return n&&(r._geoloc={lat:n[0],lng:n[1]}),r})}},{key:"_adaptHighlightResult",value:function(e,t){var r={};return null!=e.highlight&&this.isHighlightPost0240RCN32Format(e.highlight)?this.adaptHighlightObject(e,r,t):this.adaptHighlightsArray(e,r,t),r}},{key:"isHighlightPost0240RCN32Format",value:function(e){return null==e.full&&null==e.snippet}},{key:"adaptHighlightsArray",value:function(e,t,r){var n=this;Object.assign.apply(Object,[t].concat(I(Object.entries(e.document).map(function(e){var t=A(e,2),r=t[0],n=t[1];return(0,D.default)({},r,{value:n,matchLevel:"none",matchedWords:[]})}
1)))),e.highlights.forEach(function(e){t[e.field]={value:e[r]||e["".concat(r,"s")],matchLevel:"full",matchedWords:e.matched_tokens},e.indices&&(t[e.field].matchedIndices=e.indices)}),Object.entries(t).forEach(function(i){var o=A(i,2),a=o[0],s=o[1],u=s.value,c=s.matchLevel,l=s.matchedWords,f=s.matchedIndices;null==u?t[a]=n._adaptHighlightNullValue():Array.isArray(u)?(t[a]=[],e.document[a].forEach(function(e,i){f&&f.includes(i)?t[a].push({value:n._adaptHighlightTag("".concat(u[f.indexOf(i)]),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag),matchLevel:c,matchedWords:l[i]}):"object"===(0,N.default)(e)?t[a].push(n._adaptHighlightInObjectValue(e,{},r)):t[a].push({value:"".concat(e),matchLevel:"none",matchedWords:[]})})):"object"===(0,N.default)(u)?t[a]=n._adaptHighlightInObjectValue(u,{},r):t[a].value=n._adaptHighlightTag("".concat(u),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag)})}},{key:"adaptHighlightObject",value:function(e,t,r){Object.assign(t,this._adaptHighlightInObjectValue(e.document,e.highlight,r))}},{key:"_adaptHighlightInObjectValue",value:function(e,t,r){var n=this;return Object.assign.apply(Object,[{}].concat(I(Object.entries(e).map(function(e){var i,o,a,s=A(e,2),u=s[0],c=s[1];return i=null==c?n._adaptHighlightNullValue():Array.isArray(c)?n._adaptHighlightInArrayValue(c,null!=(o=null==t?void 0:t[u])?o:[],r):"object"===(0,N.default)(c)?n._adaptHighlightInObjectValue(c,null!=(a=null==t?void 0:t[u])?a:{},r):n._adaptHighlightInPrimitiveValue(c,null==t?void 0:t[u],r),(0,D.default)({},u,i)}))))}},{key:"_adaptHighlightInArrayValue",value:function(e,t,r){var n=this;return e.map(function(e,i){var o,a;return null==e?n._adaptHighlightNullValue():Array.isArray(e)?n._adaptHighlightInArrayValue(e,null!=(o=null==t?void 0:t[i])?o:[],r):"object"===(0,N.default)(e)?n._adaptHighlightInObjectValue(e,null!=(a=null==t?void 0:t[i])?a:{},r):n._adaptHighlightInPrimitiveValue(e,null==t?void 0:t[i],r)})}},{key:"_adaptHighlightInPrimitiveValue",value:function(e,t,r){if(null==t)return{value:this._adaptHighlightTag("".concat(e),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]};var n,i,o,a=null!=(n=null!=(i=null!=(o=t[r])?o:t.highlight)?i:t.snippet)?n:e;return{value:this._adaptHighlightTag("".concat(a),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(t.matched_tokens||[]).length>0?"full":"none",matchedWords:t.matched_tokens||[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(e){var t={};return Array.isArray(e)&&e.forEach(function(e){Object.assign(t,(0,D.default)({},e.field_name,Object.assign.apply(Object,[{}].concat(I(e.counts.map(function(e){return(0,D.default)({},e.value,e.count)}))))))}),t}},{key:"_adaptFacetStats",value:function(e){var t={};return Array.isArray(e)&&e.forEach(function(e){e.stats&&Object.keys(e.stats).length>0&&Object.assign(t,(0,D.default)({},e.field_name,e.stats))}),t}},{key:"_adaptRenderingContent",value:function(e){var t,r=Object.assign({},this.configuration.renderingContent);return(null==(t=r.facetOrdering)||null==(t=t.facets)?void 0:t.order)==null&&(r.facetOrdering=r.facetOrdering||{},r.facetOrdering.facets=r.facetOrdering.facets||{},r.facetOrdering.facets.order=I(new Set((Array.isArray(e)?e:[]).map(function(e){return e.field_name}).concat(this.allTypesenseResults.map(function(e){return e.facet_counts||[]}).flat().map(function(e){return e.field_name}).filter(function(e){return e}))))),r}},{key:"_adaptUserData",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"adapt",value:function(){var e=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),t=this.typesenseResponse.union_request_params?this.typesenseResponse.union_request_params[0]:this.typesenseResponse.request_params,r=F({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.union_request_params?this.typesenseResponse.page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:(null==t?void 0:t.per_page)||10,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||[]),query:(null==t?void 0:t.q)||"",processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(e).length>0?{renderingContent:e}:null);return this.typesenseResponse.metadata&&(r.appliedRules=["typesense-override"],r.userData=this._adaptUserData(this.typesenseResponse.metadata)),this.typesenseResponse.parsed_nl_query&&(r.parsed_nl_query=this.typesenseResponse.parsed_nl_query),this.fullTypesenseResponse.conversation&&0===r.hits.length&&(r.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),r}}]);Object.assign(L.prototype,k);var M=w(function e(t,r){b(this,e),this.typesenseResponse=t,this.instantsearchRequest=r},[{key:"_adaptFacetHits",value:function(e){var t=this,r=[],n=e.find(function(e){return e.field_name===t.instantsearchRequest.params.facetName});return void 0!==n&&(r=n.counts.map(function(e){return{value:e.value,highlighted:t._adaptHighlightTag(e.highlighted,t.instantsearchRequest.params.highlightPreTag,t.instantsearchRequest.params.highlightPostTag),count:e.count}})),r}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}]);Object.assign(M.prototype,k);let q=new(w(function e(t){var r=this;b(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return r.clearCache()},search:function(e){return r.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return r.searchTypesenseForFacetValuesAndAdapt(e)}}},[{key:"searchTypesenseAndAdapt",value:(r=v(O.default.mark(function e(t){var r,n,i,o,a=this;return O.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest
1(t);case 3:if(!(r=e.sent).union_request_params){e.next=12;break}return this._validateTypesenseResult(r),n=new L(r,t[0],this.configuration,[r],r).adapt(),i=t.map(function(){return n}),e.abrupt("return",{results:i});case 12:return o=r.results.map(function(e,n){return a._validateTypesenseResult(e),new L(e,t[n],a.configuration,r.results,r).adapt()}),e.abrupt("return",{results:o});case 14:e.next=20;break;case 16:throw e.prev=16,e.t0=e.catch(0),console.error(e.t0),e.t0;case 20:case"end":return e.stop()}},e,this,[[0,16]])})),function(e){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=v(O.default.mark(function e(t){var r,n=this;return O.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return r=e.sent.results.map(function(e,r){return n._validateTypesenseResult(e),new M(e,t[r],n.configuration).adapt()}),e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}},e,this,[[0,8]])})),function(e){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(i=v(O.default.mark(function e(t){var r,n;return O.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new T(t,this.typesenseClient,this.configuration),e.next=3,r.request();case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new R.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new P(e),this.configuration.validate(),this.typesenseClient=new R.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(e){if(e.error)throw Error("".concat(e.code," - ").concat(e.error));if(!e.hits&&!e.grouped_hits)throw Error("Did not find any hits. ".concat(e.code," - ").concat(e.error))}}]))({server:{nodes:[{host:m.env.NEXT_PUBLIC_TYPESENSE_HOST,port:443,protocol:"https"}],apiKey:m.env.NEXT_PUBLIC_TYPESENSE_SEARCH_KEY},additionalSearchParameters:{text_match_type:"max_weight",split_join_tokens:"fallback",num_typos:2,min_len_1typo:4,min_len_2typo:8,exhaustive_search:!0,highlight_affix_num_tokens:8,enable_typos_for_numerical_tokens:!1},collectionSpecificSearchParameters:s}).searchClient;e.s(["searchClient",0,q],70115);var H=e.i(68953),W=e.i(730499),B=e.i(958358);function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var z=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=$(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=$(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var J=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,z);return e.setQueryParameters(r)}
1,V=function(e,t){var r=[].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean).filter(function(e,t,r){return r.indexOf(e)===t});return r.length>0?e.setQueryParameters({ruleContexts:r}):e},Q=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t){var r,n,i,o,a,s,u,c;return J((c=V((r=e.setQueryParameters({hierarchicalFacetsRefinements:K(K({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)}),n=r.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var r=function(e,t){if(!Array.isArray(e))return -1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return -1}(e,function(e){return e.name===t.name});if(-1===r)return e.concat(t);var n=e.slice();return n.splice(r,1,t),n},r.hierarchicalFacets)}),i=t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},n),o=i.setQueryParameters({numericRefinements:K(K({},i.numericRefinements),t.numericRefinements)}),a=o.setQueryParameters({disjunctiveFacetsRefinements:K(K({},o.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)}),s=a.setQueryParameters({facetsExcludes:K(K({},a.facetsExcludes),t.facetsExcludes)}),u=s.setQueryParameters({facetsRefinements:K(K({},s.facetsRefinements),t.facetsRefinements)}),t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},u)),t),t.facets.reduce(function(e,t){return e.addFacet(t)},c)),t)})};e.s(["mergeSearchParameters",()=>Q],125651);var X=e.i(919508);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){et(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function et(e,t,r){var n;return(n=function(e,t){if("object"!=Y(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Y(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==Y(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var er=(0,W.createDocumentationMessageGenerator)({name:"configure",connector:!0});function en(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return ee(ee({},e),{},et({},t,void 0))},{}))}let ei=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X.noop,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X.noop;return function(r){if(!r||!(0,B.isPlainObject)(r.searchParameters))throw Error(er("The `searchParameters` option expects an object."));var n={};return{$$type:"ais.configure",init:function(t){var r=t.instantSearchInstance;e(ee(ee({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(ee(ee({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var n=e.state;return t(),en(n,r)},getRenderState:function(e,t){var r,n=this.getWidgetRenderState(t);return ee(ee({},e),{},{configure:ee(ee({},n),{},{widgetParams:ee(ee({},n.widgetParams),{},{searchParameters:Q(new H.default.SearchParameters(null==(r=e.configure)?void 0:r.widgetParams.searchParameters),new H.default.SearchParameters(n.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return n.refine||(n.refine=function(e){var n=Q(en(t.state,r),new H.default.SearchParameters(e));r.searchParameters=e,t.setState(n).search()}),{refine:n.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){var n=t.uiState;return Q(e,new H.default.SearchParameters(ee(ee({},n.configure),r.searchParameters)))},getWidgetUiState:function(e){return ee(ee({},e),{},{configure:ee(ee({},e.configure),r.searchParameters)})}}}};var eo=e.i(851029);function ea(e){return(ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eu(e){var t,r;return t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?es(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=ea(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ea(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ea(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):es(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e),r={$$widgetType:"ais.configure"},(0,eo.useConnector)(ei,{searchParameters:t},r),null}e.s(["Configure",()=>eu],944626)},259257,871383,e=>{"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(){if(("u"<typeof document?"undefined":t(document))==="object"&&"string"==typeof document.cookie)for(var e="".concat("_ALGOLIA","="),r=
1document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(e))return i.substring(e.length,i.length)}}function n(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(!e.transporter)return[e.applicationID,e.apiKey];var t=e.transporter,r=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,i="x-algolia-application-id",o="x-algolia-api-key";return[r[i]||n[i],r[o]||n[o]]}e.i(390462),e.s(["getInsightsAnonymousUserTokenInternal",()=>r],259257),e.s(["getAppIdAndApiKey",()=>n],871383)},315402,e=>{"use strict";function t(e,t){for(var r,n=0;n<e.length;n++)if(t(r=e[n],n,e))return r}e.s(["find",()=>t])},776467,e=>{"use strict";function t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},r=t.fallback;return"u"<typeof window?r():e({window:window})}e.s(["safelyRunOnBrowser",()=>t])},231473,(e,t,r)=>{"use strict";t.exports=TypeError},524270,(e,t,r)=>{"use strict";var n=e.r(787405),i=e.r(231473),o=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n},a=function(e,t){if(e){var r=o(e,t);return r&&r.value}},s=function(e,t,r){var n=o(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},u=function(e,t){if(e)return o(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=u(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){var r;return!!(r=e)&&!!o(r,t)},set:function(t,r){e||(e={next:void 0}),s(e,t,r)}};return t}},314174,(e,t,r)=>{"use strict";t.exports=Object},892715,(e,t,r)=>{"use strict";t.exports=Error},607829,(e,t,r)=>{"use strict";t.exports=EvalError},498493,(e,t,r)=>{"use strict";t.exports=RangeError},167914,(e,t,r)=>{"use strict";t.exports=ReferenceError},26857,(e,t,r)=>{"use strict";t.exports=SyntaxError},991878,(e,t,r)=>{"use strict";t.exports=URIError},978866,(e,t,r)=>{"use strict";t.exports=Math.abs},365335,(e,t,r)=>{"use strict";t.exports=Math.floor},922083,(e,t,r)=>{"use strict";t.exports=Math.max},640465,(e,t,r)=>{"use strict";t.exports=Math.min},18849,(e,t,r)=>{"use strict";t.exports=Math.pow},97988,(e,t,r)=>{"use strict";t.exports=Math.round},636469,(e,t,r)=>{"use strict";t.exports=Number.isNaN||function(e){return e!=e}},366205,(e,t,r)=>{"use strict";var n=e.r(636469);t.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},484153,(e,t,r)=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},83585,(e,t,r)=>{"use strict";var n=e.r(484153);if(n)try{n([],"length")}catch(e){n=null}t.exports=n},393155,(e,t,r)=>{"use strict";var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}t.exports=n},199260,(e,t,r)=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},811880,(e,t,r)=>{"use strict";var n="u">typeof Symbol&&Symbol,i=e.r(199260);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},277146,(e,t,r)=>{"use strict";t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},818991,(e,t,r)=>{"use strict";t.exports=e.r(314174).getPrototypeOf||null},992819,(e,t,r)=>{"use strict";var n=Object.prototype.toString,i=Math.max,o=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},a=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};t.exports=function(e){var t,r=this;if("function"!=typeof r||"[object Function]"!==n.apply(r))throw TypeError("Function.prototype.bind called on incompatible "+r);
1for(var u=a(arguments,1),c=i(0,r.length-u.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(t=Function("binder","return function ("+s(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof t){var n=r.apply(this,o(u,arguments));return Object(n)===n?n:this}return r.apply(e,o(u,arguments))}),r.prototype){var p=function(){};p.prototype=r.prototype,t.prototype=new p,p.prototype=null}return t}},78387,(e,t,r)=>{"use strict";var n=e.r(992819);t.exports=Function.prototype.bind||n},487957,(e,t,r)=>{"use strict";t.exports=Function.prototype.call},996077,(e,t,r)=>{"use strict";t.exports=Function.prototype.apply},628403,(e,t,r)=>{"use strict";t.exports="u">typeof Reflect&&Reflect&&Reflect.apply},510938,(e,t,r)=>{"use strict";var n=e.r(78387),i=e.r(996077),o=e.r(487957);t.exports=e.r(628403)||n.call(o,i)},954767,(e,t,r)=>{"use strict";var n=e.r(78387),i=e.r(231473),o=e.r(487957),a=e.r(510938);t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(n,o,e)}},905408,(e,t,r)=>{"use strict";var n,i=e.r(954767),o=e.r(83585);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&o&&o(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof u&&function(e){return u(null==e?e:s(e))}},211915,(e,t,r)=>{"use strict";var n=e.r(277146),i=e.r(818991),o=e.r(905408);t.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},816322,(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;t.exports=e.r(78387).call(n,i)},343473,(e,t,r)=>{"use strict";var n=e.r(314174),i=e.r(892715),o=e.r(607829),a=e.r(498493),s=e.r(167914),u=e.r(26857),c=e.r(231473),l=e.r(991878),f=e.r(978866),p=e.r(365335),d=e.r(922083),h=e.r(640465),y=e.r(18849),m=e.r(97988),g=e.r(366205),v=Function,b=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=e.r(83585),S=e.r(393155),w=function(){throw new c},O=_?function(){try{return arguments.callee,w}catch(e){try{return _(arguments,"callee").get}catch(e){return w}}}():w,P=e.r(811880)(),R=e.r(211915),E=e.r(818991),C=e.r(277146),j=e.r(996077),A=e.r(487957),x={},T="u">typeof Uint8Array&&R?R(Uint8Array):void 0,N={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":P&&R?R([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"u"<typeof Atomics?void 0:Atomics,"%BigInt%":"u"<typeof BigInt?void 0:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"u"<typeof Float16Array?void 0:Float16Array,"%Float32Array%":"u"<typeof Float32Array?void 0:Float32Array,"%Float64Array%":"u"<typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":x,"%Int8Array%":"u"<typeof Int8Array?void 0:Int8Array,"%Int16Array%":"u"<typeof Int16Array?void 0:Int16Array,"%Int32Array%":"u"<typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":P&&R?R(R([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"u"<typeof Map?void 0:Map,"%MapIteratorPrototype%":"u">typeof Map&&P&&R?R(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?void 0:Promise,"%Proxy%":"u"<typeof Proxy?void 0:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"u"<typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?void 0:Set,"%SetIteratorPrototype%":"u">typeof Set&&P&&R?R(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":P&&R?R(""[Symbol.iterator]()):void 0,"%Symbol%":P?Symbol:void 0,"%SyntaxError%":u,"%ThrowTypeError%":O,"%TypedArray%":T,"%TypeError%":c,"%Uint8Array%":"u"<typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?void 0:Uint32Array,"%URIError%":l,"%WeakMap%":"u"<typeof WeakMap?void 0:WeakMap,"%WeakRef%":"u"<typeof WeakRef?void 0:WeakRef,"%WeakSet%":"u"<typeof WeakSet?void 0:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":j,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":E,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":C};if(R)try{null.error}catch(e){var I=R(R(e));N["%Error.prototype%"]=I}var D=function e(t){var r;if("%AsyncFunction%"===t)r=b("async function () {}");else if("%GeneratorFunction%"===t)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=b("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&R&&(r=R(i.prototype))}return N[t]=r,r},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=e.r(78387),F=e.r(816322),L=U.call(A,Array.prototype.concat),M=U.call(j,Array.prototype.splice),q=U.call(A,String.prototype.replace),H=U.call(A,String.prototype.slice),W=U.call(A,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,z=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return q(e,B,function(e,t,r,i){n[n.length]=r?q(i,$,"$1"):t||e}),n},G=function(e,t){var r,n=e;if(F(k,n)&&(n="%"+(r=k[n])[0]+"%"),F(N,n)){var i=N[n];if(i===x&&(i=D(n)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",i=G("%"+n+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(n=l[0],M(r,L([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],h=H(d,0,1),y=H(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),n+="."+d,F(N,o="%"+n+"%"))a=N[o];
1else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&f+1>=r.length){var m=_(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=F(a,d),a=a[d];p&&!s&&(N[o]=a)}}return a}},795081,(e,t,r)=>{"use strict";var n=e.r(343473),i=e.r(954767),o=i([n("%String.prototype.indexOf%")]);t.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},975251,(e,t,r)=>{"use strict";var n=e.r(343473),i=e.r(795081),o=e.r(787405),a=e.r(231473),s=n("%Map%",!0),u=i("Map.prototype.get",!0),c=i("Map.prototype.set",!0),l=i("Map.prototype.has",!0),f=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);t.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+o(e))},delete:function(t){if(e){var r=f(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return u(e,t)},has:function(t){return!!e&&l(e,t)},set:function(t,r){e||(e=new s),c(e,t,r)}};return t}},720719,(e,t,r)=>{"use strict";var n=e.r(343473),i=e.r(795081),o=e.r(787405),a=e.r(975251),s=e.r(231473),u=n("%WeakMap%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);t.exports=u?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+o(e))},delete:function(r){if(u&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(a&&t)return t.delete(r);return!1},get:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):t&&t.get(r)},has:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&e?f(e,r):!!t&&t.has(r)},set:function(r,n){u&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new u),l(e,r,n)):a&&(t||(t=a()),t.set(r,n))}};return r}:a},168251,(e,t,r)=>{"use strict";var n=e.r(231473),i=e.r(787405),o=e.r(524270),a=e.r(975251),s=e.r(720719)||a||o;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=s()),e.set(t,r)}};return t}},535302,(e,t,r)=>{"use strict";var n=String.prototype.replace,i=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:o}},647567,(e,t,r)=>{"use strict";var n=e.r(535302),i=e.r(168251),o=Object.prototype.hasOwnProperty,a=Array.isArray,s=i(),u=function(e,t){return s.set(e,t),e},c=function(e){return s.has(e)},l=function(e){return s.get(e)},f=function(e,t){s.set(e,t)},p=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),d=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}},h=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};t.exports={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(c(e)){var i=l(e)+1;return e[i]=t,f(e,i),e}var o=[].concat(e,t);return o.length>r?u(h(o,{plainObjects:n}),o.length-1):o},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],a=Object.keys(o),s=0;s<a.length;++s){var u=a[s],c=o[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:o,prop:u}),r.push(c))}return d(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",u=0;u<a.length;u+=1024){for(var c=a.length>=1024?a.slice(u,u+1024):a,l=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===n.RFC1738&&(40===d||41===d)){l[l.length]=c.charAt(f);continue}if(d<128){l[l.length]=p[d];continue}if(d<2048){l[l.length]=p[192|d>>6]+p[128|63&d];continue}if(d<55296||d>=57344){l[l.length]=p[224|d>>12]+p[128|d>>6&63]+p[128|63&d];continue}
1f+=1,d=65536+((1023&d)<<10|1023&c.charCodeAt(f)),l[l.length]=p[240|d>>18]+p[128|d>>12&63]+p[128|d>>6&63]+p[128|63&d]}s+=l.join("")}return s},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(a(t))t.push(r);else if(!t||"object"!=typeof t)return[t,r];else if(c(t)){var i=l(t)+1;t[i]=r,f(t,i)}else(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0);return t}if(!t||"object"!=typeof t){if(c(r)){for(var s=Object.keys(r),p=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},d=0;d<s.length;d++)p[parseInt(s[d],10)+1]=r[s[d]];return u(p,l(r)+1)}return[t].concat(r)}var y=t;return(a(t)&&!a(r)&&(y=h(t,n)),a(t)&&a(r))?(r.forEach(function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t},y)}}},525391,(e,t,r)=>{"use strict";var n=e.r(168251),i=e.r(647567),o=e.r(535302),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,p=o.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},y=function e(t,r,o,a,s,c,f,p,y,m,g,v,b,_,S,w,O,P){for(var R,E,C=t,j=P,A=0,x=!1;void 0!==(j=j.get(h))&&!x;){var T=j.get(t);if(A+=1,void 0!==T)if(T===A)throw RangeError("Cyclic object value");else x=!0;void 0===j.get(h)&&(A=0)}if("function"==typeof m?C=m(r,C):C instanceof Date?C=b(C):"comma"===o&&u(C)&&(C=i.maybeMap(C,function(e){return e instanceof Date?b(e):e})),null===C){if(c)return y&&!w?y(r,d.encoder,O,"key",_):r;C=""}if("string"==typeof(R=C)||"number"==typeof R||"boolean"==typeof R||"symbol"==typeof R||"bigint"==typeof R||i.isBuffer(C))return y?[S(w?r:y(r,d.encoder,O,"key",_))+"="+S(y(C,d.encoder,O,"value",_))]:[S(r)+"="+S(String(C))];var N=[];if(void 0===C)return N;if("comma"===o&&u(C))w&&y&&(C=i.maybeMap(C,y)),E=[{value:C.length>0?C.join(",")||null:void 0}];else if(u(m))E=m;else{var I=Object.keys(C);E=g?I.sort(g):I}var D=p?String(r).replace(/\./g,"%2E"):String(r),k=a&&u(C)&&1===C.length?D+"[]":D;if(s&&u(C)&&0===C.length)return k+"[]";for(var U=0;U<E.length;++U){var F=E[U],L="object"==typeof F&&F&&void 0!==F.value?F.value:C[F];if(!f||null!==L){var M=v&&p?String(F).replace(/\./g,"%2E"):String(F),q=u(C)?"function"==typeof o?o(k,M):k:k+(v?"."+M:"["+M+"]");P.set(t,A);var H=n();H.set(h,P),l(N,e(L,q,o,a,s,c,f,p,"comma"===o&&w&&u(C)?null:y,m,g,v,b,_,S,w,O,H))}}return N},m=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var i=o.formatters[n],c=d.filter;if(("function"==typeof e.filter||u(e.filter))&&(c=e.filter),t=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:t,charset
1:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:c,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}};t.exports=function(e,t){var r,i=e,o=m(t);"function"==typeof o.filter?i=(0,o.filter)("",i):u(o.filter)&&(r=o.filter);var a=[];if("object"!=typeof i||null===i)return"";var c=s[o.arrayFormat],f="comma"===c&&o.commaRoundTrip;r||(r=Object.keys(i)),o.sort&&r.sort(o.sort);for(var p=n(),d=0;d<r.length;++d){var h=r[d],g=i[h];o.skipNulls&&null===g||l(a,y(g,h,c,f,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,p))}var v=a.join(o.delimiter),b=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),v.length>0?b+v:""}},438576,(e,t,r)=>{"use strict";var n=e.r(647567),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},u=function(e,t){var r={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=t.parameterLimit===1/0?void 0:t.parameterLimit,l=u.split(t.delimiter,t.throwOnLimitExceeded?c+1:c);if(t.throwOnLimitExceeded&&l.length>c)throw RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var f=-1,p=t.charset;if(t.charsetSentinel)for(d=0;d<l.length;++d)0===l[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[d]?p="utf-8":"utf8=%26%2310003%3B"===l[d]&&(p="iso-8859-1"),f=d,d=l.length);for(d=0;d<l.length;++d)if(d!==f){var d,h,y,m=l[d],g=m.indexOf("]="),v=-1===g?m.indexOf("="):g+1;if(-1===v?(h=t.decoder(m,a.decoder,p,"key"),y=t.strictNullHandling?null:""):null!==(h=t.decoder(m.slice(0,v),a.decoder,p,"key"))&&(y=n.maybeMap(s(m.slice(v+1),t,o(r[h])?r[h].length:0),function(e){return t.decoder(e,a.decoder,p,"value")})),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=String(y).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),m.indexOf("[]=")>-1&&(y=o(y)?[y]:y),null!==h){var b=i.call(r,h);b&&"combine"===t.duplicates?r[h]=n.combine(r[h],y,t.arrayLimit,t.plainObjects):b&&"last"!==t.duplicates||(r[h]=y)}}return r},c=function(e,t,r,i){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var a=e.slice(0,-1).join("");o=Array.isArray(t)&&t[a]?t[a].length:0}for(var u=i?t:s(t,r,o),c=e.length-1;c>=0;--c){var l,f=e[c];if("[]"===f&&r.parseArrays)l=n.isOverflow(u)?u:r.allowEmptyArrays&&(""===u||r.strictNullHandling&&null===u)?[]:n.combine([],u,r.arrayLimit,r.plainObjects);else{l=r.plainObjects?{__proto__:null}:{};var p="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,h=parseInt(d,10);r.parseArrays||""!==d?!isNaN(h)&&f!==d&&String(h)===d&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[])[h]=u:"__proto__"!==d&&(l[d]=u):l={0:u}}u=l}return u},l=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&i.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),a=o?r.slice(0,o.index):r,s=[];if(a){if(!t.plainObjects&&i.call(Object.prototype,a)&&!t.allowPrototypes)return;s.push(a)}for(var u=0;null!==(o=n.exec(r))&&u<t.depth;){u+=1;var c=o[1].slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,c)&&!t.allowPrototypes)return;s.push(o[1])}if(o){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");s.push("["+r.slice(o.index)+"]")}return s},f=function(e,t,r,n){if(e){var i=l(e,r);if(i)return c(i,t,r,n)}},p=function(e){if(!e)return a;
1if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};t.exports=function(e,t){var r=p(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?u(e,r):e,o=r.plainObjects?{__proto__:null}:{},a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],l=f(c,i[c],r,"string"==typeof e);o=n.merge(o,l,r)}return!0===r.allowSparse?o:n.compact(o)}},206078,(e,t,r)=>{"use strict";var n=e.r(525391),i=e.r(438576);t.exports={formats:e.r(535302),parse:i,stringify:n}},279979,895817,144643,e=>{"use strict";var t=e.i(702239),r=e.i(766365),n=e.i(536681),i=e.i(390462),o=e.i(106824),a=e.i(68953),s=e.i(259257),u=e.i(919508),c=e.i(871383),l=e.i(315402),f=e.i(776467);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||m(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return g(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var v="2.17.2",b="https://cdn.jsdelivr.net/npm/search-insights@".concat(v,"/dist/search-insights.min.js");function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,o=void 0!==i&&i,a=e.$$automatic,p=void 0!==a&&a,d=t;t||null===t||(0,f.safelyRunOnBrowser)(function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(d=t[r]),d||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t[r].queue.push(n)},t[r].version=v,t[r].shouldAddScript=!0),d=t[r])});var _=d||u.noop;return function(e){var t,i,a=e.instantSearchInstance,f=a.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});a.unuse.apply(a,function(e){if(Array.isArray(e))return g(e)}(f)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(f)||m(f)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var d=y((0,c.getAppIdAndApiKey)(a.client),2),v=d[0],O=d[1],P=void 0,R=void 0,E=void 0,C=_.queue;if(Array.isArray(C)){var j=["setUserToken","init"].map(function(e){var t=(0,l.find)(C.slice().reverse(),function(t){return y(t,1)[0]===e})||[];return y(t,2)[1]}),A=y(j,2);R=A[0],P=A[1]}return _("getUserToken",null,function(e,t){E=w(t)}),(r||!S(_))&&_("init",h({appId:v,apiKey:O,partial:!0},r)),{$$type:"ais.insights",$$internal:o,$$automatic:p,onStateChange:function(){},subscribe:function(){if(_.shouldAddScript){var e="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var t=document.createElement("script");t.async=!0,t.src=b,t.onerror=function(){a.emit("error",Error(e))},document.body.appendChild(t),_.shouldAddScript=!1}catch(t){_.shouldAddScript=!1,a.emit("error",Error(e))}}},started:function(){_("addAlgoliaAgent","insights-middleware"),i=a.mainHelper;var e,u,f,d,m,g,v,b,O,C,j,A,x,T=_.queue;if(Array.isArray(T)){var N=["setUserToken","init"].map(function(e){var t=(0,l.find)(T.slice().reverse(),function(t){return y(t,1)[0]===e})||[];return y(t,2)[1]}),I=y(N,2);R=I[0],P=I[1]}d=(null==(u=(e=a)._initialResults)||null==(f=u[e.indexName])?void 0:f.state)||{},m=e.mainHelper.state,t={userToken:d.userToken||m.userToken,clickAnalytics:d.clickAnalytics||m.clickAnalytics},p||i.overrideStateWithoutTriggeringChangeEvent(h(h({},i.state),{},{clickAnalytics:!0})),o||a.scheduleSearch();var D=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=w(e);if(r){var n=i.state.userToken;t?o():setTimeout(o,0)}function o(){i.overrideStateWithoutTriggeringChangeEvent(h(h({},i.state),{},{userToken:r})),n&&n!==e&&a.scheduleSearch()}};function k(e){D(e,!0),_("setUserToken",e)}var U=void 0,F=(0,s.getInsightsAnonymousUserTokenInternal)();U=F||"anonymous-".concat("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));var L=t.userToken;
1null!=r&&r.userToken&&(C=r.userToken),C?k(C):L?k(L):E?k(E):R?k(R):U&&(k(U),(null!=r&&r.useCookie||null!=(j=P)&&j.useCookie)&&(g=U,v=(null==r?void 0:r.cookieDuration)||(null==(A=P)?void 0:A.cookieDuration),(b=new Date).setTime(b.getTime()+(v||15552e6)),O="expires=".concat(b.toUTCString()),document.cookie="_ALGOLIA=".concat(g,";").concat(O,";path=/"))),_("onUserTokenChange",function(e){return D(e,!0)},{immediate:!0});var M=_;S(_)&&(M=function(e,t){var r=y((0,c.getAppIdAndApiKey)(a.client),2);return _(e,t,{headers:{"X-Algolia-Application-Id":r[0],"X-Algolia-API-Key":r[1]}})});var q=new Set;a.mainHelper.derivedHelpers[0].on("result",function(e){var t=e.results;t&&(!t.queryID||t.queryID!==x)&&(x=t.queryID,q.clear())}),a.sendEventToInsights=function(e){if(n)n(e,M);else if(e.insightsMethod){if("viewedObjectIDs"===e.insightsMethod){var t=e.payload,r=t.objectIDs.filter(function(e){return!q.has(e)});if(0===r.length)return;r.forEach(function(e){return q.add(e)}),t.objectIDs=r}e.payload.algoliaSource=["instantsearch"],p&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),M(e.insightsMethod,e.payload)}}},unsubscribe:function(){_("onUserTokenChange",void 0),a.sendEventToInsights=u.noop,i&&t&&(i.overrideStateWithoutTriggeringChangeEvent(h(h({},i.state),t)),a.scheduleSearch())}}}}function S(e){var t=y((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function w(e){if(e)return"number"==typeof e?e.toString():e}function O(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function P(e,t,r){var n=t.getResultsForWidget(r),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}var R=e.i(206078);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=E(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}var A=function(e){e&&(window.document.title=e)},x=function(){var e;function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,o=e.createURL,a=e.parseURL,s=e.getLocation,u=e.start,c=e.dispose,l=e.push,p=e.cleanUrlOnDispose;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");C(this,"$$type","ais.browser"),C(this,"windowTitle",void 0),C(this,"writeDelay",void 0),C(this,"_createURL",void 0),C(this,"parseURL",void 0),C(this,"getLocation",void 0),C(this,"writeTimer",void 0),C(this,"_onPopState",void 0),C(this,"inPopState",!1),C(this,"isDisposed",!1),C(this,"latestAcknowledgedHistory",0),C(this,"_start",void 0),C(this,"_dispose",void 0),C(this,"_push",void 0),C(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=void 0===i?400:i,this._createURL=o,this.parseURL=a,this.getLocation=s,this._start=u,this._dispose=c,this._push=l,this._cleanUrlOnDispose=void 0===p||p,(0,f.safelyRunOnBrowser)(function(e){var t=e.window;A(r.windowTitle&&r.windowTitle(r.read())),r.latestAcknowledgedHistory=t.history.length})}return e=[{key:"read",value:function(){return this.parseURL({qsModule:R.default,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;(0,f.safelyRunOnBrowser)(function(r){var n=r.window,i=t.createURL(e),o=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){A(o),t.shouldWrite(i)&&(t._push?t._push(i):n.history.pushState(e,o||"",i),t.latestAcknowledgedHistory=n.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}}
1,{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},(0,f.safelyRunOnBrowser)(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:R.default,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,(0,f.safelyRunOnBrowser)(function(t){var r=t.window;e._onPopState&&r.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return(0,f.safelyRunOnBrowser)(function(r){var n=r.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==n.history.length);return!t.inPopState&&i&&e!==n.location.href})}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,u=n.pathname,c=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(u,"?").concat(l).concat(c):"".concat(i,"//").concat(o).concat(f).concat(u).concat(c)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,a=e.windowTitle,s=e.getLocation;return new x({createURL:r,parseURL:i,writeDelay:void 0===o?400:o,windowTitle:a,getLocation:void 0===s?function(){return(0,f.safelyRunOnBrowser)(function(e){return e.window.location},{fallback:function(){throw Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:s,start:e.start,dispose:e.dispose,push:e.push,cleanUrlOnDispose:e.cleanUrlOnDispose})}function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["default",()=>T],895817);var I=["configure"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){U(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function U(e,t,r){var n;return(n=function(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==N(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e){return e.configure,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,I)}function L(e){return e!==Object(e)}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?q(Object(r),!0).forEach(function(t){W(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function W(e,t,r){var n;return(n=function(e,t){if("object"!=M(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=M(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==M(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?T():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce(function(t,r){return k(k({},t),{},U({},r,F(e[r])))},{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,r){return k(k({},t),{},U({},r,F(e[r])))},{})}}:n,o=e.$$internal,a=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce(function(t,r){return H(H({},t),{},W({},r,e[r]))},n),a=i.stateToRoute(o);return r.createURL(a)};var n=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:a,onStateChange:function(e){var t=e.uiState,o=i.stateToRoute(t);(void 0===n||!function e(t,r){if(t===r)return!0;if(L(t)||L(r)||"function"==typeof t||"function"==typeof r)return t===r;if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];if(!(o in r)||!e(t[o],r[o]))return!1}return!0}(n,o))&&(r.write(o),n=o)},subscribe:function(){t._initialUiState=H(H({},o),i.routeToState(r.read())),r.onUpdate(function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))})},started:function(){var e;null==(e=r.start)||e.call(r)},unsubscribe:function(){r.dispose()}}}},$=e.i(730499),z=e.i(125651),G=e.i(818014),K=Promise.resolve();function J(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];null===t&&(t=K.then(function(){if(t=null,r){r=!1;return}e.apply(void 0,i)}))};return n.wait=function(){if(null===t)throw Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){null!==t&&(r=!0)},n}var V=0;function Q(e){"recommend"===e.dependsOn&&(e.$$id=V++)}function X(){V=0}function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["addWidgetId",()=>Q,"resetWidgetId",()=>X],144643);var Z=["initialSearchParameters"],ee=["initialRecommendParameters"];function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach(function(t){en(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function en(e,t,r){var n;return(n=function(e,t){if("object"!=Y(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Y(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==Y(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ei(e){return function(e){if(Array.isArray(e))return eo(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eo(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eo(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ea(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var es=(0,$.createDocumentationMessageGenerator)({name:"index-widget"});function eu(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,o=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:o})),n!==e.recommendState&&(e.recommendState=n)}function ec(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,r){return!(0,G.isIndexWidget)(r)&&(r.getWidgetUiState||r.getWidgetState)?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e},r)}function el(e,t){var r=t.initialSearchParameters,n=ea(t,Z);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||(0,G.isIndexWidget)(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)},r)}function ef(e,t){var r=t.initialRecommendParameters,n=ea(t,ee);return e.reduce(function(e,t){return!(0,G.isIndexWidget)(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e},r)}let ep=function(e){if(void 0===e||void 0===e.indexName&&!e.EXPERIMENTAL_isolated)throw Error(es("The `indexName` option is required."));var t=e.indexName,r=void 0===t?"":t,n=e.indexId,i=void 0===n?r:n,o=e.EXPERIMENTAL_isolated,s=void 0!==o&&o,u=[],c={},l=null,f=null,p=null,d=null,h=null,y=!1,m=!1;return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:s,getIndexName:function(){return r},getIndexId:function(){return i},getHelper:function(){return p},getResults:function(){var e;return null!=(e=d)&&e.lastResults?(d.lastResults._state=p.state,d.lastResults):null},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||(0,G.isIndexWidget)(e)||void 0===e.$$id?this.getResults():null!=(t=p)&&t.lastRecommendResults?p.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return h},getScopedResults:function(){var e=this.getParent();return function e(t){return t.filter(G.isIndexWidget).reduce(function(t,r){return t.concat.apply(t,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(ei(e(r.getWidgets()))))},[])}(e?e.getWidgets():0===r.length?this.getWidgets():[this])},getParent:function(){return s?null:f},createURL:function(e){return"function"==typeof e?l._createURL(en({},i,e(c))):l._createURL(en({},i,ec(u,{searchParameters:e,helper:p})))},scheduleLocalSearch:J(function(){if(s){var e;null==(e=p)||e.search()}}),getWidgets:function(){return u},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw Error(es("The `addWidgets` method expects an array of widgets."));var r=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(r.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw Error(es("The widget definition expects a `render` and/or an `init` method."));return r.forEach(function(e){e.parent=t,(0,G.isIndexWidget)(e)||(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?y=!0:m=!0,Q(e))}),u=u.concat(r),l&&r.length&&(eu(p,{state:el(u,{uiState:c,initialSearchParameters:p.state}),recommendState:ef(u,{uiState:c,initialRecommendParameters:p.recommendState}),_uiState:c}),r.forEach(function(e){e.getRenderState&&ed({renderState:e.getRenderState(l.renderState[t.getIndexId()]||{},O(l,t,l._initialUiState)),instantSearchInstance:l,parent:t})}),r.forEach(function(e){e.init&&e.init(O(l,t,l._initialUiState))}
1),s?this.scheduleLocalSearch():l.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw Error(es("The `removeWidgets` method expects an array of widgets."));var r=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(r.some(function(e){return"function"!=typeof e.dispose}))throw Error(es("The widget definition expects a `dispose` method."));if((u=u.filter(function(e){return -1===r.indexOf(e)})).forEach(function(e){e.parent=void 0,(0,G.isIndexWidget)(e)||(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?y=!0:m=!0)}),l&&r.length){var n=r.reduce(function(e,r){var n=r.dispose({helper:p,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return n instanceof a.default.RecommendParameters?e.cleanedRecommendState=n:n&&(e.cleanedSearchState=n),e},{cleanedSearchState:p.state,cleanedRecommendState:p.recommendState}),i=n.cleanedSearchState,o=n.cleanedRecommendState,f=l.future.preserveSharedStateOnUnmount?el(u,{uiState:c,initialSearchParameters:new a.default.SearchParameters({index:this.getIndexName()})}):el(u,{uiState:ec(u,{searchParameters:i,helper:p}),initialSearchParameters:i});c=ec(u,{searchParameters:f,helper:p}),p.setState(f),p.recommendState=o,u.length&&(s?this.scheduleLocalSearch():l.scheduleSearch())}return this},init:function(e){var t,n=this,o=e.instantSearchInstance,g=e.parent,v=e.uiState;if(null===p){l=o,f=g,c=v[i]||{};var b=o.mainHelper,_=el(u,{uiState:c,initialSearchParameters:new a.default.SearchParameters({index:r})}),S=ef(u,{uiState:c,initialRecommendParameters:new a.default.RecommendParameters});(p=(0,a.default)(b.getClient(),_.index,_)).recommendState=S,p.search=function(){return s?(o.status="loading",n.render({instantSearchInstance:o}),o.compositionID?p.searchWithComposition():p.searchOnlyWithDerivedHelpers()):o.onStateChange?(o.onStateChange({uiState:o.mainIndex.getWidgetUiState({}),setUiState:function(e){return o.setUiState(e,!1)}}),b):b.search()},p.searchWithoutTriggeringOnStateChange=function(){return b.search()};var w=r?p:(0,a.default)({},"__empty_index__",{});d=(s?w:function(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}(g,b)).derive(function(){return z.mergeSearchParameters.apply(void 0,[b.state].concat(ei(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(n))))},function(){return n.getHelper().recommendState});var P=null==(t=o._initialResults)?void 0:t[this.getIndexId()];if(null!=P&&P.results){var R=new a.default.SearchResults(new a.default.SearchParameters(P.state),P.results);d.lastResults=R,p.lastResults=R}if(null!=P&&P.recommendResults){var E=new a.default.RecommendResults(new a.default.RecommendParameters({params:P.recommendResults.params}),P.recommendResults.results);d.lastRecommendResults=E,p.lastRecommendResults=E}p.on("change",function(e){e.isPageReset&&function e(t){var r=t.filter(G.isIndexWidget);0!==r.length&&r.forEach(function(t){var r=t.getHelper();eu(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),e(t.getWidgets())})}(u)}),d.on("search",function(){o.scheduleStalledRender()}),d.on("result",function(e){var t=e.results;o.scheduleRender(),p.lastResults=t,h=null==t?void 0:t._state}),d.on("recommend:result",function(e){var t=e.recommend;o.scheduleRender(),p.lastRecommendResults=t.results}),u.forEach(function(e){e.getRenderState&&ed({renderState:e.getRenderState(o.renderState[n.getIndexId()]||{},O(o,n,v)),instantSearchInstance:o,parent:n})}),u.forEach(function(e){e.init&&e.init(O(o,n,v))}),p.on("change",function(e){var t=e.state,r=e._uiState;c=ec(u,{searchParameters:t,helper:p},r||{}),o.onStateChange||o.onInternalStateChange()}),P&&o.scheduleRender(),y&&(o._hasRecommendWidget=!0),m&&(o._hasSearchWidget=!0)}},render:function(e){var t,n=this,i=e.instantSearchInstance;"error"===i.status&&!i.mainHelper.hasPendingRequests()&&h&&p.setState(h);var o=this.getResults()||null!=(t=d)&&t.lastRecommendResults||s&&!r?u:u.filter(function(e){return e.shouldRender});(o=o.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:i})}
1)).forEach(function(e){e.getRenderState&&ed({renderState:e.getRenderState(i.renderState[n.getIndexId()]||{},P(i,n,e)),instantSearchInstance:i,parent:n})}),o.forEach(function(e){e.render&&e.render(P(i,n,e))})},dispose:function(){var e,t,r=this;u.forEach(function(e){e.dispose&&p&&e.dispose({helper:p,state:p.state,recommendState:p.recommendState,parent:r})}),l=null,f=null,null==(e=p)||e.removeAllListeners(),p=null,null==(t=d)||t.detach(),d=null},getWidgetUiState:function(e){return u.filter(G.isIndexWidget).filter(function(e){return!e._isolated}).reduce(function(e,t){return t.getWidgetUiState(e)},er(er({},e),{},en({},i,er(er({},e[i]),c))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return el(u,{uiState:r,initialSearchParameters:e})},shouldRender:function(){return!0},refreshUiState:function(){c=ec(u,{searchParameters:this.getHelper().state,helper:this.getHelper()},c)},setIndexUiState:function(e){var t="function"==typeof e?e(c):e;l.setUiState(function(e){return er(er({},e),{},en({},i,t))})}}};function ed(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=er(er({},r.renderState),{},en({},i,er(er({},r.renderState[i]),t)))}var eh=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName;return"".concat("ais","-").concat(e).concat(r?"-".concat(r):"").concat(n?"--".concat(n):"")}},ey=e.i(356780),em=e.i(313442),eg=eh("Highlight"),ev=e.i(952616),eb=e.i(105182),e_=new RegExp(/\w/i);function eS(e){return(eS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ew(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=eS(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eS(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eS(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ew(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eP(e){return e.some(function(e){return e.isHighlighted})?e.map(function(t,r){var n,i,o,a,s;return eO(eO({},t),{},{isHighlighted:(o=e[r],a=(null==(n=e[r+1])?void 0:n.isHighlighted)||!0,s=(null==(i=e[r-1])?void 0:i.isHighlighted)||!0,e_.test((0,eb.unescape)(o.value))||s!==a?!o.isHighlighted:!s)})}):e.map(function(e){return eO(eO({},e),{},{isHighlighted:!1})})}function eR(e){var t=em.TAG_REPLACEMENT.highlightPreTag,r=em.TAG_REPLACEMENT.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+r:e.value}).join("")}var eE=eh("ReverseHighlight"),eC=eh("Snippet"),ej=eh("ReverseSnippet"),eA=e.i(840220);function ex(e){return(ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eT(e){return(eT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?eN(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=eT(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eT(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eT(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eD(e){return(eD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ek(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ek(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=eD(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eD(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eD(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ek(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eF(e){return(eF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eL(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(t){eH(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eH(e,t,r){var n;return(n=function(e,t){if("object"!=eF(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eF(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==eF(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eW(e){var t=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0;return e.replace(/%s/g,function(){return encodeURIComponent(r[i++])})};return Object.keys(e).map(function(r){var n;return t("%s=%s",r,(n=e[r],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n))?JSON.stringify(e[r]):e[r])}).join("&")}function eB(e,t){var r=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(G.isIndexWidget).forEach(function(t){return eB(e,t)})}function e$(e){return(e$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ez(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?ez(Object(r),!0).forEach(function(t){eX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ez(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eK(e,t){return(eK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eJ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eV=function(){return!!e})()}function eQ(e){return(eQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eX(e,t,r){return(t=eY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eY(e){var t=function(e,t){if("object"!=e$(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=e$(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==e$(t)?t:t+""}var eZ=(0,$.createDocumentationMessageGenerator)({name:"instantsearch"});function e0(){return"#"}var e1={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},e2=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&eK(i,e);var t,r,n=(t=eV(),function(){var e,r=eQ(i);return e=t?Reflect.construct(r,arguments,eQ(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==e$(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return eJ(e)}(this,e)});function i(e){if(!(this instanceof i))throw TypeError("Cannot call a class as a function");eX(eJ(t=n.call(this)),"client",void 0),eX(eJ(t),"indexName",void 0),eX(eJ(t),"compositionID",void 0),eX(eJ(t),"insightsClient",void 0),eX(eJ(t),"onStateChange",null),eX(eJ(t),"future",void 0),eX(eJ(t),"helper",void 0),eX(eJ(t),"mainHelper",void 0),eX(eJ(t),"mainIndex",void 0),eX(eJ(t),"started",void 0),eX(eJ(t),"templatesConfig",void 0),eX(eJ(t),"renderState",{}),eX(eJ(t),"_stalledSearchDelay",void 0),eX(eJ(t),"_searchStalledTimer",void 0),eX(eJ(t),"_initialUiState",void 0),eX(eJ(t),"_initialResults",void 0),eX(eJ(t),"_manuallyResetScheduleSearch",!1),eX(eJ(t),"_resetScheduleSearch",void 0),eX(eJ(t),"_createURL",void 0),eX(eJ(t),"_searchFunction",void 0),eX(eJ(t),"_mainHelperSearch",void 0),eX(eJ(t),"_hasSearchWidget",!1),eX(eJ(t),"_hasRecommendWidget",!1),eX(eJ(t),"_insights",void 0),eX(eJ(t),"middleware",[]),eX(eJ(t),"sendEventToInsights",void 0),eX(eJ(t),"status","idle"),eX(eJ(t),"error",void 0),eX(eJ(t),"scheduleSearch",J(function(){t.started&&t.mainHelper.search()})),eX(eJ(t),"scheduleRender",J(function(){var e,r=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!(null!=(e=t.mainHelper)&&e.hasPendingRequests())&&(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:eJ(t)}),t.emit("render")})),eX(eJ(t),"onInternalStateChange",J(function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach(function(t){t.instance.onStateChange({uiState:e})})})),t.setMaxListeners(100);var t,r=e.indexName,o=e.compositionID,a=e.numberLocale,s=e.initialUiState,c=e.routing,l=void 0===c?null:c,p=e.insights,d=void 0===p?void 0:p,h=e.searchFunction,y=e.stalledSearchDelay,m=e.searchClient,g=void 0===m?null:m,v=e.insightsClient,b=void 0===v?null:v,S=e.onStateChange,w=e.future,P=void 0===w?eG(eG({},e1),e.future||{}):w;if(null===g)throw Error(eZ("The `searchClient` option is required."));if("function"!=typeof g.search)throw 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("function"==typeof g.addAlgoliaAgent&&g.addAlgoliaAgent("instantsearch.js (".concat("4.87.1",")")),b&&"function"!=typeof b)throw Error(eZ("The `insightsClient` option should be a function."));if(t.client=g,t.future=P,t.insightsClient=b,t.indexName=void 0===r?"":r,t.compositionID=o,t.helper=null,t.mainHelper=null,t.mainIndex=ep({indexName:t.compositionID||t.indexName}),t.onStateChange=void 0===S?null:S,t.started=!1,t.templatesConfig={helpers:{formatNumber:function(e,t){var r;
1return r=Number(t(e)),r.toLocaleString(a)},highlight:function(e,t){try{var r,n,i,o,a,s,u,c,l,f=JSON.parse(e);return t((n=(r=eI(eI({},f),{},{hit:this})).attribute,i=r.highlightedTagName,o=void 0===i?"mark":i,a=r.hit,s=r.cssClasses,u=void 0===s?{}:s,c=((0,ey.getPropertyByPath)(a._highlightResult,n)||{}).value,l=eg({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),(void 0===c?"":c).replace(RegExp(em.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(o,' class="').concat(l,'">')).replace(RegExp(em.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(o,">"))))}catch(e){throw Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{var r,n,i,o,a,s,u,c,l,f=JSON.parse(e);return t((n=(r=eI(eI({},f),{},{hit:this})).attribute,i=r.highlightedTagName,o=void 0===i?"mark":i,a=r.hit,s=r.cssClasses,u=void 0===s?{}:s,c=((0,ey.getPropertyByPath)(a._highlightResult,n)||{}).value,l=eE({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),eR(eP((0,ev.getHighlightedParts)(void 0===c?"":c))).replace(RegExp(em.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(o,' class="').concat(l,'">')).replace(RegExp(em.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(o,">"))))}catch(e){throw Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{var r,n,i,o,a,s,u,c,l,f=JSON.parse(e);return t((n=(r=eI(eI({},f),{},{hit:this})).attribute,i=r.highlightedTagName,o=void 0===i?"mark":i,a=r.hit,s=r.cssClasses,u=void 0===s?{}:s,c=((0,ey.getPropertyByPath)(a._snippetResult,n)||{}).value,l=eC({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),(void 0===c?"":c).replace(RegExp(em.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(o,' class="').concat(l,'">')).replace(RegExp(em.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(o,">"))))}catch(e){throw Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{var r,n,i,o,a,s,u,c,l,f=JSON.parse(e);return t((n=(r=eI(eI({},f),{},{hit:this})).attribute,i=r.highlightedTagName,o=void 0===i?"mark":i,a=r.hit,s=r.cssClasses,u=void 0===s?{}:s,c=((0,ey.getPropertyByPath)(a._snippetResult,n)||{}).value,l=ej({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),eR(eP((0,ev.getHighlightedParts)(void 0===c?"":c))).replace(RegExp(em.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(o,' class="').concat(l,'">')).replace(RegExp(em.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(o,">"))))}catch(e){throw Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r,n=JSON.parse(e),i=n.method,o=n.payload;return t((r=eI({objectIDs:[this.objectID]},o),function(e){var t,r=e.method,n=e.payload;if("object"!==ex(n))throw Error("The insights helper expects the payload to be an object.");try{t=(0,eA.serializePayload)(n)}catch(e){throw Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(r,'" data-insights-payload="').concat(t,'"')}({method:i,payload:r})))}catch(e){throw Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}},compileOptions:{}},t._stalledSearchDelay=void 0===y?200:y,t._searchStalledTimer=null,t._createURL=e0,t._initialUiState=void 0===s?{}:s,t._initialResults=null,t._insights=d,h&&(t._searchFunction=h),t.sendEventToInsights=u.noop,l){var R="boolean"==typeof l?{}:l;R.$$internal=!0,t.use(B(R))}if(d){var E="boolean"==typeof d?{}:d;E.$$internal=!0,t.use(_(E))}return(0,f.safelyRunOnBrowser)(function(e){var t,r;return(null==(t=e.window.navigator)||null==(r=t.userAgent)?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})&&t.use(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.$$internal,r=void 0!==t&&t;return function(e){var t=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),o=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var e;n.ua=(e=t.client).transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function e(t,r,n){var i=O(r,r.mainIndex,r._initialUiState);t.forEach(function(t){var o={};
1if(t.getWidgetRenderState){var a=t.getWidgetRenderState(i);a&&a.widgetParams&&(o=a.widgetParams)}var s=Object.keys(o).filter(function(e){return void 0!==o[e]});n.widgets.push({type:t.$$type,widgetType:t.$$widgetType,params:s}),"ais.index"===t.$$type&&e(t.getWidgets(),r,n)})}(t.mainIndex.getWidgets(),t,n),t.middleware.forEach(function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),i.content=JSON.stringify(n),o.appendChild(i)},0)},started:function(){},unsubscribe:function(){i.remove()}}}}({$$internal:!0})),t}return r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.map(function(t){var r=eG({$$type:"__unknown__",$$internal:!1,subscribe:u.noop,started:u.noop,unsubscribe:u.noop,onStateChange:u.noop},t({instantSearchInstance:e}));return e.middleware.push({creator:t,instance:r}),r});return this.started&&i.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.middleware.filter(function(e){return t.includes(e.creator)}).forEach(function(e){return e.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(e){return!t.includes(e.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw Error(eZ("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&e.some(function(e){return!Array.isArray(e)&&(0,G.isIndexWidget)(e)&&!e._isolated}))throw Error(eZ("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw Error(eZ("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var e=this;if(this.started)throw Error(eZ("The `start` method has already been called once."));var t=this.mainHelper||(0,a.default)(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(t.searchForFacetValues=t.searchForCompositionFacetValues.bind(t)),t.search=function(){return e.status="loading",e.scheduleRender(!1),e._hasSearchWidget&&(e.compositionID?t.searchWithComposition():t.searchOnlyWithDerivedHelpers()),e._hasRecommendWidget&&t.recommend(),t},this._searchFunction){var r={search:function(){return new Promise(u.noop)}};this._mainHelperSearch=t.search.bind(t),t.search=function(){var n=e.mainIndex.getHelper(),i=(0,a.default)(r,n.state.index,n.state);return i.once("search",function(t){var r=t.state;n.overrideStateWithoutTriggeringChangeEvent(r),e._mainHelperSearch()}),i.on("change",function(e){var t=e.state;n.setState(t)}),e._searchFunction(i),t}}if(t.on("error",function(t){var r=t.error;if(!(r instanceof Error)){var n=r;r=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},Error(n.message))}r.error=r,e.error=r,e.status="error",e.scheduleRender(!1),e.emit("error",r)}),this.mainHelper=t,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){!function(e,t){if(t&&("transporter"in e&&!e._cacheHydrated||e._useCache&&"function"==typeof e.addAlgoliaAgent)){var r=[Object.keys(t).reduce(function(e,r){var n=t[r],i=n.state,o=n.requestParams,a=n.results,s=a&&i?a.map(function(e,t){return eq({indexName:i.index||e.index},null!=o&&o[t]||e.params?{params:eW((null==o?void 0:o[t])||e.params.split("&").reduce(function(e,t){var r,n=function(e){if(Array.isArray(e))return e}(r=t.split("="))||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{o=(r=r.call(e)).next,!1;for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);u=!0);}catch(e){c=!0,i=e}
1finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(r,2)||function(e,t){if(e){if("string"==typeof e)return eL(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eL(e,2):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],o=n[1];return e[i]=o?decodeURIComponent(o):"",e},{}))}:{})}):[];return e.concat(s)},[])],n=Object.keys(t).reduce(function(e,r){var n=t[r].results;return n?e.concat(n):e},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var i=e.search.bind(e);e.search=function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=Array.isArray(t)?t.map(function(e){return eq(eq({},e),{},{params:eW(e.params)})}):eW(t.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[a].concat(n)},function(){return i.apply(void 0,[t].concat(n))})},e.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in e)){var o="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));e.cache=eq(eq({},e.cache),{},eH({},o,JSON.stringify({results:Object.keys(t).map(function(e){return t[e].results})})))}}}(this.client,this._initialResults),this.mainHelper._recommendCache=Object.keys(n=this._initialResults).reduce(function(e,t){var r=n[t];return r.recommendResults?eU(eU({},e),r.recommendResults.results):e},{});var n,i=this.scheduleSearch;this.scheduleSearch=J(u.noop),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){e.scheduleSearch=i}:J(function(){e.scheduleSearch=i})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()}),void 0===this._insights&&t.derivedHelpers[0].once("result",function(){e.mainIndex.getScopedResults().some(function(e){var t=e.results;return null==t?void 0:t._automaticInsights})&&e.use(_({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null==(e=this.mainHelper)||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!this.mainHelper)throw Error(eZ("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){eB("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(eB(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw Error(eZ("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw Error(eZ("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eY(n.key),n)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(o.default),e4=e.i(56032);let e3="7.23.1";var e7=e.i(615743);function e8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var e6=e.i(773336),e5=e.i(105347),e9=e.i(742766);function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?tt(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=te(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=te(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==te(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tn=["react (".concat(t.version,")"),"react-instantsearch (".concat(e3,")"),"react-instantsearch-core (".concat(e3,")")],ti="react-instantsearch-server (".concat(e3,")");function to(e,t){"function"==typeof e.addAlgoliaAgent&&t.filter(Boolean).forEach(function(t){e.addAlgoliaAgent(t)})}var ta=["children"];function ts(e){var o=e.children,a=function(e){var r=(function(e){if(Array.isArray(e))return e}(d=(0,t.useReducer)(function(e){return e+1},0))||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{o=(r=r.call(e)).next,!1;for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(d,2)||function(e,t){if(e){if("string"==typeof e)return e8(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e8(e,2):void 0}}(d,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],n=(0,e6.useInstantSearchServerContext)(),o=(0,e5.useInstantSearchSSRContext)(),a=(0,e9.useRSCContext)().waitForResultsRef,s=null==o?void 0:o.initialResults,u=(0,t.useRef)(e),c=n||s||a,l=(0,t.useRef)(null);if(null!=o&&o.ssrSearchRef&&(l=o.ssrSearchRef),null===l.current){var f,p,d,h,y=new e2(e);y._schedule=function(e){y._schedule.queue.push(e),clearTimeout(y._schedule.timer),y._schedule.timer=setTimeout(function(){y._schedule.queue.forEach(function(e){e()}),y._schedule.queue=[]},0)},y._schedule.queue=[],c&&(y._initialResults=s||{},y._manuallyResetScheduleSearch=!0),to(e.searchClient,[].concat(tn,[n&&ti,(h="u">typeof window&&(null==(f=window.next)?void 0:f.version)||(void 0!==i.default?null==(p=i.default.env)?void 0:p.NEXT_RUNTIME:void 0))?"next.js (".concat(h,")"):null])),c&&y.start(),n&&n.notifyServer({search:y}),e.routing,l.current=y}var m,g=l.current,v=u.current;v.indexName!==e.indexName&&(g.helper.setIndex(e.indexName||"").search(),u.current=e),v.searchClient!==e.searchClient&&(to(e.searchClient,[].concat(tn,[n&&ti])),g.mainHelper.setClient(e.searchClient).search(),u.current=e),v.onStateChange!==e.onStateChange&&(g.onStateChange=e.onStateChange,u.current=e),v.searchFunction!==e.searchFunction&&(g._searchFunction=e.searchFunction,u.current=e),v.stalledSearchDelay!==e.stalledSearchDelay&&(g._stalledSearchDelay=null!=(m=e.stalledSearchDelay)?m:200,u.current=e),(0,e7.dequal)(v.future,e.future)||(g.future=tr(tr({},e1),e.future),u.current=e);var b=(0,t.useRef)(null);return(0,e4.useSyncExternalStore)((0,t.useCallback)(function(){var e=l.current;return null===b.current?e.started||(e.start(),r()):(clearTimeout(b.current),e._preventWidgetCleanup=!1),function(){null!=o&&o.ssrSearchRef||(clearTimeout(e._schedule.timer),b.current=setTimeout(function(){e.dispose()}),e._preventWidgetCleanup=!0)}},[r,o]),function(){return l.current},function(){return l.current})}(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ta));return a.started?t.default.createElement(n.InstantSearchContext.Provider,{value:a},t.default.createElement(r.IndexContext.Provider,{value:a.mainIndex},o,t.default.createElement(tu,{search:a}))):null}function tu(e){var r=e.search;return(0,t.useEffect)(function(){r._resetScheduleSearch&&r._resetScheduleSearch()},[r]),null}e.s(["InstantSearch",()=>ts],279979)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.