-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrecombee-api-client.min.js
2 lines (2 loc) · 80.5 KB
/
recombee-api-client.min.js
1
2
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.recombee=e():t.recombee=e()}(self,(()=>(()=>{var t={32:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=r(343),u=r(520),a=function(){return t=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.databaseId=e,this.publicToken=r,this.options=n||{},this.baseUri=this._getBaseUri(),this.useHttps=!("useHttps"in this.options)||this.options.useHttps,this.async=!("async"in this.options)||this.options.async},(e=[{key:"_getRegionalBaseUri",value:function(t){var e={"ap-se":"client-rapi-ap-se.recombee.com","ca-east":"client-rapi-ca-east.recombee.com","eu-west":"client-rapi-eu-west.recombee.com","us-west":"client-rapi-us-west.recombee.com"}[t.toLowerCase()];if(void 0===e)throw new Error('Region "'.concat(t,'" is unknown. You may need to update the version of the SDK.'));return e}},{key:"_getBaseUri",value:function(){var t=this.options.baseUri;if(this.options.region){if(t)throw new Error("baseUri and region cannot be specified at the same time");t=this._getRegionalBaseUri(this.options.region)}return t||"client-rapi.recombee.com"}},{key:"send",value:function(t,e){var r=this,n="undefined"==typeof globalThis?window.Promise:globalThis.Promise;if(void 0===e&&n)return new n((function(e,n){r.send(t,(function(t,r){t?n(t):e(r)}))}));var o=this._signUrl(t.path),i=(this.useHttps||t.ensureHttps?"https://":"http://")+this.baseUri+o,c=new XMLHttpRequest;c.open("POST",i,this.async),c.setRequestHeader("Accept","application/json"),c.setRequestHeader("Content-Type","application/json"),this.async&&(c.timeout=t.timeout),c.onreadystatechange=function(){if(4==this.readyState&&this.responseText)if(200==this.status){if(e)return e(null,JSON.parse(this.responseText))}else if(e)return e(new u.ResponseError(t,this.status,this.responseText))},c.ontimeout=function(){if(e)return e(new u.TimeoutError(t))},c.send(JSON.stringify(t.bodyParameters()))}},{key:"_signUrl",value:function(t){var e="/"+this.databaseId+t;e+=(-1==t.indexOf("?")?"?":"&")+"frontend_timestamp="+parseInt((new Date).getTime()/1e3);var r=new c("SHA-1","TEXT");return r.setHMACKey(this.publicToken,"TEXT"),r.update(e),e+"&frontend_sign="+r.getHMAC("HEX")}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.ApiClient=a},895:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(o())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var c=new(t.bind.apply(t,n));return r&&i(c,r.prototype),c}(t,arguments,c(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,t)},n(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var u=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=c(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(e,n||[],c(t).constructor):e.apply(t,n))}(this,e,[t])).name=n.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(n,n.constructor):n.stack=new Error(t).stack,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(n(Error));e.ApiError=u},520:(t,e,r)=>{"use strict";e.ApiError=r(895).ApiError,e.ResponseError=r(654).ResponseError,e.TimeoutError=r(36).TimeoutError},654:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}var u=function(t){function e(t,r,c){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(u=function(t,e,r){return e=i(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(e,r||[],i(t).constructor):e.apply(t,r))}(this,e,[c])).request=t,u.statusCode=r,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(r(895).ApiError);e.ResponseError=u},36:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}var u=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=i(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(e,r||[],i(t).constructor):e.apply(t,r))}(this,e,["Client did not get response within ".concat(t.timeout," ms")])).request=t,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(r(895).ApiError);e.TimeoutError=u},487:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/bookmarks/",9e3,!1])).userId=t,i.itemId=r,o=o||{},i.timestamp=o.timestamp,i.cascadeCreate=o.cascadeCreate,i.recommId=o.recommId,i.additionalData=o.additionalData,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.AddBookmark=s},542:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/cartadditions/",9e3,!1])).userId=t,i.itemId=r,o=o||{},i.timestamp=o.timestamp,i.cascadeCreate=o.cascadeCreate,i.amount=o.amount,i.price=o.price,i.recommId=o.recommId,i.additionalData=o.additionalData,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.amount&&(t.amount=this.amount),void 0!==this.price&&(t.price=this.price),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.AddCartAddition=s},526:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/detailviews/",9e3,!1])).userId=t,i.itemId=r,o=o||{},i.timestamp=o.timestamp,i.duration=o.duration,i.cascadeCreate=o.cascadeCreate,i.recommId=o.recommId,i.additionalData=o.additionalData,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.duration&&(t.duration=this.duration),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.AddDetailView=s},416:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/purchases/",9e3,!1])).userId=t,i.itemId=r,o=o||{},i.timestamp=o.timestamp,i.cascadeCreate=o.cascadeCreate,i.amount=o.amount,i.price=o.price,i.profit=o.profit,i.recommId=o.recommId,i.additionalData=o.additionalData,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.amount&&(t.amount=this.amount),void 0!==this.price&&(t.price=this.price),void 0!==this.profit&&(t.profit=this.profit),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.AddPurchase=s},982:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/ratings/",9e3,!1])).userId=t,a.itemId=r,a.rating=o,i=i||{},a.timestamp=i.timestamp,a.cascadeCreate=i.cascadeCreate,a.recommId=i.recommId,a.additionalData=i.additionalData,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,t.rating=this.rating,void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.AddRating=s},813:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=r(960),f=function(t){return t.map((function(t){return t.timeout})).reduce((function(t,e){return t+e}),0)},p=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/batch/",f(t),!0])).requests=t,r=r||{},o.distinctRecomms=r.distinctRecomms,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t=this,e={requests:this.requests.map((function(e){return t._request_to_batch_object(e)}))};return void 0!==this.distinctRecomms&&(e.distinctRecomms=this.distinctRecomms),e}},{key:"_request_to_batch_object",value:function(t){var e=t.bodyParameters();return{method:t.method,path:t.path,params:Object.keys(e).length?e:void 0}}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(s.Request);e.Batch=p},92:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["PUT","/users/".concat(encodeURIComponent(t),"/merge/").concat(encodeURIComponent(r)),3e4,!1])).targetUserId=t,i.sourceUserId=r,o=o||{},i.cascadeCreate=o.cascadeCreate,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.MergeUsers=s},456:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/item-segments/item-segments/",9e3,!1])).contextSegmentId=t,a.targetUserId=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.contextSegmentId=this.contextSegmentId,t.targetUserId=this.targetUserId,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemSegmentsToItemSegment=s},680:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/items/".concat(encodeURIComponent(t),"/item-segments/"),9e3,!1])).itemId=t,a.targetUserId=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.targetUserId=this.targetUserId,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemSegmentsToItem=s},108:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/users/".concat(encodeURIComponent(t),"/item-segments/"),9e3,!1])).userId=t,i.count=r,o=o||{},i.scenario=o.scenario,i.cascadeCreate=o.cascadeCreate,i.filter=o.filter,i.booster=o.booster,i.logic=o.logic,i.expertSettings=o.expertSettings,i.returnAbGroup=o.returnAbGroup,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemSegmentsToUser=s},88:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/item-segments/items/",9e3,!1])).contextSegmentId=t,a.targetUserId=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.returnProperties=i.returnProperties,a.includedProperties=i.includedProperties,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.minRelevance=i.minRelevance,a.rotationRate=i.rotationRate,a.rotationTime=i.rotationTime,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.contextSegmentId=this.contextSegmentId,t.targetUserId=this.targetUserId,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.returnProperties&&(t.returnProperties=this.returnProperties),void 0!==this.includedProperties&&(t.includedProperties=this.includedProperties),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.minRelevance&&(t.minRelevance=this.minRelevance),void 0!==this.rotationRate&&(t.rotationRate=this.rotationRate),void 0!==this.rotationTime&&(t.rotationTime=this.rotationTime),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemsToItemSegment=s},360:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/items/".concat(encodeURIComponent(t),"/items/"),9e3,!1])).itemId=t,a.targetUserId=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.returnProperties=i.returnProperties,a.includedProperties=i.includedProperties,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.userImpact=i.userImpact,a.diversity=i.diversity,a.minRelevance=i.minRelevance,a.rotationRate=i.rotationRate,a.rotationTime=i.rotationTime,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.targetUserId=this.targetUserId,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.returnProperties&&(t.returnProperties=this.returnProperties),void 0!==this.includedProperties&&(t.includedProperties=this.includedProperties),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.userImpact&&(t.userImpact=this.userImpact),void 0!==this.diversity&&(t.diversity=this.diversity),void 0!==this.minRelevance&&(t.minRelevance=this.minRelevance),void 0!==this.rotationRate&&(t.rotationRate=this.rotationRate),void 0!==this.rotationTime&&(t.rotationTime=this.rotationTime),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemsToItem=s},892:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/users/".concat(encodeURIComponent(t),"/items/"),9e3,!1])).userId=t,i.count=r,o=o||{},i.scenario=o.scenario,i.cascadeCreate=o.cascadeCreate,i.returnProperties=o.returnProperties,i.includedProperties=o.includedProperties,i.filter=o.filter,i.booster=o.booster,i.logic=o.logic,i.diversity=o.diversity,i.minRelevance=o.minRelevance,i.rotationRate=o.rotationRate,i.rotationTime=o.rotationTime,i.expertSettings=o.expertSettings,i.returnAbGroup=o.returnAbGroup,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.returnProperties&&(t.returnProperties=this.returnProperties),void 0!==this.includedProperties&&(t.includedProperties=this.includedProperties),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.diversity&&(t.diversity=this.diversity),void 0!==this.minRelevance&&(t.minRelevance=this.minRelevance),void 0!==this.rotationRate&&(t.rotationRate=this.rotationRate),void 0!==this.rotationTime&&(t.rotationTime=this.rotationTime),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendItemsToUser=s},4:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/recomms/next/items/".concat(encodeURIComponent(t)),9e3,!1])).recommId=t,o.count=r,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.count=this.count,t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.RecommendNextItems=s},960:(t,e)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var c=o((function t(e,r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.method=e,this.path=r,this.timeout=n,this.ensureHttps=o}));e.Request=c},332:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/search/users/".concat(encodeURIComponent(t),"/item-segments/"),9e3,!1])).userId=t,a.searchQuery=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.searchQuery=this.searchQuery,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.SearchItemSegments=s},480:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/search/users/".concat(encodeURIComponent(t),"/items/"),9e3,!1])).userId=t,a.searchQuery=r,a.count=o,i=i||{},a.scenario=i.scenario,a.cascadeCreate=i.cascadeCreate,a.returnProperties=i.returnProperties,a.includedProperties=i.includedProperties,a.filter=i.filter,a.booster=i.booster,a.logic=i.logic,a.expertSettings=i.expertSettings,a.returnAbGroup=i.returnAbGroup,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.searchQuery=this.searchQuery,t.count=this.count,void 0!==this.scenario&&(t.scenario=this.scenario),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.returnProperties&&(t.returnProperties=this.returnProperties),void 0!==this.includedProperties&&(t.includedProperties=this.includedProperties),void 0!==this.filter&&(t.filter=this.filter),void 0!==this.booster&&(t.booster=this.booster),void 0!==this.logic&&(t.logic=this.logic),void 0!==this.expertSettings&&(t.expertSettings=this.expertSettings),void 0!==this.returnAbGroup&&(t.returnAbGroup=this.returnAbGroup),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.SearchItems=s},125:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){function e(t,r,o,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,["POST","/viewportions/",9e3,!1])).userId=t,a.itemId=r,a.portion=o,i=i||{},a.sessionId=i.sessionId,a.timestamp=i.timestamp,a.cascadeCreate=i.cascadeCreate,a.recommId=i.recommId,a.additionalData=i.additionalData,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,(i=[{key:"bodyParameters",value:function(){var t={};return t.userId=this.userId,t.itemId=this.itemId,t.portion=this.portion,void 0!==this.sessionId&&(t.sessionId=this.sessionId),void 0!==this.timestamp&&(t.timestamp=this.timestamp),void 0!==this.cascadeCreate&&(t.cascadeCreate=this.cascadeCreate),void 0!==this.recommId&&(t.recommId=this.recommId),void 0!==this.additionalData&&(t.additionalData=this.additionalData),t.cascadeCreate=void 0===this.cascadeCreate||this.cascadeCreate,t}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(960).Request);e.SetViewPortion=s},343:function(t){t.exports=function(){"use strict";var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="ARRAYBUFFER not supported by this environment",r="UINT8ARRAY not supported by this environment";function n(t,e,r,n){var o,i,c,u=e||[0],a=(r=r||0)>>>3,s=-1===n?3:0;for(o=0;o<t.length;o+=1)i=(c=o+a)>>>2,u.length<=i&&u.push(0),u[i]|=t[o]<<8*(s+n*(c%4));return{value:u,binLen:8*t.length+r}}function o(o,i,c){switch(i){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(o){case"HEX":return function(t,e,r){return function(t,e,r,n){var o,i,c,u;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var a=e||[0],s=(r=r||0)>>>3,f=-1===n?3:0;for(o=0;o<t.length;o+=2){if(i=parseInt(t.substr(o,2),16),isNaN(i))throw new Error("String of HEX type contains invalid characters");for(c=(u=(o>>>1)+s)>>>2;a.length<=c;)a.push(0);a[c]|=i<<8*(f+n*(u%4))}return{value:a,binLen:4*t.length+r}}(t,e,r,c)};case"TEXT":return function(t,e,r){return function(t,e,r,n,o){var i,c,u,a,s,f,p,l,y=0,d=r||[0],b=(n=n||0)>>>3;if("UTF8"===e)for(p=-1===o?3:0,u=0;u<t.length;u+=1)for(c=[],128>(i=t.charCodeAt(u))?c.push(i):2048>i?(c.push(192|i>>>6),c.push(128|63&i)):55296>i||57344<=i?c.push(224|i>>>12,128|i>>>6&63,128|63&i):(u+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(u)),c.push(240|i>>>18,128|i>>>12&63,128|i>>>6&63,128|63&i)),a=0;a<c.length;a+=1){for(s=(f=y+b)>>>2;d.length<=s;)d.push(0);d[s]|=c[a]<<8*(p+o*(f%4)),y+=1}else for(p=-1===o?2:0,l="UTF16LE"===e&&1!==o||"UTF16LE"!==e&&1===o,u=0;u<t.length;u+=1){for(i=t.charCodeAt(u),!0===l&&(i=(a=255&i)<<8|i>>>8),s=(f=y+b)>>>2;d.length<=s;)d.push(0);d[s]|=i<<8*(p+o*(f%4)),y+=2}return{value:d,binLen:8*y+n}}(t,i,e,r,c)};case"B64":return function(e,r,n){return function(e,r,n,o){var i,c,u,a,s,f,p=0,l=r||[0],y=(n=n||0)>>>3,d=-1===o?3:0,b=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==b&&b<e.length)throw new Error("Invalid '=' found in base-64 string");for(i=0;i<e.length;i+=4){for(a=e.substr(i,4),u=0,c=0;c<a.length;c+=1)u|=t.indexOf(a.charAt(c))<<18-6*c;for(c=0;c<a.length-1;c+=1){for(s=(f=p+y)>>>2;l.length<=s;)l.push(0);l[s]|=(u>>>16-8*c&255)<<8*(d+o*(f%4)),p+=1}}return{value:l,binLen:8*p+n}}(e,r,n,c)};case"BYTES":return function(t,e,r){return function(t,e,r,n){var o,i,c,u,a=e||[0],s=(r=r||0)>>>3,f=-1===n?3:0;for(i=0;i<t.length;i+=1)o=t.charCodeAt(i),c=(u=i+s)>>>2,a.length<=c&&a.push(0),a[c]|=o<<8*(f+n*(u%4));return{value:a,binLen:8*t.length+r}}(t,e,r,c)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(e)}return function(t,e,r){return function(t,e,r,o){return n(new Uint8Array(t),e,r,o)}(t,e,r,c)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(r)}return function(t,e,r){return n(t,e,r,c)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(n,o,i,c){switch(n){case"HEX":return function(t){return function(t,e,r,n){var o,i,c="0123456789abcdef",u="",a=e/8,s=-1===r?3:0;for(o=0;o<a;o+=1)i=t[o>>>2]>>>8*(s+r*(o%4)),u+=c.charAt(i>>>4&15)+c.charAt(15&i);return n.outputUpper?u.toUpperCase():u}(t,o,i,c)};case"B64":return function(e){return function(e,r,n,o){var i,c,u,a,s,f="",p=r/8,l=-1===n?3:0;for(i=0;i<p;i+=3)for(a=i+1<p?e[i+1>>>2]:0,s=i+2<p?e[i+2>>>2]:0,u=(e[i>>>2]>>>8*(l+n*(i%4))&255)<<16|(a>>>8*(l+n*((i+1)%4))&255)<<8|s>>>8*(l+n*((i+2)%4))&255,c=0;c<4;c+=1)f+=8*i+6*c<=r?t.charAt(u>>>6*(3-c)&63):o.b64Pad;return f}(e,o,i,c)};case"BYTES":return function(t){return function(t,e,r){var n,o,i="",c=e/8,u=-1===r?3:0;for(n=0;n<c;n+=1)o=t[n>>>2]>>>8*(u+r*(n%4))&255,i+=String.fromCharCode(o);return i}(t,o,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(e)}return function(t){return function(t,e,r){var n,o=e/8,i=new ArrayBuffer(o),c=new Uint8Array(i),u=-1===r?3:0;for(n=0;n<o;n+=1)c[n]=t[n>>>2]>>>8*(u+r*(n%4))&255;return i}(t,o,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(r)}return function(t){return function(t,e,r){var n,o=e/8,i=-1===r?3:0,c=new Uint8Array(o);for(n=0;n<o;n+=1)c[n]=t[n>>>2]>>>8*(i+r*(n%4))&255;return c}(t,o,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var c=4294967296,u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f="Chosen SHA variant is not supported",p="Cannot set numRounds with MAC";function l(t,e){var r,n,o=t.binLen>>>3,i=e.binLen>>>3,c=o<<3,u=4-o<<3;if(o%4!=0){for(r=0;r<i;r+=4)n=o+r>>>2,t.value[n]|=e.value[r>>>2]<<c,t.value.push(0),t.value[n+1]|=e.value[r>>>2]>>>u;return(t.value.length<<2)-4>=i+o&&t.value.pop(),{value:t.value,binLen:t.binLen+e.binLen}}return{value:t.value.concat(e.value),binLen:t.binLen+e.binLen}}function y(t){var e={outputUpper:!1,b64Pad:"=",outputLen:-1},r=t||{},n="Output length must be a multiple of 8";if(e.outputUpper=r.outputUpper||!1,r.b64Pad&&(e.b64Pad=r.b64Pad),r.outputLen){if(r.outputLen%8!=0)throw new Error(n);e.outputLen=r.outputLen}else if(r.shakeLen){if(r.shakeLen%8!=0)throw new Error(n);e.outputLen=r.shakeLen}if("boolean"!=typeof e.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw new Error("Invalid b64Pad formatting option");return e}function d(t,e,r,n){var i=t+" must include a value and format";if(!e){if(!n)throw new Error(i);return n}if(void 0===e.value||!e.format)throw new Error(i);return o(e.format,e.encoding||"UTF8",r)(e.value)}var b=function(){function t(t,e,r){var n=r||{};if(this.t=e,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.o=t,this.u=[],this.h=0,this.v=!1,this.A=0,this.l=!1,this.S=[],this.H=[]}return t.prototype.update=function(t){var e,r=0,n=this.p>>>5,o=this.m(t,this.u,this.h),i=o.binLen,c=o.value,u=i>>>5;for(e=0;e<u;e+=n)r+this.p<=i&&(this.U=this.R(c.slice(e,e+n),this.U),r+=this.p);return this.A+=r,this.u=c.slice(r>>>5),this.h=i%this.p,this.v=!0,this},t.prototype.getHash=function(t,e){var r,n,o=this.T,c=y(e);if(this.C){if(-1===c.outputLen)throw new Error("Output length must be specified in options");o=c.outputLen}var u=i(t,o,this.F,c);if(this.l&&this.K)return u(this.K(c));for(n=this.g(this.u.slice(),this.h,this.A,this.L(this.U),o),r=1;r<this.numRounds;r+=1)this.C&&o%32!=0&&(n[n.length-1]&=16777215>>>24-o%32),n=this.g(n,o,0,this.B(this.o),o);return u(n)},t.prototype.setHMACKey=function(t,e,r){if(!this.k)throw new Error("Variant does not support HMAC");if(this.v)throw new Error("Cannot set MAC key after calling update");var n=o(e,(r||{}).encoding||"UTF8",this.F);this.Y(n(t))},t.prototype.Y=function(t){var e,r=this.p>>>3,n=r/4-1;if(1!==this.numRounds)throw new Error(p);if(this.l)throw new Error("MAC key already set");for(r<t.binLen/8&&(t.value=this.g(t.value,t.binLen,0,this.B(this.o),this.T));t.value.length<=n;)t.value.push(0);for(e=0;e<=n;e+=1)this.S[e]=909522486^t.value[e],this.H[e]=1549556828^t.value[e];this.U=this.R(this.S,this.U),this.A=this.p,this.l=!0},t.prototype.getHMAC=function(t,e){var r=y(e);return i(t,this.T,this.F,r)(this.N())},t.prototype.N=function(){var t;if(!this.l)throw new Error("Cannot call getHMAC without first setting MAC key");var e=this.g(this.u.slice(),this.h,this.A,this.L(this.U),this.T);return t=this.R(this.H,this.B(this.o)),this.g(e,this.T,this.p,t,this.T)},t}(),h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},h(t,e)};function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function v(t,e){return t<<e|t>>>32-e}function w(t,e){return t>>>e|t<<32-e}function g(t,e){return t>>>e}function O(t,e,r){return t^e^r}function S(t,e,r){return t&e^~t&r}function P(t,e,r){return t&e^t&r^e&r}function j(t){return w(t,2)^w(t,13)^w(t,22)}function I(t,e){var r=(65535&t)+(65535&e);return(65535&(t>>>16)+(e>>>16)+(r>>>16))<<16|65535&r}function C(t,e,r,n){var o=(65535&t)+(65535&e)+(65535&r)+(65535&n);return(65535&(t>>>16)+(e>>>16)+(r>>>16)+(n>>>16)+(o>>>16))<<16|65535&o}function R(t,e,r,n,o){var i=(65535&t)+(65535&e)+(65535&r)+(65535&n)+(65535&o);return(65535&(t>>>16)+(e>>>16)+(r>>>16)+(n>>>16)+(o>>>16)+(i>>>16))<<16|65535&i}function T(t){return w(t,7)^w(t,18)^g(t,3)}function E(t){return w(t,6)^w(t,11)^w(t,25)}function _(t){return[1732584193,4023233417,2562383102,271733878,3285377520]}function A(t,e){var r,n,o,i,c,u,a,s=[];for(r=e[0],n=e[1],o=e[2],i=e[3],c=e[4],a=0;a<80;a+=1)s[a]=a<16?t[a]:v(s[a-3]^s[a-8]^s[a-14]^s[a-16],1),u=a<20?R(v(r,5),S(n,o,i),c,1518500249,s[a]):a<40?R(v(r,5),O(n,o,i),c,1859775393,s[a]):a<60?R(v(r,5),P(n,o,i),c,2400959708,s[a]):R(v(r,5),O(n,o,i),c,3395469782,s[a]),c=i,i=o,o=v(n,30),n=r,r=u;return e[0]=I(r,e[0]),e[1]=I(n,e[1]),e[2]=I(o,e[2]),e[3]=I(i,e[3]),e[4]=I(c,e[4]),e}function M(t,e,r,n){for(var o,i=15+(e+65>>>9<<4),u=e+r;t.length<=i;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[i]=4294967295&u,t[i-1]=u/c|0,o=0;o<t.length;o+=16)n=A(t.slice(o,o+16),n);return n}"function"==typeof SuppressedError&&SuppressedError;var k=function(t){function e(e,r,n){var i=this;if("SHA-1"!==e)throw new Error(f);var c=n||{};return(i=t.call(this,e,r,n)||this).k=!0,i.K=i.N,i.F=-1,i.m=o(i.t,i.i,i.F),i.R=A,i.L=function(t){return t.slice()},i.B=_,i.g=M,i.U=[1732584193,4023233417,2562383102,271733878,3285377520],i.p=512,i.T=160,i.C=!1,c.hmacKey&&i.Y(d("hmacKey",c.hmacKey,i.F)),i}return m(e,t),e}(b);function U(t){return"SHA-224"==t?a.slice():s.slice()}function x(t,e){var r,n,o,i,c,a,s,f,p,l,y,d,b=[];for(r=e[0],n=e[1],o=e[2],i=e[3],c=e[4],a=e[5],s=e[6],f=e[7],y=0;y<64;y+=1)b[y]=y<16?t[y]:C(w(d=b[y-2],17)^w(d,19)^g(d,10),b[y-7],T(b[y-15]),b[y-16]),p=R(f,E(c),S(c,a,s),u[y],b[y]),l=I(j(r),P(r,n,o)),f=s,s=a,a=c,c=I(i,p),i=o,o=n,n=r,r=I(p,l);return e[0]=I(r,e[0]),e[1]=I(n,e[1]),e[2]=I(o,e[2]),e[3]=I(i,e[3]),e[4]=I(c,e[4]),e[5]=I(a,e[5]),e[6]=I(s,e[6]),e[7]=I(f,e[7]),e}var B=function(t){function e(e,r,n){var i=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error(f);var u=n||{};return(i=t.call(this,e,r,n)||this).K=i.N,i.k=!0,i.F=-1,i.m=o(i.t,i.i,i.F),i.R=x,i.L=function(t){return t.slice()},i.B=U,i.g=function(t,r,n,o){return function(t,e,r,n,o){for(var i,u=15+(e+65>>>9<<4),a=e+r;t.length<=u;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[u]=4294967295&a,t[u-1]=a/c|0,i=0;i<t.length;i+=16)n=x(t.slice(i,i+16),n);return"SHA-224"===o?[n[0],n[1],n[2],n[3],n[4],n[5],n[6]]:n}(t,r,n,o,e)},i.U=U(e),i.p=512,i.T="SHA-224"===e?224:256,i.C=!1,u.hmacKey&&i.Y(d("hmacKey",u.hmacKey,i.F)),i}return m(e,t),e}(b),H=function(t,e){this.I=t,this.M=e};function D(t,e){var r;return e>32?(r=64-e,new H(t.M<<e|t.I>>>r,t.I<<e|t.M>>>r)):0!==e?(r=32-e,new H(t.I<<e|t.M>>>r,t.M<<e|t.I>>>r)):t}function K(t,e){var r;return e<32?(r=32-e,new H(t.I>>>e|t.M<<r,t.M>>>e|t.I<<r)):(r=64-e,new H(t.M>>>e|t.I<<r,t.I>>>e|t.M<<r))}function L(t,e){return new H(t.I>>>e,t.M>>>e|t.I<<32-e)}function G(t,e,r){return new H(t.I&e.I^~t.I&r.I,t.M&e.M^~t.M&r.M)}function F(t,e,r){return new H(t.I&e.I^t.I&r.I^e.I&r.I,t.M&e.M^t.M&r.M^e.M&r.M)}function N(t){var e=K(t,28),r=K(t,34),n=K(t,39);return new H(e.I^r.I^n.I,e.M^r.M^n.M)}function q(t,e){var r,n;r=(65535&t.M)+(65535&e.M);var o=(65535&(n=(t.M>>>16)+(e.M>>>16)+(r>>>16)))<<16|65535&r;return r=(65535&t.I)+(65535&e.I)+(n>>>16),n=(t.I>>>16)+(e.I>>>16)+(r>>>16),new H((65535&n)<<16|65535&r,o)}function Y(t,e,r,n){var o,i;o=(65535&t.M)+(65535&e.M)+(65535&r.M)+(65535&n.M);var c=(65535&(i=(t.M>>>16)+(e.M>>>16)+(r.M>>>16)+(n.M>>>16)+(o>>>16)))<<16|65535&o;return o=(65535&t.I)+(65535&e.I)+(65535&r.I)+(65535&n.I)+(i>>>16),i=(t.I>>>16)+(e.I>>>16)+(r.I>>>16)+(n.I>>>16)+(o>>>16),new H((65535&i)<<16|65535&o,c)}function X(t,e,r,n,o){var i,c;i=(65535&t.M)+(65535&e.M)+(65535&r.M)+(65535&n.M)+(65535&o.M);var u=(65535&(c=(t.M>>>16)+(e.M>>>16)+(r.M>>>16)+(n.M>>>16)+(o.M>>>16)+(i>>>16)))<<16|65535&i;return i=(65535&t.I)+(65535&e.I)+(65535&r.I)+(65535&n.I)+(65535&o.I)+(c>>>16),c=(t.I>>>16)+(e.I>>>16)+(r.I>>>16)+(n.I>>>16)+(o.I>>>16)+(i>>>16),new H((65535&c)<<16|65535&i,u)}function z(t,e){return new H(t.I^e.I,t.M^e.M)}function V(t){var e=K(t,1),r=K(t,8),n=L(t,7);return new H(e.I^r.I^n.I,e.M^r.M^n.M)}function Q(t){var e=K(t,14),r=K(t,18),n=K(t,41);return new H(e.I^r.I^n.I,e.M^r.M^n.M)}var J=[new H(u[0],3609767458),new H(u[1],602891725),new H(u[2],3964484399),new H(u[3],2173295548),new H(u[4],4081628472),new H(u[5],3053834265),new H(u[6],2937671579),new H(u[7],3664609560),new H(u[8],2734883394),new H(u[9],1164996542),new H(u[10],1323610764),new H(u[11],3590304994),new H(u[12],4068182383),new H(u[13],991336113),new H(u[14],633803317),new H(u[15],3479774868),new H(u[16],2666613458),new H(u[17],944711139),new H(u[18],2341262773),new H(u[19],2007800933),new H(u[20],1495990901),new H(u[21],1856431235),new H(u[22],3175218132),new H(u[23],2198950837),new H(u[24],3999719339),new H(u[25],766784016),new H(u[26],2566594879),new H(u[27],3203337956),new H(u[28],1034457026),new H(u[29],2466948901),new H(u[30],3758326383),new H(u[31],168717936),new H(u[32],1188179964),new H(u[33],1546045734),new H(u[34],1522805485),new H(u[35],2643833823),new H(u[36],2343527390),new H(u[37],1014477480),new H(u[38],1206759142),new H(u[39],344077627),new H(u[40],1290863460),new H(u[41],3158454273),new H(u[42],3505952657),new H(u[43],106217008),new H(u[44],3606008344),new H(u[45],1432725776),new H(u[46],1467031594),new H(u[47],851169720),new H(u[48],3100823752),new H(u[49],1363258195),new H(u[50],3750685593),new H(u[51],3785050280),new H(u[52],3318307427),new H(u[53],3812723403),new H(u[54],2003034995),new H(u[55],3602036899),new H(u[56],1575990012),new H(u[57],1125592928),new H(u[58],2716904306),new H(u[59],442776044),new H(u[60],593698344),new H(u[61],3733110249),new H(u[62],2999351573),new H(u[63],3815920427),new H(3391569614,3928383900),new H(3515267271,566280711),new H(3940187606,3454069534),new H(4118630271,4000239992),new H(116418474,1914138554),new H(174292421,2731055270),new H(289380356,3203993006),new H(460393269,320620315),new H(685471733,587496836),new H(852142971,1086792851),new H(1017036298,365543100),new H(1126000580,2618297676),new H(1288033470,3409855158),new H(1501505948,4234509866),new H(1607167915,987167468),new H(1816402316,1246189591)];function Z(t){return"SHA-384"===t?[new H(3418070365,a[0]),new H(1654270250,a[1]),new H(2438529370,a[2]),new H(355462360,a[3]),new H(1731405415,a[4]),new H(41048885895,a[5]),new H(3675008525,a[6]),new H(1203062813,a[7])]:[new H(s[0],4089235720),new H(s[1],2227873595),new H(s[2],4271175723),new H(s[3],1595750129),new H(s[4],2917565137),new H(s[5],725511199),new H(s[6],4215389547),new H(s[7],327033209)]}function W(t,e){var r,n,o,i,c,u,a,s,f,p,l,y,d,b,h,m,v=[];for(r=e[0],n=e[1],o=e[2],i=e[3],c=e[4],u=e[5],a=e[6],s=e[7],l=0;l<80;l+=1)l<16?(y=2*l,v[l]=new H(t[y],t[y+1])):v[l]=Y((void 0,void 0,void 0,b=K(d=v[l-2],19),h=K(d,61),m=L(d,6),new H(b.I^h.I^m.I,b.M^h.M^m.M)),v[l-7],V(v[l-15]),v[l-16]),f=X(s,Q(c),G(c,u,a),J[l],v[l]),p=q(N(r),F(r,n,o)),s=a,a=u,u=c,c=q(i,f),i=o,o=n,n=r,r=q(f,p);return e[0]=q(r,e[0]),e[1]=q(n,e[1]),e[2]=q(o,e[2]),e[3]=q(i,e[3]),e[4]=q(c,e[4]),e[5]=q(u,e[5]),e[6]=q(a,e[6]),e[7]=q(s,e[7]),e}var $=function(t){function e(e,r,n){var i=this;if("SHA-384"!==e&&"SHA-512"!==e)throw new Error(f);var u=n||{};return(i=t.call(this,e,r,n)||this).K=i.N,i.k=!0,i.F=-1,i.m=o(i.t,i.i,i.F),i.R=W,i.L=function(t){return t.slice()},i.B=Z,i.g=function(t,r,n,o){return function(t,e,r,n,o){for(var i,u=31+(e+129>>>10<<5),a=e+r;t.length<=u;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[u]=4294967295&a,t[u-1]=a/c|0,i=0;i<t.length;i+=32)n=W(t.slice(i,i+32),n);return"SHA-384"===o?[n[0].I,n[0].M,n[1].I,n[1].M,n[2].I,n[2].M,n[3].I,n[3].M,n[4].I,n[4].M,n[5].I,n[5].M]:[n[0].I,n[0].M,n[1].I,n[1].M,n[2].I,n[2].M,n[3].I,n[3].M,n[4].I,n[4].M,n[5].I,n[5].M,n[6].I,n[6].M,n[7].I,n[7].M]}(t,r,n,o,e)},i.U=Z(e),i.p=1024,i.T="SHA-384"===e?384:512,i.C=!1,u.hmacKey&&i.Y(d("hmacKey",u.hmacKey,i.F)),i}return m(e,t),e}(b),tt=[new H(0,1),new H(0,32898),new H(2147483648,32906),new H(2147483648,2147516416),new H(0,32907),new H(0,2147483649),new H(2147483648,2147516545),new H(2147483648,32777),new H(0,138),new H(0,136),new H(0,2147516425),new H(0,2147483658),new H(0,2147516555),new H(2147483648,139),new H(2147483648,32905),new H(2147483648,32771),new H(2147483648,32770),new H(2147483648,128),new H(0,32778),new H(2147483648,2147483658),new H(2147483648,2147516545),new H(2147483648,32896),new H(0,2147483649),new H(2147483648,2147516424)],et=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function rt(t){var e,r=[];for(e=0;e<5;e+=1)r[e]=[new H(0,0),new H(0,0),new H(0,0),new H(0,0),new H(0,0)];return r}function nt(t){var e,r=[];for(e=0;e<5;e+=1)r[e]=t[e].slice();return r}function ot(t,e){var r,n,o,i,c,u,a,s,f,p=[],l=[];if(null!==t)for(n=0;n<t.length;n+=2)e[(n>>>1)%5][(n>>>1)/5|0]=z(e[(n>>>1)%5][(n>>>1)/5|0],new H(t[n+1],t[n]));for(r=0;r<24;r+=1){for(i=rt(),n=0;n<5;n+=1)p[n]=(c=e[n][0],u=e[n][1],a=e[n][2],s=e[n][3],f=e[n][4],new H(c.I^u.I^a.I^s.I^f.I,c.M^u.M^a.M^s.M^f.M));for(n=0;n<5;n+=1)l[n]=z(p[(n+4)%5],D(p[(n+1)%5],1));for(n=0;n<5;n+=1)for(o=0;o<5;o+=1)e[n][o]=z(e[n][o],l[n]);for(n=0;n<5;n+=1)for(o=0;o<5;o+=1)i[o][(2*n+3*o)%5]=D(e[n][o],et[n][o]);for(n=0;n<5;n+=1)for(o=0;o<5;o+=1)e[n][o]=z(i[n][o],new H(~i[(n+1)%5][o].I&i[(n+2)%5][o].I,~i[(n+1)%5][o].M&i[(n+2)%5][o].M));e[0][0]=z(e[0][0],tt[r])}return e}function it(t){var e,r,n=0,o=[0,0],i=[4294967295&t,t/c&2097151];for(e=6;e>=0;e--)0==(r=i[e>>2]>>>8*e&255)&&0===n||(o[n+1>>2]|=r<<8*(n+1),n+=1);return n=0!==n?n:1,o[0]|=n,{value:n+1>4?o:[o[0]],binLen:8+8*n}}function ct(t){return l(it(t.binLen),t)}function ut(t,e){var r,n=it(e),o=e>>>2,i=(o-(n=l(n,t)).value.length%o)%o;for(r=0;r<i;r++)n.value.push(0);return n.value}var at=function(t){function e(e,r,n){var i=this,c=6,u=0,a=n||{};if(1!==(i=t.call(this,e,r,n)||this).numRounds){if(a.kmacKey||a.hmacKey)throw new Error(p);if("CSHAKE128"===i.o||"CSHAKE256"===i.o)throw new Error("Cannot set numRounds for CSHAKE variants")}switch(i.F=1,i.m=o(i.t,i.i,i.F),i.R=ot,i.L=nt,i.B=rt,i.U=rt(),i.C=!1,e){case"SHA3-224":i.p=u=1152,i.T=224,i.k=!0,i.K=i.N;break;case"SHA3-256":i.p=u=1088,i.T=256,i.k=!0,i.K=i.N;break;case"SHA3-384":i.p=u=832,i.T=384,i.k=!0,i.K=i.N;break;case"SHA3-512":i.p=u=576,i.T=512,i.k=!0,i.K=i.N;break;case"SHAKE128":c=31,i.p=u=1344,i.T=-1,i.C=!0,i.k=!1,i.K=null;break;case"SHAKE256":c=31,i.p=u=1088,i.T=-1,i.C=!0,i.k=!1,i.K=null;break;case"KMAC128":c=4,i.p=u=1344,i.X(n),i.T=-1,i.C=!0,i.k=!1,i.K=i.O;break;case"KMAC256":c=4,i.p=u=1088,i.X(n),i.T=-1,i.C=!0,i.k=!1,i.K=i.O;break;case"CSHAKE128":i.p=u=1344,c=i.j(n),i.T=-1,i.C=!0,i.k=!1,i.K=null;break;case"CSHAKE256":i.p=u=1088,c=i.j(n),i.T=-1,i.C=!0,i.k=!1,i.K=null;break;default:throw new Error(f)}return i.g=function(t,e,r,n,o){return function(t,e,r,n,o,i,c){var u,a,s=0,f=[],p=o>>>5,l=e>>>5;for(u=0;u<l&&e>=o;u+=p)n=ot(t.slice(u,u+p),n),e-=o;for(t=t.slice(u),e%=o;t.length<p;)t.push(0);for(t[(u=e>>>3)>>2]^=i<<u%4*8,t[p-1]^=2147483648,n=ot(t,n);32*f.length<c&&(a=n[s%5][s/5|0],f.push(a.M),!(32*f.length>=c));)f.push(a.I),0==64*(s+=1)%o&&(ot(null,n),s=0);return f}(t,e,0,n,u,c,o)},a.hmacKey&&i.Y(d("hmacKey",a.hmacKey,i.F)),i}return m(e,t),e.prototype.j=function(t,e){var r=function(t){var e=t||{};return{funcName:d("funcName",e.funcName,1,{value:[],binLen:0}),customization:d("Customization",e.customization,1,{value:[],binLen:0})}}(t||{});e&&(r.funcName=e);var n=l(ct(r.funcName),ct(r.customization));if(0!==r.customization.binLen||0!==r.funcName.binLen){for(var o=ut(n,this.p>>>3),i=0;i<o.length;i+=this.p>>>5)this.U=this.R(o.slice(i,i+(this.p>>>5)),this.U),this.A+=this.p;return 4}return 31},e.prototype.X=function(t){var e=function(t){var e=t||{};return{kmacKey:d("kmacKey",e.kmacKey,1),funcName:{value:[1128353099],binLen:32},customization:d("Customization",e.customization,1,{value:[],binLen:0})}}(t||{});this.j(t,e.funcName);for(var r=ut(ct(e.kmacKey),this.p>>>3),n=0;n<r.length;n+=this.p>>>5)this.U=this.R(r.slice(n,n+(this.p>>>5)),this.U),this.A+=this.p;this.l=!0},e.prototype.O=function(t){var e=l({value:this.u.slice(),binLen:this.h},function(t){var e,r,n=0,o=[0,0],i=[4294967295&t,t/c&2097151];for(e=6;e>=0;e--)0==(r=i[e>>2]>>>8*e&255)&&0===n||(o[n>>2]|=r<<8*n,n+=1);return o[(n=0!==n?n:1)>>2]|=n<<8*n,{value:n+1>4?o:[o[0]],binLen:8+8*n}}(t.outputLen));return this.g(e.value,e.binLen,this.A,this.L(this.U),t.outputLen)},e}(b);return function(){function t(t,e,r){if("SHA-1"==t)this._=new k(t,e,r);else if("SHA-224"==t||"SHA-256"==t)this._=new B(t,e,r);else if("SHA-384"==t||"SHA-512"==t)this._=new $(t,e,r);else{if("SHA3-224"!=t&&"SHA3-256"!=t&&"SHA3-384"!=t&&"SHA3-512"!=t&&"SHAKE128"!=t&&"SHAKE256"!=t&&"CSHAKE128"!=t&&"CSHAKE256"!=t&&"KMAC128"!=t&&"KMAC256"!=t)throw new Error(f);this._=new at(t,e,r)}}return t.prototype.update=function(t){return this._.update(t),this},t.prototype.getHash=function(t,e){return this._.getHash(t,e)},t.prototype.setHMACKey=function(t,e,r){this._.setHMACKey(t,e,r)},t.prototype.getHMAC=function(t,e){return this._.getHMAC(t,e)},t}()}()}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};return(()=>{"use strict";var t=n;t.ApiClient=r(32).ApiClient,t.ApiError=r(895).ApiError,t.ResponseError=r(654).ResponseError,t.TimeoutError=r(36).TimeoutError,t.MergeUsers=r(92).MergeUsers,t.AddDetailView=r(526).AddDetailView,t.AddPurchase=r(416).AddPurchase,t.AddRating=r(982).AddRating,t.AddCartAddition=r(542).AddCartAddition,t.AddBookmark=r(487).AddBookmark,t.SetViewPortion=r(125).SetViewPortion,t.RecommendItemsToUser=r(892).RecommendItemsToUser,t.RecommendItemsToItem=r(360).RecommendItemsToItem,t.RecommendNextItems=r(4).RecommendNextItems,t.RecommendItemSegmentsToUser=r(108).RecommendItemSegmentsToUser,t.RecommendItemSegmentsToItem=r(680).RecommendItemSegmentsToItem,t.RecommendItemSegmentsToItemSegment=r(456).RecommendItemSegmentsToItemSegment,t.RecommendItemsToItemSegment=r(88).RecommendItemsToItemSegment,t.SearchItems=r(480).SearchItems,t.SearchItemSegments=r(332).SearchItemSegments,t.Batch=r(813).Batch})(),n})()));
//# sourceMappingURL=recombee-api-client.min.js.map