UNPKG

recombee-js-api-client

Version:

Client-side js library for easy use of the Recombee recommendation API

2 lines 90.7 kB
/*! For license information please see recombee-api-client.min.js.LICENSE.txt */ !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={56:(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(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,c=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new x(n||[]);return c(i,"_invoke",{value:C(t,r,u)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var y="suspendedStart",d="suspendedYield",b="executing",m="completed",v={};function w(){}function g(){}function O(){}var S={};p(S,a,(function(){return this}));var P=Object.getPrototypeOf,j=P&&P(P(k([])));j&&j!==r&&i.call(j,a)&&(S=j);var I=O.prototype=w.prototype=Object.create(S);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,c,u,a){var s=h(t[o],t,c);if("throw"!==s.type){var f=s.arg,p=f.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,u,a)}),(function(t){r("throw",t,u,a)})):e.resolve(p).then((function(t){f.value=t,u(f)}),(function(t){return r("throw",t,u,a)}))}a(s.arg)}var o;c(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function C(e,r,n){var o=y;return function(i,c){if(o===b)throw Error("Generator is already running");if(o===m){if("throw"===i)throw c;return{value:t,done:!0}}for(n.method=i,n.arg=c;;){var u=n.delegate;if(u){var a=T(u,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=b;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var c=i.arg;return c?c.done?(r[e.resultName]=c.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function k(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,c=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return c.next=c}}throw new TypeError(n(e)+" is not iterable")}return g.prototype=O,c(I,"constructor",{value:O,configurable:!0}),c(O,"constructor",{value:g,configurable:!0}),g.displayName=p(O,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,p(t,f,"GeneratorFunction")),t.prototype=Object.create(I),t},e.awrap=function(t){return{__await:t}},_(E.prototype),p(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var c=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},_(I),p(I,f,"Generator"),p(I,a,(function(){return this})),p(I,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],u=c.completion;if("root"===c.tryLoc)return n("end");if(c.tryLoc<=this.prev){var a=i.call(c,"catchLoc"),s=i.call(c,"finallyLoc");if(a&&s){if(this.prev<c.catchLoc)return n(c.catchLoc,!0);if(this.prev<c.finallyLoc)return n(c.finallyLoc)}else if(a){if(this.prev<c.catchLoc)return n(c.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return n(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=t,c.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function i(t,e,r,n,o,i,c){try{var u=t[i](c),a=u.value}catch(t){return void r(t)}u.done?e(a):Promise.resolve(a).then(n,o)}function c(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,u(n.key),n)}}function u(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 a=r(77),s=r(552),f=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,this.future_v6_fetch="future_v6_fetch"in this.options&&this.options.future_v6_fetch},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){if(this.future_v6_fetch){if(!("undefined"==typeof globalThis?window.Promise:globalThis.Promise))throw new Error("future_v6_fetch requires Promises to be available.");if(!this.async)throw new Error("future_v6_fetch cannot be used with synchronous requests.");return void 0===e?this._sendFetch(t):this._sendFetch(t).then((function(t){return e(null,t)})).catch(e)}return this._sendXhr(t,e)}},{key:"_sendFetch",value:(r=o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this._getUrl(e),t.prev=1,t.next=4,fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e.bodyParameters()),signal:AbortSignal.timeout(e.timeout)});case 4:if(!(n=t.sent).ok){t.next=11;break}return t.next=8,n.json();case 8:return t.abrupt("return",t.sent);case 11:return t.t0=s.ResponseError,t.t1=e,t.t2=n.status,t.next=16,n.text();case 16:throw t.t3=t.sent,new t.t0(t.t1,t.t2,t.t3);case 18:t.next=27;break;case 20:if(t.prev=20,t.t4=t.catch(1),"TimeoutError"!==t.t4.name){t.next=26;break}throw new s.TimeoutError(e);case 26:throw t.t4;case 27:case"end":return t.stop()}}),t,this,[[1,20]])})),n=function(){var t=this,e=arguments;return new Promise((function(n,o){var c=r.apply(t,e);function u(t){i(c,n,o,u,a,"next",t)}function a(t){i(c,n,o,u,a,"throw",t)}u(void 0)}))},function(t){return n.apply(this,arguments)})},{key:"_sendXhr",value:function(t,e){var r="undefined"==typeof globalThis?window.Promise:globalThis.Promise;if(void 0===e&&r){var n=this._sendXhr.bind(this);return new r((function(e,r){n(t,(function(t,n){return t?r(t):e(n)}))}))}var o=this._getUrl(t),i=new XMLHttpRequest;i.open("POST",o,this.async),i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Content-Type","application/json"),this.async&&(i.timeout=t.timeout),i.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 s.ResponseError(t,this.status,this.responseText))},i.ontimeout=function(){if(e)return e(new s.TimeoutError(t))},i.send(JSON.stringify(t.bodyParameters()))}},{key:"_getUrl",value:function(t){var e=this._signUrl(t.path);return(this.useHttps||t.ensureHttps?"https://":"http://")+this.baseUri+e}},{key:"_signUrl",value:function(t){var e="/"+this.databaseId+t;e+=(-1==t.indexOf("?")?"?":"&")+"frontend_timestamp="+parseInt((new Date).getTime()/1e3);var r=new a("SHA-1","TEXT");return r.setHMACKey(this.publicToken,"TEXT"),r.update(e),e+"&frontend_sign="+r.getHMAC("HEX")}}],e&&c(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n}();e.ApiClient=f},231:(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},552:(t,e,r)=>{"use strict";e.ApiError=r(231).ApiError,e.ResponseError=r(902).ResponseError,e.TimeoutError=r(492).TimeoutError},902:(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(231).ApiError);e.ResponseError=u},492:(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(231).ApiError);e.TimeoutError=u},943:(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(568).Request);e.AddBookmark=s},974:(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(568).Request);e.AddCartAddition=s},550:(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(568).Request);e.AddDetailView=s},672:(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(568).Request);e.AddPurchase=s},262:(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(568).Request);e.AddRating=s},405:(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(568),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},372:(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(568).Request);e.MergeUsers=s},16:(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(568).Request);e.RecommendItemSegmentsToItemSegment=s},592:(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(568).Request);e.RecommendItemSegmentsToItem=s},991:(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(568).Request);e.RecommendItemSegmentsToUser=s},112:(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(568).Request);e.RecommendItemsToItemSegment=s},171:(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