vviinn-widgets 2.76.0 → 2.76.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cjs/{index-85c223b1.js → index-21cf53a2.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{package-46b840db.js → package-6ed71104.js} +1 -1
  4. package/dist/cjs/search-filters_18.cjs.entry.js +6 -6
  5. package/dist/cjs/{search.store-a688362f.js → search.store-ba1e2ead.js} +2 -1
  6. package/dist/cjs/vviinn-carousel_8.cjs.entry.js +74 -36
  7. package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
  8. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  9. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  10. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +5 -5
  11. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  12. package/dist/collection/components/vviinn-filters/helpers/subFilterSelection.js +4 -1
  13. package/dist/collection/components/vviinn-filters/vviinn-extended-filters.js +18 -17
  14. package/dist/collection/components/vviinn-filters/vviinn-filters.css +179 -105
  15. package/dist/collection/components/vviinn-filters/vviinn-filters.js +34 -12
  16. package/dist/collection/components/vviinn-icons/icons/CheckFilterIcon.js +2 -0
  17. package/dist/collection/components/vviinn-icons/icons/CloseFilterIcon.js +2 -0
  18. package/dist/collection/components/vviinn-icons/icons/FiltersIcon.js +1 -1
  19. package/dist/collection/components/vviinn-icons/icons/SquareFilterIcon.js +2 -0
  20. package/dist/collection/components/vviinn-icons/icons/StarsIcon.js +2 -0
  21. package/dist/collection/components/vviinn-icons/index.js +4 -0
  22. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -23
  23. package/dist/collection/components/vviinn-price-range/vviinn-price-range.css +12 -33
  24. package/dist/collection/components/vviinn-product-card/vviinn-energy-label/vviinn-energy-label.css +0 -23
  25. package/dist/collection/components/vviinn-results/vviinn-results.css +0 -23
  26. package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -23
  27. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -23
  28. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +2 -2
  29. package/dist/collection/store/search.store.js +2 -1
  30. package/dist/esm/{index-80d9da2f.js → index-9e9b32a2.js} +1 -1
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/{package-a9dace8c.js → package-eda9cc4a.js} +1 -1
  33. package/dist/esm/search-filters_18.entry.js +6 -6
  34. package/dist/esm/{search.store-9acff206.js → search.store-8fe25d80.js} +2 -1
  35. package/dist/esm/vviinn-carousel_8.entry.js +74 -36
  36. package/dist/esm/vviinn-preloader.entry.js +1 -1
  37. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  38. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  39. package/dist/esm/vviinn-vps-widget.entry.js +5 -5
  40. package/dist/esm/vviinn-widgets.js +1 -1
  41. package/dist/types/components/vviinn-filters/helpers/index.d.ts +1 -0
  42. package/dist/types/components/vviinn-filters/vviinn-filters.d.ts +1 -0
  43. package/dist/types/components/vviinn-icons/icons/CheckFilterIcon.d.ts +1 -0
  44. package/dist/types/components/vviinn-icons/icons/CloseFilterIcon.d.ts +1 -0
  45. package/dist/types/components/vviinn-icons/icons/SquareFilterIcon.d.ts +1 -0
  46. package/dist/types/components/vviinn-icons/icons/StarsIcon.d.ts +1 -0
  47. package/dist/types/components/vviinn-icons/index.d.ts +4 -0
  48. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
  49. package/{www/build/p-dee78ef6.js → dist/vviinn-widgets/p-03e84ad1.js} +1 -1
  50. package/dist/vviinn-widgets/{p-400dac78.entry.js → p-102be3be.entry.js} +1 -1
  51. package/dist/vviinn-widgets/p-188e1517.entry.js +1 -0
  52. package/dist/vviinn-widgets/p-626495b2.js +1 -0
  53. package/dist/vviinn-widgets/{p-17d6fab0.entry.js → p-7361c2b2.entry.js} +1 -1
  54. package/dist/vviinn-widgets/p-8cb71261.entry.js +1 -0
  55. package/dist/vviinn-widgets/{p-ddf609ee.js → p-9447314b.js} +1 -1
  56. package/dist/vviinn-widgets/{p-7bd909df.entry.js → p-a24ae98f.entry.js} +1 -1
  57. package/dist/vviinn-widgets/p-bfd6c12b.entry.js +11 -0
  58. package/dist/vviinn-widgets/vviinn-widgets.css +1 -1
  59. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  60. package/package.json +1 -1
  61. package/{dist/vviinn-widgets/p-dee78ef6.js → www/build/p-03e84ad1.js} +1 -1
  62. package/www/build/{p-400dac78.entry.js → p-102be3be.entry.js} +1 -1
  63. package/www/build/p-188e1517.entry.js +1 -0
  64. package/www/build/p-626495b2.js +1 -0
  65. package/www/build/{p-17d6fab0.entry.js → p-7361c2b2.entry.js} +1 -1
  66. package/www/build/p-8cb71261.entry.js +1 -0
  67. package/www/build/{p-ddf609ee.js → p-9447314b.js} +1 -1
  68. package/www/build/{p-7bd909df.entry.js → p-a24ae98f.entry.js} +1 -1
  69. package/www/build/p-bfd6c12b.entry.js +11 -0
  70. package/www/build/vviinn-widgets.css +1 -1
  71. package/www/build/vviinn-widgets.esm.js +1 -1
  72. package/dist/vviinn-widgets/p-a08bc9bb.js +0 -1
  73. package/dist/vviinn-widgets/p-c724c8bd.entry.js +0 -1
  74. package/dist/vviinn-widgets/p-f05a5179.entry.js +0 -11
  75. package/dist/vviinn-widgets/p-f45afcaa.entry.js +0 -1
  76. package/www/build/p-a08bc9bb.js +0 -1
  77. package/www/build/p-c724c8bd.entry.js +0 -1
  78. package/www/build/p-f05a5179.entry.js +0 -11
  79. package/www/build/p-f45afcaa.entry.js +0 -1
@@ -1 +1 @@
1
- import{e as t,i as e}from"./p-dee78ef6.js";const n={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class i{constructor(t){this.init(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||n,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,i){return i&&!this.debug?null:("string"==typeof t[0]&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new i(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new i(this.logger,t)}}var r=new i;class o{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]=this.observers[t]||[],this.observers[t].push(e)})),this}off(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((t=>t!==e)):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach((t=>{t(...n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((e=>{e.apply(e,[t,...n])}))}}function s(){let t,e;const n=new Promise(((n,i)=>{t=n,e=i}));return n.resolve=t,n.reject=e,n}function a(t){return null==t?"":""+t}function u(t,e,n){function i(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function r(){return!t||"string"==typeof t}const o="string"!=typeof e?[].concat(e):e.split(".");for(;o.length>1;){if(r())return{};const e=i(o.shift());!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{}}return r()?{}:{obj:t,k:i(o.shift())}}function c(t,e,n){const{obj:i,k:r}=u(t,e,Object);i[r]=n}function f(t,e){const{obj:n,k:i}=u(t,e);if(n)return n[i]}function h(t,e,n){for(const i in e)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof e[i]||e[i]instanceof String?n&&(t[i]=e[i]):h(t[i],e[i],n):t[i]=e[i]);return t}function l(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function p(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(t=>d[t])):t}const v=[" ",",","?","!",";"];function m(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let t=0;t<i.length;++t){if(!r)return;if("string"==typeof r[i[t]]&&t+1<i.length)return;if(void 0===r[i[t]]){let o=2,s=i.slice(t,t+o).join(n),a=r[s];for(;void 0===a&&i.length>t+o;)o++,s=i.slice(t,t+o).join(n),a=r[s];if(void 0===a)return;if(null===a)return null;if(e.endsWith(s)){if("string"==typeof a)return a;if(s&&"string"==typeof a[s])return a[s]}const u=i.slice(t+o).join(n);return u?m(a,u,n):void 0}r=r[i[t]]}return r}function g(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class y extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(s=t.split("."));const a=f(this.data,s);return a||!o||"string"!=typeof n?a:m(this.data&&this.data[t]&&this.data[t][e],n,r)}addResource(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=e,e=s[1]),this.addNamespaces(e),c(this.data,s,i),r.silent||this.emit("added",t,e,n,i)}addResources(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(t,e,i,n[i],{silent:!0});i.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=e,e=s[1]),this.addNamespaces(e);let a=f(this.data,s)||{};i?h(a,n,r):a={...a,...n},c(this.data,s,a),o.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var b={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach((t=>{this.processors[t]&&(e=this.processors[t].process(e,n,i,r))})),e}};const w={};class _ extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;super(),n=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{n[t]&&(i[t]=n[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=r.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){if(null==t)return!1;const e=this.resolve(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});return e&&void 0!==e.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,n){e=e||"",n=n||"";const i=v.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(0===i.length)return!0;const r=new RegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let o=!r.test(t);if(!o){const e=t.indexOf(n);e>0&&!r.test(t.substring(0,e))&&(o=!0)}return o}(t,n,i));if(o&&!s){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:r};const o=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),t=o.join(i)}return"string"==typeof r&&(r=[r]),{key:t,namespaces:r}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const i=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],e),a=s[s.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(c){const t=e.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${t}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a}:`${a}${t}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a}:o}const f=this.resolve(t,e);let h=f&&f.res;const l=f&&f.usedKey||o,d=f&&f.exactUsedKey||o,p=Object.prototype.toString.apply(h),v=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&h&&"string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof v||"[object Array]"!==p)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(l,h,{...e,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=t,f):t}if(r){const t="[object Array]"===p,n=t?[]:{},i=t?d:l;for(const t in h)if(Object.prototype.hasOwnProperty.call(h,t)){const o=`${i}${r}${t}`;n[t]=this.translate(o,{...e,joinArrays:!1,ns:s}),n[t]===o&&(n[t]=h[t])}h=n}}else if(m&&"string"==typeof v&&"[object Array]"===p)h=h.join(v),h&&(h=this.extendTranslation(h,t,e,n));else{let i=!1,s=!1;const c=void 0!==e.count&&"string"!=typeof e.count,l=_.hasDefaultValue(e),d=c?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&c?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",v=e[`defaultValue${d}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(h)&&l&&(i=!0,h=v),this.isValidLookup(h)||(s=!0,h=o);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,g=l&&v!==h&&this.options.updateMissing;if(s||i||g){if(this.logger.log(g?"updateKey":"missingKey",u,a,o,g?v:h),r){const t=this.resolve(o,{...e,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const i=(t,n,i)=>{const r=l&&i!==h?i:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,a,n,r,g,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,a,n,r,g,e),this.emit("missingKey",t,a,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?t.forEach((t=>{this.pluralResolver.getSuffixes(t,e).forEach((n=>{i([t],o+n,e[`defaultValue${n}`]||v)}))})):i(t,o,v))}h=this.extendTranslation(h,t,e,f,n),s&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${o}`),(s||i)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,i?h:void 0):this.options.parseMissingKeyHandler(h))}return i?(f.res=h,f):h}extendTranslation(t,e,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language,n),s){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(n.lng=i.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return r&&r[0]===i[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${e[0]}`),null):o.translate(...i,e)}),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a="string"==typeof s?[s]:s;return null!=t&&a&&a.length&&!1!==n.applyPostProcessor&&(t=b.handle(a,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:i,...n}:n,this)),t}resolve(t){let e,n,i,r,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,s),u=a.key;n=u;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const f=void 0!==s.count&&"string"!=typeof s.count,h=f&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),l=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(e)||(o=t,!w[`${d[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(w[`${d[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((n=>{if(this.isValidLookup(e))return;r=n;const o=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,u,n,t,s);else{let t;f&&(t=this.pluralResolver.getSuffix(n,s.count,s));const e=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(o.push(u+t),s.ordinal&&0===t.indexOf(i)&&o.push(u+t.replace(i,this.options.pluralSeparator)),h&&o.push(u+e)),l){const n=`${u}${this.options.contextSeparator}${s.context}`;o.push(n),f&&(o.push(n+t),s.ordinal&&0===t.indexOf(i)&&o.push(n+t.replace(i,this.options.pluralSeparator)),h&&o.push(n+e))}}let a;for(;a=o.pop();)this.isValidLookup(e)||(i=a,e=this.getResource(n,t,a,s))})))}))})),{res:e,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,i):this.resourceStore.getResource(t,e,n,i)}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&"defaultValue"===e.substring(0,12)&&void 0!==t[e])return!0;return!1}}function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}class N{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=r.create("languageUtils")}getScriptPartFromCode(t){if(!(t=g(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=g(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if("string"==typeof t&&t.indexOf("-")>-1){const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map((t=>t.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=j(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find((t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===t.indexOf(n)?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],r=t=>{t&&(this.isSupportedCode(t)?i.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return"string"==typeof t&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(t))):"string"==typeof t&&r(this.formatLanguageCode(t)),n.forEach((t=>{i.indexOf(t)<0&&r(this.formatLanguageCode(t))})),i}}let O=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],S={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};const E=["v1","v2","v3"],T=["v4"],k={zero:0,one:1,two:2,few:3,many:4,other:5};class x{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=r.create("pluralResolver"),this.options.compatibilityJSON&&!T.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const t={};return O.forEach((e=>{e.lngs.forEach((n=>{t[n]={numbers:e.nr,plurals:S[e.fc]}}))})),t}()}addRule(t,e){this.rules[t]=e}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(g(t),{type:e.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){const e=this.getRule(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return this.shouldUseIntlApi()?e&&e.resolvedOptions().pluralCategories.length>1:e&&e.numbers.length>1}getPluralFormsOfKey(t,e){return this.getSuffixes(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((t,e)=>k[t]-k[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):n.numbers.map((n=>this.getSuffix(t,n,e))):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:this.getSuffixRetroCompatible(i,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.plurals(t.noAbs?e:Math.abs(e));let i=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:r():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!E.includes(this.options.compatibilityJSON)}}function A(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(t,e,n){const i=f(t,n);return void 0!==i?i:f(e,n)}(t,e,n);return!o&&r&&"string"==typeof n&&(o=m(t,n,i),void 0===o&&(o=m(e,n,i))),o}class ${constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const e=t.interpolation;this.escape=void 0!==e.escape?e.escape:p,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?l(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?l(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?l(e.nestingPrefix):e.nestingPrefixEscaped||l("$t("),this.nestingSuffix=e.nestingSuffix?l(e.nestingSuffix):e.nestingSuffixEscaped||l(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){this.regexp=new RegExp(`${this.prefix}(.+?)${this.suffix}`,"g"),this.regexpUnescape=new RegExp(`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`,"g"),this.nestingRegexp=new RegExp(`${this.nestingPrefix}(.+?)${this.nestingSuffix}`,"g")}interpolate(t,e,n,i){let r,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}const f=t=>{if(t.indexOf(this.formatSeparator)<0){const r=A(e,u,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...e,interpolationkey:t}):r}const r=t.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(A(e,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...e,interpolationkey:o})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>c(t)},{regex:this.regexp,safeValue:t=>c(this.escapeValue?this.escape(t):t)}].forEach((e=>{for(s=0;r=e.regex.exec(t);){const n=r[1].trim();if(o=f(n),void 0===o)if("function"==typeof h){const e=h(t,r,i);o="string"==typeof e?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(l){o=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=a(o));const u=e.safeValue(o);if(t=t.replace(r[0],u),l?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=r[0].length):e.regex.lastIndex=0,s++,s>=this.maxReplaces)break}})),t}nest(t,e){let n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(t,e){const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const i=t.split(new RegExp(`${n}[ ]*{`));let o=`{${i[1]}`;t=i[0],o=this.interpolate(o,r);const s=o.match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),e&&(r={...e,...r})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${o}`}return delete r.defaultValue,t}for(;n=this.nestingRegexp.exec(t);){let u=[];r={...o},r=r.replace&&"string"!=typeof r.replace?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map((t=>t.trim()));n[1]=t.shift(),u=t,c=!0}if(i=e(s.call(this,n[1].trim(),r),r),i&&n[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=a(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),i=""),c&&(i=u.reduce(((t,e)=>this.format(t,e,o.lng,{...o,interpolationkey:n[1].trim()})),i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}function P(t){const e={};return function(n,i,r){const o=i+JSON.stringify(r);let s=e[o];return s||(s=t(g(i),r),e[o]=s),s(n)}}class R{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("formatter"),this.options=t,this.formats={number:P(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:P(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:P(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:P(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:P(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))},this.init(t)}init(t){const e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=P(e)}format(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.split(this.formatSeparator).reduce(((t,e)=>{const{formatName:r,formatOptions:o}=function(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);"currency"===e&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===e&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach((t=>{if(!t)return;const[e,...i]=t.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,"");n[e.trim()]||(n[e.trim()]=r),"false"===r&&(n[e.trim()]=!1),"true"===r&&(n[e.trim()]=!0),isNaN(r)||(n[e.trim()]=parseInt(r,10))}))}return{formatName:e,formatOptions:n}}(e);if(this.formats[r]){let e=t;try{const s=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{};e=this.formats[r](t,s.locale||s.lng||i.locale||i.lng||n,{...o,...i,...s})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${r}`),t}),t)}}class C extends o{constructor(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=r.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,e,n,i){const r={},o={},s={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const s=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(s[t]=!0)})),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(t,e,n){const i=t.split("|"),r=i[0],o=i[1];e&&this.emit("failedLoading",r,o,e),n&&this.store.addResourceBundle(r,o,n),this.state[t]=e?-1:2;const s={};this.queue.forEach((n=>{!function(t,e,n){const{obj:i,k:r}=u(t,e,Object);i[r]=i[r]||[],i[r].push(n)}(n.loaded,[r],o),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((t=>{s[t]||(s[t]={});const e=n.loaded[t];e.length&&e.forEach((e=>{void 0===s[t][e]&&(s[t][e]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((t=>!t.done))}read(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:r,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}s&&a&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,n,i+1,2*r,o)}),r):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(t,e,s);try{const n=a(t,e);n&&"function"==typeof n.then?n.then((t=>s(null,t))).catch(s):s(null,n)}catch(t){s(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);const r=this.queueLoad(t,e,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${e}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${e}loaded namespace ${r} for language ${i}`,o),this.loaded(t,n,o)}))}saveMissing(t,e,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const a={...o,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let r;r=5===u.length?u(t,e,n,i,a):u(t,e,n,i),r&&"function"==typeof r.then?r.then((t=>s(null,t))).catch(s):s(null,r)}catch(t){s(t)}else u(t,e,n,i,s,a)}t&&t[0]&&this.store.addResource(t[0],e,n,i)}}}function I(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if("object"==typeof t[1]&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach((t=>{e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function M(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function B(){}class V extends o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=M(t),this.services={},this.logger=r,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=I();function o(t){return t?"function"==typeof t?new t:t:null}if(this.options={...i,...this.options,...M(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){let e;r.init(this.modules.logger?o(this.modules.logger):null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=R);const n=new N(this.options);this.store=new y(this.options.resources,this.options);const s=this.services;s.logger=r,s.resourceStore=this.store,s.languageUtils=n,s.pluralResolver=new x(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(s.formatter=o(e),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new $(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new C(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit(e,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new _(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit(e,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=B),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((e=>{this[e]=function(){return t.store[e](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=function(){return t.store[e](...arguments),t}}));const a=s(),u=()=>{const t=(t,e)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B;const n="string"==typeof t?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return e();const t=[],i=e=>{e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{t.indexOf(e)<0&&t.push(e)}))};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload&&this.options.preload.forEach((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,e,n){const i=s();return t||(t=this.languages),e||(e=this.options.ns),n||(n=B),this.services.backendConnector.reload(t,e,(t=>{i.resolve(),n(t)})),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&b.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const i=s();this.emit("languageChanging",t);const r=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(t,o)=>{o?(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,i.resolve((function(){return n.t(...arguments)})),e&&e(t,(function(){return n.t(...arguments)}))},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n="string"==typeof e?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||r(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),i}getFixedT(t,e,n){var i=this;const r=function(t,e){let o;if("object"!=typeof e){for(var s=arguments.length,a=new Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];o=i.options.overloadTranslationOptionHandler([t,e].concat(a))}else o={...e};o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,o.keyPrefix=o.keyPrefix||n||r.keyPrefix;const c=i.options.keySeparator||".";let f;return f=o.keyPrefix&&Array.isArray(t)?t.map((t=>`${o.keyPrefix}${c}${t}`)):o.keyPrefix?`${o.keyPrefix}${c}${t}`:t,i.t(f,o)};return"string"==typeof t?r.lng=t:r.lngs=t,r.ns=e,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||2===n};if(e.precheck){const t=e.precheck(this,o);if(void 0!==t)return t}return!(!this.hasResourceBundle(n,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,t)||i&&!o(r,t)))}loadNamespaces(t,e){const n=s();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=s();"string"==typeof t&&(t=[t]);const i=this.options.preload||[],r=t.filter((t=>i.indexOf(t)<0));return r.length?(this.options.preload=i.concat(r),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new N(I());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new V(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new V(i);return void 0===t.debug&&void 0===t.prefix||(r.logger=r.logger.clone(t)),["store","services","language"].forEach((t=>{r[t]=this[t]})),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new y(this.store.data,i),r.services.resourceStore=r.store),r.translator=new _(r.services,i),r.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.emit(t,...n)})),r.init(i,e),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const L=V.createInstance();L.createInstance=V.createInstance;const U="<a href='https://www.vviinn.com/' target='_blank'>Vviinn</a>",F={de:{translation:{noResultText:"Keine Ergebnisse! Versuche es bitte später erneut.",basketButtonText:"In den Warenkorb",setMode:{widgetTitle:"Kaufen Sie ein Set und erhalten Sie Rabatt",widgetSubtitle:"Sparen Sie bis zu 15% beim Kauf von Produkten aus der Liste",basketButtonText:"Als Set kaufen",appliedDiscountText:"gespart",updateButtonText:"Neues Set vorschlagen"},exampleImagesTitle:"Mit den Beispielbildern die Suche direkt ausprobieren",imageUploadButtonText:"Bild hochladen",cameraButtonTextStart:"Kamera starten",cameraButtonTextStop:"Kamera stoppen",privacyBadgeText:`Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${U} ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.`,teaserText:"Finde Produkte auf \n einem Foto",imageSearchModalTitle:"AI Search",textSearchPlaceholder:"mit Text suchen",emptyResultsBlock:{title:"Leider nichts gefunden",button:"Neues Bild hochladen"},serverErrorBlock:{title:"Keine Verbindung",button:"Erneut versuchen"},wrongFormatBlock:{title:"Dateityp wird nicht unterstützt",text:"Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",button:"Neues Bild hochladen"},wrongAspectRatioBlock:{title:"Das Bild ist zu schmal",button:"Neues Bild hochladen"},filters:{modal:{title:"Filter",apply:"Anwenden",resetFilters:"Filter zurücksetzen"}}}},en:{translation:{noResultText:"No results! Please, try again later.",basketButtonText:"Add to Basket",setMode:{widgetTitle:"Buy a set to get discount",widgetSubtitle:"Save up to 15% for buying products from the list",basketButtonText:"Buy as set",appliedDiscountText:"saved",updateButtonText:"Suggest New Set"},exampleImagesTitle:"Try out the search with the example images",imageUploadButtonText:"Upload Photo",cameraButtonTextStart:"Start Camera",cameraButtonTextStop:"Stop Camera",privacyBadgeText:`By uploading a picture you agree to the processing by our partner ${U}. The image will be deleted after one hour of inactivity.`,teaserText:"Find Product by Photo",imageSearchModalTitle:"AI Search",textSearchPlaceholder:"Search by text",emptyResultsBlock:{title:"Sorry, nothing found",button:"Upload another image"},serverErrorBlock:{title:"Something went wrong",button:"Try again"},wrongFormatBlock:{title:"Wrong file format",text:"Please upload a .jpg, .png or .webp image file.",button:"Upload another file"},wrongAspectRatioBlock:{title:"The image is too narrow",button:"Upload another image"},filters:{modal:{title:"Filters",apply:"Apply",resetFilters:"Reset Filters"}}}}};var D,W=new Uint8Array(16);function z(){if(!D&&!(D="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(W)}const K=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var q=[],H=0;H<256;++H)q.push((H+256).toString(16).substr(1));function G(t,e,n){var i=(t=t||{}).random||(t.rng||z)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var r=0;r<16;++r)e[n+r]=i[r];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(q[t[e+0]]+q[t[e+1]]+q[t[e+2]]+q[t[e+3]]+"-"+q[t[e+4]]+q[t[e+5]]+"-"+q[t[e+6]]+q[t[e+7]]+"-"+q[t[e+8]]+q[t[e+9]]+"-"+q[t[e+10]]+q[t[e+11]]+q[t[e+12]]+q[t[e+13]]+q[t[e+14]]+q[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&K.test(t)}(n))throw TypeError("Stringified UUID is invalid");return n}(i)}var J=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t},Y=Object.prototype.hasOwnProperty;function X(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function Z(t){try{return encodeURIComponent(t)}catch(t){return null}}var Q={stringify:function(t,e){e=e||"";var n,i,r=[];for(i in"string"!=typeof e&&(e="?"),t)if(Y.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=Z(i),n=Z(n),null===i||null===n)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""},parse:function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var r=X(e[1]),o=X(e[2]);null===r||null===o||r in i||(i[r]=o)}return i}},tt=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,et=/[\n\r\t]/g,nt=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,it=/:\d+$/,rt=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,ot=/^[a-zA-Z]:/;function st(t){return(t||"").toString().replace(tt,"")}var at=[["#","hash"],["?","query"],function(t,e){return ft(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ut={hash:1,query:1};function ct(e){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var i,r={},o=typeof(e=e||n.location||{});if("blob:"===e.protocol)r=new lt(unescape(e.pathname),{});else if("string"===o)for(i in r=new lt(e,{}),ut)delete r[i];else if("object"===o){for(i in e)i in ut||(r[i]=e[i]);void 0===r.slashes&&(r.slashes=nt.test(e.href))}return r}function ft(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function ht(t,e){t=(t=st(t)).replace(et,""),e=e||{};var n,i=rt.exec(t),r=i[1]?i[1].toLowerCase():"",o=!!i[2],s=!!i[3],a=0;return o?s?(n=i[2]+i[3]+i[4],a=i[2].length+i[3].length):(n=i[2]+i[4],a=i[2].length):s?(n=i[3]+i[4],a=i[3].length):n=i[4],"file:"===r?a>=2&&(n=n.slice(2)):ft(r)?n=i[4]:r?o&&(n=n.slice(2)):a>=2&&ft(e.protocol)&&(n=i[4]),{protocol:r,slashes:o||ft(r),slashesCount:a,rest:n}}function lt(t,e,n){if(t=(t=st(t)).replace(et,""),!(this instanceof lt))return new lt(t,e,n);var i,r,o,s,a,u,c=at.slice(),f=typeof e,h=this,l=0;for("object"!==f&&"string"!==f&&(n=e,e=null),n&&"function"!=typeof n&&(n=Q.parse),i=!(r=ht(t||"",e=ct(e))).protocol&&!r.slashes,h.slashes=r.slashes||i&&e.slashes,h.protocol=r.protocol||e.protocol||"",t=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||ot.test(t))||!r.slashes&&(r.protocol||r.slashesCount<2||!ft(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);l<c.length;l++)"function"!=typeof(s=c[l])?(u=s[1],(o=s[0])!=o?h[u]=t:"string"==typeof o?~(a="@"===o?t.lastIndexOf(o):t.indexOf(o))&&("number"==typeof s[2]?(h[u]=t.slice(0,a),t=t.slice(a+s[2])):(h[u]=t.slice(a),t=t.slice(0,a))):(a=o.exec(t))&&(h[u]=a[1],t=t.slice(0,a.index)),h[u]=h[u]||i&&s[3]&&e[u]||"",s[4]&&(h[u]=h[u].toLowerCase())):t=s(t,h);n&&(h.query=n(h.query)),i&&e.slashes&&"/"!==h.pathname.charAt(0)&&(""!==h.pathname||""!==e.pathname)&&(h.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),i=n.length,r=n[i-1],o=!1,s=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),s++):s&&(0===i&&(o=!0),n.splice(i,1),s--);return o&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(h.pathname,e.pathname)),"/"!==h.pathname.charAt(0)&&ft(h.protocol)&&(h.pathname="/"+h.pathname),J(h.port,h.protocol)||(h.host=h.hostname,h.port=""),h.username=h.password="",h.auth&&(~(a=h.auth.indexOf(":"))?(h.username=h.auth.slice(0,a),h.username=encodeURIComponent(decodeURIComponent(h.username)),h.password=h.auth.slice(a+1),h.password=encodeURIComponent(decodeURIComponent(h.password))):h.username=encodeURIComponent(decodeURIComponent(h.auth)),h.auth=h.password?h.username+":"+h.password:h.username),h.origin="file:"!==h.protocol&&ft(h.protocol)&&h.host?h.protocol+"//"+h.host:"null",h.href=h.toString()}lt.prototype={set:function(t,e,n){var i=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||Q.parse)(e)),i[t]=e;break;case"port":i[t]=e,J(e,i.protocol)?e&&(i.host=i.hostname+":"+e):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=e,i.port&&(e+=":"+i.port),i.host=e;break;case"host":i[t]=e,it.test(e)?(e=e.split(":"),i.port=e.pop(),i.hostname=e.join(":")):(i.hostname=e,i.port="");break;case"protocol":i.protocol=e.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(e){var r="pathname"===t?"/":"#";i[t]=e.charAt(0)!==r?r+e:e}else i[t]=e;break;case"username":case"password":i[t]=encodeURIComponent(e);break;case"auth":var o=e.indexOf(":");~o?(i.username=e.slice(0,o),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(o+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var s=0;s<at.length;s++){var a=at[s];a[4]&&(i[a[1]]=i[a[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&ft(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(t){t&&"function"==typeof t||(t=Q.stringify);var e,n=this,i=n.host,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.protocol&&n.slashes||ft(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&ft(n.protocol)&&!i&&"/"!==n.pathname&&(o+="@"),(":"===i[i.length-1]||it.test(n.hostname)&&!n.port)&&(i+=":"),o+=i+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},lt.extractProtocol=ht,lt.location=ct,lt.trimLeft=st,lt.qs=Q;var dt=lt,pt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=e.mergeMap=e.of=e.from=e.Observable=void 0;var n=function(){function t(t){this.promise=t}return t.prototype.toPromise=function(){return this.promise},t.prototype.pipe=function(e){return new t(this.promise.then(e))},t}();e.Observable=n,e.from=function(t){return new n(t)},e.of=function(t){return new n(Promise.resolve(t))},e.mergeMap=function(t){return function(e){return t(e).toPromise()}},e.map=function(t){return t}})),vt="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==vt&&vt,mt="URLSearchParams"in vt,gt="Symbol"in vt&&"iterator"in Symbol,yt="FileReader"in vt&&"Blob"in vt&&function(){try{return new Blob,!0}catch(t){return!1}}(),bt="FormData"in vt,wt="ArrayBuffer"in vt;if(wt)var _t=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jt=ArrayBuffer.isView||function(t){return t&&_t.indexOf(Object.prototype.toString.call(t))>-1};function Nt(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Ot(t){return"string"!=typeof t&&(t=String(t)),t}function St(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return gt&&(e[Symbol.iterator]=function(){return e}),e}function Et(t){this.map={},t instanceof Et?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Tt(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function kt(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function xt(t){var e=new FileReader,n=kt(e);return e.readAsArrayBuffer(t),n}function At(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function $t(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:yt&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:bt&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:mt&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():wt&&yt&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=At(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wt&&(ArrayBuffer.prototype.isPrototypeOf(t)||jt(t))?this._bodyArrayBuffer=At(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):mt&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},yt&&(this.blob=function(){var t=Tt(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Tt(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(xt)}),this.text=function(){var t,e,n,i=Tt(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,n=kt(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i<e.length;i++)n[i]=String.fromCharCode(e[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},bt&&(this.formData=function(){return this.text().then(Ct)}),this.json=function(){return this.text().then(JSON.parse)},this}Et.prototype.append=function(t,e){t=Nt(t),e=Ot(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},Et.prototype.delete=function(t){delete this.map[Nt(t)]},Et.prototype.get=function(t){return t=Nt(t),this.has(t)?this.map[t]:null},Et.prototype.has=function(t){return this.map.hasOwnProperty(Nt(t))},Et.prototype.set=function(t,e){this.map[Nt(t)]=Ot(e)},Et.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},Et.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),St(t)},Et.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),St(t)},Et.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),St(t)},gt&&(Et.prototype[Symbol.iterator]=Et.prototype.entries);var Pt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Rt(t,e){if(!(this instanceof Rt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(e=e||{}).body;if(t instanceof Rt){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Et(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Et(e.headers)),this.method=(i=(n=e.method||this.method||"GET").toUpperCase(),Pt.indexOf(i)>-1?i:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function Ct(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function It(t,e){if(!(this instanceof It))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new Et(e.headers),this.url=e.url||"",this._initBody(t)}Rt.prototype.clone=function(){return new Rt(this,{body:this._bodyInit})},$t.call(Rt.prototype),$t.call(It.prototype),It.prototype.clone=function(){return new It(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Et(this.headers),url:this.url})},It.error=function(){var t=new It(null,{status:0,statusText:""});return t.type="error",t};var Mt=[301,302,303,307,308];It.redirect=function(t,e){if(-1===Mt.indexOf(e))throw new RangeError("Invalid status code");return new It(null,{status:e,headers:{location:t}})};var Bt=vt.DOMException;try{new Bt}catch(t){(Bt=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),Bt.prototype.constructor=Bt}function Vt(t,e){return new Promise((function(n,i){var r=new Rt(t,e);if(r.signal&&r.signal.aborted)return i(new Bt("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,i={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new Et,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();e.append(i,r)}})),e)};i.url="responseURL"in o?o.responseURL:i.headers.get("X-Request-URL");var r="response"in o?o.response:o.responseText;setTimeout((function(){n(new It(r,i))}),0)},o.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){i(new Bt("Aborted","AbortError"))}),0)},o.open(r.method,function(t){try{return""===t&&vt.location.href?vt.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?o.withCredentials=!0:"omit"===r.credentials&&(o.withCredentials=!1),"responseType"in o&&(yt?o.responseType="blob":wt&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof Et?r.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,Ot(e.headers[t]))})),r.signal&&(r.signal.addEventListener("abort",s),o.onreadystatechange=function(){4===o.readyState&&r.signal.removeEventListener("abort",s)}),o.send(void 0===r._bodyInit?null:r._bodyInit)}))}Vt.polyfill=!0,vt.fetch||(vt.fetch=Vt,vt.Headers=Et,vt.Request=Rt,vt.Response=It);var Lt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.IsomorphicFetchHttpLibrary=void 0;var n=function(){function t(){}return t.prototype.send=function(t){var e=t.getHttpMethod().toString(),n=t.getBody(),i=fetch(t.getUrl(),{method:e,body:n,headers:t.getHeaders(),credentials:"same-origin"}).then((function(t){var e={};t.headers.forEach((function(t,n){e[n]=t}));var n={text:function(){return t.text()},binary:function(){return t.blob()}};return new Ut.ResponseContext(t.status,e,n)}));return(0,pt.from)(i)},t}();e.IsomorphicFetchHttpLibrary=n})),Ut=e((function(e,n){var i,r,o=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),a=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||s(e,t,n)},u=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},c=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.wrapHttpLibrary=n.ResponseContext=n.SelfDecodingBody=n.RequestContext=n.HttpException=n.HttpMethod=void 0,a(Lt,n),(r=n.HttpMethod||(n.HttpMethod={})).GET="GET",r.HEAD="HEAD",r.POST="POST",r.PUT="PUT",r.DELETE="DELETE",r.CONNECT="CONNECT",r.OPTIONS="OPTIONS",r.TRACE="TRACE",r.PATCH="PATCH";var f=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e}(Error);n.HttpException=f;var h=function(){function t(t,e){this.httpMethod=e,this.headers={},this.body=void 0,this.url=new dt(t,!0)}return t.prototype.getUrl=function(){return this.url.toString()},t.prototype.setUrl=function(t){this.url=new dt(t,!0)},t.prototype.setBody=function(t){this.body=t},t.prototype.getHttpMethod=function(){return this.httpMethod},t.prototype.getHeaders=function(){return this.headers},t.prototype.getBody=function(){return this.body},t.prototype.setQueryParam=function(t,e){var n=this.url.query;n[t]=e,this.url.set("query",n)},t.prototype.addCookie=function(t,e){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=t+"="+e+"; "},t.prototype.setHeaderParam=function(t,e){this.headers[t]=e},t}();n.RequestContext=h;var l=function(){function t(t){this.dataSource=t}return t.prototype.binary=function(){return this.dataSource},t.prototype.text=function(){return u(this,void 0,void 0,(function(){var t;return c(this,(function(e){switch(e.label){case 0:return[4,this.dataSource];case 1:return(t=e.sent()).text?[2,t.text()]:[2,new Promise((function(e,n){var i=new FileReader;i.addEventListener("load",(function(){return e(i.result)})),i.addEventListener("error",(function(){return n(i.error)})),i.readAsText(t)}))]}}))}))},t}();n.SelfDecodingBody=l;var d=function(){function t(t,e,n){this.httpStatusCode=t,this.headers=e,this.body=n}return t.prototype.getParsedHeader=function(t){var e={};if(!this.headers[t])return e;for(var n=0,i=this.headers[t].split(";");n<i.length;n++){var r=i[n].split("=",2),o=r[0],s=r[1];o=o.toLowerCase().trim(),void 0===s?e[""]=o:((s=s.trim()).startsWith('"')&&s.endsWith('"')&&(s=s.substring(1,s.length-1)),e[o]=s)}return e},t.prototype.getBodyAsFile=function(){return u(this,void 0,void 0,(function(){var t,e,n;return c(this,(function(i){switch(i.label){case 0:return[4,this.body.binary()];case 1:t=i.sent(),e=this.getParsedHeader("content-disposition").filename||"",n=this.headers["content-type"]||"";try{return[2,new File([t],e,{type:n})]}catch(i){return[2,Object.assign(t,{name:e,type:n})]}return[2]}}))}))},t.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(t){}try{return this.body.binary()}catch(t){}return Promise.resolve(void 0)},t}();n.ResponseContext=d,n.wrapHttpLibrary=function(t){return{send:function(e){return(0,pt.from)(t.send(e))}}}})),Ft=e((function(e,n){var i=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},r=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.configureAuthMethods=n.BearerAuthAuthentication=void 0;var o=function(){function t(t){this.tokenProvider=t}return t.prototype.getName=function(){return"bearerAuth"},t.prototype.applySecurityAuthentication=function(t){return i(this,void 0,void 0,(function(){var e,n,i,o;return r(this,(function(r){switch(r.label){case 0:return n=(e=t).setHeaderParam,i=["Authorization"],o="Bearer ",[4,this.tokenProvider.getToken()];case 1:return n.apply(e,i.concat([o+r.sent()])),[2]}}))}))},t}();n.BearerAuthAuthentication=o,n.configureAuthMethods=function(t){var e={};return t?(e.default=t.default,t.bearerAuth&&(e.bearerAuth=new o(t.bearerAuth.tokenProvider)),e):e}})),Dt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0;var n=function(){function t(){this.typ="Event"}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator="typ",t.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],t}();e.Event=n})),Wt=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.AddToBasketEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="AddToBasketEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.AddToBasketEvent=o})),zt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorObject=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],t}();e.ErrorObject=n})),Kt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorResponse=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],t}();e.ErrorResponse=n})),qt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventConfirmation=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],t}();e.EventConfirmation=n})),Ht=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventInformativeProperties=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""}],t}();e.EventInformativeProperties=n})),Gt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventObject=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"typ",baseName:"typ",type:"EventType",format:""},{name:"enabled",baseName:"enabled",type:"boolean",format:""}],t}();e.EventObject=n})),Jt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),Yt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),Xt=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.FilterEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="FilterEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],e}(Dt.Event);n.FilterEvent=o})),Zt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilterEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}();e.FilterEventAllOf=n})),Qt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),te=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.NoResultEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="NoResultEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.NoResultEvent=o})),ee=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductClickEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductClickEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductClickEvent=o})),ne=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProductEventInformativeProperties=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""}],t}();e.ProductEventInformativeProperties=n})),ie=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductLoadEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductLoadEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductLoadEvent=o})),re=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProductLoadEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}();e.ProductLoadEventAllOf=n})),oe=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductViewEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductViewEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductViewEvent=o})),se=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ResultLoadEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ResultLoadEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.ResultLoadEvent=o})),ae=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ResultLoadEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""}],t}();e.ResultLoadEventAllOf=n})),ue=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ResultViewEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ResultViewEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.ResultViewEvent=o})),ce=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),fe=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.SearchEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="SearchEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],e}(Dt.Event);n.SearchEvent=o})),he=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}();e.SearchEventAllOf=n})),le=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),de=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),pe=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),ve=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="WidgetEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],e}(Dt.Event);n.WidgetEvent=o})),me=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}();e.WidgetEventAllOf=n})),ge=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(Wt,n),r(zt,n),r(Kt,n),r(Dt,n),r(qt,n),r(Ht,n),r(Gt,n),r(Jt,n),r(Yt,n),r(Xt,n),r(Zt,n),r(Qt,n),r(te,n),r(ee,n),r(ne,n),r(ie,n),r(re,n),r(oe,n),r(se,n),r(ae,n),r(ue,n),r(ce,n),r(fe,n),r(he,n),r(le,n),r(de,n),r(pe,n),r(ve,n),r(me,n)})),ye=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PromiseMiddlewareWrapper=void 0;var n=function(){function t(t){this.middleware=t}return t.prototype.pre=function(t){return(0,pt.from)(this.middleware.pre(t))},t.prototype.post=function(t){return(0,pt.from)(this.middleware.post(t))},t}();e.PromiseMiddlewareWrapper=n})),be=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.servers=e.server2=e.server1=e.ServerConfiguration=void 0;var n=function(){function t(t,e){this.url=t,this.variableConfiguration=e}return t.prototype.setVariables=function(t){Object.assign(this.variableConfiguration,t)},t.prototype.getConfiguration=function(){return this.variableConfiguration},t.prototype.getUrl=function(){var t=this.url;for(var e in this.variableConfiguration){var n=new RegExp("{"+e+"}","g");t=t.replace(n,this.variableConfiguration[e])}return t},t.prototype.makeRequestContext=function(t,e){return new Ut.RequestContext(this.getUrl()+t,e)},t}();e.ServerConfiguration=n,e.server1=new n("https://tracking.vviinn.com",{}),e.server2=new n("https://tracking.stage.vviinn.com",{}),e.servers=[e.server1,e.server2]})),we=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.createConfiguration=void 0,e.createConfiguration=function(t){void 0===t&&(t={});var e={baseServer:void 0!==t.baseServer?t.baseServer:be.server1,httpApi:t.httpApi||new Lt.IsomorphicFetchHttpLibrary,middleware:t.middleware||[],authMethods:(0,Ft.configureAuthMethods)(t.authMethods)};return t.promiseMiddleware&&t.promiseMiddleware.forEach((function(t){return e.middleware.push(new ye.PromiseMiddlewareWrapper(t))})),e}})),_e=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ApiException=void 0;var o=function(t){function e(e,n,i,r){var o=t.call(this,"HTTP-Code: "+e+"\nMessage: "+n+"\nBody: "+JSON.stringify(i)+"\nHeaders: "+JSON.stringify(r))||this;return o.code=e,o.body=i,o.headers=r,o}return r(e,t),e}(Error);n.ApiException=o})),je=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.RequiredError=n.BaseAPIRequestFactory=n.COLLECTION_FORMATS=void 0,n.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};n.BaseAPIRequestFactory=function(t){this.configuration=t};var o=function(t){function e(e,n,i){var r=t.call(this,"Required parameter "+i+" was null or undefined when calling "+e+"."+n+".")||this;return r.api=e,r.method=n,r.field=i,r.name="RequiredError",r}return r(e,t),e}(Error);n.RequiredError=o})),Ne=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectSerializer=void 0,r(Wt,n),r(zt,n),r(Kt,n),r(Dt,n),r(qt,n),r(Ht,n),r(Gt,n),r(Jt,n),r(Yt,n),r(Xt,n),r(Zt,n),r(Qt,n),r(te,n),r(ee,n),r(ne,n),r(ie,n),r(re,n),r(oe,n),r(se,n),r(ae,n),r(ue,n),r(ce,n),r(fe,n),r(he,n),r(le,n),r(de,n),r(pe,n),r(ve,n),r(me,n);var o=Wt,s=zt,a=Kt,u=Dt,c=qt,f=Ht,h=Gt,l=Xt,d=Zt,p=te,v=ee,m=ne,g=ie,y=re,b=oe,w=se,_=ae,j=ue,N=fe,O=he,S=ve,E=me,T=["string","boolean","double","integer","long","float","number","any"],k={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},x=new Set(["EventConfirmationStatusEnum","EventType","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),A={AddToBasketEvent:o.AddToBasketEvent,ErrorObject:s.ErrorObject,ErrorResponse:a.ErrorResponse,Event:u.Event,EventConfirmation:c.EventConfirmation,EventInformativeProperties:f.EventInformativeProperties,EventObject:h.EventObject,FilterEvent:l.FilterEvent,FilterEventAllOf:d.FilterEventAllOf,NoResultEvent:p.NoResultEvent,ProductClickEvent:v.ProductClickEvent,ProductEventInformativeProperties:m.ProductEventInformativeProperties,ProductLoadEvent:g.ProductLoadEvent,ProductLoadEventAllOf:y.ProductLoadEventAllOf,ProductViewEvent:b.ProductViewEvent,ResultLoadEvent:w.ResultLoadEvent,ResultLoadEventAllOf:_.ResultLoadEventAllOf,ResultViewEvent:j.ResultViewEvent,SearchEvent:N.SearchEvent,SearchEventAllOf:O.SearchEventAllOf,WidgetEvent:S.WidgetEvent,WidgetEventAllOf:E.WidgetEventAllOf},$=function(){function t(){}return t.findCorrectType=function(t,e){if(null==t)return e;if(-1!==T.indexOf(e.toLowerCase()))return e;if("Date"===e)return e;if(x.has(e))return e;if(!A[e])return e;var n=A[e].discriminator;if(null==n)return e;if(t[n]){var i=t[n];return A[i]?i:e}return e},t.serialize=function(e,n,i){if(null==e)return e;if(-1!==T.indexOf(n.toLowerCase()))return e;if(0===n.lastIndexOf("Array<",0)){var r=n.replace("Array<","");r=r.substring(0,r.length-1);var o=[];for(var s in e)o.push(t.serialize(e[s],r,i));return o}if("Date"===n){if("date"==i){var a=e.getMonth()+1;a=a<10?"0"+a.toString():a.toString();var u=e.getDate();return u=u<10?"0"+u.toString():u.toString(),e.getFullYear()+"-"+a+"-"+u}return e.toISOString()}if(x.has(n))return e;if(!A[n])return e;n=this.findCorrectType(e,n);var c=A[n].getAttributeTypeMap(),f={};for(var s in c){var h=c[s];f[h.baseName]=t.serialize(e[h.name],h.type,h.format)}return f},t.deserialize=function(e,n,i){if(n=t.findCorrectType(e,n),null==e)return e;if(-1!==T.indexOf(n.toLowerCase()))return e;if(0===n.lastIndexOf("Array<",0)){var r=n.replace("Array<","");r=r.substring(0,r.length-1);var o=[];for(var s in e)o.push(t.deserialize(e[s],r,i));return o}if("Date"===n)return new Date(e);if(x.has(n))return e;if(!A[n])return e;var a=new A[n],u=A[n].getAttributeTypeMap();for(var s in u){var c=u[s];a[c.name]=t.deserialize(e[c.baseName],c.type,c.format)}return a},t.normalizeMediaType=function(t){if(void 0!==t)return t.split(";")[0].trim().toLowerCase()},t.getPreferredMediaType=function(t){if(!t)return"application/json";for(var e=void 0,n=-1/0,i=0,r=t.map(this.normalizeMediaType);i<r.length;i++){var o=r[i];k[o]>n&&(e=o,n=k[o])}if(void 0===e)throw new Error("None of the given media types are supported: "+t.join(", "));return e},t.stringify=function(t,e){if("application/json"===e)return JSON.stringify(t);throw new Error("The mediaType "+e+" is not supported by ObjectSerializer.stringify.")},t.parse=function(t,e){if(void 0===e)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===e)return JSON.parse(t);throw new Error("The mediaType "+e+" is not supported by ObjectSerializer.parse.")},t}();n.ObjectSerializer=$})),Oe=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.canConsumeForm=e.isCodeInRange=void 0,e.isCodeInRange=function(t,e){if("0"===t)return!0;if(t==e.toString())return!0;var n=e.toString();if(n.length!=t.length)return!1;for(var i=0;i<n.length;i++)if("X"!=t.charAt(i)&&t.charAt(i)!=n.charAt(i))return!1;return!0},e.canConsumeForm=function(t){return-1!==t.indexOf("multipart/form-data")}})),Se=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},s=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultApiResponseProcessor=n.DefaultApiRequestFactory=void 0;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.trackEvent=function(t,e){var n,i,r;return o(this,void 0,void 0,(function(){var o,a,u,c,f,h;return s(this,(function(s){switch(s.label){case 0:return(a=(o=e||this.configuration).baseServer.makeRequestContext("/event",Ut.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),u=Ne.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",u),c=Ne.ObjectSerializer.stringify(Ne.ObjectSerializer.serialize(t,"ProductLoadEvent | ProductViewEvent | ProductClickEvent | ResultLoadEvent | ResultViewEvent | NoResultEvent | WidgetEvent | FilterEvent | SearchEvent | AddToBasketEvent",""),u),a.setBody(c),(null==(f=o.authMethods.bearerAuth)?void 0:f.applySecurityAuthentication)?[4,null==f?void 0:f.applySecurityAuthentication(a)]:[3,2];case 1:s.sent(),s.label=2;case 2:return(null==(h=(null===(n=null==e?void 0:e.authMethods)||void 0===n?void 0:n.default)||(null===(r=null===(i=this.configuration)||void 0===i?void 0:i.authMethods)||void 0===r?void 0:r.default))?void 0:h.applySecurityAuthentication)?[4,null==h?void 0:h.applySecurityAuthentication(a)]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2,a]}}))}))},e}(je.BaseAPIRequestFactory);n.DefaultApiRequestFactory=a;var u=function(){function t(){}return t.prototype.trackEvent=function(t){return o(this,void 0,void 0,(function(){var e,n,i,r,o,a,u,c,f,h,l,d,p,v,m,g;return s(this,(function(s){switch(s.label){case 0:return e=Ne.ObjectSerializer.normalizeMediaType(t.headers["content-type"]),(0,Oe.isCodeInRange)("200",t.httpStatusCode)?(i=(n=Ne.ObjectSerializer).deserialize,o=(r=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,2];case 1:return[2,h=i.apply(n,[o.apply(r,[s.sent(),e]),"EventConfirmation",""])];case 2:return(0,Oe.isCodeInRange)("502",t.httpStatusCode)?(u=(a=Ne.ObjectSerializer).deserialize,f=(c=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,4];case 3:throw h=u.apply(a,[f.apply(c,[s.sent(),e]),"ErrorResponse",""]),new _e.ApiException(502,"an error occurred",h,t.headers);case 4:return t.httpStatusCode>=200&&t.httpStatusCode<=299?(d=(l=Ne.ObjectSerializer).deserialize,v=(p=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,6];case 5:return[2,h=d.apply(l,[v.apply(p,[s.sent(),e]),"EventConfirmation",""])];case 6:return m=_e.ApiException.bind,g=[void 0,t.httpStatusCode,"Unknown API Status Code!"],[4,t.getBodyAsAny()];case 7:throw new(m.apply(_e.ApiException,g.concat([s.sent(),t.headers])))}}))}))},t}();n.DefaultApiResponseProcessor=u})),Ee=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObservableDefaultApi=void 0;var n=pt,i=function(){function t(t,e,n){this.configuration=t,this.requestFactory=e||new Se.DefaultApiRequestFactory(t),this.responseProcessor=n||new Se.DefaultApiResponseProcessor}return t.prototype.trackEvent=function(t,e){for(var i=this,r=this.requestFactory.trackEvent(t,e),o=(0,pt.from)(r),s=function(t){o=o.pipe((0,n.mergeMap)((function(e){return t.pre(e)})))},a=0,u=this.configuration.middleware;a<u.length;a++)s(u[a]);return o.pipe((0,n.mergeMap)((function(t){return i.configuration.httpApi.send(t)}))).pipe((0,n.mergeMap)((function(t){for(var e=(0,pt.of)(t),r=function(t){e=e.pipe((0,n.mergeMap)((function(e){return t.post(e)})))},o=0,s=i.configuration.middleware;o<s.length;o++)r(s[o]);return e.pipe((0,n.map)((function(t){return i.responseProcessor.trackEvent(t)})))})))},t}();e.ObservableDefaultApi=i})),Te=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PromiseDefaultApi=void 0;var n=function(){function t(t,e,n){this.api=new Ee.ObservableDefaultApi(t,e,n)}return t.prototype.trackEvent=function(t,e){return this.api.trackEvent(t,e).toPromise()},t}();e.PromiseDefaultApi=n})),ke=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultApi=n.createConfiguration=void 0,r(Ut,n),r(Ft,n),r(ge,n),Object.defineProperty(n,"createConfiguration",{enumerable:!0,get:function(){return we.createConfiguration}}),r(_e,n),r(be,n),Object.defineProperty(n,"DefaultApi",{enumerable:!0,get:function(){return Te.PromiseDefaultApi}})}));const xe=(t,e)=>{const n=(t=>(t=>!t.includes("stage"))(t)?ke.servers[0]:ke.servers[1])(t),i=(t=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((e=>e(t)))}}}))(e);return new ke.DefaultApi(ke.createConfiguration({baseServer:n,authMethods:i}))},Ae=t=>e=>Object.assign(Object.assign({},e),t),$e="product_load_event",Pe="product_view_event",Re="product_click_event",Ce="add_to_basket_event",Ie="widget_event",Me="result_load_event",Be="result_view_event",Ve={widget:"VPR",typ:$e},Le={widget:"VPC",typ:$e},Ue={widget:"VPS",typ:$e},Fe={widget:"VPR",typ:Pe},De={widget:"VPC",typ:Pe},We={widget:"VPS",typ:Pe},ze={widget:"VPR",typ:Re},Ke={widget:"VPC",typ:Re},qe={widget:"VPS",typ:Re},He={widget:"VPR",typ:Ce},Ge={widget:"VPC",typ:Ce},Je={widget:"VPC",typ:Ie},Ye={widget:"VPS",typ:Ie},Xe={widget:"VPR",typ:Me},Ze={widget:"VPR",typ:Be},Qe={widget:"VPC",typ:Me},tn={widget:"VPC",typ:Be},en={widget:"VPS",typ:Me},nn={widget:"VPS",typ:Be},rn=t=>{switch(t){case"load":return Ae(Ve);case"view":return Ae(Fe);case"click":return Ae(ze)}},on=t=>{switch(t){case"load":return Ae(Le);case"view":return Ae(De);case"click":return Ae(Ke)}},sn=t=>{switch(t){case"load":return Ae(Ue);case"view":return Ae(We);case"click":return Ae(qe)}},an=t=>{switch(t){case"load":return Ae(Xe);case"view":return Ae(Ze)}},un=t=>{switch(t){case"load":return Ae(Qe);case"view":return Ae(tn)}},cn=t=>{switch(t){case"load":return Ae(en);case"view":return Ae(nn)}},fn=Ae({widget:"VPR",typ:Ie}),hn=Ae(Ye),ln=Ae(Je),dn=Ae({widget:"VPS",typ:"search_event"}),pn=Ae({widget:"VPS",typ:"filter_event"}),vn=Ae(He),mn=Ae(Ge);export{mn as a,vn as b,xe as c,ln as d,fn as e,un as f,an as g,on as h,L as i,rn as j,dn as k,pn as l,hn as m,cn as n,sn as o,F as r,G as v}
1
+ import{e as t,i as e}from"./p-03e84ad1.js";const n={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class i{constructor(t){this.init(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||n,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,i){return i&&!this.debug?null:("string"==typeof t[0]&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new i(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new i(this.logger,t)}}var r=new i;class o{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]=this.observers[t]||[],this.observers[t].push(e)})),this}off(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((t=>t!==e)):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach((t=>{t(...n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((e=>{e.apply(e,[t,...n])}))}}function s(){let t,e;const n=new Promise(((n,i)=>{t=n,e=i}));return n.resolve=t,n.reject=e,n}function a(t){return null==t?"":""+t}function u(t,e,n){function i(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function r(){return!t||"string"==typeof t}const o="string"!=typeof e?[].concat(e):e.split(".");for(;o.length>1;){if(r())return{};const e=i(o.shift());!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{}}return r()?{}:{obj:t,k:i(o.shift())}}function c(t,e,n){const{obj:i,k:r}=u(t,e,Object);i[r]=n}function f(t,e){const{obj:n,k:i}=u(t,e);if(n)return n[i]}function h(t,e,n){for(const i in e)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof e[i]||e[i]instanceof String?n&&(t[i]=e[i]):h(t[i],e[i],n):t[i]=e[i]);return t}function l(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function p(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(t=>d[t])):t}const v=[" ",",","?","!",";"];function m(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let t=0;t<i.length;++t){if(!r)return;if("string"==typeof r[i[t]]&&t+1<i.length)return;if(void 0===r[i[t]]){let o=2,s=i.slice(t,t+o).join(n),a=r[s];for(;void 0===a&&i.length>t+o;)o++,s=i.slice(t,t+o).join(n),a=r[s];if(void 0===a)return;if(null===a)return null;if(e.endsWith(s)){if("string"==typeof a)return a;if(s&&"string"==typeof a[s])return a[s]}const u=i.slice(t+o).join(n);return u?m(a,u,n):void 0}r=r[i[t]]}return r}function g(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class y extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(s=t.split("."));const a=f(this.data,s);return a||!o||"string"!=typeof n?a:m(this.data&&this.data[t]&&this.data[t][e],n,r)}addResource(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=e,e=s[1]),this.addNamespaces(e),c(this.data,s,i),r.silent||this.emit("added",t,e,n,i)}addResources(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(t,e,i,n[i],{silent:!0});i.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=e,e=s[1]),this.addNamespaces(e);let a=f(this.data,s)||{};i?h(a,n,r):a={...a,...n},c(this.data,s,a),o.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var b={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach((t=>{this.processors[t]&&(e=this.processors[t].process(e,n,i,r))})),e}};const w={};class _ extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;super(),n=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{n[t]&&(i[t]=n[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=r.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){if(null==t)return!1;const e=this.resolve(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});return e&&void 0!==e.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,n){e=e||"",n=n||"";const i=v.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(0===i.length)return!0;const r=new RegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let o=!r.test(t);if(!o){const e=t.indexOf(n);e>0&&!r.test(t.substring(0,e))&&(o=!0)}return o}(t,n,i));if(o&&!s){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:r};const o=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),t=o.join(i)}return"string"==typeof r&&(r=[r]),{key:t,namespaces:r}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const i=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],e),a=s[s.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(c){const t=e.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${t}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a}:`${a}${t}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a}:o}const f=this.resolve(t,e);let h=f&&f.res;const l=f&&f.usedKey||o,d=f&&f.exactUsedKey||o,p=Object.prototype.toString.apply(h),v=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&h&&"string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof v||"[object Array]"!==p)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(l,h,{...e,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=t,f):t}if(r){const t="[object Array]"===p,n=t?[]:{},i=t?d:l;for(const t in h)if(Object.prototype.hasOwnProperty.call(h,t)){const o=`${i}${r}${t}`;n[t]=this.translate(o,{...e,joinArrays:!1,ns:s}),n[t]===o&&(n[t]=h[t])}h=n}}else if(m&&"string"==typeof v&&"[object Array]"===p)h=h.join(v),h&&(h=this.extendTranslation(h,t,e,n));else{let i=!1,s=!1;const c=void 0!==e.count&&"string"!=typeof e.count,l=_.hasDefaultValue(e),d=c?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&c?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",v=e[`defaultValue${d}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(h)&&l&&(i=!0,h=v),this.isValidLookup(h)||(s=!0,h=o);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,g=l&&v!==h&&this.options.updateMissing;if(s||i||g){if(this.logger.log(g?"updateKey":"missingKey",u,a,o,g?v:h),r){const t=this.resolve(o,{...e,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const i=(t,n,i)=>{const r=l&&i!==h?i:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,a,n,r,g,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,a,n,r,g,e),this.emit("missingKey",t,a,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?t.forEach((t=>{this.pluralResolver.getSuffixes(t,e).forEach((n=>{i([t],o+n,e[`defaultValue${n}`]||v)}))})):i(t,o,v))}h=this.extendTranslation(h,t,e,f,n),s&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${o}`),(s||i)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,i?h:void 0):this.options.parseMissingKeyHandler(h))}return i?(f.res=h,f):h}extendTranslation(t,e,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language,n),s){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(n.lng=i.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return r&&r[0]===i[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${e[0]}`),null):o.translate(...i,e)}),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a="string"==typeof s?[s]:s;return null!=t&&a&&a.length&&!1!==n.applyPostProcessor&&(t=b.handle(a,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:i,...n}:n,this)),t}resolve(t){let e,n,i,r,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,s),u=a.key;n=u;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const f=void 0!==s.count&&"string"!=typeof s.count,h=f&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),l=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(e)||(o=t,!w[`${d[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(w[`${d[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((n=>{if(this.isValidLookup(e))return;r=n;const o=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,u,n,t,s);else{let t;f&&(t=this.pluralResolver.getSuffix(n,s.count,s));const e=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(o.push(u+t),s.ordinal&&0===t.indexOf(i)&&o.push(u+t.replace(i,this.options.pluralSeparator)),h&&o.push(u+e)),l){const n=`${u}${this.options.contextSeparator}${s.context}`;o.push(n),f&&(o.push(n+t),s.ordinal&&0===t.indexOf(i)&&o.push(n+t.replace(i,this.options.pluralSeparator)),h&&o.push(n+e))}}let a;for(;a=o.pop();)this.isValidLookup(e)||(i=a,e=this.getResource(n,t,a,s))})))}))})),{res:e,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,i):this.resourceStore.getResource(t,e,n,i)}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&"defaultValue"===e.substring(0,12)&&void 0!==t[e])return!0;return!1}}function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}class N{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=r.create("languageUtils")}getScriptPartFromCode(t){if(!(t=g(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=g(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if("string"==typeof t&&t.indexOf("-")>-1){const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map((t=>t.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=j(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find((t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===t.indexOf(n)?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],r=t=>{t&&(this.isSupportedCode(t)?i.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return"string"==typeof t&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(t))):"string"==typeof t&&r(this.formatLanguageCode(t)),n.forEach((t=>{i.indexOf(t)<0&&r(this.formatLanguageCode(t))})),i}}let O=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],S={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};const E=["v1","v2","v3"],T=["v4"],k={zero:0,one:1,two:2,few:3,many:4,other:5};class x{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=r.create("pluralResolver"),this.options.compatibilityJSON&&!T.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const t={};return O.forEach((e=>{e.lngs.forEach((n=>{t[n]={numbers:e.nr,plurals:S[e.fc]}}))})),t}()}addRule(t,e){this.rules[t]=e}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(g(t),{type:e.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){const e=this.getRule(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return this.shouldUseIntlApi()?e&&e.resolvedOptions().pluralCategories.length>1:e&&e.numbers.length>1}getPluralFormsOfKey(t,e){return this.getSuffixes(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((t,e)=>k[t]-k[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):n.numbers.map((n=>this.getSuffix(t,n,e))):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:this.getSuffixRetroCompatible(i,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.plurals(t.noAbs?e:Math.abs(e));let i=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:r():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!E.includes(this.options.compatibilityJSON)}}function A(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(t,e,n){const i=f(t,n);return void 0!==i?i:f(e,n)}(t,e,n);return!o&&r&&"string"==typeof n&&(o=m(t,n,i),void 0===o&&(o=m(e,n,i))),o}class ${constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const e=t.interpolation;this.escape=void 0!==e.escape?e.escape:p,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?l(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?l(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?l(e.nestingPrefix):e.nestingPrefixEscaped||l("$t("),this.nestingSuffix=e.nestingSuffix?l(e.nestingSuffix):e.nestingSuffixEscaped||l(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){this.regexp=new RegExp(`${this.prefix}(.+?)${this.suffix}`,"g"),this.regexpUnescape=new RegExp(`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`,"g"),this.nestingRegexp=new RegExp(`${this.nestingPrefix}(.+?)${this.nestingSuffix}`,"g")}interpolate(t,e,n,i){let r,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}const f=t=>{if(t.indexOf(this.formatSeparator)<0){const r=A(e,u,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...e,interpolationkey:t}):r}const r=t.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(A(e,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...e,interpolationkey:o})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>c(t)},{regex:this.regexp,safeValue:t=>c(this.escapeValue?this.escape(t):t)}].forEach((e=>{for(s=0;r=e.regex.exec(t);){const n=r[1].trim();if(o=f(n),void 0===o)if("function"==typeof h){const e=h(t,r,i);o="string"==typeof e?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(l){o=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=a(o));const u=e.safeValue(o);if(t=t.replace(r[0],u),l?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=r[0].length):e.regex.lastIndex=0,s++,s>=this.maxReplaces)break}})),t}nest(t,e){let n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(t,e){const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const i=t.split(new RegExp(`${n}[ ]*{`));let o=`{${i[1]}`;t=i[0],o=this.interpolate(o,r);const s=o.match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),e&&(r={...e,...r})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${o}`}return delete r.defaultValue,t}for(;n=this.nestingRegexp.exec(t);){let u=[];r={...o},r=r.replace&&"string"!=typeof r.replace?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map((t=>t.trim()));n[1]=t.shift(),u=t,c=!0}if(i=e(s.call(this,n[1].trim(),r),r),i&&n[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=a(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),i=""),c&&(i=u.reduce(((t,e)=>this.format(t,e,o.lng,{...o,interpolationkey:n[1].trim()})),i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}function P(t){const e={};return function(n,i,r){const o=i+JSON.stringify(r);let s=e[o];return s||(s=t(g(i),r),e[o]=s),s(n)}}class R{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("formatter"),this.options=t,this.formats={number:P(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:P(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:P(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:P(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:P(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))},this.init(t)}init(t){const e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=P(e)}format(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.split(this.formatSeparator).reduce(((t,e)=>{const{formatName:r,formatOptions:o}=function(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);"currency"===e&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===e&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach((t=>{if(!t)return;const[e,...i]=t.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,"");n[e.trim()]||(n[e.trim()]=r),"false"===r&&(n[e.trim()]=!1),"true"===r&&(n[e.trim()]=!0),isNaN(r)||(n[e.trim()]=parseInt(r,10))}))}return{formatName:e,formatOptions:n}}(e);if(this.formats[r]){let e=t;try{const s=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{};e=this.formats[r](t,s.locale||s.lng||i.locale||i.lng||n,{...o,...i,...s})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${r}`),t}),t)}}class C extends o{constructor(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=r.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,e,n,i){const r={},o={},s={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const s=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(s[t]=!0)})),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(t,e,n){const i=t.split("|"),r=i[0],o=i[1];e&&this.emit("failedLoading",r,o,e),n&&this.store.addResourceBundle(r,o,n),this.state[t]=e?-1:2;const s={};this.queue.forEach((n=>{!function(t,e,n){const{obj:i,k:r}=u(t,e,Object);i[r]=i[r]||[],i[r].push(n)}(n.loaded,[r],o),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((t=>{s[t]||(s[t]={});const e=n.loaded[t];e.length&&e.forEach((e=>{void 0===s[t][e]&&(s[t][e]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((t=>!t.done))}read(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:r,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}s&&a&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,n,i+1,2*r,o)}),r):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(t,e,s);try{const n=a(t,e);n&&"function"==typeof n.then?n.then((t=>s(null,t))).catch(s):s(null,n)}catch(t){s(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);const r=this.queueLoad(t,e,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${e}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${e}loaded namespace ${r} for language ${i}`,o),this.loaded(t,n,o)}))}saveMissing(t,e,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const a={...o,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let r;r=5===u.length?u(t,e,n,i,a):u(t,e,n,i),r&&"function"==typeof r.then?r.then((t=>s(null,t))).catch(s):s(null,r)}catch(t){s(t)}else u(t,e,n,i,s,a)}t&&t[0]&&this.store.addResource(t[0],e,n,i)}}}function I(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if("object"==typeof t[1]&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach((t=>{e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function M(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function B(){}class V extends o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=M(t),this.services={},this.logger=r,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=I();function o(t){return t?"function"==typeof t?new t:t:null}if(this.options={...i,...this.options,...M(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){let e;r.init(this.modules.logger?o(this.modules.logger):null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=R);const n=new N(this.options);this.store=new y(this.options.resources,this.options);const s=this.services;s.logger=r,s.resourceStore=this.store,s.languageUtils=n,s.pluralResolver=new x(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(s.formatter=o(e),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new $(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new C(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit(e,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new _(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit(e,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=B),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((e=>{this[e]=function(){return t.store[e](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=function(){return t.store[e](...arguments),t}}));const a=s(),u=()=>{const t=(t,e)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B;const n="string"==typeof t?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return e();const t=[],i=e=>{e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{t.indexOf(e)<0&&t.push(e)}))};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload&&this.options.preload.forEach((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,e,n){const i=s();return t||(t=this.languages),e||(e=this.options.ns),n||(n=B),this.services.backendConnector.reload(t,e,(t=>{i.resolve(),n(t)})),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&b.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const i=s();this.emit("languageChanging",t);const r=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(t,o)=>{o?(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,i.resolve((function(){return n.t(...arguments)})),e&&e(t,(function(){return n.t(...arguments)}))},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n="string"==typeof e?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||r(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),i}getFixedT(t,e,n){var i=this;const r=function(t,e){let o;if("object"!=typeof e){for(var s=arguments.length,a=new Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];o=i.options.overloadTranslationOptionHandler([t,e].concat(a))}else o={...e};o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,o.keyPrefix=o.keyPrefix||n||r.keyPrefix;const c=i.options.keySeparator||".";let f;return f=o.keyPrefix&&Array.isArray(t)?t.map((t=>`${o.keyPrefix}${c}${t}`)):o.keyPrefix?`${o.keyPrefix}${c}${t}`:t,i.t(f,o)};return"string"==typeof t?r.lng=t:r.lngs=t,r.ns=e,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||2===n};if(e.precheck){const t=e.precheck(this,o);if(void 0!==t)return t}return!(!this.hasResourceBundle(n,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,t)||i&&!o(r,t)))}loadNamespaces(t,e){const n=s();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=s();"string"==typeof t&&(t=[t]);const i=this.options.preload||[],r=t.filter((t=>i.indexOf(t)<0));return r.length?(this.options.preload=i.concat(r),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new N(I());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new V(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new V(i);return void 0===t.debug&&void 0===t.prefix||(r.logger=r.logger.clone(t)),["store","services","language"].forEach((t=>{r[t]=this[t]})),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new y(this.store.data,i),r.services.resourceStore=r.store),r.translator=new _(r.services,i),r.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.emit(t,...n)})),r.init(i,e),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const L=V.createInstance();L.createInstance=V.createInstance;const U="<a href='https://www.vviinn.com/' target='_blank'>Vviinn</a>",F={de:{translation:{noResultText:"Keine Ergebnisse! Versuche es bitte später erneut.",basketButtonText:"In den Warenkorb",setMode:{widgetTitle:"Kaufen Sie ein Set und erhalten Sie Rabatt",widgetSubtitle:"Sparen Sie bis zu 15% beim Kauf von Produkten aus der Liste",basketButtonText:"Als Set kaufen",appliedDiscountText:"gespart",updateButtonText:"Neues Set vorschlagen"},exampleImagesTitle:"Mit den Beispielbildern die Suche direkt ausprobieren",imageUploadButtonText:"Bild hochladen",cameraButtonTextStart:"Kamera starten",cameraButtonTextStop:"Kamera stoppen",privacyBadgeText:`Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${U} ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.`,teaserText:"Finde Produkte auf \n einem Foto",imageSearchModalTitle:"AI Search",textSearchPlaceholder:"mit Text suchen",emptyResultsBlock:{title:"Leider nichts gefunden",button:"Neues Bild hochladen"},serverErrorBlock:{title:"Keine Verbindung",button:"Erneut versuchen"},wrongFormatBlock:{title:"Dateityp wird nicht unterstützt",text:"Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",button:"Neues Bild hochladen"},wrongAspectRatioBlock:{title:"Das Bild ist zu schmal",button:"Neues Bild hochladen"},filters:{modal:{title:"Filter",apply:"Anwenden",resetFilters:"Filter zurücksetzen"}}}},en:{translation:{noResultText:"No results! Please, try again later.",basketButtonText:"Add to Basket",setMode:{widgetTitle:"Buy a set to get discount",widgetSubtitle:"Save up to 15% for buying products from the list",basketButtonText:"Buy as set",appliedDiscountText:"saved",updateButtonText:"Suggest New Set"},exampleImagesTitle:"Try out the search with the example images",imageUploadButtonText:"Upload Photo",cameraButtonTextStart:"Start Camera",cameraButtonTextStop:"Stop Camera",privacyBadgeText:`By uploading a picture you agree to the processing by our partner ${U}. The image will be deleted after one hour of inactivity.`,teaserText:"Find Product by Photo",imageSearchModalTitle:"AI Search",textSearchPlaceholder:"Search by text",emptyResultsBlock:{title:"Sorry, nothing found",button:"Upload another image"},serverErrorBlock:{title:"Something went wrong",button:"Try again"},wrongFormatBlock:{title:"Wrong file format",text:"Please upload a .jpg, .png or .webp image file.",button:"Upload another file"},wrongAspectRatioBlock:{title:"The image is too narrow",button:"Upload another image"},filters:{modal:{title:"Filters",apply:"Apply",resetFilters:"Reset Filters"}}}}};var D,W=new Uint8Array(16);function z(){if(!D&&!(D="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(W)}const K=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var q=[],H=0;H<256;++H)q.push((H+256).toString(16).substr(1));function G(t,e,n){var i=(t=t||{}).random||(t.rng||z)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var r=0;r<16;++r)e[n+r]=i[r];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(q[t[e+0]]+q[t[e+1]]+q[t[e+2]]+q[t[e+3]]+"-"+q[t[e+4]]+q[t[e+5]]+"-"+q[t[e+6]]+q[t[e+7]]+"-"+q[t[e+8]]+q[t[e+9]]+"-"+q[t[e+10]]+q[t[e+11]]+q[t[e+12]]+q[t[e+13]]+q[t[e+14]]+q[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&K.test(t)}(n))throw TypeError("Stringified UUID is invalid");return n}(i)}var J=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t},Y=Object.prototype.hasOwnProperty;function X(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function Z(t){try{return encodeURIComponent(t)}catch(t){return null}}var Q={stringify:function(t,e){e=e||"";var n,i,r=[];for(i in"string"!=typeof e&&(e="?"),t)if(Y.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=Z(i),n=Z(n),null===i||null===n)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""},parse:function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var r=X(e[1]),o=X(e[2]);null===r||null===o||r in i||(i[r]=o)}return i}},tt=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,et=/[\n\r\t]/g,nt=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,it=/:\d+$/,rt=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,ot=/^[a-zA-Z]:/;function st(t){return(t||"").toString().replace(tt,"")}var at=[["#","hash"],["?","query"],function(t,e){return ft(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ut={hash:1,query:1};function ct(e){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var i,r={},o=typeof(e=e||n.location||{});if("blob:"===e.protocol)r=new lt(unescape(e.pathname),{});else if("string"===o)for(i in r=new lt(e,{}),ut)delete r[i];else if("object"===o){for(i in e)i in ut||(r[i]=e[i]);void 0===r.slashes&&(r.slashes=nt.test(e.href))}return r}function ft(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function ht(t,e){t=(t=st(t)).replace(et,""),e=e||{};var n,i=rt.exec(t),r=i[1]?i[1].toLowerCase():"",o=!!i[2],s=!!i[3],a=0;return o?s?(n=i[2]+i[3]+i[4],a=i[2].length+i[3].length):(n=i[2]+i[4],a=i[2].length):s?(n=i[3]+i[4],a=i[3].length):n=i[4],"file:"===r?a>=2&&(n=n.slice(2)):ft(r)?n=i[4]:r?o&&(n=n.slice(2)):a>=2&&ft(e.protocol)&&(n=i[4]),{protocol:r,slashes:o||ft(r),slashesCount:a,rest:n}}function lt(t,e,n){if(t=(t=st(t)).replace(et,""),!(this instanceof lt))return new lt(t,e,n);var i,r,o,s,a,u,c=at.slice(),f=typeof e,h=this,l=0;for("object"!==f&&"string"!==f&&(n=e,e=null),n&&"function"!=typeof n&&(n=Q.parse),i=!(r=ht(t||"",e=ct(e))).protocol&&!r.slashes,h.slashes=r.slashes||i&&e.slashes,h.protocol=r.protocol||e.protocol||"",t=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||ot.test(t))||!r.slashes&&(r.protocol||r.slashesCount<2||!ft(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);l<c.length;l++)"function"!=typeof(s=c[l])?(u=s[1],(o=s[0])!=o?h[u]=t:"string"==typeof o?~(a="@"===o?t.lastIndexOf(o):t.indexOf(o))&&("number"==typeof s[2]?(h[u]=t.slice(0,a),t=t.slice(a+s[2])):(h[u]=t.slice(a),t=t.slice(0,a))):(a=o.exec(t))&&(h[u]=a[1],t=t.slice(0,a.index)),h[u]=h[u]||i&&s[3]&&e[u]||"",s[4]&&(h[u]=h[u].toLowerCase())):t=s(t,h);n&&(h.query=n(h.query)),i&&e.slashes&&"/"!==h.pathname.charAt(0)&&(""!==h.pathname||""!==e.pathname)&&(h.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),i=n.length,r=n[i-1],o=!1,s=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),s++):s&&(0===i&&(o=!0),n.splice(i,1),s--);return o&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(h.pathname,e.pathname)),"/"!==h.pathname.charAt(0)&&ft(h.protocol)&&(h.pathname="/"+h.pathname),J(h.port,h.protocol)||(h.host=h.hostname,h.port=""),h.username=h.password="",h.auth&&(~(a=h.auth.indexOf(":"))?(h.username=h.auth.slice(0,a),h.username=encodeURIComponent(decodeURIComponent(h.username)),h.password=h.auth.slice(a+1),h.password=encodeURIComponent(decodeURIComponent(h.password))):h.username=encodeURIComponent(decodeURIComponent(h.auth)),h.auth=h.password?h.username+":"+h.password:h.username),h.origin="file:"!==h.protocol&&ft(h.protocol)&&h.host?h.protocol+"//"+h.host:"null",h.href=h.toString()}lt.prototype={set:function(t,e,n){var i=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||Q.parse)(e)),i[t]=e;break;case"port":i[t]=e,J(e,i.protocol)?e&&(i.host=i.hostname+":"+e):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=e,i.port&&(e+=":"+i.port),i.host=e;break;case"host":i[t]=e,it.test(e)?(e=e.split(":"),i.port=e.pop(),i.hostname=e.join(":")):(i.hostname=e,i.port="");break;case"protocol":i.protocol=e.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(e){var r="pathname"===t?"/":"#";i[t]=e.charAt(0)!==r?r+e:e}else i[t]=e;break;case"username":case"password":i[t]=encodeURIComponent(e);break;case"auth":var o=e.indexOf(":");~o?(i.username=e.slice(0,o),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(o+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var s=0;s<at.length;s++){var a=at[s];a[4]&&(i[a[1]]=i[a[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&ft(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(t){t&&"function"==typeof t||(t=Q.stringify);var e,n=this,i=n.host,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.protocol&&n.slashes||ft(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&ft(n.protocol)&&!i&&"/"!==n.pathname&&(o+="@"),(":"===i[i.length-1]||it.test(n.hostname)&&!n.port)&&(i+=":"),o+=i+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},lt.extractProtocol=ht,lt.location=ct,lt.trimLeft=st,lt.qs=Q;var dt=lt,pt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=e.mergeMap=e.of=e.from=e.Observable=void 0;var n=function(){function t(t){this.promise=t}return t.prototype.toPromise=function(){return this.promise},t.prototype.pipe=function(e){return new t(this.promise.then(e))},t}();e.Observable=n,e.from=function(t){return new n(t)},e.of=function(t){return new n(Promise.resolve(t))},e.mergeMap=function(t){return function(e){return t(e).toPromise()}},e.map=function(t){return t}})),vt="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==vt&&vt,mt="URLSearchParams"in vt,gt="Symbol"in vt&&"iterator"in Symbol,yt="FileReader"in vt&&"Blob"in vt&&function(){try{return new Blob,!0}catch(t){return!1}}(),bt="FormData"in vt,wt="ArrayBuffer"in vt;if(wt)var _t=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jt=ArrayBuffer.isView||function(t){return t&&_t.indexOf(Object.prototype.toString.call(t))>-1};function Nt(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Ot(t){return"string"!=typeof t&&(t=String(t)),t}function St(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return gt&&(e[Symbol.iterator]=function(){return e}),e}function Et(t){this.map={},t instanceof Et?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Tt(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function kt(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function xt(t){var e=new FileReader,n=kt(e);return e.readAsArrayBuffer(t),n}function At(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function $t(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:yt&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:bt&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:mt&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():wt&&yt&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=At(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wt&&(ArrayBuffer.prototype.isPrototypeOf(t)||jt(t))?this._bodyArrayBuffer=At(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):mt&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},yt&&(this.blob=function(){var t=Tt(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Tt(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(xt)}),this.text=function(){var t,e,n,i=Tt(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,n=kt(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i<e.length;i++)n[i]=String.fromCharCode(e[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},bt&&(this.formData=function(){return this.text().then(Ct)}),this.json=function(){return this.text().then(JSON.parse)},this}Et.prototype.append=function(t,e){t=Nt(t),e=Ot(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},Et.prototype.delete=function(t){delete this.map[Nt(t)]},Et.prototype.get=function(t){return t=Nt(t),this.has(t)?this.map[t]:null},Et.prototype.has=function(t){return this.map.hasOwnProperty(Nt(t))},Et.prototype.set=function(t,e){this.map[Nt(t)]=Ot(e)},Et.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},Et.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),St(t)},Et.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),St(t)},Et.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),St(t)},gt&&(Et.prototype[Symbol.iterator]=Et.prototype.entries);var Pt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Rt(t,e){if(!(this instanceof Rt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(e=e||{}).body;if(t instanceof Rt){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Et(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Et(e.headers)),this.method=(i=(n=e.method||this.method||"GET").toUpperCase(),Pt.indexOf(i)>-1?i:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function Ct(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function It(t,e){if(!(this instanceof It))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new Et(e.headers),this.url=e.url||"",this._initBody(t)}Rt.prototype.clone=function(){return new Rt(this,{body:this._bodyInit})},$t.call(Rt.prototype),$t.call(It.prototype),It.prototype.clone=function(){return new It(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Et(this.headers),url:this.url})},It.error=function(){var t=new It(null,{status:0,statusText:""});return t.type="error",t};var Mt=[301,302,303,307,308];It.redirect=function(t,e){if(-1===Mt.indexOf(e))throw new RangeError("Invalid status code");return new It(null,{status:e,headers:{location:t}})};var Bt=vt.DOMException;try{new Bt}catch(t){(Bt=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),Bt.prototype.constructor=Bt}function Vt(t,e){return new Promise((function(n,i){var r=new Rt(t,e);if(r.signal&&r.signal.aborted)return i(new Bt("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,i={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new Et,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();e.append(i,r)}})),e)};i.url="responseURL"in o?o.responseURL:i.headers.get("X-Request-URL");var r="response"in o?o.response:o.responseText;setTimeout((function(){n(new It(r,i))}),0)},o.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){i(new Bt("Aborted","AbortError"))}),0)},o.open(r.method,function(t){try{return""===t&&vt.location.href?vt.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?o.withCredentials=!0:"omit"===r.credentials&&(o.withCredentials=!1),"responseType"in o&&(yt?o.responseType="blob":wt&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof Et?r.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,Ot(e.headers[t]))})),r.signal&&(r.signal.addEventListener("abort",s),o.onreadystatechange=function(){4===o.readyState&&r.signal.removeEventListener("abort",s)}),o.send(void 0===r._bodyInit?null:r._bodyInit)}))}Vt.polyfill=!0,vt.fetch||(vt.fetch=Vt,vt.Headers=Et,vt.Request=Rt,vt.Response=It);var Lt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.IsomorphicFetchHttpLibrary=void 0;var n=function(){function t(){}return t.prototype.send=function(t){var e=t.getHttpMethod().toString(),n=t.getBody(),i=fetch(t.getUrl(),{method:e,body:n,headers:t.getHeaders(),credentials:"same-origin"}).then((function(t){var e={};t.headers.forEach((function(t,n){e[n]=t}));var n={text:function(){return t.text()},binary:function(){return t.blob()}};return new Ut.ResponseContext(t.status,e,n)}));return(0,pt.from)(i)},t}();e.IsomorphicFetchHttpLibrary=n})),Ut=e((function(e,n){var i,r,o=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),a=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||s(e,t,n)},u=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},c=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.wrapHttpLibrary=n.ResponseContext=n.SelfDecodingBody=n.RequestContext=n.HttpException=n.HttpMethod=void 0,a(Lt,n),(r=n.HttpMethod||(n.HttpMethod={})).GET="GET",r.HEAD="HEAD",r.POST="POST",r.PUT="PUT",r.DELETE="DELETE",r.CONNECT="CONNECT",r.OPTIONS="OPTIONS",r.TRACE="TRACE",r.PATCH="PATCH";var f=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e}(Error);n.HttpException=f;var h=function(){function t(t,e){this.httpMethod=e,this.headers={},this.body=void 0,this.url=new dt(t,!0)}return t.prototype.getUrl=function(){return this.url.toString()},t.prototype.setUrl=function(t){this.url=new dt(t,!0)},t.prototype.setBody=function(t){this.body=t},t.prototype.getHttpMethod=function(){return this.httpMethod},t.prototype.getHeaders=function(){return this.headers},t.prototype.getBody=function(){return this.body},t.prototype.setQueryParam=function(t,e){var n=this.url.query;n[t]=e,this.url.set("query",n)},t.prototype.addCookie=function(t,e){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=t+"="+e+"; "},t.prototype.setHeaderParam=function(t,e){this.headers[t]=e},t}();n.RequestContext=h;var l=function(){function t(t){this.dataSource=t}return t.prototype.binary=function(){return this.dataSource},t.prototype.text=function(){return u(this,void 0,void 0,(function(){var t;return c(this,(function(e){switch(e.label){case 0:return[4,this.dataSource];case 1:return(t=e.sent()).text?[2,t.text()]:[2,new Promise((function(e,n){var i=new FileReader;i.addEventListener("load",(function(){return e(i.result)})),i.addEventListener("error",(function(){return n(i.error)})),i.readAsText(t)}))]}}))}))},t}();n.SelfDecodingBody=l;var d=function(){function t(t,e,n){this.httpStatusCode=t,this.headers=e,this.body=n}return t.prototype.getParsedHeader=function(t){var e={};if(!this.headers[t])return e;for(var n=0,i=this.headers[t].split(";");n<i.length;n++){var r=i[n].split("=",2),o=r[0],s=r[1];o=o.toLowerCase().trim(),void 0===s?e[""]=o:((s=s.trim()).startsWith('"')&&s.endsWith('"')&&(s=s.substring(1,s.length-1)),e[o]=s)}return e},t.prototype.getBodyAsFile=function(){return u(this,void 0,void 0,(function(){var t,e,n;return c(this,(function(i){switch(i.label){case 0:return[4,this.body.binary()];case 1:t=i.sent(),e=this.getParsedHeader("content-disposition").filename||"",n=this.headers["content-type"]||"";try{return[2,new File([t],e,{type:n})]}catch(i){return[2,Object.assign(t,{name:e,type:n})]}return[2]}}))}))},t.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(t){}try{return this.body.binary()}catch(t){}return Promise.resolve(void 0)},t}();n.ResponseContext=d,n.wrapHttpLibrary=function(t){return{send:function(e){return(0,pt.from)(t.send(e))}}}})),Ft=e((function(e,n){var i=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},r=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.configureAuthMethods=n.BearerAuthAuthentication=void 0;var o=function(){function t(t){this.tokenProvider=t}return t.prototype.getName=function(){return"bearerAuth"},t.prototype.applySecurityAuthentication=function(t){return i(this,void 0,void 0,(function(){var e,n,i,o;return r(this,(function(r){switch(r.label){case 0:return n=(e=t).setHeaderParam,i=["Authorization"],o="Bearer ",[4,this.tokenProvider.getToken()];case 1:return n.apply(e,i.concat([o+r.sent()])),[2]}}))}))},t}();n.BearerAuthAuthentication=o,n.configureAuthMethods=function(t){var e={};return t?(e.default=t.default,t.bearerAuth&&(e.bearerAuth=new o(t.bearerAuth.tokenProvider)),e):e}})),Dt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0;var n=function(){function t(){this.typ="Event"}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator="typ",t.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],t}();e.Event=n})),Wt=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.AddToBasketEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="AddToBasketEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.AddToBasketEvent=o})),zt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorObject=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],t}();e.ErrorObject=n})),Kt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorResponse=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],t}();e.ErrorResponse=n})),qt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventConfirmation=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],t}();e.EventConfirmation=n})),Ht=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventInformativeProperties=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""}],t}();e.EventInformativeProperties=n})),Gt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventObject=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"typ",baseName:"typ",type:"EventType",format:""},{name:"enabled",baseName:"enabled",type:"boolean",format:""}],t}();e.EventObject=n})),Jt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),Yt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),Xt=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.FilterEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="FilterEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],e}(Dt.Event);n.FilterEvent=o})),Zt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilterEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}();e.FilterEventAllOf=n})),Qt=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),te=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.NoResultEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="NoResultEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.NoResultEvent=o})),ee=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductClickEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductClickEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductClickEvent=o})),ne=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProductEventInformativeProperties=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""}],t}();e.ProductEventInformativeProperties=n})),ie=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductLoadEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductLoadEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductLoadEvent=o})),re=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProductLoadEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}();e.ProductLoadEventAllOf=n})),oe=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ProductViewEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ProductViewEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"product_name",baseName:"productName",type:"string",format:""},{name:"product_type",baseName:"productType",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],e}(Dt.Event);n.ProductViewEvent=o})),se=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ResultLoadEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ResultLoadEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.ResultLoadEvent=o})),ae=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ResultLoadEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""}],t}();e.ResultLoadEventAllOf=n})),ue=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ResultViewEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="ResultViewEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""}],e}(Dt.Event);n.ResultViewEvent=o})),ce=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),fe=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.SearchEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="SearchEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],e}(Dt.Event);n.SearchEvent=o})),he=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}();e.SearchEventAllOf=n})),le=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),de=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),pe=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0})})),ve=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetEvent=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.typ="WidgetEvent",e}return r(e,t),e.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(e.attributeTypeMap)},e.discriminator=void 0,e.attributeTypeMap=[{name:"widget_id",baseName:"widgetId",type:"string",format:""},{name:"widget_version",baseName:"widgetVersion",type:"string",format:""},{name:"campaign_type_name",baseName:"campaignTypeName",type:"string",format:""},{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],e}(Dt.Event);n.WidgetEvent=o})),me=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetEventAllOf=void 0;var n=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}();e.WidgetEventAllOf=n})),ge=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(Wt,n),r(zt,n),r(Kt,n),r(Dt,n),r(qt,n),r(Ht,n),r(Gt,n),r(Jt,n),r(Yt,n),r(Xt,n),r(Zt,n),r(Qt,n),r(te,n),r(ee,n),r(ne,n),r(ie,n),r(re,n),r(oe,n),r(se,n),r(ae,n),r(ue,n),r(ce,n),r(fe,n),r(he,n),r(le,n),r(de,n),r(pe,n),r(ve,n),r(me,n)})),ye=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PromiseMiddlewareWrapper=void 0;var n=function(){function t(t){this.middleware=t}return t.prototype.pre=function(t){return(0,pt.from)(this.middleware.pre(t))},t.prototype.post=function(t){return(0,pt.from)(this.middleware.post(t))},t}();e.PromiseMiddlewareWrapper=n})),be=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.servers=e.server2=e.server1=e.ServerConfiguration=void 0;var n=function(){function t(t,e){this.url=t,this.variableConfiguration=e}return t.prototype.setVariables=function(t){Object.assign(this.variableConfiguration,t)},t.prototype.getConfiguration=function(){return this.variableConfiguration},t.prototype.getUrl=function(){var t=this.url;for(var e in this.variableConfiguration){var n=new RegExp("{"+e+"}","g");t=t.replace(n,this.variableConfiguration[e])}return t},t.prototype.makeRequestContext=function(t,e){return new Ut.RequestContext(this.getUrl()+t,e)},t}();e.ServerConfiguration=n,e.server1=new n("https://tracking.vviinn.com",{}),e.server2=new n("https://tracking.stage.vviinn.com",{}),e.servers=[e.server1,e.server2]})),we=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.createConfiguration=void 0,e.createConfiguration=function(t){void 0===t&&(t={});var e={baseServer:void 0!==t.baseServer?t.baseServer:be.server1,httpApi:t.httpApi||new Lt.IsomorphicFetchHttpLibrary,middleware:t.middleware||[],authMethods:(0,Ft.configureAuthMethods)(t.authMethods)};return t.promiseMiddleware&&t.promiseMiddleware.forEach((function(t){return e.middleware.push(new ye.PromiseMiddlewareWrapper(t))})),e}})),_e=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ApiException=void 0;var o=function(t){function e(e,n,i,r){var o=t.call(this,"HTTP-Code: "+e+"\nMessage: "+n+"\nBody: "+JSON.stringify(i)+"\nHeaders: "+JSON.stringify(r))||this;return o.code=e,o.body=i,o.headers=r,o}return r(e,t),e}(Error);n.ApiException=o})),je=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.RequiredError=n.BaseAPIRequestFactory=n.COLLECTION_FORMATS=void 0,n.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};n.BaseAPIRequestFactory=function(t){this.configuration=t};var o=function(t){function e(e,n,i){var r=t.call(this,"Required parameter "+i+" was null or undefined when calling "+e+"."+n+".")||this;return r.api=e,r.method=n,r.field=i,r.name="RequiredError",r}return r(e,t),e}(Error);n.RequiredError=o})),Ne=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectSerializer=void 0,r(Wt,n),r(zt,n),r(Kt,n),r(Dt,n),r(qt,n),r(Ht,n),r(Gt,n),r(Jt,n),r(Yt,n),r(Xt,n),r(Zt,n),r(Qt,n),r(te,n),r(ee,n),r(ne,n),r(ie,n),r(re,n),r(oe,n),r(se,n),r(ae,n),r(ue,n),r(ce,n),r(fe,n),r(he,n),r(le,n),r(de,n),r(pe,n),r(ve,n),r(me,n);var o=Wt,s=zt,a=Kt,u=Dt,c=qt,f=Ht,h=Gt,l=Xt,d=Zt,p=te,v=ee,m=ne,g=ie,y=re,b=oe,w=se,_=ae,j=ue,N=fe,O=he,S=ve,E=me,T=["string","boolean","double","integer","long","float","number","any"],k={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},x=new Set(["EventConfirmationStatusEnum","EventType","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),A={AddToBasketEvent:o.AddToBasketEvent,ErrorObject:s.ErrorObject,ErrorResponse:a.ErrorResponse,Event:u.Event,EventConfirmation:c.EventConfirmation,EventInformativeProperties:f.EventInformativeProperties,EventObject:h.EventObject,FilterEvent:l.FilterEvent,FilterEventAllOf:d.FilterEventAllOf,NoResultEvent:p.NoResultEvent,ProductClickEvent:v.ProductClickEvent,ProductEventInformativeProperties:m.ProductEventInformativeProperties,ProductLoadEvent:g.ProductLoadEvent,ProductLoadEventAllOf:y.ProductLoadEventAllOf,ProductViewEvent:b.ProductViewEvent,ResultLoadEvent:w.ResultLoadEvent,ResultLoadEventAllOf:_.ResultLoadEventAllOf,ResultViewEvent:j.ResultViewEvent,SearchEvent:N.SearchEvent,SearchEventAllOf:O.SearchEventAllOf,WidgetEvent:S.WidgetEvent,WidgetEventAllOf:E.WidgetEventAllOf},$=function(){function t(){}return t.findCorrectType=function(t,e){if(null==t)return e;if(-1!==T.indexOf(e.toLowerCase()))return e;if("Date"===e)return e;if(x.has(e))return e;if(!A[e])return e;var n=A[e].discriminator;if(null==n)return e;if(t[n]){var i=t[n];return A[i]?i:e}return e},t.serialize=function(e,n,i){if(null==e)return e;if(-1!==T.indexOf(n.toLowerCase()))return e;if(0===n.lastIndexOf("Array<",0)){var r=n.replace("Array<","");r=r.substring(0,r.length-1);var o=[];for(var s in e)o.push(t.serialize(e[s],r,i));return o}if("Date"===n){if("date"==i){var a=e.getMonth()+1;a=a<10?"0"+a.toString():a.toString();var u=e.getDate();return u=u<10?"0"+u.toString():u.toString(),e.getFullYear()+"-"+a+"-"+u}return e.toISOString()}if(x.has(n))return e;if(!A[n])return e;n=this.findCorrectType(e,n);var c=A[n].getAttributeTypeMap(),f={};for(var s in c){var h=c[s];f[h.baseName]=t.serialize(e[h.name],h.type,h.format)}return f},t.deserialize=function(e,n,i){if(n=t.findCorrectType(e,n),null==e)return e;if(-1!==T.indexOf(n.toLowerCase()))return e;if(0===n.lastIndexOf("Array<",0)){var r=n.replace("Array<","");r=r.substring(0,r.length-1);var o=[];for(var s in e)o.push(t.deserialize(e[s],r,i));return o}if("Date"===n)return new Date(e);if(x.has(n))return e;if(!A[n])return e;var a=new A[n],u=A[n].getAttributeTypeMap();for(var s in u){var c=u[s];a[c.name]=t.deserialize(e[c.baseName],c.type,c.format)}return a},t.normalizeMediaType=function(t){if(void 0!==t)return t.split(";")[0].trim().toLowerCase()},t.getPreferredMediaType=function(t){if(!t)return"application/json";for(var e=void 0,n=-1/0,i=0,r=t.map(this.normalizeMediaType);i<r.length;i++){var o=r[i];k[o]>n&&(e=o,n=k[o])}if(void 0===e)throw new Error("None of the given media types are supported: "+t.join(", "));return e},t.stringify=function(t,e){if("application/json"===e)return JSON.stringify(t);throw new Error("The mediaType "+e+" is not supported by ObjectSerializer.stringify.")},t.parse=function(t,e){if(void 0===e)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===e)return JSON.parse(t);throw new Error("The mediaType "+e+" is not supported by ObjectSerializer.parse.")},t}();n.ObjectSerializer=$})),Oe=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.canConsumeForm=e.isCodeInRange=void 0,e.isCodeInRange=function(t,e){if("0"===t)return!0;if(t==e.toString())return!0;var n=e.toString();if(n.length!=t.length)return!1;for(var i=0;i<n.length;i++)if("X"!=t.charAt(i)&&t.charAt(i)!=n.charAt(i))return!1;return!0},e.canConsumeForm=function(t){return-1!==t.indexOf("multipart/form-data")}})),Se=e((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},s=t&&t.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultApiResponseProcessor=n.DefaultApiRequestFactory=void 0;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.trackEvent=function(t,e){var n,i,r;return o(this,void 0,void 0,(function(){var o,a,u,c,f,h;return s(this,(function(s){switch(s.label){case 0:return(a=(o=e||this.configuration).baseServer.makeRequestContext("/event",Ut.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),u=Ne.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",u),c=Ne.ObjectSerializer.stringify(Ne.ObjectSerializer.serialize(t,"ProductLoadEvent | ProductViewEvent | ProductClickEvent | ResultLoadEvent | ResultViewEvent | NoResultEvent | WidgetEvent | FilterEvent | SearchEvent | AddToBasketEvent",""),u),a.setBody(c),(null==(f=o.authMethods.bearerAuth)?void 0:f.applySecurityAuthentication)?[4,null==f?void 0:f.applySecurityAuthentication(a)]:[3,2];case 1:s.sent(),s.label=2;case 2:return(null==(h=(null===(n=null==e?void 0:e.authMethods)||void 0===n?void 0:n.default)||(null===(r=null===(i=this.configuration)||void 0===i?void 0:i.authMethods)||void 0===r?void 0:r.default))?void 0:h.applySecurityAuthentication)?[4,null==h?void 0:h.applySecurityAuthentication(a)]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2,a]}}))}))},e}(je.BaseAPIRequestFactory);n.DefaultApiRequestFactory=a;var u=function(){function t(){}return t.prototype.trackEvent=function(t){return o(this,void 0,void 0,(function(){var e,n,i,r,o,a,u,c,f,h,l,d,p,v,m,g;return s(this,(function(s){switch(s.label){case 0:return e=Ne.ObjectSerializer.normalizeMediaType(t.headers["content-type"]),(0,Oe.isCodeInRange)("200",t.httpStatusCode)?(i=(n=Ne.ObjectSerializer).deserialize,o=(r=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,2];case 1:return[2,h=i.apply(n,[o.apply(r,[s.sent(),e]),"EventConfirmation",""])];case 2:return(0,Oe.isCodeInRange)("502",t.httpStatusCode)?(u=(a=Ne.ObjectSerializer).deserialize,f=(c=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,4];case 3:throw h=u.apply(a,[f.apply(c,[s.sent(),e]),"ErrorResponse",""]),new _e.ApiException(502,"an error occurred",h,t.headers);case 4:return t.httpStatusCode>=200&&t.httpStatusCode<=299?(d=(l=Ne.ObjectSerializer).deserialize,v=(p=Ne.ObjectSerializer).parse,[4,t.body.text()]):[3,6];case 5:return[2,h=d.apply(l,[v.apply(p,[s.sent(),e]),"EventConfirmation",""])];case 6:return m=_e.ApiException.bind,g=[void 0,t.httpStatusCode,"Unknown API Status Code!"],[4,t.getBodyAsAny()];case 7:throw new(m.apply(_e.ApiException,g.concat([s.sent(),t.headers])))}}))}))},t}();n.DefaultApiResponseProcessor=u})),Ee=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObservableDefaultApi=void 0;var n=pt,i=function(){function t(t,e,n){this.configuration=t,this.requestFactory=e||new Se.DefaultApiRequestFactory(t),this.responseProcessor=n||new Se.DefaultApiResponseProcessor}return t.prototype.trackEvent=function(t,e){for(var i=this,r=this.requestFactory.trackEvent(t,e),o=(0,pt.from)(r),s=function(t){o=o.pipe((0,n.mergeMap)((function(e){return t.pre(e)})))},a=0,u=this.configuration.middleware;a<u.length;a++)s(u[a]);return o.pipe((0,n.mergeMap)((function(t){return i.configuration.httpApi.send(t)}))).pipe((0,n.mergeMap)((function(t){for(var e=(0,pt.of)(t),r=function(t){e=e.pipe((0,n.mergeMap)((function(e){return t.post(e)})))},o=0,s=i.configuration.middleware;o<s.length;o++)r(s[o]);return e.pipe((0,n.map)((function(t){return i.responseProcessor.trackEvent(t)})))})))},t}();e.ObservableDefaultApi=i})),Te=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PromiseDefaultApi=void 0;var n=function(){function t(t,e,n){this.api=new Ee.ObservableDefaultApi(t,e,n)}return t.prototype.trackEvent=function(t,e){return this.api.trackEvent(t,e).toPromise()},t}();e.PromiseDefaultApi=n})),ke=e((function(e,n){var i=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),r=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultApi=n.createConfiguration=void 0,r(Ut,n),r(Ft,n),r(ge,n),Object.defineProperty(n,"createConfiguration",{enumerable:!0,get:function(){return we.createConfiguration}}),r(_e,n),r(be,n),Object.defineProperty(n,"DefaultApi",{enumerable:!0,get:function(){return Te.PromiseDefaultApi}})}));const xe=(t,e)=>{const n=(t=>(t=>!t.includes("stage"))(t)?ke.servers[0]:ke.servers[1])(t),i=(t=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((e=>e(t)))}}}))(e);return new ke.DefaultApi(ke.createConfiguration({baseServer:n,authMethods:i}))},Ae=t=>e=>Object.assign(Object.assign({},e),t),$e="product_load_event",Pe="product_view_event",Re="product_click_event",Ce="add_to_basket_event",Ie="widget_event",Me="result_load_event",Be="result_view_event",Ve={widget:"VPR",typ:$e},Le={widget:"VPC",typ:$e},Ue={widget:"VPS",typ:$e},Fe={widget:"VPR",typ:Pe},De={widget:"VPC",typ:Pe},We={widget:"VPS",typ:Pe},ze={widget:"VPR",typ:Re},Ke={widget:"VPC",typ:Re},qe={widget:"VPS",typ:Re},He={widget:"VPR",typ:Ce},Ge={widget:"VPC",typ:Ce},Je={widget:"VPC",typ:Ie},Ye={widget:"VPS",typ:Ie},Xe={widget:"VPR",typ:Me},Ze={widget:"VPR",typ:Be},Qe={widget:"VPC",typ:Me},tn={widget:"VPC",typ:Be},en={widget:"VPS",typ:Me},nn={widget:"VPS",typ:Be},rn=t=>{switch(t){case"load":return Ae(Ve);case"view":return Ae(Fe);case"click":return Ae(ze)}},on=t=>{switch(t){case"load":return Ae(Le);case"view":return Ae(De);case"click":return Ae(Ke)}},sn=t=>{switch(t){case"load":return Ae(Ue);case"view":return Ae(We);case"click":return Ae(qe)}},an=t=>{switch(t){case"load":return Ae(Xe);case"view":return Ae(Ze)}},un=t=>{switch(t){case"load":return Ae(Qe);case"view":return Ae(tn)}},cn=t=>{switch(t){case"load":return Ae(en);case"view":return Ae(nn)}},fn=Ae({widget:"VPR",typ:Ie}),hn=Ae(Ye),ln=Ae(Je),dn=Ae({widget:"VPS",typ:"search_event"}),pn=Ae({widget:"VPS",typ:"filter_event"}),vn=Ae(He),mn=Ae(Ge);export{mn as a,vn as b,xe as c,ln as d,fn as e,un as f,an as g,on as h,L as i,rn as j,dn as k,pn as l,hn as m,cn as n,sn as o,F as r,G as v}