1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35],{5971:function(t,e,n){var i,r=n(3454),s=n(8764).lW;i=(t,e,i,o,a,c,u,h,l)=>(()=>{var p={1:t=>{"use strict";t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,r=void 0,s=void 0,o=[];return function(){var c,u="function"==typeof e?e():e,h=(new Date).getTime(),l=!i||h-i>u;i=h;for(var p=arguments.length,d=Array(p),f=0;f<p;f++)d[f]=arguments[f];if(l&&n.leading)return n.accumulate?Promise.resolve(t.call(this,[d])).then(function(t){return t[0]}):Promise.resolve(t.call.apply(t,[this].concat(d)));if(r?clearTimeout(s):((c={}).promise=new Promise(function(t,e){c.resolve=t,c.reject=e}),r=c),o.push(d),s=setTimeout(a.bind(this),u),n.accumulate){var v=o.length-1;return r.promise.then(function(t){return t[v]})}return r.promise};function a(){var e=r;clearTimeout(s),Promise.resolve(n.accumulate?t.call(this,o):t.apply(this,o[o.length-1])).then(e.resolve,e.reject),o=[],r=null}}},12:t=>{"use strict";t.exports=h},33:t=>{"use strict";t.exports=l},266:t=>{"use strict";t.exports=i},283:(t,e,n)=>{"use strict";var i=n(416);t.exports=function(t,e){if(!i(t)&&"function"!=typeof t)return{};var n={};if("string"==typeof e)return e in t&&(n[e]=t[e]),n;for(var r=e.length,s=-1;++s<r;){var o=e[s];o in t&&(n[o]=t[o])}return n}},319:(t,e,n)=>{"use strict";var i=n(12),r="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=i.useState,o=i.useEffect,a=i.useLayoutEffect,c=i.useDebugValue;function u(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!r(t,n)}catch(t){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),i=s({inst:{value:n,getSnapshot:e}}),r=i[0].inst,h=i[1];return a(function(){r.value=n,r.getSnapshot=e,u(r)&&h({inst:r})},[t,n,e]),o(function(){return u(r)&&h({inst:r}),t(function(){u(r)&&h({inst:r})})},[t]),c(n),n};e.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:h},416:t=>{"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},483:t=>{"use strict";t.exports=c},517:t=>{"use strict";t.exports=a},530:(t,e)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,function(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=s(e,n));return e}(n)))}return t}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(r.default=r,t.exports=r):void 0===(n=(function(){return r}).apply(e,[]))||(t.exports=n)}()},625:e=>{"use strict";e.exports=t},634:(t,e,n)=>{"use strict";t.exports=n(319)},646:t=>{"use strict";t.exports=u},816:t=>{"use strict";t.exports=o},824:t=>{"use strict";t.exports=e}},d={};function f(t){var e=d[t];if(void 0!==e)return e.exports;var n=d[t]={exports:{}};return p[t](n,n.exports,f),n.exports}f.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return f.d(e,{a:e}),e},f.d=(t,e)=>{for(var n in e)f.o(e,n)&&!f.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},f.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),f.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var v={};return(()=>{"use strict";let t,e,i,o,a,c,u,h;f.r(v),f.d(v,{NewsSearch:()=>sM,WidgetVariant:()=>sk});var l,p={};f.r(p),f.d(p,{hasBrowserEnv:()=>eA,hasStandardBrowserEnv:()=>eT,hasStandardBrowserWebWorkerEnv:()=>eL,navigator:()=>eP,origin:()=>eO});var d=f(12),m=f.n(d);let g={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},w=new Uint8Array(16),y=[];for(let t=0;t<256;++t)y.push((t+256).toString(16).slice(1));let b=function(e,n,i){if(g.randomUUID&&!n&&!e)return g.randomUUID();let r=(e=e||{}).random||(e.rng||function(){if(!t&&!(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(w)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){i=i||0;for(let t=0;t<16;++t)n[i+t]=r[t];return n}return function(t,e=0){return y[t[e+0]]+y[t[e+1]]+y[t[e+2]]+y[t[e+3]]+"-"+y[t[e+4]]+y[t[e+5]]+"-"+y[t[e+6]]+y[t[e+7]]+"-"+y[t[e+8]]+y[t[e+9]]+"-"+y[t[e+10]]+y[t[e+11]]+y[t[e+12]]+y[t[e+13]]+y[t[e+14]]+y[t[e+15]]}(r)};var S,C=f(646);(so=S||(S={})).RECOMMENDATION="recommendation",so.PREVIEW_SEARCH="preview_search",so.SEARCH_RESULTS="content_grid",so.CONTENT_BLOCK="content_block",so.QUESTIONS="questions_answers",so.HTML_BLOCK="html_block",so.BANNER="banner",so.SEO="seo";let E=(t,e,n="")=>{let i=(t=>{let e=t.split("_");return`${e[0]}${e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}`})(e);return`${t}${i[0].toUpperCase()+i.slice(1)}${n}`},A=t=>{let e=typeof t;return null!==t&&("object"===e||"function"===e)},P=new Set(["__proto__","prototype","constructor"]),T=new Set("0123456789");function L(t){let e=[],n="",i="start",r=!1;for(let s of t)switch(s){case"\\":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");r&&(n+=s),i="property",r=!r;break;case".":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="property";break}if(r){r=!1,n+=s;break}if(P.has(n))return[];e.push(n),n="",i="property";break;case"[":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="index";break}if(r){r=!1,n+=s;break}if("property"===i){if(P.has(n))return[];e.push(n),n=""}i="index";break;case"]":if("index"===i){e.push(Number.parseInt(n,10)),n="",i="indexEnd";break}if("indexEnd"===i)throw Error("Invalid character after an index");default:if("index"===i&&!T.has(s))throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");"start"===i&&(i="property"),r&&(r=!1,n+="\\"),n+=s}switch(r&&(n+="\\"),i){case"property":if(P.has(n))return[];e.push(n);break;case"index":throw Error("Index was not closed");case"start":e.push("")}return e}function O(t,e){if("number"!=typeof e&&Array.isArray(t)){let n=Number.parseInt(e,10);return Number.isInteger(n)&&t[n]===t[e]}return!1}function R(t,e){if(O(t,e))throw Error("Cannot use string index")}function I(t,e,n){if(!A(t)||"string"!=typeof e)return t;let i=t,r=L(e);for(let e=0;e<r.length;e++){let i=r[e];R(t,i),e===r.length-1?t[i]=n:A(t[i])||(t[i]="number"==typeof r[e+1]?[]:{}),t=t[i]}return i}function D(t,e){let n={};if(Array.isArray(e))for(let i of e){let e=Object.getOwnPropertyDescriptor(t,i);e?.enumerable&&Object.defineProperty(n,i,e)}else for(let i of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,i);r.enumerable&&e(i,t[i],t)&&Object.defineProperty(n,i,r)}return n}let _=t=>t&&"object"==typeof t&&!Array.isArray(t);function k(t,e,{mutate:n=!1}={}){let i=n?t:Object.assign({},t);return _(t)&&_(e)&&Object.keys(e).forEach(n=>{_(e[n])&&n in t?i[n]=k(t[n],e[n]):Object.assign(i,{[n]:e[n]})}),i}let x=t=>{if("object"!=typeof t||null===t)return t;let e=Array.isArray(t)?[]:{};for(let n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=x(t[n]));return e};var N=f(283);class G{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"props",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"dataSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:{}})}takeSnapshot(){return this.dataSnapshot=JSON.parse(JSON.stringify(this.data)),this}restoreSnapshot(){return this.data=JSON.parse(JSON.stringify(this.dataSnapshot)),this.onChange("@restore-snapsh
1ot",null),this}set(t,e,n){if(t in this.props){let i=this.getPropExportKey(t,n);if(this.get(t,void 0)!==e){let n=this.props[t];void 0===e?this.removeKey(n.parent?.key,n.keyPath[0]):I(this.data,i,e),this.onChange(t,e)}}return this}get(t,e,n){return t in this.props?function(t,e,n){if(!A(t)||"string"!=typeof e)return void 0===n?t:n;let i=L(e);if(0===i.length)return n;for(let e=0;e<i.length;e++){let r=i[e];if(null==(t=O(t,r)?e===i.length-1?void 0:null:t[r])){if(e!==i.length-1)return n;break}}return void 0===t?n:t}(this.data,this.getPropExportKey(t,n),e):e}resetValue(t,e){if(t in this.props){let n=this.props[t],i=n.initialValue?n.initialValue():void 0;return void 0===i&&e&&n.parent&&"map"===n.parent.type?this.removeKey(n.parent.key,e):this.set(t,i,e)}return this}getMapExportKey(t,e){return t.map(t=>"#KEY#"===t?e:t)}getPropExportKey(t,e){if(t in this.props){let n=this.props[t].exportKey;return e?this.getMapExportKey(n,e).join("."):n.join(".")}return""}getValue(t,e,n){return t in this.props?this.get(t,e,n):e}setValue(t,e,n){return t in this.props?"array"===this.props[t].type&&0===e.length?this.resetValue(t,n):this.set(t,e,n):this}removeKey(t,e){if(!t)return this.data=function(t,e){if(Array.isArray(e)){let n=new Set(e);return D(t,t=>!n.has(t))}return D(t,(t,n,i)=>!e(t,n,i))}(this.data,[e]),this;let n=this.getValue(t,{});return function(t,e){if(!A(t)||"string"!=typeof e)return 0;let n=L(e);for(let e=0;e<n.length;e++){let i=n[e];if(R(t,i),e===n.length-1)return delete t[i],!0;if(!A(t=t[i]))return!1}}(n,"string"==typeof e?e:`[${e}]`),0===Object.keys(n).length&&(n=void 0),this.setValue(t,n)}updateValue(t,e,n){return this.setValue(t,k(this.getValue(t,{},n),e),n)}addValue(t,e,n){return t in this.props&&"array"===this.props[t].type?this.setValue(t,this.getValue(t,[],n).concat(e),n):this}removeValue(t,e,n=t=>t!==e,i){return t in this.props&&"array"===this.props[t].type&&this.setValue(t,this.getValue(t,[],i).filter(t=>n(t,e)),i),this}load(t,e=!1){return this.data=t.toJson(),e&&this.onChange("load","load"),this}transformJson(t){return t}toJson(...t){return 0===Object.keys(this.data).length?this.transformJson(void 0):0===t.length?this.transformJson(x(this.data)):this.transformJson(N(x(this.data),t))}onChange(t,e){this.listeners.forEach(n=>{n.onChange(this,t,e)})}addListeners(t){t.forEach(t=>this.addListener(t))}addListener(t){this.listeners.find(e=>e===t)||this.listeners.push(t)}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}}function F(t,e){return(F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function U(t){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t){return(j="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})(t)}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let B=(t,e,n)=>{let{name:i=t}=e;return n?`${n.key}.${i}`:i},V=(t,{parent:e},n,i=0)=>{if("map"===e?.type){if(t.length<n-i+1)throw Error("Invalid number of arguments");if("string"!=typeof t[0])throw Error(`Invalid map key argument: ${t[0]}`);let e=t.slice(1);return[...Array(n).fill(void 0).map((t,n)=>e[n]),t[0]]}return t},M=(t,e,n,i,r)=>{let s={};return Object.keys(e).forEach(o=>{let{key:a,methodKey:c,config:u,config:{accessProp:h,exportKey:l,setter:p,getter:d,type:f,model:v,initialValue:m}}=((t,e,n)=>{let i;let{exportKey:r=[t],getter:s,setter:o}=n,a="map"===e?.type,c=B(t,n,e),u=e?`${e.accessProp}.${t}`:t,h=[...a?["#KEY#"]:[],..."__constructor__"===t?[]:r],l=e?.exportKey?.concat(...h)||h,p=(i=c,"__constructor__"===t&&(i=B(t,n,e?.parent||null)),i.replace(/\./g,"_")),d=s||E("get",p),f=o||E("set",p);return{config:{...n,key:c,accessProp:u,exportKey:l,keyPath:h,getter:d,setter:f,parent:e},key:c,methodKey:p}})(o,t,e[o]),g={type:f,...r};s[a]=u;let w=m?m():void 0;if(void 0===w||a.includes("#KEY#")||I(n,l.join("."),w),i.push({typeOptions:g,prop:h,key:d,value:function(...t){return this.getValue(a,...V(t,g,1,1))}}),i.push({typeOptions:g,prop:h,key:p,value:function(...t){return this.setValue(a,...V(t,g,1))}}),i.push({typeOptions:g,prop:h,key:E("reset",c),value:function(...t){return this.resetValue(a,...V(t,g,0))}}),"array"===f){let t=c.replace(/s$/,"").replace(/ie$/,"y");i.push({typeOptions:g,prop:h,key:E("add",t),value:function(...t){return this.addValue(a,...V(t,g,1))}}),i.push({typeOptions:g,prop:h,key:E("remove",t),value:function(...t){return this.removeValue(a,...V(t,g,2,1))}})}else"model"===f&&v?(Object.assign(s,M(u,v.properties,n,i,r)),i.push({typeOptions:g,prop:h,key:E("update",c),value:function(...t){return this.updateV
1alue(a,...V(t,g,1))}})):"map"===f&&v&&Object.assign(s,M(u,v.properties,n,i,{parent:u,...r}))}),s},K=t=>{let{name:e,properties:n={}}=t,i={},r=[],s=M(null,n,i,r);!function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&F(t,e)}(a,G);let o=function(t){let e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){let n;let i=U(t);return n=e?Reflect.construct(i,arguments,U(this).constructor):i.apply(this,arguments),function(t,e){if(e&&("object"===j(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(a);function a(...t){let e=o.call.apply(o,[this].concat(t));return q(e,"listeners",[]),q(e,"props",s),q(e,"data",JSON.parse(JSON.stringify(i))),e}return r&&function(t,e){for(let n=0;n<e.length;n++){let i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(a.prototype,r),Object.defineProperty(a,"name",{value:e}),a},Q={name:"Content",properties:{fields:{type:"array"}}},W={name:"SearchFilter",properties:{type:{},name:{required:!0},values:{type:"array",required:!0}}},H={name:"Rule",properties:{behaviors:{}
1,blacklist:{type:"model",model:{name:"Blacklist",properties:{filter:{type:"model",model:W,required:!0}}}},boost:{type:"array",model:{name:"Boost",properties:{filter:{type:"model",model:W,required:!0},slots:{type:"array",required:!0}}}},bury:{type:"model",model:{name:"Bury",properties:{filter:{type:"model",model:W,required:!0}}}},include:{type:"array",model:{name:"Include",properties:{filter:{type:"model",model:W,required:!0},slots:{type:"array",required:!0}}}},pin:{type:"array",model:{name:"Pin",properties:{id:{required:!0},slot:{type:"array",required:!0}}}}}},$={name:"FacetSort",properties:{name:{required:!0},order:{required:!0}}};(sa=sm||(sm={})).HARD_FILTERS="hard_filters",sa.OTHER_FACET_VALUES="other_facet_values",sa.OWN_VALUES="own_values";let J={name:"WidgetItem",buildInterface:!0,properties:{entity:{required:!0},rfk_id:{required:!0,name:"rfkId"},recommendations:{type:"model",model:{name:"Recommendations",properties:{content:{type:"model",model:Q},filter:{type:"model",model:W},recipe:{type:"model",model:{name:"RecommendationsRecipe",properties:{id:{},version:{}}}},limit:{},rule:{type:"model",model:H}}}},questions:{type:"model",model:{name:"Questions",properties:{keyphrase:{},exact_answer:{type:"model",model:{name:"ExactAnswer",properties:{query_types:{type:"array"}}}},related_questions:{type:"model",model:{name:"RelatedQuestions",properties:{limit:{},offset:{}}}}}}},rfk_flags:{type:"array",name:"rfkFlags"},search:{type:"model",model:{name:"Search",properties:{sort:{type:"model",model:{name:"Sort",properties:{choices:{},value:{type:"model",model:{name:"SortItem",properties:{name:{required:!0},order:{}}},exportKey:["value[0]"],name:"criteria"}}}},content:{type:"model",model:Q},facet:{type:"model",model:{name:"Facet",properties:{all:{},max:{},sort:{type:"model",model:$},types:{type:"array",model:{name:"FacetType",properties:{after:{},exclude:{type:"array"},filter:{},filtering_options:{type:"array"},keyphrase:{},max:{},min_count:{},name:{required:!0},sort:{type:"array",model:$}}}}}}},filter:{},group_by:{},limit:{},offset:{},personalization:{type:"model",model:{name:"Personalization",properties:{algorithm:{},fields:{type:"array"},ids:{type:"array"}}}},query:{type:"model",model:{name:"Query",properties:{highlight:{type:"model",model:{name:"Highlight",properties:{fields:{type:"array",required:!0},fragment_size:{},post_tag:{type:"string"},pre_tag:{type:"string"}}}},keyphrase:{required:!0},operator:{},relevance:{type:"array",model:{name:"Relevance",properties:{analyzer:{required:!0},name:{required:!0},weight:{}}}}}}},ranking:{type:"array",model:{name:"Ranking",properties:{name:{required:!0},weight:{}}}},rule:{type:"model",model:H},suggestion:{type:"array",model:{name:"Suggestion",properties:{exclude:{},keyphrase_fallback:{},max:{},name:{required:!0}}}},swatch:{type:"model",model:{name:"Swatch",properties:{fields:{type:"array"},group_by:{},max:{}}}}}}},sources:{type:"array"},appearance:{type:"model",model:{name:"Appearance",properties:{templates:{type:"model",model:{name:"Templates",properties:{sections:{type:"array"},devices:{type:"array"},keep_variables:{},keep_original_css:{}}}},variables:{type:"model",model:{name:"Variables",properties:{sections:{type:"array"}}}}}}}}},z=K(J);class Y extends z{constructor(t){super(),this.setRfkId(t)}setSearchFilter(t){return this.setValue("search.filter",t.toJson()),this}}let X=t=>{let e=new Y(t);return e.setAppearance({}),e.setAppearanceTemplates({}),e.setAppearanceVariables({}),e};class Z extends Y{constructor(){super(...arguments),Object.defineProperty(this,"facetTypeFiltersType",{enumerable:!0,configurable:!0,writable:!0,value:"or"})}buildFacetTypeFilters(t,e="or"){if(0!==t.length)return{type:e,values:t}}setSearchFacetTypeFilterType(t){return this.facetTypeFiltersType=t,this}getSearchFacetTypeFilterType(){return this.facetTypeFiltersType}setSearchFacetType(t,e){let n=this.getSearchFacetTypes()||[];return n.find(({name:e})=>e===t)?this.setSearchFacetTypes(n.map(n=>n.name===t?{...e,name:t}:n)):this.setSearchFacetTypes([...n,{...e,name:t}]),this}updateSearchFacetType(t,e){let n=this.getSearchFacetTypes()||[];return this.setSearchFacetType(t,{...n.find(({name:e})=>e===t),...e}),this}addSearchFacetTypeFilter(t,e,n="or"){let i=this.getSearchFacetTypes()||[],r=i.find(({name:e})=>e===t)?.filter?.values||[];return this.updateSearchFacetType(t,{filter:this.buildFacetTypeFilters([...r,e],n)}),this}resetSearchFacetTypeFilter(t){return this.updateSearchFacetType(t,{filter:void 0}),this}removeSearchFacetTypeFilter(t,e){let n=this.getSearchFacetTypes()||[],i=n.find(({name:e})=>e===t)?.filter?.values||[];return this.updateSearchFacetType(t,{filter:this.buildFacetTypeFilters(i.filter(t=>!function t(e,n){if(typeof e!=typeof n)return!1;if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1;return!0}{let i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!1;for(let r of i)if(!t(e[r],n[r]))return!1;return!0}}return e===n}(t,e)))}),this}resetSearchFacetTypeFilters(){return(this.getSearchFacetTypes()||[]).forEac
1h(({name:t})=>{this.updateSearchFacetType(t,{filter:void 0})}),this}}let tt={[S.RECOMMENDATION]:t=>{let e=new Y(t);return e.setRecommendationsContent({}),e},[S.SEARCH_RESULTS]:t=>{let e=new Z(t);return e.setSearchContent({}),e.setSearchFacetAll(!0),e.setSearchOffset(0),e.setSearchSortChoices(!0),e},[S.PREVIEW_SEARCH]:t=>{let e=new Y(t);return e.setSearchContent({}),e},[S.QUESTIONS]:t=>{let e=new Z(t);return e.setQuestionsRelatedQuestionsLimit(5),e.setQuestionsExactAnswer({}),e},[S.CONTENT_BLOCK]:X,[S.HTML_BLOCK]:X,[S.SEO]:X,[S.BANNER]:X},te={name:"Context",file:"context",buildInterface:!0,properties:{browser:{type:"model",model:{name:"ContextBrowser",file:"browser",properties:{user_agent:{},device:{},app_type:{}}}},campaign:{type:"model",model:{name:"ContextCampaign",properties:{utm_source:{},utm_medium:{},utm_campaign:{},utm_term:{},utm_content:{}}}},geo:{type:"model",model:{name:"ContextGeo",properties:{ip:{},location:{type:"model",model:{name:"ContextGeoLocation",properties:{lat:{required:!0},lon:{required:!0}}}}}}},ids:{type:"map",model:{name:"ContextEntityIds",properties:{__constructor__:{type:"array",name:"entityIds"}}},mapKey:"entity",mapKeyType:"Entity"},locale:{type:"model",model:{name:"ContextLocale",properties:{country:{required:!0},language:{required:!0}}}},page:{type:"model",model:{name:"ContextPage",properties:{uri:{required:!0},custom:{}}}},store:{type:"model",model:{name:"ContextStore",properties:{group_id:{required:!0},id:{required:!0}}}},time:{type:"model",model:{name:"ContextTime",properties:{epoch:{}}}},user:{type:"model",model:{name:"ContextUser",properties:{uuid:{required:!0},groups:{type:"array",name:"groups"},custom:{}}}}}},tn=K(te);class ti extends tn{}class tr{static get(){return this.context}static toJson(){if(this.context){let t=this.context.toJson();return{...t.browser?{browser:t.browser}:{},...t.geo?{geo:t.geo}:{},...t.page?{page:{...t.page,...t.locale?{...t.locale.country?{locale_country:t.locale.country}:{},...t.locale.language?{locale_language:t.locale.language}:{}}:{}}}:{},...t.user?{user:t.user}:{}}}return{}}}Object.defineProperty(tr,"context",{enumerable:!0,configurable:!0,writable:!0,value:new ti});let ts=t=>0===Object.keys(t||{}).length,to=t=>void 0===t,ta=t=>{try{return t?JSON.parse(t):""}catch(e){return t}},tc=(t={})=>"undefined"!=typeof window?window:t;(sc=sg||(sg={}))[sc.NONE=0]="NONE",sc[sc.ERROR=1]="ERROR",sc[sc.WARN=2]="WARN",sc[sc.INFO=3]="INFO",sc[sc.DEBUG=4]="DEBUG",sc[sc.TRACE=5]="TRACE";let tu={none:sg.NONE,error:sg.ERROR,warn:sg.WARN,info:sg.INFO,debug:sg.DEBUG,trace:sg.TRACE},th="Sitecore Search SDK",tl=[console],tp=new class{constructor(t,e=sg.NONE,n=th){Object.defineProperty(this,"NONE",{enumerable:!0,configurable:!0,writable:!0,value:sg.NONE}),Object.defineProperty(this,"ERROR",{enumerable:!0,configurable:!0,writable:!0,value:sg.ERROR}),Object.defineProperty(this,"WARN",{enumerable:!0,configurable:!0,writable:!0,value:sg.WARN}),Object.defineProperty(this,"INFO",{enumerable:!0,configurable:!0,writable:!0,value:sg.INFO}),Object.defineProperty(this,"DEBUG",{enumerable:!0,configurable:!0,writable:!0,value:sg.DEBUG}),Object.defineProperty(this,"TRACE",{enumerable:!0,configurable:!0,writable:!0,value:sg.TRACE}),Object.defineProperty(this,"transports",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:sg.NONE}),Object.defineProperty(this,"namespace",{enumerable:!0,configurable:!0,writable:!0,value:th}),this.transports=t,this.namespace=n,this.setLogLevel(e)}setLogLevel(t){if("string"!=typeof t)this.logLevel=t;else{if(!tu[t])throw Error(`Logger :: Invalid logLevel (${t})`);this.logLevel=tu[t]}}send(t,e,...n){try{this.logLevel>=t&&this.transports.forEach(t=>{t[e](this.namespace," ::: ",...n)})}catch(t){console.error(t)}}error(...t){return this.send(sg.ERROR,"error",...t)}warn(...t){return this.send(sg.WARN,"warn",...t)}info(...t){return this.send(sg.INFO,"info",...t)}debug(...t){return this.send(sg.DEBUG,"debug",...t)}trace(...t){return this.send(sg.TRACE,"log",...t)}}(tl),td={dev:"https://discover-dev.sitecore-staging.cloud",staging:"https://discover-staging.sitecore-staging.cloud",uat:"https://discover-uat.sitecore-staging.cloud",prod:"https://discover.sitecorecloud.io",prodEu:"https://discover-euc1.sitecorecloud.io",apse2:"https://discover-apse2.sitecorecloud.io"},tf={australiaEast:"https://australiaeast-integrations.ordercloud.io",europeWest:"https://westeurope-integrations.ordercloud.io",japanEast:"https://japaneast-integrations.ordercloud.io",usEast:"https://useast-integrations.ordercloud.io",usWest:"https://uswest-integrations.ordercloud.io",usWestQa:"https://uswest-integrations.ordercloud-qa.com"},tv="/event/{{key}}/v4/publish",tm=(t,e)=>{let n=Object.assign({},t,e),{orderCloudRegion:i="usWest",env:r="prod",discoverDomainId:s}=e;if(!s)throw Error("{discoverDomainId} has not been provided.");return n.domainId=s,n.connector="oc",Object.assign(n,{useAccessToken:!0,apiDomain:tf[i],searchUrl:`${tf[i]}${"/api/v1/search/{{domain}}".replace("{{domain}}",s)}`,eventUrl:`${td[r]}${tv.replace("{{key}}",s)}`})},tg=t=>{let e=t.split("-");return 2===e.length&&e[1]||""},tw=(t,e)=>{let n;let i=Object.assign({},t,e),{env:r="prod",customerKey:s=""}=i,{serviceHost:o,apiKey:a}=e,c=ty(s);if(!c)throw Error(`Invalid customerKey: "${s}". It should match the following pattern: (\\d+)-(\\d+). Example: 11111-2222222`);let[u,h]=c;if(Object.assign(i,{domainId:u,domainHash:h}),i.connector="sitecore",!a&&!o)throw Error('Invalid configuration: "apiKey" has not been set but not serviceHost provided. Please, review your domain configuration');return Object.assign(i,(n=td[r],a?{apiDomain:n,searchUrl:`${n}${"/discover/v2/{{key}}".replace("{{key}}",tg(s))}`,eventUrl:`${n}${tv.replace("{{key}}",s)}`}:{apiDomain:o,searchUrl:`${o}/api/discover/v2`,eventUrl:`${o}/api/event/v4/publish`}))},ty=t=>{if(t){let e=t.match(/^(\d+)-(\d+)$/);if(e)return[e[1],e[2]]}return null},tb={apiDomain:"",apiKey:"",clientId:"",connector:"sitecore",cookieOptions:{},customerKey:"",debug:!1,domainHash:"",domainId:"",env:"prod",eventUrl:"",orderCloudRegion:"usWest",publicSuffix:!1,searchUrl:"",tokenDomain:"",tokenUrl:"",trackConsent:!0,useAccessToken:!1,userId:null},tS=t=>tb[t],tC=()=>tb,tE=()=>{let t=tc({location:{hostname:""}}),{publicSuffix:e}=tC();return e?t.location.hostname:t.location.hostname.split(".").reverse().splice(0,2).reverse().join(".")},tA=Date.now(),tP=((t={})=>"undefined"!=typeof document?document:t)({cookie:""});tP.cookie||(tP.cookie="");class tT{getCookieValue(t,e){let n=t.slice(e.length+1,t.length);return n?decodeURIComponent(n):""}getCookieFromBrowser(t){let e=tP.cookie.split("; ");for(let n=0;n<e.length;
1n++)if(e[n].slice(0,t.length)===t)return this.getCookieValue(e[n],t);return""}setCookieInBrowser(t,e,n){let i=new Date,r=encodeURIComponent(e);i.setMilliseconds(i.getMilliseconds()+n),r+=`;domain=${tE()};path=/;`+(n?`;expires=${i.toUTCString()}`:"")+";secure;SameSite=None;",tP.cookie=`${t}=${r}`}removeCookieFromBrowser(t){tP.cookie=`${t}=;domain=${tE()};path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;secure;SameSite=None`}removeCachedCookie(t){this.removeCookieFromBrowser(t)}set(t,e,n){if(e){let i="object"==typeof e?JSON.stringify(e):e;this.setCookieInBrowser(t,i,n)}else this.removeCachedCookie(t)}get(t){return this.getCookieFromBrowser(t)}remove(t){this.removeCachedCookie(t)}}class tL{set(t,e,n){let i={value:e,lastModifiedAt:(new Date).getTime()||0,expiryTime:n};void 0!==e?localStorage.setItem(t,JSON.stringify(i)):localStorage.removeItem(t)}get(t){let e=(new Date).getTime()||0,n=ta(localStorage.getItem(t));return n&&n.lastModifiedAt&&e-+n.lastModifiedAt>+n.expiryTime&&(this.remove(t),n=void 0),n&&n.value}remove(t){localStorage.removeItem(t)}}let tO=class{static init(t){e=t&&tc().localStorage?new tL:new tT}static set(t,n,i){e.set(t,n,i||3e5)}static get(t){let n=e.get(t),i=n?ta(n):{};return"undefined"===n&&(n=void 0),n&&i?i:n}static remove(t){e.remove(t)}},tR={},tI=()=>{let{domainId:t,customerKey:e}=tC();return e?tg(e):t},tD=()=>{let t=0,e=tO.get("__rutma");return tO.get("__rutmb")||(tO.set("__rutmb",tI(),18e5),t=1),e=e?((t,e)=>{let n=t.split(".");return n.length>3&&(e&&(n[1]=n[2],n[2]=tA,n[3]=1*n[3]+1),4===n.length&&(n[4]=1),5===n.length&&(n[5]=1),n[4]=1*n[4]+1,n[5]=1+(e?0:1*n[5]),t=n.join(".")),t})(e,t):`${(()=>{let t=tO.get("__ruid");if(t)return t;t=("xx-xx-4x-1"+"pc"[0]+"-").replace(/[x]/g,()=>{var t;return String.fromCharCode((t=36*Math.random()|0)<10?t+48:t<36?t+87:t+29)});for(let e=0;e<5;e++)t+=("0000"+(1679615*Math.random()|0).toString(36)).slice(-4);let e=tI()+"-"+t+"-"+tA;return tO.set("__ruid",e),e})()}.${tA}.${tA}.1.1.1`,tO.set("__rutma",e,18e5),e},t_=()=>{let t=tS("userId");if(t)return{user_id:t};let{uid:e}=(()=>{var t;let{domainHash:e}=tC();tR.domainHashCkey=e,tR.domainHash=tR.domainHashCkey,tR.domainRoot=tE();let n=tD(),i=n.split(".");return tR.uid=i[0],tR.usetLastDigit=(t=i[0]).length?t[t.length-1]:void 0,tR.previousSessionStartTime=parseInt(i[1]),tR.currentSessionStartTime=parseInt(i[2]),tR.visitCount=parseInt(i[3]),tR.pageViewCount=parseInt(i[4]),tR.visitPageCount=parseInt(i[5]),tR.utma=n,tR})();return{uuid:e}},tk=tc();function tx(t,e){return function(){return t.apply(e,arguments)}}let{toString:tN}=Object.prototype,{getPrototypeOf:tG}=Object,{iterator:tF,toStringTag:tU}=Symbol,tj=(a=Object.create(null),t=>{let e=tN.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())}),tq=t=>(t=t.toLowerCase(),e=>tj(e)===t),tB=t=>e=>typeof e===t,{isArray:tV}=Array,tM=tB("undefined"),tK=tq("ArrayBuffer"),tQ=tB("string"),tW=tB("function"),tH=tB("number"),t$=t=>null!==t&&"object"==typeof t,tJ=t=>{if("object"!==tj(t))return!1;let e=tG(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||tU in t||tF in t)},tz=tq("Date"),tY=tq("File"),tX=tq("Blob"),tZ=tq("FileList"),t0=tq("URLSearchParams"),[t1,t2,t4,t3]=["ReadableStream","Request","Response","Headers"].map(tq);function t5(t,e,{allOwnKeys:n=!1}={}){let i,r;if(null!=t){if("object"!=typeof t&&(t=[t]),tV(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{let r;let s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;for(i=0;i<o;i++)r=s[i],e.call(null,t[r],r,t)}}}function t6(t,e){e=e.toLowerCase();let n=Object.keys(t),i,r=n.length;for(;r-- >0;)if(e===(i=n[r]).toLowerCase())return i;return null}let t8="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,t9=t=>!tM(t)&&t!==t8,t7=(sw="undefined"!=typeof Uint8Array&&tG(Uint8Array),t=>sw&&t instanceof sw),et=tq("HTMLFormElement"),ee=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),en=tq("RegExp"),ei=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),i={};t5(n,(n,r)=>{let s;!1!==(s=e(n,r,t))&&(i[r]=s||n)}),Object.defineProperties(t,i)},er=tq("AsyncFunction"),es=(sy="function"==typeof setImmediate,sb=tW(t8.postMessage),sy?setImmediate:sb?(sS=`axios@${Math.random()}`,sC=[],t8.addEventListener("message",({source:t,data:e})=>{t===t8&&e===sS&&sC.length&&sC.shift()()},!1),t=>{sC.push(t),t8.postMessage(sS,"*")}):t=>setTimeout(t)),eo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(t8):void 0!==r&&r.nextTick||es,ea={isArray:tV,isArrayBuffer:tK,isBuffer:function(t){return null!==t&&!tM(t)&&null!==t.constructor&&!tM(t.constructor)&&tW(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||tW(t.append)&&("formdata"===(e=tj(t))||"object"===e&&tW(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&tK(t.buffer)},isString:tQ,isNumber:tH,isBoolean:t=>!0===t||!1===t,isObject:t$,isPlainObject:tJ,isReadableStream:t1,isRequest:t2,isResponse:t4,isHeaders:t3,isUndefined:tM,isDate:tz,isFile:tY,isBlob:tX,isRegExp:en,isFunction:tW,isStream:t=>t$(t)&&tW(t.pipe),isURLSearchParams:t0,isTypedArray:t7,isFileList:tZ,forEach:t5,merge:function t(){let{caseless:e}=t9(this)&&this||{},n={},i=(i,r)=>{let s=e&&t6(n,r)||r;tJ(n[s])&&tJ(i)?n[s]=t(n[s],i):tJ(i)?n[s]=t({},i):tV(i)?n[s]=i.slice():n[s]=i};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&t5(arguments[t],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(t5(e,(e,i)=>{n&&tW(e)?t[i]=tx(e,n):t[i]=e},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>
1{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;let a={};if(e=e||{},null==t)return e;do{for(s=(r=Object.getOwnPropertyNames(t)).length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&tG(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:tj,kindOfTest:tq,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;let i=t.indexOf(e,n);return -1!==i&&i===n},toArray:t=>{if(!t)return null;if(tV(t))return t;let e=t.length;if(!tH(e))return null;let n=Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{let n;let i=(t&&t[tF]).call(t);for(;(n=i.next())&&!n.done;){let i=n.value;e.call(t,i[0],i[1])}},matchAll:(t,e)=>{let n;let i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:et,hasOwnProperty:ee,hasOwnProp:ee,reduceDescriptors:ei,freezeMethods:t=>{ei(t,(e,n)=>{if(tW(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;tW(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(t,e)=>{let n={};return(t=>{t.forEach(t=>{n[t]=!0})})(tV(t)?t:String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:t6,global:t8,isContextDefined:t9,isSpecCompliantForm:function(t){return!!(t&&tW(t.append)&&"FormData"===t[tU]&&t[tF])},toJSONObject:t=>{let e=Array(10),n=(t,i)=>{if(t$(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;let r=tV(t)?[]:{};return t5(t,(t,e)=>{let s=n(t,i+1);tM(s)||(r[e]=s)}),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:er,isThenable:t=>t&&(t$(t)||tW(t))&&tW(t.then)&&tW(t.catch),setImmediate:es,asap:eo,isIterable:t=>null!=t&&tW(t[tF])};function ec(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}ea.inherits(ec,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ea.toJSONObject(this.config),code:this.code,status:this.status}}});let eu=ec.prototype,eh={};function el(t){return ea.isPlainObject(t)||ea.isArray(t)}function ep(t){return ea.endsWith(t,"[]")?t.slice(0,-2):t}function ed(t,e,n){return t?t.concat(e).map(function(t,e){return t=ep(t),!n&&e?"["+t+"]":t}).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{eh[t]={value:t}}),Object.defineProperties(ec,eh),Object.defineProperty(eu,"isAxiosError",{value:!0}),ec.from=(t,e,n,i,r,s)=>{let o=Object.create(eu);return ea.toFlatObject(t,o,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),ec.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};let ef=ea.toFlatObject(ea,{},null,function(t){return/^is[A-Z]/.test(t)}),ev=function(t,e,n){if(!ea.isObject(t))throw TypeError("target must be an object");e=e||new FormData;let i=(n=ea.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!ea.isUndefined(e[t])})).metaTokens,r=n.visitor||h,o=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ea.isSpecCompliantForm(e);if(!ea.isFunction(r))throw TypeError("visitor must be a function");function u(t){if(null===t)return"";if(ea.isDate(t))return t.toISOString();if(!c&&ea.isBlob(t))throw new ec("Blob is not supported. Use a Buffer instead.");return ea.isArrayBuffer(t)||ea.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):s.from(t):t}function h(t,n,r){let s=t;if(t&&!r&&"object"==typeof t){if(ea.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else{var c;if(ea.isArray(t)&&(c=t,ea.isArray(c)&&!c.some(el))||(ea.isFileList(t)||ea.endsWith(n,"[]"))&&(s=ea.toArray(t)))return n=ep(n),s.forEac
1h(function(t,i){ea.isUndefined(t)||null===t||e.append(!0===a?ed([n],i,o):null===a?n:n+"[]",u(t))}),!1}}return!!el(t)||(e.append(ed(r,n,o),u(t)),!1)}let l=[],p=Object.assign(ef,{defaultVisitor:h,convertValue:u,isVisitable:el});if(!ea.isObject(t))throw TypeError("data must be an object");return function t(n,i){if(!ea.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+i.join("."));l.push(n),ea.forEach(n,function(n,s){!0===(!(ea.isUndefined(n)||null===n)&&r.call(e,n,ea.isString(s)?s.trim():s,i,p))&&t(n,i?i.concat(s):[s])}),l.pop()}}(t),e};function em(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function eg(t,e){this._pairs=[],t&&ev(t,this,e)}let ew=eg.prototype;function ey(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eb(t,e,n){let i;if(!e)return t;let r=n&&n.encode||ey;ea.isFunction(n)&&(n={serialize:n});let s=n&&n.serialize;if(i=s?s(e,n):ea.isURLSearchParams(e)?e.toString():new eg(e,n).toString(r)){let e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}ew.append=function(t,e){this._pairs.push([t,e])},ew.toString=function(t){let e=t?function(e){return t.call(this,e,em)}:em;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};let eS=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ea.forEach(this.handlers,function(e){null!==e&&t(e)})}},eC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eE={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:eg,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},eA="undefined"!=typeof window&&"undefined"!=typeof document,eP="object"==typeof navigator&&navigator||void 0,eT=eA&&(!eP||0>["ReactNative","NativeScript","NS"].indexOf(eP.product)),eL="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eO=eA&&window.location.href||"http://localhost",eR={...p,...eE},eI=function(t){if(ea.isFormData(t)&&ea.isFunction(t.entries)){let e={};return ea.forEachEntry(t,(t,n)=>{(function t(e,n,i,r){let s=e[r++];if("__proto__"===s)return!0;let o=Number.isFinite(+s),a=r>=e.length;return s=!s&&ea.isArray(i)?i.length:s,a?ea.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n:(i[s]&&ea.isObject(i[s])||(i[s]=[]),t(e,n,i[s],r)&&ea.isArray(i[s])&&(i[s]=function(t){let e,n;let i={},r=Object.keys(t),s=r.length;for(e=0;e<s;e++)i[n=r[e]]=t[n];return i}(i[s]))),!o})(ea.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0]),n,e,0)}),e}return null},eD={transitional:eC,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){let n;let i=e.getContentType()||"",r=i.indexOf("application/json")>-1,s=ea.isObject(t);if(s&&ea.isHTMLForm(t)&&(t=new FormData(t)),ea.isFormData(t))return r?JSON.stringify(eI(t)):t;if(ea.isArrayBuffer(t)||ea.isBuffer(t)||ea.isStream(t)||ea.isFile(t)||ea.isBlob(t)||ea.isReadableStream(t))return t;if(ea.isArrayBufferView(t))return t.buffer;if(ea.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1){var o,a;return(o=t,a=this.formSerializer,ev(o,new eR.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return eR.isNode&&ea.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))).toString()}if((n=ea.isFileList(t))||i.indexOf("multipart/form-data")>-1){let e=this.env&&this.env.FormData;return ev(n?{"files[]":t}:t,e&&new e,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),function(t){if(ea.isString(t))try{return(0,JSON.parse)(t),ea.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){let e=this.transitional||eD.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(ea.isResponse(t)||ea.isReadableStream(t))return t;if(t&&ea.isString(t)&&(n&&!this.responseType||i)){let n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw ec.from(t,ec.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eR.classes.FormData,Blob:eR.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ea.forEach(["delete","get","head","post","put","patch"],t=>{eD.headers[t]={}});let e_=ea.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ek=Symbol("internals");function ex(t){return t&&String(t).trim().toLowerCase()}function eN(t){return!1===t||null==t?t:ea.isArray(t)?t.map(eN):String(t)}function eG(t,e,n,i,r){return ea.isFunction(i)?i.call(this,e,n):(r&&(e=n),ea.isString(e)?ea.isString(i)?-1!==e.indexOf(i):ea.isRegExp(i)?i.test(e):void 0:void 0)}class eF{constructor(t){t&&this.set(t)}set(t,e,n){let i=this;function r(t,e,n){let r=ex(e);if(!r)throw Error("header name must be a non-empty string");let s=ea.findKey(i,r);s&&void 0!==i[s]&&!0!==n&&(void 0!==n||!1===i[s])||(i[s||e]=eN(t))}let s=(t,e)=>ea.forEach(t,(t,n)=>r(t,n,e));if(ea.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(ea.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{let e,n,i;let r={};return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),e=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!e||r[e]&&e_[e]||("set-cookie"===e?r[e]?r[e].push(n):r[e]=[n]:r[e]=r[e]?r[e]+", "+n:n)}),r})(t),e);else if(ea.isObject(t)&&ea.isIterable(t)){let n,i,r={};for(let e of t){if(!ea.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[i=e[0]]=(n=r[i])?ea.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}s(r,e)}else null!=t&&r(e,t,n);return this}get(t,e){if(t=ex(t)){let n=ea.findKey(this,t);if(n){let t=this[n];if(!e)return t;if(!0===e)return function(t){let e;let n=Object.create(null),i=/([^\s,;
1=]+)\s*(?:=\s*([^,;]+))?/g;for(;e=i.exec(t);)n[e[1]]=e[2];return n}(t);if(ea.isFunction(e))return e.call(this,t,n);if(ea.isRegExp(e))return e.exec(t);throw TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ex(t)){let n=ea.findKey(this,t);return!(!n||void 0===this[n]||e&&!eG(0,this[n],n,e))}return!1}delete(t,e){let n=this,i=!1;function r(t){if(t=ex(t)){let r=ea.findKey(n,t);r&&(!e||eG(0,n[r],r,e))&&(delete n[r],i=!0)}}return ea.isArray(t)?t.forEach(r):r(t),i}clear(t){let e=Object.keys(this),n=e.length,i=!1;for(;n--;){let r=e[n];t&&!eG(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){let e=this,n={};return ea.forEach(this,(i,r)=>{let s=ea.findKey(n,r);if(s)return e[s]=eN(i),void delete e[r];let o=t?r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n):String(r).trim();o!==r&&delete e[r],e[o]=eN(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let e=Object.create(null);return ea.forEach(this,(n,i)=>{null!=n&&!1!==n&&(e[i]=t&&ea.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){let n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){let e=(this[ek]=this[ek]={accessors:{}}).accessors,n=this.prototype;function i(t){let i=ex(t);e[i]||(function(t,e){let n=ea.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})})}(n,t),e[i]=!0)}return ea.isArray(t)?t.forEach(i):i(t),this}}function eU(t,e){let n=this||eD,i=e||n,r=eF.from(i.headers),s=i.data;return ea.forEach(t,function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function ej(t){return!(!t||!t.__CANCEL__)}function eq(t,e,n){ec.call(this,null==t?"canceled":t,ec.ERR_CANCELED,e,n),this.name="CanceledError"}function eB(t,e,n){let i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ec("Request failed with status code "+n.status,[ec.ERR_BAD_REQUEST,ec.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}eF.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ea.reduceDescriptors(eF.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),ea.freezeMethods(eF),ea.inherits(eq,ec,{__CANCEL__:!0});let eV=(t,e,n=3)=>{let i=0,r=function(t,e){let n=Array(t=t||10),i=Array(t),r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){let c=Date.now(),u=i[o];r||(r=c),n[s]=a,i[s]=c;let h=o,l=0;for(;h!==s;)l+=n[h++],h%=t;if((s=(s+1)%t)===o&&(o=(o+1)%t),c-r<e)return;let p=u&&c-u;return p?Math.round(1e3*l/p):void 0}}(50,250);return function(t,e){let n,i,r=0,s=1e3/e,o=(e,s=Date.now())=>{r=s,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[(...t)=>{let e=Date.now(),a=e-r;a>=s?o(t,e):(n=t,i||(i=setTimeout(()=>{i=null,o(n)},s-a)))},()=>n&&o(n)]}(n=>{let s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-i,c=r(a);i=s,t({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[e?"download":"upload"]:!0})},n)},eM=(t,e)=>{let n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},eK=t=>(...e)=>ea.asap(()=>t(...e)),eQ=eR.hasStandardBrowserEnv?(c=new URL(eR.origin),u=eR.navigator&&/(msie|trident)/i.test(eR.navigator.userAgent),t=>(t=new URL(t,eR.origin),c.protocol===t.protocol&&c.host===t.host&&(u||c.port===t.port))):()=>!0,eW=eR.hasStandardBrowserEnv?{write(t,e,n,i,r,s){let o=[t+"="+encodeURIComponent(e)];ea.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ea.isString(i)&&o.push("path="+i),ea.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(t){let e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function eH(t,e,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(i||0==n)?e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t:e}let e$=t=>t instanceof eF?{...t}:t;function eJ(t,e){e=e||{};let n={};function i(t,e,n,i){return ea.isPlainObject(t)&&ea.isPlainObject(e)?ea.merge.call({caseless:i},t,e):ea.isPlainObject(e)?ea.merge({},e):ea.isArray(e)?e.slice():e}function r(t,e,n,r){return ea.isUndefined(e)?ea.isUndefined(t)?void 0:i(void 0,t,0,r):i(t,e,0,r)}function s(t,e){if(!ea.isUndefined(e))return i(void 0,e)}function o(t,e){return ea.isUndefined(e)?ea.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
1dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e,n)=>r(e$(t),e$(e),0,!0)};return ea.forEach(Object.keys(Object.assign({},t,e)),function(i){let s=c[i]||r,o=s(t[i],e[i],i);ea.isUndefined(o)&&s!==a||(n[i]=o)}),n}let ez=t=>{let e=eJ({},t),n,{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=e;if(e.headers=a=eF.from(a),e.url=eb(eH(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ea.isFormData(i)){if(eR.hasStandardBrowserEnv||eR.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){let[t,...e]=n?n.split(";").map(t=>t.trim()).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}}if(eR.hasStandardBrowserEnv&&(r&&ea.isFunction(r)&&(r=r(e)),r||!1!==r&&eQ(e.url))){let t=s&&o&&eW.read(o);t&&a.set(s,t)}return e},eY="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){let i=ez(t),r=i.data,s=eF.from(i.headers).normalize(),o,a,c,u,h,{responseType:l,onUploadProgress:p,onDownloadProgress:d}=i;function f(){u&&u(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let v=new XMLHttpRequest;function m(){if(!v)return;let i=eF.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());eB(function(t){e(t),f()},function(t){n(t),f()},{data:l&&"text"!==l&&"json"!==l?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:i,config:t,request:v}),v=null}v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(n(new ec("Request aborted",ec.ECONNABORTED,t,v)),v=null)},v.onerror=function(){n(new ec("Network Error",ec.ERR_NETWORK,t,v)),v=null},v.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",r=i.transitional||eC;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ec(e,r.clarifyTimeoutError?ec.ETIMEDOUT:ec.ECONNABORTED,t,v)),v=null},void 0===r&&s.setContentType(null),"setRequestHeader"in v&&ea.forEach(s.toJSON(),function(t,e){v.setRequestHeader(e,t)}),ea.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),l&&"json"!==l&&(v.responseType=i.responseType),d&&([c,h]=eV(d,!0),v.addEventListener("progress",c)),p&&v.upload&&([a,u]=eV(p),v.upload.addEventListener("progress",a),v.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(o=e=>{v&&(n(!e||e.type?new eq(null,t,v):e),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o))
1);let g=function(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);g&&-1===eR.protocols.indexOf(g)?n(new ec("Unsupported protocol "+g+":",ec.ERR_BAD_REQUEST,t)):v.send(r||null)})},eX=(t,e)=>{let{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController,r=function(t){if(!n){n=!0,o();let e=t instanceof Error?t:this.reason;i.abort(e instanceof ec?e:new eq(e instanceof Error?e.message:e))}},s=e&&setTimeout(()=>{s=null,r(new ec(`timeout ${e} of ms exceeded`,ec.ETIMEDOUT))},e),o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}),t=null)};t.forEach(t=>t.addEventListener("abort",r));let{signal:a}=i;return a.unsubscribe=()=>ea.asap(o),a}},eZ=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},e0=(t,e,n,i)=>{let r=async function*(t,e){for await(let n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);let e=t.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*eZ(n,e)}(t,e),s,o=0,a=t=>{s||(s=!0,i&&i(t))};return new ReadableStream({async pull(t){try{let{done:e,value:i}=await r.next();if(e)return a(),void t.close();let s=i.byteLength;if(n){let t=o+=s;n(t)}t.enqueue(new Uint8Array(i))}catch(t){throw a(t),t}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},e1="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,e2=e1&&"function"==typeof ReadableStream,e4=e1&&("function"==typeof TextEncoder?(sE=new TextEncoder,t=>sE.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer())),e3=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},e5=e2&&e3(()=>{let t=!1,e=new Request(eR.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),e6=e2&&e3(()=>ea.isReadableStream(new Response("").body)),e8={stream:e6&&(t=>t.body)};e1&&(sA=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(t=>{e8[t]||(e8[t]=ea.isFunction(sA[t])?e=>e[t]():(e,n)=>{throw new ec(`Response type '${t}' is not supported`,ec.ERR_NOT_SUPPORT,n)})}));let e9={http:null,xhr:eY,fetch:e1&&(async t=>{let e,{url:n,method:i,data:r,signal:s,cancelToken:o,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:h,headers:l,withCredentials:p="same-origin",fetchOptions:d}=ez(t);h=h?(h+"").toLowerCase():"text";let f,v=eX([s,o&&o.toAbortSignal()],a),m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});try{if(u&&e5&&"get"!==i&&"head"!==i&&0!==(e=await (async(t,e)=>{let n=ea.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ea.isBlob(t))return t.size;if(ea.isSpecCompliantForm(t)){let e=new Request(eR.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ea.isArrayBufferView(t)||ea.isArrayBuffer(t)?t.byteLength:(ea.isURLSearchParams(t)&&(t+=""),ea.isString(t)?(await e4(t)).byteLength:void 0)})(e):n})(l,r))){let t,i=new Request(n,{method:"POST",body:r,duplex:"half"});if(ea.isFormData(r)&&(t=i.headers.get("content-type"))&&l.setContentType(t),i.body){let[t,n]=eM(e,eV(eK(u)));r=e0(i.body,65536,t,n)}}ea.isString(p)||(p=p?"include":"omit");let s="credentials"in Request.prototype;f=new Request(n,{...d,signal:v,method:i.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:s?p:void 0});let o=await fetch(f),a=e6&&("stream"===h||"response"===h);if(e6&&(c||a&&m)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=o[e]});let e=ea.toFiniteNumber(o.headers.get("content-length")),[n,i]=c&&eM(e,eV(eK(c),!0))||[];o=new Response(e0(o.body,65536,n,()=>{i&&i(),m&&m()}),t)}h=h||"text";let g=await e8[ea.findKey(e8,h)||"text"](o,t);return!a&&m&&m(),await new Promise((e,n)=>{eB(e,n,{data:g,headers:eF.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:f})})}catch(e){if(m&&m(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new ec("Network Error",ec.ERR_NETWORK,t,f),{cause:e.cause||e});throw ec.from(e,e&&e.code,t,f)}})};ea.forEach(e9,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});let e7=t=>`- ${t}`,nt=t=>ea.isFunction(t)||null===t||!1===t,ne=t=>{let e,n;let{length:i}=t=ea.isArray(t)?t:[t],r={};for(let s=0;s<i;s++){let i;if(n=e=t[s],!nt(e)&&void 0===(n=e9[(i=String(e)).toLowerCase()]))throw new e
1c(`Unknown adapter '${i}'`);if(n)break;r[i||"#"+s]=n}if(!n){let t=Object.entries(r).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new ec("There is no suitable adapter to dispatch the request "+(i?t.length>1?"since :\n"+t.map(e7).join("\n"):" "+e7(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function nn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new eq(null,t)}function ni(t){return nn(t),t.headers=eF.from(t.headers),t.data=eU.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ne(t.adapter||eD.adapter)(t).then(function(e){return nn(t),e.data=eU.call(t,t.transformResponse,e),e.headers=eF.from(e.headers),e},function(e){return ej(e)||(nn(t),e&&e.response&&(e.response.data=eU.call(t,t.transformResponse,e.response),e.response.headers=eF.from(e.response.headers))),Promise.reject(e)})}let nr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{nr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});let ns={};nr.transitional=function(t,e,n){function i(t,e){return"[Axios v1.9.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new ec(i(r," has been removed"+(e?" in "+e:"")),ec.ERR_DEPRECATED);return e&&!ns[r]&&(ns[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},nr.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};let no={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ec("options must be an object",ec.ERR_BAD_OPTION_VALUE);let i=Object.keys(t),r=i.length;for(;r-- >0;){let s=i[r],o=e[s];if(o){let e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new ec("option "+s+" must be "+n,ec.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ec("Unknown option "+s,ec.ERR_BAD_OPTION)}},validators:nr},na=no.validators;class nc{constructor(t){this.defaults=t||{},this.interceptors={request:new eS,response:new eS}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=Error();let n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){let n;"string"==typeof t?(e=e||{}).url=t:e=t||{};let{transitional:i,paramsSerializer:r,headers:s}=e=eJ(this.defaults,e);void 0!==i&&no.assertOptions(i,{silentJSONParsing:na.transitional(na.boolean),forcedJSONParsing:na.transitional(na.boolean),clarifyTimeoutError:na.transitional(na.boolean)},!1),null!=r&&(ea.isFunction(r)?e.paramsSerializer={serialize:r}:no.assertOptions(r,{encode:na.function,serialize:na.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),no.assertOptions(e,{baseUrl:na.spelling("baseURL"),withXsrfToken:na.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&ea.merge(s.common,s[e.method]);s&&ea.forEach(["delete","get","head","post","put","patch","common"],t=>{delete s[t]}),e.headers=eF.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))});let u=[];this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let h,l=0;if(!c){let t=[ni.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),h=t.length,n=Promise.resolve(e);l<h;)n=n.then(t[l++],t[l++]);return n}h=a.length;let p=e;for(l=0;l<h;){let t=a[l++],e=a[l++];try{p=t(p)}catch(t){e.call(this,t);break}}try{n=ni.call(this,p)}catch(t){return Promise.reject(t)}for(l=0,h=u.length;l<h;)n=n.then(u[l++],u[l++]);return n}getUri(t){return eb(eH((t=eJ(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}ea.forEach(["delete","get","head","options"],function(t){nc.prototype[t]=function(e,n){return this.request(eJ(n||{},{method:t,url:e,data:(n||{}).data}))}}),ea.forEach(["post","put","patch"],function(t){function e(e){return function(n,i,r){return this.request(eJ(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}nc.prototype[t]=e(),nc.prototype[t+"Form"]=e(!0)});
1class nu{constructor(t){let e;if("function"!=typeof t)throw TypeError("executor must be a function.");this.promise=new Promise(function(t){e=t});let n=this;this.promise.then(t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null}),this.promise.then=t=>{let e;let i=new Promise(t=>{n.subscribe(t),e=t}).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t(function(t,i,r){n.reason||(n.reason=new eq(t,i,r),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){let t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new nu(function(e){t=e}),cancel:t}}}let nh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
1alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nh).forEach(([t,e])=>{nh[e]=t});let nl=function t(e){let n=new nc(e),i=tx(nc.prototype.request,n);return ea.extend(i,nc.prototype,n,{allOwnKeys:!0}),ea.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(eJ(e,n))},i}(eD);nl.Axios=nc,nl.CanceledError=eq,nl.CancelToken=nu,nl.isCancel=ej,nl.VERSION="1.9.0",nl.toFormData=ev,nl.AxiosError=ec,nl.Cancel=nl.CanceledError,nl.all=function(t){return Promise.all(t)},nl.spread=function(t){return function(e){return t.apply(null,e)}},nl.isAxiosError=function(t){return ea.isObject(t)&&!0===t.isAxiosError},nl.mergeConfig=eJ,nl.AxiosHeaders=eF,nl.formToJSON=t=>eI(ea.isHTMLForm(t)?new FormData(t):t),nl.getAdapter=ne,nl.HttpStatusCode=nh,nl.default=nl;var np=function(t,e){return(np=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},nd=function(){return(nd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function nf(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){t.done?r(t.value):new n(function(e){e(t.value)}).then(o,a)}c((i=i.apply(t,e||[])).next())})}function nv(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}var nm=new(function(){function t(){this.defaultConfig={baseApiUrl:"https://api.ordercloud.io",apiVersion:"v1",timeoutInMilliseconds:6e4,clientID:null,cookieOptions:{samesite:"lax",secure:!1,domain:null,prefix:"ordercloud",path:"/"}},this.config=JSON.parse(JSON.stringify(this.defaultConfig)),this.Set=this.Set.bind(this),this.Get=this.Get.bind(this)}return t.prototype.Set=function(t){this.config=nd(nd(nd({},this.defaultConfig),this.config),t||{}),this.config.cookieOptions=nd(nd(nd({},this.defaultConfig.cookieOptions),this.config.cookieOptions),(null==t?void 0:t.cookieOptions)||{})},t.prototype.Get=function(){return this.config},t}()),ng=function(t){function e(e){var n=this,i=function(t){var e;try{var n=null===(e=null==t?void 0:t.response)||void 0===e?void 0:e.data;return n?"object"==typeof n?n.Errors:"string"==typeof n?(n&&65279===n.charCodeAt(0)&&(n=n.substring(1)),JSON.parse(n).Errors):n:[]}catch(t){return[]}}(e),r=null==i?void 0:i[0];return(n=t.call(this,r?"NotFound"===r.ErrorCode?"".concat(r.Data.ObjectType," ").concat(r.Data.ObjectID," not found"):r.Message:e.response.statusText)||this).isOrderCloudError=!0,n.errors=i,n.name="OrderCloudError",n.errorCode=r?r.ErrorCode:"OrderCloudError",n.status=e.response.status,n.statusText=e.response.statusText,n.response=e.response,n.request=e.request,n}return function(t,e){function n(){this.constructor=t}np(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(Error),nw=new(function(){function t(){}return t.prototype.write=function(t,e,n){void 0===e&&(e=void 0),document.cookie=this.buildCookieString(t,e,n)},t.prototype.read=function(t){for(var e=0,n=document.cookie.split(";");e<n.length;e++){var i=n[e].split("="),r=i[0],s=i[1];if(decodeURIComponent(r.trim().toLowerCase())===t.toLowerCase())return decodeURIComponent(s)}return""},t.prototype.buildCookieString=function(t,e,n){void 0===e&&(e=void 0),e?(i=new Date).setFullYear(i.getFullYear()+1):(i=new Date("Thu, 01 Jan 1970 00:00:00 GMT"),e="");var i,r=encodeURIComponent(t)+"="+encodeURIComponent(e),s=(r+=(n.domain?";domain="+n.domain:"")+(i?";expires="+i.toUTCString():"")+(n.secure?";secure":"")+(n.samesite?";samesite="+n.samesite:"")+(n.path?";path="+n.path:"")).length+1;return s>4096&&console.warn("Cookie ".concat(t," possibly not set or overflowed because it was too large! (").concat(s," > 4096 bytes)")),r},t}()),ny=new(function(){function t(){this.get=this.get.bind(this),this.set=this.set.bind(this),this.remove=this.remove.bind(this)}return t.prototype.get=function(t){var e=nm.Get().cookieOptions.prefix+t;return nw.read(e)},t.prototype.set=function(t,e){var n=nm.Get(),i=n.cookieOptions.prefix+t;nw.write(i,e,n.cookieOptions)},t.prototype.remove=function(t){var e=nm.Get(),n=e.cookieOptions.prefix+t;nw.write(n,void 0,e.cookieOptions)},t}());function nb(t){try{var e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(("undefined"!=typeof atob?atob(e):s.from(e,"base64").toString("binary")).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)}catch(t){throw Error("Invalid token")}}var nS={serialize:function(t){var e=JSON.parse(JSON.stringify(t)),n=[];if(e.filters){var i=function(t){var e={};for(var n in t)(function t(e,n,i){if("[object Object]"===Object.prototype.toString.call(e))for(var r in e)t(e[r],"".concat(n,".").concat(r),i);else{if(null===e)throw Error('Null is not a valid filter prop. Use negative filter "!" combined with wildcard filter "*" to define a filter for the absence of a value. \nex: an order list call with { xp: { hasPaid: \'!*\' } } would return a list of orders where xp.hasPaid is null or undefined\nhttps://
1ordercloud.io/features/advanced-querying#filtering');i[n]=e}})(t[n],n,e);return e}(e.filters),r=function(t){var e=i[t];Array.isArray(e)?e.forEach(function(e){return n.push("".concat(t,"=").concat(encodeURIComponent(e)))}):("boolean"==typeof e||0===e||e)&&n.push("".concat(t,"=").concat(encodeURIComponent(e)))};for(var s in i)r(s);delete e.filters}for(var s in e){var o=e[s];o&&n.push("".concat(s,"=").concat(encodeURIComponent(o)))}return n.length?"".concat(n.join("&")):""}},nC=new(function(){function t(){if(void 0===nl)throw Error("Ordercloud is missing required peer dependency axios. This must be installed and loaded before the OrderCloud SDK");this.Anonymous=this.Anonymous.bind(this),this.ClientCredentials=this.ClientCredentials.bind(this),this.ElevatedLogin=this.ElevatedLogin.bind(this),this.Login=this.Login.bind(this),this.RefreshToken=this.RefreshToken.bind(this)}return t.prototype.Login=function(t,e,n,i,r,s){return void 0===s&&(s={}),nf(this,void 0,void 0,function(){var o,a,c;return nv(this,function(u){switch(u.label){case 0:if(i&&!Array.isArray(i))throw Error("scope must be a string array");if(null!=r&&!Array.isArray(r))throw Error("custom roles must be defined as a string array");return(null==i?void 0:i.length)&&!(null==r?void 0:r.length)?o=i.join(" "):!(null==i?void 0:i.length)&&(null==r?void 0:r.length)?o+=" ".concat(r.join(" ")):(null==i?void 0:i.length)&&(null==r?void 0:r.length)&&(o="".concat(i.join(" ")," ").concat(r.join(" "))),a={grant_type:"password",username:t,password:e,client_id:n,scope:o},c=nm.Get(),[4,nl.post("".concat(c.baseApiUrl,"/oauth/token"),nS.serialize(a),nd({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:c.axiosAdapter},s)).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,u.sent().data]}})})},t.prototype.ElevatedLogin=function(t,e,n,i,r,s,o){return void 0===o&&(o={}),nf(this,void 0,void 0,function(){var a,c,u;return nv(this,function(h){switch(h.label){case 0:if(r&&!Array.isArray(r))throw Error("scope must be a string array");if(null!=s&&!Array.isArray(s))throw Error("custom roles must be defined as a string array");return(null==r?void 0:r.length)&&!(null==s?void 0:s.length)?a=r.join(" "):!(null==r?void 0:r.length)&&(null==s?void 0:s.length)?a+=" ".concat(s.join(" ")):(null==r?void 0:r.length)&&(null==s?void 0:s.length)&&(a="".concat(r.join(" ")," ").concat(s.join(" "))),c={grant_type:"password",scope:a,client_id:i,username:e,password:n,client_secret:t},u=nm.Get(),[4,nl.post("".concat(u.baseApiUrl,"/oauth/token"),nS.serialize(c),nd({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:u.axiosAdapter},o)).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,h.sent().data]}})})},t.prototype.ClientCredentials=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s,o,a;return nv(this,function(c){switch(c.label){case 0:if(n&&!Array.isArray(n))throw Error("scope must be a string array");if(null!=i&&!Array.isArray(i))throw Error("custom roles must be defined as a string array");return(null==n?void 0:n.length)&&!(null==i?void 0:i.length)?s=n.join(" "):!(null==n?void 0:n.length)&&(null==i?void 0:i.length)?s+=" ".concat(i.join(" ")):(null==n?void 0:n.length)&&(null==i?void 0:i.length)&&(s="".concat(n.join(" ")," ").concat(i.join(" "))),o={grant_type:"client_credentials",scope:s,client_id:e,client_secret:t},a=nm.Get(),[4,nl.post("".concat(a.baseApiUrl,"/oauth/token"),nS.serialize(o),nd({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:a.axiosAdapter},r)).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,c.sent().data]}})})},t.prototype.RefreshToken=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i,r;return nv(this,function(s){switch(s.label){case 0:return i={grant_type:"refresh_token",client_id:e,refresh_token:t},r=nm.Get(),[4,nl.post("".concat(r.baseApiUrl,"/oauth/token"),nS.serialize(i),nd({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:r.axiosAdapter},n)).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent().data]}})})},t.prototype.Anonymous=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r,s,o;return nv(this,function(a){switch(a.label){case 0:if(e&&!Array.isArray(e))throw Error("scope must be a string array");if(null!=n&&!Array.isArray(n))throw Error("custom roles must be defined as a string array");return(null==e?void 0:e.length)&&!(null==n?void 0:n.length)?r=e.join(" "):!(null==e?void 0:e.length)&&(null==n?void 0:n.length)?r+=" ".concat(n.join(" ")):(null==e?void 0:e.length)&&(null==n?void 0:n.length)&&(r="".concat(e.join(" ")," ").concat(n.join(" "))),s={grant_type:"client_credentials",client_id:t,scope:r},i.anonuserid&&(s.anonuserid=i.anonuserid,delete i.anonuserid),o=nm.Get(),[4,nl.post("".concat(o.baseApiUrl,"/oauth/token"),nS.seri
1alize(s),nd({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:o.axiosAdapter},i)).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,a.sent().data]}})})},t}()),nE=Function("try {return this===global;}catch(e){return false;}"),nA=new(function(){function t(){this.accessTokenCookieName=".access-token",this.impersonationTokenCookieName=".impersonation-token",this.refreshTokenCookieName=".refresh-token",this.identityTokenCookieName=".identity-token",this.accessToken=null,this.impersonationToken=null,this.refreshToken=null,this.identityToken=null,this.GetAccessToken=this.GetAccessToken.bind(this),this.GetImpersonationToken=this.GetImpersonationToken.bind(this),this.GetRefreshToken=this.GetRefreshToken.bind(this),this.RemoveAccessToken=this.RemoveAccessToken.bind(this),this.RemoveImpersonationToken=this.RemoveImpersonationToken.bind(this),this.SetAccessToken=this.SetAccessToken.bind(this),this.RemoveRefreshToken=this.RemoveRefreshToken.bind(this),this.SetImpersonationToken=this.SetImpersonationToken.bind(this),this.SetRefreshToken=this.SetRefreshToken.bind(this),this.RemoveIdentityToken=this.RemoveIdentityToken.bind(this),this.GetIdentityToken=this.GetIdentityToken.bind(this),this.SetIdentityToken=this.SetIdentityToken.bind(this),this._isTokenExpired=this._isTokenExpired.bind(this),this._tryRefreshToken=this._tryRefreshToken.bind(this)}return t.prototype.GetAccessToken=function(){return nE()?this.accessToken:ny.get(this.accessTokenCookieName)},t.prototype.SetAccessToken=function(t){nb(t),nE()?this.accessToken=t:ny.set(this.accessTokenCookieName,t)},t.prototype.RemoveAccessToken=function(){nE()?this.accessToken="":ny.remove(this.accessTokenCookieName)},t.prototype.GetImpersonationToken=function(){return nE()?this.impersonationToken:ny.get(this.impersonationTokenCookieName)},t.prototype.SetImpersonationToken=function(t){nb(t),nE()?this.impersonationToken=t:ny.set(this.impersonationTokenCookieName,t)},t.prototype.RemoveImpersonationToken=function(){nE()?this.impersonationToken=null:ny.remove(this.impersonationTokenCookieName)},t.prototype.GetRefreshToken=function(){return nE()?this.refreshToken:ny.get(this.refreshTokenCookieName)},t.prototype.SetRefreshToken=function(t){nE()?this.refreshToken=t:ny.set(this.refreshTokenCookieName,t)},t.prototype.RemoveRefreshToken=function(){nE()?this.refreshToken=null:ny.remove(this.refreshTokenCookieName)},t.prototype.GetIdentityToken=function(){return nE()?this.identityToken:ny.get(this.identityTokenCookieName)},t.prototype.SetIdentityToken=function(t){nE()?this.identityToken=t:ny.set(this.identityTokenCookieName,t)},t.prototype.RemoveIdentityToken=function(){nE()?this.identityToken=null:ny.remove(this.identityTokenCookieName)},t.prototype.GetValidToken=function(t){return nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=t||this.GetAccessToken(),this._isTokenExpired(e)?[4,this._tryRefreshToken(e)]:[3,2];case 1:e=n.sent(),n.label=2;case 2:return[2,Promise.resolve(e||"")]}})})},t.prototype._isTokenExpired=function(t){if(!t)return!0;var e=nb(t),n=Date.now()/1e3-10;return e.exp<n},t.prototype._tryRefreshToken=function(t){return nf(this,void 0,void 0,function(){var e,n,i,r;return nv(this,function(s){switch(s.label){case 0:if(!(e=this.GetRefreshToken())||(n=nm.Get(),!t&&!n.clientID))return[2,t||""];if(t&&(i=nb(t).cid),n.clientID&&(i=n.clientID),!i)return[2,""];if(!i)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,nC.RefreshToken(e,i)];
1case 2:return r=s.sent().access_token,this.SetAccessToken(r),[2,r];case 3:return s.sent(),[2,""];case 4:return[2]}})})},t}()),nP=new(function(){function t(){var t=this;if(this.get=function(e,n){return nf(t,void 0,void 0,function(){return nv(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("get",e,n)];case 1:return[2,t.sent()]}})})},this.post=function(e,n){return nf(t,void 0,void 0,function(){return nv(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("post",e,n)];case 1:return[2,t.sent()]}})})},this.put=function(e,n){return nf(t,void 0,void 0,function(){return nv(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("put",e,n)];case 1:return[2,t.sent()]}})})},this.patch=function(e,n){return nf(t,void 0,void 0,function(){return nv(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("patch",e,n)];case 1:return[2,t.sent()]}})})},this.delete=function(e,n){return nf(t,void 0,void 0,function(){return nv(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("delete",e,n)];case 1:return[2,t.sent()]}})})},void 0===nl)throw Error("Missing required peer dependency axios. This must be installed and loaded before the OrderCloud SDK");this.get=this.get.bind(this),this.put=this.put.bind(this),this.post=this.post.bind(this),this.patch=this.patch.bind(this),this.delete=this.delete.bind(this),this._resolveToken=this._resolveToken.bind(this),this._buildRequestConfig=this._buildRequestConfig.bind(this),this._addTokenToConfig=this._addTokenToConfig.bind(this)}return t.prototype.makeApiCall=function(t,e,n){return nf(this,void 0,void 0,function(){var i,r,s;return nv(this,function(o){switch(o.label){case 0:return[4,this._buildRequestConfig(n)];case 1:return i=o.sent(),r=e.includes("oauth/")?"".concat(nm.Get().baseApiUrl,"/").concat(e):"".concat(nm.Get().baseApiUrl,"/").concat(nm.Get().apiVersion).concat(e),"put"!==t&&"post"!==t&&"patch"!==t?[3,3]:(s=i.data,delete i.data,[4,nl[t](r,s,i)]);case 2:case 4:return[2,o.sent().data];case 3:return[4,nl[t](r,i)]}})})},t.prototype._addTokenToConfig=function(t){return nf(this,void 0,void 0,function(){var e,n;return nv(this,function(i){switch(i.label){case 0:return e=this._resolveToken(t),[4,nA.GetValidToken(e)];case 1:return n=i.sent(),t.headers||(t.headers={}),t.headers.Authorization="Bearer ".concat(n),[2,t]}})})},t.prototype._resolveToken=function(t){var e;return e=t.accessToken?t.accessToken:t.impersonating?nA.GetImpersonationToken():nA.GetAccessToken(),delete t.accessToken,delete t.impersonating,e},t.prototype._buildRequestConfig=function(t){var e=nm.Get(),n=nd(nd({},t),{paramsSerializer:nS,adapter:e.axiosAdapter,timeout:e.timeoutInMilliseconds,headers:{"Content-Type":"application/json"}});return this._addTokenToConfig(n)},t}());new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/securityprofiles",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/securityprofiles",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/securityprofiles/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/securityprofiles/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/securityprofiles/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/securityprofiles/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/securityprofiles/".concat(t,"/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/securityprofiles/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/securityprofiles/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.SendVerificationCode=this.SendVerificationCode.bind(this),this.ResetPasswordByVerificationCode=this.ResetPasswordByVerificationCode.bind(this)}return t.prototype.SendVerificationCode=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/password/reset",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByVerificationCode=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/password/reset/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/impersonationconfig",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/impersonationconfig",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/impersonationconfig/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/impersonationconfig/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/impersonationconfig/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/impersonationconfig/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.GetPublicKey=this.GetPublicKey.bind(this)}return t.prototype.GetPublicKey=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("oauth/certs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/openidconnects",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/openidconnects",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/openidconnects/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/openidconnects/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/openidconnects/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/openidconnects/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/adminusers",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/adminusers",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/adminusers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/adminusers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/adminusers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/adminusers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonat
1ing=!1,[4,nP.get("/usergroups",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/usergroups",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/usergroups/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/usergroups/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/usergroups/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/usergroups/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/usergroups/".concat(t,"/assignments/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListUserAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/usergroups/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/usergroups/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/addresses",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/addresses",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/addresses/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/addresses/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/addresses/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/addresses/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.DeleteBuyerAssignment=this.DeleteBuyerAssignment.bind(this),this.DeleteSupplierAssignment=this.DeleteSupplierAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/apiclients",n
1d(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/apiclients",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/apiclients/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/apiclients/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/apiclients/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/apiclients/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/apiclients/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/apiclients/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeleteBuyerAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(e,"/ApiClients/Assignments/").concat(t),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSupplierAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(e,"/ApiClients/Assignments/").concat(t),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/incrementors",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/incrementors",n
1d(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/incrementors/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/incrementors/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/incrementors/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/incrementors/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/locales",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/locales",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/locales/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/locales/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/locales/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/locales/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/locales/".concat(t,"/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/locales/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/locales/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/webhooks",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/webhooks",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/webhooks/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/webhooks/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/webhooks/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/webhooks/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Put=this.Put.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/xpindices",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Put=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/xpindices",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/xpindices/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListBuyerSellers=this.ListBuyerSellers.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyerSellers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/sellers"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.GetAccessToken=this.GetAccessToken.bind(this),this.Move=this.Move.bind(this),this.ListAcrossBuyers=this.ListAcrossBuyers.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/users"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/users"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/users/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/users/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/users/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/users/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetAccessToken=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/users/").concat(e,"/accesstoken"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Move=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/users/").concat(e,"/moveto/").concat(n),nd(nd({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.ListAcrossBuyers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/buyerusers",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind
1(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/usergroups"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/usergroups"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/usergroups/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/usergroups/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/usergroups/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/usergroups/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/usergroups/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/usergroups/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/addresses"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/addresses"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/addresses/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/addresses/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/addresses/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/addresses/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/addresses/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/addresses/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/addresses/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/costcenters"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/costcenters"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/costcenters/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/costcenters/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/costcenters/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/costcenters/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/costcenters/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/costcenters/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/costcenters/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/creditcards"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/creditcards"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/creditcards/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/creditcards/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/creditcards/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/creditcards/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/creditcards/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/creditcards/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/creditcards/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv
1(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/spendingaccounts"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/spendingaccounts"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/spendingaccounts/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/spendingaccounts/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/spendingaccounts/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/spendingaccounts/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/spendingaccounts/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/approvalrules"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/buyers/".concat(t,"/approvalrules"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/approvalrules/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/buyers/".concat(t,"/approvalrules/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/buyers/".concat(t,"/approvalrules/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/buyers/".concat(t,"/approvalrules/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Get=this.Get.bind(this),this.ListEntries=this.ListEntries.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/productcollections"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/productcollections/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListEntries=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/buyers/".concat(t,"/productcollections/").concat(e,"/products"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListBuyers=this.ListBuyers.bind(this),this.SaveBuyer=this.SaveBuyer.bind(this),this.DeleteBuyer=this.DeleteBuyer.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/suppliers",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/suppliers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/suppliers/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/buyers"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBuyer=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/suppliers/".concat(t,"/buyers/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBuyer=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t,"/buyers/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/users"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/suppliers/".concat(t,"/users"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/users/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/suppliers/".concat(t,"/users/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t,"/users/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/suppliers/".concat(t,"/users/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/usergroups"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/suppliers/".concat(t,"/usergroups"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/usergroups/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/suppliers/".concat(t,"/usergroups/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t,"/usergroups/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.pr
1ototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/suppliers/".concat(t,"/usergroups/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/usergroups/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/suppliers/".concat(t,"/usergroups/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/addresses"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/suppliers/".concat(t,"/addresses"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/suppliers/".concat(t,"/addresses/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/suppliers/".concat(t,"/addresses/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/suppliers/".concat(t,"/addresses/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/suppliers/".concat(t,"/addresses/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteBundleAssignment=this.DeleteBundleAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListBundleAssignments=this.ListBundleAssignments.bind(this),this.SaveBundleAssignment=this.SaveBundleAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/catalogs/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/catalogs/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/bundleassignments/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/productassignments/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListBundleAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/bundleassignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/bundleassignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/productassignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/productassignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteBundleAssignment=this.DeleteBundleAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListBundleAssignments=this.ListBundleAssignments.bind(this),this.SaveBundleAssignment=this.SaveBundleAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t,"/categories"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/".concat(t,"/categories"),nd(nd({},i),{data:e,impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t,"/categories/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.put("/catalogs/".concat(t,"/categories/").concat(e),nd(nd({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/categories/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.patch("/catalogs/".concat(t,"/categories/").concat(e),nd(nd({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/categories/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/categories/").concat(e,"/bundleassignments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/catalogs/".concat(t,"/categories/").concat(e,"/productassignments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t,"/categories/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/".concat(t,"/categories/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBundleAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,
1void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t,"/categories/bundleassignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/".concat(t,"/categories/bundleassignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/catalogs/".concat(t,"/categories/productassignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/catalogs/".concat(t,"/categories/productassignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListSpecs=this.ListSpecs.bind(this),this.ListSuppliers=this.ListSuppliers.bind(this),this.SaveSupplier=this.SaveSupplier.bind(this),this.RemoveSupplier=this.RemoveSupplier.bind(this),this.ListVariants=this.ListVariants.bind(this),this.GetVariant=this.GetVariant.bind(this),this.SaveVariant=this.SaveVariant.bind(this),this.PatchVariant=this.PatchVariant.bind(this),this.GenerateVariants=this.GenerateVariants.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/products",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/products",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/products/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/products/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/assignments/").concat(e),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListSpecs=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/specs"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSuppliers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/suppliers"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveSupplier=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/products/".concat(t,"/suppliers/").concat(e),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemoveSupplier=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/suppliers/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/variants"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/variants/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/products/".concat(t,"/variants/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/products/".concat(t,"/variants/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GenerateVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/products/".concat(t,"/variants/generate"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/products/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/products/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SavePriceBreak=this.SavePriceBreak.bind(this),this.DeletePriceBreak=this.DeletePriceBreak.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/priceschedules",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/priceschedules",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/priceschedules/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/priceschedules/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/priceschedules/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/priceschedules/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SavePriceBreak=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/priceschedules/".concat(t,"/PriceBreaks"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeletePriceBreak=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/priceschedules/".concat(t,"/PriceBreaks"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListOptions=this.ListOptions.bind(this),this.CreateOption=this.CreateOption.bind(this),this.GetOption=this.GetOption.bind(this),this.SaveOption=this.SaveOption.bind(this),this.DeleteOption=this.DeleteOption.bind(this),this.PatchOption=this.PatchOption.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/specs",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/specs",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/specs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/specs/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/specs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/specs/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListOptions=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/specs/".concat(t,"/options"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateOption=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/specs/
1".concat(t,"/options"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetOption=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/specs/".concat(t,"/options/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveOption=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/specs/".concat(t,"/options/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteOption=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/specs/".concat(t,"/options/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchOption=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/specs/".concat(t,"/options/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/specs/".concat(t,"/productassignments/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/specs/productassignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/specs/productassignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/productfacets",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/productfacets",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/productfacets/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/productfacets/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/productfacets/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/productfacets/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListVariant=this.ListVariant.bind(this),this.CreateVariant=this.CreateVariant.bind(this),this.GetVariant=this.GetVariant.bind(this),this.SaveVariant=this.SaveVariant.bind(this),this.DeleteVariant=this.DeleteVariant.bind(this),this.PatchVariant=this.PatchVariant.bind(this),this.DeleteVariantAssignment=this.DeleteVariantAssignment.bind(this),this.ListVariantAssignments=this.ListVariantAssignments.bind(this),this.SaveVariantAssignment=this.SaveVariantAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/inventoryrecords"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/products/".concat(t,"/inventoryrecords"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/inventoryrecords/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/products/".concat(t,"/inventoryrecords/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/inventoryrecords/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/products/".concat(t,"/inventoryrecords/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/inventoryrecords/").concat(e,"/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/inventoryrecords/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/products/".concat(t,"/inventoryrecords/assignments"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariant=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateVariant=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetVariant=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.put("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteVariant=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.patch("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteVariantAssignment=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n,"/assignments"),nd(nd({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.ListVariantAssignments=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariantAssignment=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/bundles",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/bundles",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/bundles/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/bundles/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/bundles/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return v
1oid 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/bundles/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/bundles/".concat(t,"/assignments/").concat(e),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/bundles/".concat(t,"/productassignments/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/bundles/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/bundles/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/bundles/productassignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/bundles/productassignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ApplyPromotions=this.ApplyPromotions.bind(this),this.ListApprovals=this.ListApprovals.bind(this),this.Approve=this.Approve.bind(this),this.SetBillingAddress=this.SetBillingAddress.bind(this),this.PatchBillingAddress=this.PatchBillingAddress.bind(this),this.Cancel=this.Cancel.bind(this),this.Complete=this.Complete.bind(this),this.Decline=this.Decline.bind(this),this.ListEligibleApprovers=this.ListEligibleApprovers.bind(this),this.ListEligiblePromotions=this.ListEligiblePromotions.bind(this),this.Forward=this.Forward.bind(this),this.PatchFromUser=this.PatchFromUser.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.AddPromotion=this.AddPromotion.bind(this),this.RemovePromotion=this.RemovePromotion.bind(this),this.Ship=this.Ship.bind(this),this.ListShipments=this.ListShipments.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this),this.Split=this.Split.bind(this),this.Submit=this.Submit.bind(this),this.Validate=this.Validate.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/orders/".concat(t,"/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ApplyPromotions=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/applypromotions"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListApprovals=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/approvals"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Approve=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/approve"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/orders/".concat(t,"/").concat(e,"/billto"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/billto"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Cancel=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/cancel"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Complete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/complete"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Decline=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/decline"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListEligibleApprovers=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/eligibleapprovers"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListEligiblePromotions=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/eligiblepromotions"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Forward=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/forward"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchFromUser=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/fromuser"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListPromotions=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/promotions"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AddPromotion=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemovePromotion=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Ship=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/ship"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListShipments=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/shipments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/orders/".concat(t,"/").concat(e,"/shipto"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/shipto"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Split=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/split"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/submit"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Validate=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/validate"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SetA
1ctiveCart=this.SetActiveCart.bind(this),this.ApplyPromotions=this.ApplyPromotions.bind(this),this.SetBillingAddress=this.SetBillingAddress.bind(this),this.PatchBillingAddress=this.PatchBillingAddress.bind(this),this.CreateBundleItem=this.CreateBundleItem.bind(this),this.DeleteBundleItem=this.DeleteBundleItem.bind(this),this.Calculate=this.Calculate.bind(this),this.ListEligiblePromotions=this.ListEligiblePromotions.bind(this),this.EstimateShipping=this.EstimateShipping.bind(this),this.PatchFromUser=this.PatchFromUser.bind(this),this.ListLineItems=this.ListLineItems.bind(this),this.CreateLineItem=this.CreateLineItem.bind(this),this.GetLineItem=this.GetLineItem.bind(this),this.SaveLineItem=this.SaveLineItem.bind(this),this.DeleteLineItem=this.DeleteLineItem.bind(this),this.PatchLineItem=this.PatchLineItem.bind(this),this.ListPayments=this.ListPayments.bind(this),this.CreatePayment=this.CreatePayment.bind(this),this.GetPayment=this.GetPayment.bind(this),this.DeletePayment=this.DeletePayment.bind(this),this.PatchPayment=this.PatchPayment.bind(this),this.CreatePaymentTransaction=this.CreatePaymentTransaction.bind(this),this.DeletePaymentTransaction=this.DeletePaymentTransaction.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.AddPromotion=this.AddPromotion.bind(this),this.DeletePromotion=this.DeletePromotion.bind(this),this.SelectShipMethods=this.SelectShipMethods.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this),this.Submit=this.Submit.bind(this),this.Validate=this.Validate.bind(this),this.GetOrderWorksheet=this.GetOrderWorksheet.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/cart",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/cart",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetActiveCart=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/cart/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ApplyPromotions=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/applypromotions",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.SetBillingAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/cart/billto",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart/billto",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateBundleItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/bundles/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart/bundles/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/calculate",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.ListEligiblePromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/eligiblepromotions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.EstimateShipping=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/estimateshipping",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.PatchFromUser=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart/fromuser",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListLineItems=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/lineitems",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateLineItem=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/lineitems",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetLineItem=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/lineitems/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveLineItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/cart/lineitems/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteLineItem=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart/lineitems/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchLineItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart/lineitems/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPayments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/payments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreatePayment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/payments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPayment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/payments/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePayment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart/payments/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchPayment=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart/payments/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreatePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/payments/".concat(t,"/transactions"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeletePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart/payments/".concat(t,"/transactions/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/promotions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.AddPromotion=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/promotions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePromotion=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/cart/promotions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SelectShipMethods=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/shipmethods",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetShippingAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/cart/shipto",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/cart/shipto",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Submit=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/submit",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/cart/validate",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.GetOrderWorksheet=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/cart/worksheet",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.ListAcrossOrders=this.ListAcrossOrders.bind(this),this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this)}return t.prototype.ListAcrossOrders=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/lineitems/".concat(t),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.List=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/lineitems"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this
1.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/lineitems"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Save=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/promotions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/promotions",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/promotions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/promotions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/promotions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/promotions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/promotions/".concat(t,"/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/promotions/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/promotions/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.CreateTransaction=this.CreateTransaction.bind(this),this.DeleteTransaction=this.DeleteTransaction.bind(this)}return t.prototype.List=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/payments"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/payments"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.patch("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.CreateTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions"),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions/").concat(i),nd(nd({},r),{impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListItems=this.ListItems.bind(this),this.SaveItem=this.SaveItem.bind(this),this.GetItem=this.GetItem.bind(this),this.DeleteItem=this.DeleteItem.bind(this),this.SetShipFromAddress=this.SetShipFromAddress.bind(this),this.SetShipToAddress=this.SetShipToAddress.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/shipments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/shipments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/shipments/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/shipments/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/shipments/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/shipments/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/shipments/".concat(t,"/items"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/shipments/".concat(t,"/items"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShipFromAddress=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/shipments/".concat(t,"/shipfrom"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SetShipToAddress=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/shipments/".concat(t,"/shipto"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListApprovals=this.ListApprovals.bind(this),this.Ap
1prove=this.Approve.bind(this),this.Cancel=this.Cancel.bind(this),this.Complete=this.Complete.bind(this),this.Decline=this.Decline.bind(this),this.ListEligibleApprovers=this.ListEligibleApprovers.bind(this),this.DeleteItem=this.DeleteItem.bind(this),this.Submit=this.Submit.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/orderreturns",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/orderreturns/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/orderreturns/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/orderreturns/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/orderreturns/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListApprovals=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/orderreturns/".concat(t,"/approvals"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Approve=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns/".concat(t,"/approve"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Cancel=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns/".concat(t,"/cancel"),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Complete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns/".concat(t,"/complete"),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Decline=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns/".concat(t,"/decline"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListEligibleApprovers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/orderreturns/".concat(t,"/eligibleapprovers"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/orderreturns/".concat(t,"/items/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/orderreturns/".concat(t,"/submit"),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/approvalrules",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/approvalrules",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/approvalrules/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/approvalrules/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/approvalrules/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/approvalrules/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Create=this.Create.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.Create=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n),nd(nd({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i,r){return void 0===r&&(r={}),nf(this,void 0,void 0,function(){var s;return nv(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nP.delete("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n,"/").concat(i),nd(nd({},r),{impersonating:s})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Create=this.Create.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/subscriptions/".concat(t,"/bundles/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/subscriptions/".concat(t,"/bundles/").concat(e,"/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/subscriptions/".concat(t,"/items"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/subscriptions/".concat(t,"/items"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/subscriptions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/subscriptions",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/subscriptions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/subscriptions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/subscriptions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/subscriptions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Patch=this.Patch.bind(this),this.ListAddresses=this.ListAddresses.bind(this),this.CreateAddress=this.CreateAddress.bind(this),this.GetAddress=this.GetAddress.bind(this),this.SaveAddress=this.SaveAddress.bind(this),this.DeleteAddress=this.DeleteAddress.bind(this),this.PatchAddress=this.PatchAddress.bind(this),this.ListCatalogs=this.ListCatalogs.bind(this),this.GetCatalog=this.GetCatalog.bind(this),this.ListCategories=this.ListCategories.bind(this),this.GetCategory=this.GetCategory.bind(this),this.ListCostCenters=this.ListCostCenters.bind(this),this.ListCreditCards=this.ListCreditCards.bind(this),this.CreateCreditCard=this.CreateCreditCard.bind(this),this.GetCredit
1Card=this.GetCreditCard.bind(this),this.SaveCreditCard=this.SaveCreditCard.bind(this),this.DeleteCreditCard=this.DeleteCreditCard.bind(this),this.PatchCreditCard=this.PatchCreditCard.bind(this),this.ListOrders=this.ListOrders.bind(this),this.TransferAnonUserOrder=this.TransferAnonUserOrder.bind(this),this.ListApprovableOrders=this.ListApprovableOrders.bind(this),this.ResetPasswordByToken=this.ResetPasswordByToken.bind(this),this.ListProductCollections=this.ListProductCollections.bind(this),this.CreateProductCollection=this.CreateProductCollection.bind(this),this.GetProductCollection=this.GetProductCollection.bind(this),this.SaveProductCollection=this.SaveProductCollection.bind(this),this.DeleteProductCollection=this.DeleteProductCollection.bind(this),this.PatchProductCollection=this.PatchProductCollection.bind(this),this.CreateProductCollectionEntry=this.CreateProductCollectionEntry.bind(this),this.DeleteProductCollectionEntry=this.DeleteProductCollectionEntry.bind(this),this.ListProductCollectionInvitations=this.ListProductCollectionInvitations.bind(this),this.CreateProductCollectionInvitation=this.CreateProductCollectionInvitation.bind(this),this.GetProductCollectionInvitation=this.GetProductCollectionInvitation.bind(this),this.DeleteProductCollectionInvitation=this.DeleteProductCollectionInvitation.bind(this),this.PatchProductCollectionInvitation=this.PatchProductCollectionInvitation.bind(this),this.AcceptProductCollectionInvitation=this.AcceptProductCollectionInvitation.bind(this),this.DeclineProductCollectionInvitation=this.DeclineProductCollectionInvitation.bind(this),this.ListProductCollectionEntries=this.ListProductCollectionEntries.bind(this),this.ListProducts=this.ListProducts.bind(this),this.GetProduct=this.GetProduct.bind(this),this.ListProductInventoryRecords=this.ListProductInventoryRecords.bind(this),this.ListProductSellers=this.ListProductSellers.bind(this),this.ListSpecs=this.ListSpecs.bind(this),this.GetSpec=this.GetSpec.bind(this),this.ListVariants=this.ListVariants.bind(this),this.GetVariant=this.GetVariant.bind(this),this.ListVariantInventoryRecords=this.ListVariantInventoryRecords.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.GetPromotion=this.GetPromotion.bind(this),this.Register=this.Register.bind(this),this.ListBuyerSellers=this.ListBuyerSellers.bind(this),this.ListShipments=this.ListShipments.bind(this),this.GetShipment=this.GetShipment.bind(this),this.ListShipmentItems=this.ListShipmentItems.bind(this),this.ListSpendingAccounts=this.ListSpendingAccounts.bind(this),this.GetSpendingAccount=this.GetSpendingAccount.bind(this),this.ListSubscriptions=this.ListSubscriptions.bind(this),this.CreateSubscription=this.CreateSubscription.bind(this),this.GetSubscription=this.GetSubscription.bind(this),this.SaveSubscription=this.SaveSubscription.bind(this),this.DeleteSubscription=this.DeleteSubscription.bind(this),this.PatchSubscription=this.PatchSubscription.bind(this),this.ListSubscriptionItems=this.ListSubscriptionItems.bind(this),this.CreateSubscriptionItem=this.CreateSubscriptionItem.bind(this),this.GetSubscriptionItem=this.GetSubscriptionItem.bind(this),this.SaveSubscriptionItem=this.SaveSubscriptionItem.bind(this),this.DeleteSubscriptionItem=this.DeleteSubscriptionItem.bind(this),this.PatchSubscriptionItem=this.PatchSubscriptionItem.bind(this),this.CreateSubscriptionBundleItem=this.CreateSubscriptionBundleItem.bind(this),this.DeleteSubscriptionBundleItem=this.DeleteSubscriptionBundleItem.bind(this),this.ListUserGroups=this.ListUserGroups.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/me",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/me",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/me",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListAddresses=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/addresses",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/me/addresses",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/addresses/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAddress=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/addresses/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAddress=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/addresses/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchAddress=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/addresses/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})}
1,t.prototype.ListCatalogs=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/catalogs",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCatalog=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/catalogs/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCategories=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/categories",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCategory=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/categories/".concat(t),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListCostCenters=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/costcenters",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCreditCards=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/creditcards",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateCreditCard=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/me/creditcards",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCreditCard=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/creditcards/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCreditCard=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/creditcards/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteCreditCard=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/creditcards/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchCreditCard=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/creditcards/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/orders",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.TransferAnonUserOrder=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/me/orders",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListApprovableOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/orders/approvable",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByToken=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/me/password",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductCollections=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/productcollections",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateProductCollection=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/me/productcollections",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetProductCollection=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/productcollections/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductCollection=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/productcollections/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollection=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/productcollections/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchProductCollection=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/productcollections/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/productcollections/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/productcollections/".concat(t,"/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductCollectionInvitations=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/productcollections/".concat(t,"/invitations"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/me/productcollections/".concat(t,"/invitations"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/productcollections/".concat(t,"/invitations/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/productcollections/".concat(t,"/invitations/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchProductCollectionInvitation=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/productcollections/".concat(t,"/invitations/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AcceptProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/me/productcollections/".concat(t,"/invitations/accept/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeclineProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/me/productcollections/".concat(t,"/invitations/decline/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductCollectionEntries=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/productcollections/".concat(t,"/products"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProducts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetProduct=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductInventoryRecords=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/inventoryrecords"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductSellers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/sellers"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSpecs=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/specs"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetSpec=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/specs/").concat(e),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/variants"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/variants/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariantInventoryRecords=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.get("/me/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nd(nd({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/promotions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPromotion=function(t,e){return void 0===e&&(e={}),nf(this,void 0,v
1oid 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/promotions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Register=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/register",nd(nd({},n),{data:t,impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyerSellers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/sellers",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListShipments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/shipments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetShipment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/shipments/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListShipmentItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/shipments/".concat(t,"/items"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSpendingAccounts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/spendingAccounts",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSpendingAccount=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/spendingaccounts/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListSubscriptions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/subscriptions",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateSubscription=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/me/subscriptions",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSubscription=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/subscriptions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveSubscription=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/me/subscriptions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSubscription=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/subscriptions/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchSubscription=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/subscriptions/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSubscriptionItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/subscriptions/".concat(t,"/items"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/me/subscriptions/".concat(t,"/items"),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/me/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.put("/me/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.patch("/me/subscriptions/".concat(t,"/items/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/me/subscriptions/".concat(t,"/items/bundles/").concat(e),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.delete("/me/subscriptions/".concat(t,"/items/bundles/").concat(e,"/").concat(n),nd(nd({},i),{impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserGroups=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/me/usergroups",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/trackingEvents",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/integrations/trackingEvents",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/trackingEvents/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/trackingEvents/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/trackingEvents/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/trackingEvents/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/deliveryconfig",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/integrations/deliveryconfig",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/deliveryconfig/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/deliveryconfig/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/deliveryconfig/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/deliveryconfig/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.Validate=this.Validate.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/ErrorConfig",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/ErrorConfig",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/ErrorConfig",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/ErrorConfig",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.post("/integrations/ErrorConfig/validate",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),thi
1s.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.Calculate=this.Calculate.bind(this),this.EstimateShipping=this.EstimateShipping.bind(this),this.SelectShipmethods=this.SelectShipmethods.bind(this),this.GetWorksheet=this.GetWorksheet.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrationEvents",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/integrationEvents",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/integrationEvents/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/integrationEvents/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrationEvents/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrationEvents/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/calculate"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.EstimateShipping=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/estimateshipping"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SelectShipmethods=function(t,e,n,i){return void 0===i&&(i={}),nf(this,void 0,void 0,function(){var r;return nv(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nP.post("/orders/".concat(t,"/").concat(e,"/shipmethods"),nd(nd({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetWorksheet=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.get("/orders/".concat(t,"/").concat(e,"/worksheet"),nd(nd({},n),{impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListCCListenerAssignments=this.ListCCListenerAssignments.bind(this),this.SaveCCListenerAssignment=this.SaveCCListenerAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/messagesenders",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/messagesenders",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/messagesenders/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.put("/messagesenders/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.delete("/messagesenders/".concat(t),nd(nd({},e),{impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.patch("/messagesenders/".concat(t),nd(nd({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nf(this,void 0,void 0,function(){var i;return nv(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nP.delete("/messagesenders/".concat(t,"/assignments"),nd(nd({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/messagesenders/assignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/messagesenders/assignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})}
1,t.prototype.ListCCListenerAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.get("/messagesenders/CCListenerAssignments",nd(nd({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCCListenerAssignment=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.post("/messagesenders/CCListenerAssignments",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/OrderSync",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/OrderSync",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/OrderSync",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/OrderSync",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/productsync",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/productsync",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/productsync",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/productsync",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("/integrations/subscription",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.put("/integrations/subscription",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.delete("/integrations/subscription",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nf(this,void 0,void 0,function(){var n;return nv(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nP.patch("/integrations/subscription",nd(nd({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.GetToken=this.GetToken.bind(this)}return t.prototype.GetToken=function(t){return void 0===t&&(t={}),nf(this,void 0,void 0,function(){var e;return nv(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nP.get("oauth/userinfo",nd(nd({},t),{impersonating:e})).catch(function(t){if(t.response)throw new ng(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}());let nT={sitecore:{async getAuthHeader(){let{apiKey:t}=tC();return Promise.resolve(t)}},oc:{async getAuthHeader(){let t=nA.GetIdentityToken();if(!t)throw tp.error("Could not found an Order Cloud Cloud logged user."),Error("Could not found an Order Cloud Cloud logged user.");return tp.info("Using existing Order Cloud Token."),`Bearer ${t}`}}},nL=async()=>{let{connector:t="oc"}=tC();return{"Content-Type":"application/json",Authorization:await nT[t].getAuthHeader()||""}}
1,nO=new class{constructor(t){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=t,this.cache={},tk.RFK_CACHE||(tk.RFK_CACHE={}),tk.RFK_CACHE[t]=this.cache}hashKey(t){let e,n,i=0;for(e=0,n=t.length;e<n;e++)i=(i<<5)-i+t.charCodeAt(e)|0;return i}sortObjectKeys(t){return null==t?"":"object"!=typeof t?t:Object.keys(t).sort().reduce((e,n)=>(Array.isArray(t[n])?e[n]=t[n].map(t=>this.sortObjectKeys(t)):"object"==typeof t[n]?e[n]=this.sortObjectKeys(t[n]):e[n]=t[n],e),{})}createKey(t){let e=JSON.stringify(this.sortObjectKeys(t));return tS("debug")?(tp.debug("cache ::: createKey",t),e):String(this.hashKey(e))}has(t){return t in this.cache}get(t){return this.cache[t]}set(t,e){this.cache[t]=e}delete(t){delete this.cache[t]}all(){return this.cache}clear(){this.cache={},window.RFK_CACHE[this.name]=this.cache}getName(){return this.name}}("api-adapter"),nR={cache:!0};class nI{static async trackEvent(t){let e=nF(t),{eventUrl:n,apiKey:i}=tC();try{return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(e)})).json()}catch(t){return tp.error(t),tp.error("There was a problem on the service call"),t.message||null}}static async callApiWithoutCache(t,e){try{let n=await fetch(t,e),i=await n.json();return Promise.resolve(i)}catch(t){return tp.error(t),tp.error("There was a problem on the service call"),t.message||null}}static async callApiWithCache(t,e){let n=nO.createKey(e);if(nO.has(n))return nO.get(n);let i=await nI.callApiWithoutCache(t,e);return nO.set(n,i),i}static async callApi(t,e=nR){let{searchUrl:n}=tC(),i={method:"POST",headers:await nL(),body:JSON.stringify(t),signal:e.signal};return e.cache?nI.callApiWithCache(n,i):nI.callApiWithoutCache(n,i)}static clearCache(){nO.clear()}}let nD=async t=>{let{trackConsent:e}=tC();if(tp.debug("trackEvent ",`Consent: ${e} `,nF(t)),!e)return;let n={...t,...t_(),client_time_ms:Date.now()};return tp.debug("trackEvent","Sending: ",JSON.stringify(n,null,4)),await nI.trackEvent(n)},n_=t=>!t.find(({id:t,entity_type:e})=>to(t)||to(e)),nk=(t,e)=>e.map(({id:e,entitySubtype:n,attributes:i,variant:r,uri:s,sourceId:o})=>({id:e,entity_type:t,...n?{entity_subtype:n}:{},...i&&!ts(i)?{attributes:i}:{},...r?{variant:r}:{},...s?{uri:s}:{},...o?{source_id:o}:{}})),nx=(t,e,n,i)=>({order_id:t,...e?{order_total:e}:{},...n?{order_subtotal:n}:{},...i?{coupon:i}:{}}),nN=({keyword:t,advancedQueryText:e,modifiedKeyword:n,numResults:i,totalResults:r,numRequested:s,pageSize:o,pageNumber:a,redirectUrl:c})=>({...t?{keyword:t}:{keyword:""},...e?{advanced_query_text:e}:{},...n?{modified_keyword:n}:{},...i?{num_results:i}:{},...r?{total_results:r}:{},...s?{num_requested:s}:{},...o?{page_size:o}:{},...a?{page_number:a}:{},...c?{redirect_url:c}:{}}),nG=t=>t.map(({facetId:t,facetValue:e,startValue:n,endValue:i,facetValueId:r,valueIndex:s,facetIndex:o,facetTitle:a,displayName:c})=>({name:t,title:a,...c?{display_name:c}:{},...t?{field:t}:{},...r?{value:[r]}:e?{value:[e]}:{},...n?{start_value:n}:{},...i?{end_value:i}:{},...e?{display_name:[e]}:{},...s||0===s?{value_position:[s]}:{},...o||0===o?{facet_position:o}:{}}));function nF(t){let e={};for(let n in t){let i=t[n];if(null!=i&&("object"!=typeof i||0!==Object.keys(i).length||Array.isArray(i))&&void 0!==i){if(Array.isArray(i)){let t=[];for(let e=0;e<i.length;e++){let n=i[e];if(null!=n&&("object"!=typeof n||0!==Object.keys(n).length||Array.isArray(n))){if("object"==typeof n){let e=nF(n);(Object.keys(e).length>0||Array.isArray(e))&&t.push(e)}else t.push(n)}}t.length>0&&(e[n]=t)}else if("object"==typeof i&&Object.keys(i).length>0){let t=nF(i);(Object.keys(t).length>0||Array.isArray(t))&&(e[n]=t)}else e[n]=i}}return e}let nU=async(t,e,{review:n,transaction:i,items:r,customAttributes:s,actionSubtype:o})=>{if(!e)return void tp.warn("trackEvent :::","Event name is not defined");let a=[];return t&&r&&(a=nk(t,r)),nD({name:e,action:"add",action_sub_type:o,value:{entities:a,transaction:i,review:n,custom_attributes:s,context:tr.toJson()}})};(su=sP||(sP={})).LOAD="core/LOAD",su.UNLOAD="core/UNLOAD",su.REQUEST="core/REQUEST",su.REQUEST_SUCCESS="core/REQUEST_SUCCESS",su.REQUEST_FAIL="core/REQUEST_FAIL",su.REQUEST_CANCELED="core/REQUEST_CANCELED",su.WIDGET_DATA_REQUEST="core/WIDGET_DATA_REQUEST",su.WIDGET_DATA_REQUEST_SUCCESS="core/WIDGET_DATA_REQUEST_SUCCESS",su.WIDGET_DATA_REQUEST_FAIL="core/WIDGET_DATA_REQUEST_FAIL",su.WIDGET_DATA_REQUEST_CANCELED="core/WIDGET_DATA_REQUEST_CANCELED",su.WIDGET_STATE_CHANGED="core/WIDGET_STATE_CHANGED",su.WIDGET_APPEAR="core/WIDGET_APPEAR",su.PAGE_CONTAINER_READY="core/PAGE_CONTAINER_READY",su.WIDGET_READY="core/WIDGET_READY",su.INITIALIZE="core/INITIALIZE",su.INITIALIZED="core/INITIALIZED",su.RESET_WIDGET="core/RESET_WIDGET",su.PAGE_CONTEXT_CHANGED="core/PAGE_CONTEXT_CHANGED",su.OC_CONTEXT_CHANGED="core/OC_CONTEXT_CHANGED",su.FOUND_WIDGETS="core/FOUND_WIDGETS",su.ADD_TO_CART="core/interaction/ADD_TO_CART",su.ORDER_CONFIRM="core/interaction/ORDER_CONFIRM",su.USER_LOGIN="core/interaction/USER_LOGIN",su.ADD_TO_WISHLIST="core/interaction/ADD_TO_WISHLIST",su.CART_STATUS="core/interaction/CART_STATUS",su.ITEM_CLICKED="core/interaction/ITEM_CLICKED",su.PAGE_WIDGETS_DATA_REQUEST="core/PAGE_WIDGETS_DATA_REQUEST",su.PAGE_WIDGETS_DATA_REQUEST_SUCCESS="core/PAGE_WIDGETS_DATA_REQUEST_SUCCESS",su.PAGE_WIDGETS_DATA_REQUEST_FAIL="core/PAGE_WIDGETS_DATA_REQUEST_FAIL",su.PAGE_WIDGETS_DATA_REQUEST_CANCELED="core/PAGE_WIDGETS_DATA_REQUEST_CANCELED";let nj=sP,nq=[],nB=[];class nV{static addActionHandler(t){nq.push(t)}static removeActionHandler(t){let e=nB.indexOf(t);-1!==e&&nB.splice(e,1)}static subscribe(t){nq.push(t)}static unsubscribe(t){let e=nq.indexOf(t);-1!==e&&nq.splice(e,1)}static dispatch(t){tp.debug("dispatcher ::: dispatch",`[${t.type}
1]`,t.payload),nq.forEach(e=>{e.handleAction(t)}),nB.forEach(e=>{e.handleAction(t)})}}let nM=(t,e)=>`${t}${e?`@${e}`:""}`,nK={widgetTypesConfigMapping:{},widgetsConfigMapping:{},setWidgetType(t,e){k(this.widgetTypesConfigMapping,{[t]:e},{mutate:!0})},getType(t){let{type:e}=this.widgetsConfigMapping[nM(t)]||{};return e},set(t,e,n){"string"==typeof e?this.widgetsConfigMapping[nM(t,e)]=n:this.widgetsConfigMapping[nM(t)]=e},update(t,e,n){k("string"==typeof e?this.getOrCreate(t,e):this.getOrCreate(t),n,{mutate:!0})},get(t,e){let n=this.widgetsConfigMapping[nM(t,e)],i=this.widgetsConfigMapping[nM(t)];if(!i&&!n)return;let r=k(i||{},n||{}),{component:s,options:o}=this.getForType(t)||{},{component:a=s,options:c}=r;return{...r,component:a,options:c?k(o||{},c):o}},getWidgetIds(){return Object.keys(this.widgetsConfigMapping)},getByType(t){return this.widgetTypesConfigMapping[t]||void 0},getForType(t){let e=this.getType(t);return e?this.getByType(e):void 0},getOrCreate(t,e){return this.widgetsConfigMapping[nM(t,e)]||(this.widgetsConfigMapping[nM(t,e)]={}),this.widgetsConfigMapping[nM(t,e)]},getMetadata(t){let{metadata:e}=this.widgetsConfigMapping[nM(t)]||{};return e},setMetadata(t,e){Object.assign(this.getOrCreate(t),{metadata:e}),this.setType(t,e.type)},updateMetadata(t,e){k(this.getOrCreate(t),{metadata:e},{mutate:!0}),this.setType(t,e.type)},setType(t,e){this.getType(t)||Object.assign(this.getOrCreate(t),{type:e})}};class nQ{constructor(){Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1})}register(t){nV.subscribe(t)}unregister(t){nV.unsubscribe(t)}getDispatcher(){return nV}initialize(){this.initialized=!0,nV.dispatch({type:nj.INITIALIZED,payload:{}})}}let nW=new class extends nQ{constructor(){super(),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(tr.get()),nV.subscribe(this)}getContext(){return this.context}setContext(t){this.context=t,this.context.addListener(this)}toggleTrackConsent(t){t?this.context.setUserUuid(t_().uuid):(tO.remove("__ruid"),tO.remove("__rutma"),tO.remove("__rutmb"),tO.remove("__ec"),tb.trackConsent=!1)}handleAction(t){switch(t.type){case nj.INITIALIZE:this.initialize();break;case nj.ADD_TO_CART:{let{entity:e,items:n}=t.payload;(async(t,e)=>{nU(t,"cart",e)})(e,{items:n});break}case nj.ADD_TO_WISHLIST:{let{entity:e,items:n}=t.payload;(async(t,e)=>{nU(t,"wishlist",e)})(e,{items:n});break}case nj.USER_LOGIN:{let{id:e,email:n}=t.payload;(async t=>{if(!t||ts(t))return void tp.warn("trackEvent :::","User information is empty or not complete");nD({action:"identify",name:"login",action_sub_type:void 0,value:{context:k(tr.toJson(),{user:{...t.id?{cuid:t.id}:{},...t.email?{email:t.email}:{}}})}})})({id:e,email:n});break}case nj.CART_STATUS:{let{entity:e,items:n}=t.payload;(async(t,{items:e,actionSubtype:n})=>{let i=[];if(t&&e&&(i=nk(t,e))&&!n_(i))return void tp.warn("trackEvent :::","A field is missing on one or more of the items provided");nD({action:"view",name:"cart",action_sub_type:n,value:{entities:i,context:tr.toJson()}})})(e,{items:n});break}case nj.ORDER_CONFIRM:{let{entity:e,items:n,orderId:i,orderTotal:r,orderSubtotal:s,coupon:o}=t.payload;(async(t,e)=>{let{orderId:n,orderTotal:i,orderSubtotal:r,coupon:s,items:o,actionSubtype:a}=e;if(!to(n))return nU(t,"order_confirm",{items:o,transaction:nx(n,i,r,s),actionSubtype:a});tp.warn("trackEvent :::","Transaction orderId is not defined")})(e,{orderId:i,orderTotal:r,orderSubtotal:s,coupon:o,items:n});break}case nj.WIDGET_APPEAR:{let{rfkId:e,entity:n}=t.payload;(async(t,e,{request:n,items:i}={})=>{let r=[];if(e&&i&&(r=nk(e,i))&&!n_(r))return void tp.warn("trackEvent :::","A field is missing on one or more of the items provided");nD({action:"view",name:"widget",value:{rfk_id:t,request:n,entities:r,context:tr.toJson()}})})(e,n)}}}onChange(t,e,n){this.initialized&&nV.dispatch({type:nj.PAGE_CONTEXT_CHANGED,payload:{context:this.context}})}},nH=null,n$=async(t,e)=>{if(!nH)return Promise.reject(Error("No data processor configured"));try{let n=await nI.callApi(t,{cache:!1,...e}),i=nH.validateResponse(n,t);return i?Promise.reject(i):Promise.resolve(nH.processResponse(n,t))}catch(t){return Promise.reject(t)}},nJ=t=>{nH=t};class nz{validateResponse(t,e){return t&&(t.errors||[]).length>0?t:null}processResponse(t,e){return t}}let nY=(t,{processor:e=new nz}={})=>{let n;n=tb,"useToken"in t&&void 0!==t.useToken&&tp.warn('Parameter "useToken" has been deprecated'),tb=t.customerKey?tw(n,t):tm(n,t);
1let{useStorage:i=!1}=t;tO.init(i),e&&nJ(e)};class nX extends nz{processResponse(t){return t.widgets?.forEach(({rfk_id:t,type:e,variation_id:n,used_in:i})=>{nK.setMetadata(t,{rfkId:t,type:e,variationId:n,usedIn:i})}),t}}let nZ=!1,n0=()=>{nZ||((()=>{let{trackConsent:t}=tC();nW.toggleTrackConsent(t),nW.getContext().setBrowserUserAgent(tc({navigator:{userAgent:""}}).navigator.userAgent)})(),nZ=!0,nW.getDispatcher().dispatch({type:nj.INITIALIZE,payload:{options:{}}}))},n1="undefined"==typeof window||"Deno"in window;function n2(){}function n4(t){return"number"==typeof t&&t>=0&&t!==1/0}function n3(t,e){return Math.max(t+(e||0)-Date.now(),0)}function n5(t,e,n){return ia(t)?"function"==typeof e?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function n6(t,e,n){return ia(t)?[{...e,queryKey:t},n]:[t||{},e]}function n8(t,e){let{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(ia(o)){if(i){if(e.queryHash!==n7(o,e.options))return!1}else{if(!ie(e.queryKey,o))return!1}}if("all"!==n){let t=e.isActive();if("active"===n&&!t||"inactive"===n&&t)return!1}return!("boolean"==typeof a&&e.isStale()!==a||void 0!==r&&r!==e.state.fetchStatus||s&&!s(e))}function n9(t,e){let{exact:n,fetching:i,predicate:r,mutationKey:s}=t;if(ia(s)){if(!e.options.mutationKey)return!1;if(n){if(it(e.options.mutationKey)!==it(s))return!1}else{if(!ie(e.options.mutationKey,s))return!1}}return!("boolean"==typeof i&&"loading"===e.state.status!==i||r&&!r(e))}function n7(t,e){return((null==e?void 0:e.queryKeyHashFn)||it)(t)}function it(t){return JSON.stringify(t,(t,e)=>is(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e)}function ie(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some(n=>!ie(t[n],e[n]))}function ii(t,e){if(t&&!e||e&&!t)return!1;for(let n in t)if(t[n]!==e[n])return!1;return!0}function ir(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function is(t){if(!io(t))return!1;let e=t.constructor;if(void 0===e)return!0;let n=e.prototype;return!!io(n)&&!!n.hasOwnProperty("isPrototypeOf")}function io(t){return"[object Object]"===Object.prototype.toString.call(t)}function ia(t){return Array.isArray(t)}function ic(t){return new Promise(e=>{setTimeout(e,t)})}function iu(t){ic(0).then(t)}function ih(t,e,n){return null!=n.isDataEqual&&n.isDataEqual(t,e)?t:"function"==typeof n.structuralSharing?n.structuralSharing(t,e):!1!==n.structuralSharing?function t(e,n){if(e===n)return e;let i=ir(e)&&ir(n);if(i||is(e)&&is(n)){let r=i?e.length:Object.keys(e).length,s=i?n:Object.keys(n),o=s.length,a=i?[]:{},c=0;for(let r=0;r<o;r++){let o=i?r:s[r];a[o]=t(e[o],n[o]),a[o]===e[o]&&c++}return r===o&&c===r?e:a}return n}(t,e):e}let il=console,ip=function(){let t=[],e=0,n=t=>{t()},i=t=>{t()},r=i=>{e?t.push(i):iu(()=>{n(i)})};return{batch:r=>{let s;e++;try{s=r()}finally{--e||(()=>{let e=t;t=[],e.length&&iu(()=>{i(()=>{e.forEach(t=>{n(t)})})})})()}return s},batchCalls:t=>(...e)=>{r(()=>{t(...e)})},schedule:r,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{i=t}}}();class id{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){let e={listener:t};return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}let iv=new class extends id{constructor(){super(),this.setup=t=>{if(!n1&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",e,!1),()=>{window.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},im=["online","offline"],ig=new class extends id{constructor(){super(),this.setup=t=>{if(!n1&&window.addEventListener){let e=()=>t();return im.forEach(t=>{window.addEventListener(t,e,!1)}),()=>{im.forEach(t=>{window.removeEventListener(t,e)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setOnline(t):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}
1onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function iw(t){return Math.min(1e3*2**t,3e4)}function iy(t){return"online"!==(null!=t?t:"online")||ig.isOnline()}class ib{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function iS(t){return t instanceof ib}function iC(t){let e,n,i,r=!1,s=0,o=!1,a=new Promise((t,e)=>{n=t,i=e}),c=()=>!iv.isFocused()||"always"!==t.networkMode&&!ig.isOnline(),u=i=>{o||(o=!0,null==t.onSuccess||t.onSuccess(i),null==e||e(),n(i))},h=n=>{o||(o=!0,null==t.onError||t.onError(n),null==e||e(),i(n))},l=()=>new Promise(n=>{e=t=>{let e=o||!c();return e&&n(t),e},null==t.onPause||t.onPause()}).then(()=>{e=void 0,o||null==t.onContinue||t.onContinue()}),p=()=>{let e;if(!o){try{e=t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(u).catch(e=>{var n,i;if(o)return;let a=null!=(n=t.retry)?n:3,u=null!=(i=t.retryDelay)?i:iw,d="function"==typeof u?u(s,e):u,f=!0===a||"number"==typeof a&&s<a||"function"==typeof a&&a(s,e);!r&&f?(s++,null==t.onFail||t.onFail(s,e),ic(d).then(()=>{if(c())return l()}).then(()=>{r?h(e):p()})):h(e)})}};return iy(t.networkMode)?p():l().then(p),{promise:a,cancel:e=>{o||(h(new ib(e)),null==t.abort||t.abort())},continue:()=>(null==e?void 0:e())?a:Promise.resolve(),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1}}}class iE{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),n4(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,null!=t?t:n1?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class iA extends iE{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||il,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||function(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==e,i=n?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?null!=i?i:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(t,e){let n=ih(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){this.dispatch({type:"setState",state:t,setStateOptions:e})}cancel(t){var e;let n=this.promise;return null==(e=this.retryer)||e.cancel(t),n?n.then(n2).catch(n2):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>!1!==t.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!n3(this.state.dataUpdatedAt,t)}onFocus(){var t;let e=this.observers.find(t=>t.shouldFetchOnWindowFocus());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}onOnline(){var t;let e=this.observers.find(t=>t.shouldFetchOnReconnect());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>
1e!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,e){var n,i,r,s;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=e&&e.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(r=this.retryer)||r.continueRetry(),this.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let o=function(){if("function"==typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);let u={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};c(u),null==(n=this.options.behavior)||n.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=u.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(s=u.fetchOptions)?void 0:s.meta});let h=t=>{var e,n,i,r;iS(t)&&t.silent||this.dispatch({type:"error",error:t}),iS(t)||(null==(e=(n=this.cache.config).onError)||e.call(n,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=iC({fn:u.fetchFn,abort:null==o?void 0:o.abort.bind(o),onSuccess:t=>{var e,n,i,r;void 0!==t?(this.setData(t),null==(e=(n=this.cache.config).onSuccess)||e.call(n,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):h(Error(this.queryHash+" data is undefined"))},onError:h,onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){this.state=(e=>{var n,i;switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=t.meta)?n:null,fetchStatus:iy(this.options.networkMode)?"fetching":"paused",...!e.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(i=t.dataUpdatedAt)?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=t.error;return iS(r)&&r.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...e,error:r,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),ip.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}class iP extends id{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,e,n){var i;let r=e.queryKey,s=null!=(i=e.queryHash)?i:n7(r,e),o=this.get(s);return o||(o=new iA({cache:this,logger:t.getLogger(),queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){let e=this.queriesMap[t.queryHash];
1e&&(t.destroy(),this.queries=this.queries.filter(e=>e!==t),e===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ip.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,e){let[n]=n6(t,e);return void 0===n.exact&&(n.exact=!0),this.queries.find(t=>n8(n,t))}findAll(t,e){let[n]=n6(t,e);return Object.keys(n).length>0?this.queries.filter(t=>n8(n,t)):this.queries}notify(t){ip.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}onFocus(){ip.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ip.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class iT extends iE{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||il,this.observers=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(e=>e!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,e;return null!=(t=null==(e=this.retryer)?void 0:e.continue())?t:this.execute()}async execute(){var t,e,n,i,r,s,o,a,c,u,h,l,p,d,f,v,m,g,w,y;let b="loading"===this.state.status;try{if(!b){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(c=(u=this.mutationCache.config).onMutate)?void 0:c.call(u,this.state.variables,this));let t=await (null==(h=(l=this.options).onMutate)?void 0:h.call(l,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}let p=await (()=>{var t;return this.retryer=iC({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(t=(e=this.mutationCache.config).onSuccess)?void 0:t.call(e,p,this.state.variables,this.state.context,this)),await (null==(n=(i=this.options).onSuccess)?void 0:n.call(i,p,this.state.variables,this.state.context)),await (null==(r=(s=this.mutationCache.config).onSettled)?void 0:r.call(s,p,null,this.state.variables,this.state.context,this)),await (null==(o=(a=this.options).onSettled)?void 0:o.call(a,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(t){try{throw await (null==(p=(d=this.mutationCache.config).onError)?void 0:p.call(d,t,this.state.variables,this.state.context,this)),await (null==(f=(v=this.options).onError)?void 0:f.call(v,t,this.state.variables,this.state.context)),await (null==(m=(g=this.mutationCache.config).onSettled)?void 0:m.call(g,void 0,t,this.state.variables,this.state.context,this)),await (null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,t,this.state.variables,this.state.context)),t}finally{this.dispatch({type:"error",error:t})}}}dispatch(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"loading":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!iy(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPau
1sed:!1,status:"error"};case"setState":return{...e,...t.state}}})(this.state),ip.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}class iL extends id{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,n){let i=new iT({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(e),state:n,defaultOptions:e.mutationKey?t.getMutationDefaults(e.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(e=>e!==t),this.notify({type:"removed",mutation:t})}clear(){ip.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return void 0===t.exact&&(t.exact=!0),this.mutations.find(e=>n9(t,e))}findAll(t){return this.mutations.filter(e=>n9(t,e))}notify(t){ip.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}resumePausedMutations(){var t;return this.resuming=(null!=(t=this.resuming)?t:Promise.resolve()).then(()=>{let t=this.mutations.filter(t=>
1t.state.isPaused);return ip.batch(()=>t.reduce((t,e)=>t.then(()=>e.continue().catch(n2)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function iO(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}class iR{constructor(t={}){this.queryCache=t.queryCache||new iP,this.mutationCache=t.mutationCache||new iL,this.logger=t.logger||il,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=iv.subscribe(()=>{iv.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=ig.subscribe(()=>{ig.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,e;this.mountCount--,0===this.mountCount&&(null==(t=this.unsubscribeFocus)||t.call(this),this.unsubscribeFocus=void 0,null==(e=this.unsubscribeOnline)||e.call(this),this.unsubscribeOnline=void 0)}isFetching(t,e){let[n]=n6(t,e);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state.data}ensureQueryData(t,e,n){let i=n5(t,e,n),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,n){var i;let r=this.queryCache.find(t),s=(i=null==r?void 0:r.state.data,"function"==typeof e?e(i):e);if(void 0===s)return;let o=n5(t),a=this.defaultQueryOptions(o);return this.queryCache.build(this,a).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return ip.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,n)]))}getQueryState(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state}removeQueries(t,e){let[n]=n6(t,e),i=this.queryCache;ip.batch(()=>{i.findAll(n).forEach(t=>{i.remove(t)})})}resetQueries(t,e,n){let[i,r]=n6(t,e,n),s=this.queryCache,o={type:"active",...i};return ip.batch(()=>(s.findAll(i).forEach(t=>{t.reset()}),this.refetchQueries(o,r)))}cancelQueries(t,e,n){let[i,r={}]=n6(t,e,n);return void 0===r.revert&&(r.revert=!0),Promise.all(ip.batch(()=>this.queryCache.findAll(i).map(t=>t.cancel(r)))).then(n2).catch(n2)}invalidateQueries(t,e,n){let[i,r]=n6(t,e,n);return ip.batch(()=>{var t,e;if(this.queryCache.findAll(i).forEach(t=>{t.invalidate()}),"none"===i.refetchType)return Promise.resolve();let n={...i,type:null!=(t=null!=(e=i.refetchType)?e:i.type)?t:"active"};return this.refetchQueries(n,r)})}refetchQueries(t,e,n){let[i,r]=n6(t,e,n),s=Promise.all(ip.batch(()=>this.queryCache.findAll(i).filter(t=>!t.isDisabled()).map(t=>{var e;return t.fetch(void 0,{...r,cancelRefetch:null==(e=null==r?void 0:r.cancelRefetch)||e,meta:{refetchPage:i.refetchPage}})}))).then(n2);return null!=r&&r.throwOnError||(s=s.catch(n2)),s}fetchQuery(t,e,n){let i=n5(t,e,n),r=this.defaultQueryOptions(i);void 0===r.retry&&(r.retry=!1);let s=this.queryCache.build(this,r);return s.isStaleByTime(r.staleTime)?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(t,e,n){return this.fetchQuery(t,e,n).then(n2).catch(n2)}fetchInfiniteQuery(t,e,n){let i=n5(t,e,n);return i.behavior={onFetch:t=>{t.fetchFn=()=>{var e,n,i,r,s,o,a;let c;let u=null==(e=t.fetchOptions)||null==(n=e.meta)?void 0:n.refetchPage,h=null==(i=t.fetchOptions)||null==(r=i.meta)?void 0:r.fetchMore,l=null==h?void 0:h.pageParam,p="forward"===(null==h?void 0:h.direction),d="backward"===(null==h?void 0:h.direction),f=(null==(s=t.state.data)?void 0:s.pages)||[],v=(null==(o=t.state.data)?void 0:o.pageParams)||[],m=v,g=!1,w=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),y=(t,e,n,i)=>(m=i?[e,...m]:[...m,e],i?[n,...t]:[...t,n]),b=(e,n,i,r)=>{if(g)return Promise.reject("Cancelled");if(void 0===i&&!n&&e.length)return Promise.resolve(e);let s={queryKey:t.queryKey,pageParam:i,meta:t.options.meta};return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var e,n;return null!=(e=t.signal)&&e.aborted?g=!0:null==(n=t.signal)||n.addEventListener("abort",()=>{g=!0}),t.signal}}),Promise.resolve(w(s)).then(t=>y(e,i,t,r))};if(f.length){if(p){let e=void 0!==l,n=e?l:iO(t.options,f);c=b(f,e,n)}else if(d){let e=void 0!==l,n=e?l:null==(a=t.options).getPreviousPageParam?void 0:a.getPreviousPageParam(f[0],f);c=b(f,e,n,!0)}else{m=[];let e=void 0===t.options.getNextPageParam;c=u&&f[0]&&!u(f[0],0,f)?Promise.resolve(y([],v[0],f[0])):b([],e,v[0]);for(let n=1;n<f.length;n++)c=c.then(i=>{if(!u||!f[n]||u(f[n],n,f)){let r=e?v[n]:iO(t.options,i);return b(i,e,r)}return Promise.resolve(y(i,v[n],f[n]))})}}else c=b([]);return c.then(t=>({pages:t,pageParams:m}))}}},this.fetchQuery(i)}prefetchInfiniteQuery(t,e,n){return this.fetchInfiniteQuery(t,e,n).then(n2).cat
1ch(n2)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,e){let n=this.queryDefaults.find(e=>it(t)===it(e.queryKey));n?n.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;let e=this.queryDefaults.find(e=>ie(t,e.queryKey));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){let n=this.mutationDefaults.find(e=>it(t)===it(e.mutationKey));n?n.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;let e=this.mutationDefaults.find(e=>ie(t,e.mutationKey));return null==e?void 0:e.defaultOptions}defaultQueryOptions(t){if(null!=t&&t._defaulted)return t;let e={...this.defaultOptions.queries,...this.getQueryDefaults(null==t?void 0:t.queryKey),...t,_defaulted:!0};return!e.queryHash&&e.queryKey&&(e.queryHash=n7(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.useErrorBoundary&&(e.useErrorBoundary=!!e.suspense),e}defaultMutationOptions(t){return null!=t&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==t?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}let iI=d.createContext(void 0),iD=d.createContext(!1);function i_(t,e){return t||(e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=iI),window.ReactQueryClientContext):iI)}let ik=({context:t}={})=>{let e=d.useContext(i_(t,d.useContext(iD)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},ix=({client:t,children:e,context:n,contextSharing:i=!1})=>{d.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);let r=i_(n,i);return d.createElement(iD.Provider,{value:!n&&i},d.createElement(r.Provider,{value:t},e))};class iN{constructor(){Object.defineProperty(this,"containerHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),nW.register(this)}handleAction(t){switch(t.type){case nj.PAGE_CONTAINER_READY:this.containerHandled||(this.containerHandled=this.handlePageContainerReadyAction(t.payload));break;case nj.FOUND_WIDGETS:{let{widgets:e=[]}=t.payload;e.forEach(({rfkId:t,entity:e,node:n})=>{this.handleAddWidget(t,e,n)})}}}handlePageContainerReadyAction(t){return!0}handleAddWidget(t,e,n){}}let iG='[data-rfkid="rfkid_container"]',iF=()=>
1{if(i)return;let t=document.querySelector(iG);(i=new MutationObserver(e=>{let n=[];e.forEach(e=>{e.addedNodes.forEach(e=>{let i=e.dataset.rfkid,r=e.dataset.entity;e.nodeType!==Node.ELEMENT_NODE||t&&t.contains(e)||!i||!r||n.push({rfkId:i,entity:r,node:e})})}),Object.keys(n).length>0&&nW.getDispatcher().dispatch({type:nj.FOUND_WIDGETS,payload:{widgets:n}})})).observe(document.body,{subtree:!0,childList:!0,characterData:!0})},iU={keyphrase:(t,e)=>e.keyphrase&&t.setSearchQueryKeyphrase(e.keyphrase),suggestionsList:(t,e)=>e.suggestionsList&&t.setSearchSuggestion(e.suggestionsList.map(({suggestion:t,max:e=3})=>({name:t,max:e}))),itemsPerPage:(t,e)=>t.setSearchLimit(e.itemsPerPage)};(sh=sT||(sT={})).ITEM_CLICKED="search/ITEM_CLICKED",sh.SUGGESTION_CLICKED="search/SUGGESTION_CLICKED",sh.SUGGESTION_ADDED="search/SUGGESTION_ADDED",sh.SUGGESTION_REMOVED="search/SUGGESTION_REMOVED",sh.KEYPHRASE_CHANGED="search/KEYPHRASE_CHANGED";let ij={onItemClick:sT.ITEM_CLICKED,onSuggestionClick:sT.SUGGESTION_CLICKED,onSuggestionAdded:sT.SUGGESTION_ADDED,onSuggestionRemoved:sT.SUGGESTION_REMOVED,onKeyphraseChange:sT.KEYPHRASE_CHANGED},iq={itemsPerPage:(t,e)=>t.setRecommendationsLimit(e.itemsPerPage)};(sl=sL||(sL={})).ITEM_CLICKED="recommendation/ITEM_CLICKED",sl.NAVIGATION_NEXT="recommendation/NAVIGATION_NEXT",sl.NAVIGATION_PREV="recommendation/NAVIGATION_PREV";let iB={onNavigationNext:sL.NAVIGATION_NEXT,onNavigationPrev:sL.NAVIGATION_PREV,onItemClick:sL.ITEM_CLICKED},iV={keyphrase:(t,e)=>e.keyphrase&&t.setQuestionsKeyphrase(e.keyphrase),relatedQuestions:(t,e)=>e.relatedQuestions&&t.setQuestionsRelatedQuestionsLimit(e.relatedQuestions)};(sO||(sO={})).KEYPHRASE_CHANGED="questions/KEYPHRASE_CHANGED";let iM={onKeyphraseChanged:sO.KEYPHRASE_CHANGED},iK={keyphrase:(t,e)=>e.keyphrase&&t.setSearchQueryKeyphrase(e.keyphrase),page:(t,e)=>t.setSearchOffset((e.itemsPerPage??t.getSearchLimit())*((e.page??1)-1)||0),itemsPerPage:(t,e)=>t.setSearchLimit(e.itemsPerPage),sortType:(t,e)=>t.setSearchSortCriteriaName(e.sortType)};(sp=sR||(sR={})).FACET_CLICKED="searchResults/FACET_CLICKED",sp.FILTER_CLICKED="searchResults/FILTER_CLICKED",sp.REMOVE_FILTER="searchResults/REMOVE_FILTER",sp.SORT_CHANGED="searchResults/SORT_CHANGED",sp.PAGE_NUMBER_CHANGED="searchResults/PAGE_NUMBER_CHANGED",sp.ITEM_CLICKED="searchResults/ITEM_CLICKED",sp.RESULTS_PER_PAGE_CHANGED="searchResults/RESULTS_PER_PAGE_CHANGED",sp.KEYPHRASE_CHANGED="searchResults/KEYPHRASE_CHANGED",sp.CLEAR_FILTERS="searchResults/CLEAR_FILTERS";let iQ={onKeyphraseChange:sR.KEYPHRASE_CHANGED,onClearFilters:sR.CLEAR_FILTERS,onResultsPerPageChange:sR.RESULTS_PER_PAGE_CHANGED,onPageNumberChange:sR.PAGE_NUMBER_CHANGED,onItemClick:sR.ITEM_CLICKED,onSortChange:sR.SORT_CHANGED,onFacetClick:sR.FACET_CLICKED,onFilterClick:sR.FILTER_CLICKED,onRemoveFilter:sR.REMOVE_FILTER};(sd=sI||(sI={})).DESKTOP="pc",sd.MOBILE="mobile",sd.TABLET="tablet",(sf=sD||(sD={})).JS="js",sf.HTML="html",sf.CSS="css",(sv=s_||(s_={})).PAGE="page",sv.COMMON_ACROSS_PAGES="common_across_pages",sv.DIALOG="dialog";let iW=(0,d.createContext)({}),iH=(0,d.createContext)({}),i$=()=>(0,d.useContext)(iW);class iJ extends Error{constructor({_requestId:t,_canceled:e,...n}){super("Request canceled"),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="AbortError",this.response=n}getResponse(){return this.response}}class iz extends id{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),iY(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return iX(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return iX(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){let n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),ii(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();let r=this.hasListeners();r&&iZ(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(e),r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();let s=this.computeRefetchInterval();r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){let e=this.client.getQueryCache().build(this.client,t),n=this.createResult(e,t);return t.keepPreviousData||(void 0!==t.placeholderData?!n.isPlaceholderData:ii(this.getCurrentResult(),n))||(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){let e={};return Object.keys(t).forEach(n=>{Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...e}={}){return this.fetch({...e,meta:{refetchPage:t}})}fetchOptimistic(t){let e=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,e);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,e))}fetch(t){var e;return this.executeFetch({...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let e=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(e=e.catch(n2)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),n1||this.currentResult.isStale||!n4(this.options.staleTime))return;let t=n3(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var t;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!n1&&!1!==this.options.enabled&&n4(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>
1{(this.options.refetchIntervalInBackground||iv.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){let n=this.currentQuery,i=this.options,r=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,a=t!==n,c=a?t.state:this.currentQueryInitialState,u=a?this.currentResult:this.previousQueryResult,{state:h}=t,l,{dataUpdatedAt:p,error:d,errorUpdatedAt:f,fetchStatus:v,status:m}=h,g=!1,w=!1;if(e._optimisticResults){let r=this.hasListeners(),s=!r&&iY(t,e),o=r&&iZ(t,n,e,i);(s||o)&&(v=iy(t.options.networkMode)?"fetching":"paused",p||(m="loading")),"isRestoring"===e._optimisticResults&&(v="idle")}if(e.keepPreviousData&&!h.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==m)l=u.data,p=u.dataUpdatedAt,m=u.status,g=!0;else if(e.select&&void 0!==h.data){if(r&&h.data===(null==s?void 0:s.data)&&e.select===this.selectFn)l=this.selectResult;else try{this.selectFn=e.select,l=e.select(h.data),l=ih(null==r?void 0:r.data,l,e),this.selectResult=l,this.selectError=null}catch(t){this.selectError=t}}else l=h.data;if(void 0!==e.placeholderData&&void 0===l&&"loading"===m){let t;if(null!=r&&r.isPlaceholderData&&e.placeholderData===(null==o?void 0:o.placeholderData))t=r.data;else if(t="function"==typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.selectError=null}catch(t){this.selectError=t}void 0!==t&&(m="success",l=ih(null==r?void 0:r.data,t,e),w=!0)}this.selectError&&(d=this.selectError,l=this.selectResult,f=Date.now(),m="error");let y="fetching"===v,b="loading"===m,S="error"===m;return{status:m,fetchStatus:v,isLoading:b,isSuccess:"success"===m,isError:S,isInitialLoading:b&&y,data:l,dataUpdatedAt:p,error:d,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:S&&0===h.dataUpdatedAt,isPaused:"paused"===v,isPlaceholderData:w,isPreviousData:g,isRefetchError:S&&0!==h.dataUpdatedAt,isStale:i0(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){let e=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,ii(n,e))return;this.currentResult=n;let i={cache:!0};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.trackedProps.size)return!0;let i=new Set(null!=n?n:this.trackedProps);return this.options.useErrorBoundary&&i.add("error"),Object.keys(this.currentResult).some(t=>this.currentResult[t]!==e[t]&&i.has(t))})()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){let t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;let e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){let e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||iS(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){ip.batch(()=>{var e,n,i,r,s,o,a,c;t.onSuccess?(null==(e=(n=this.options).onSuccess)||e.call(n,this.currentResult.data),null==(i=(r=this.options).onSettled)||i.call(r,this.currentResult.data,null)):t.onError&&(null==(s=(o=this.options).onError)||s.call(o,this.currentResult.error),null==(a=(c=this.options).onSettled)||a.call(c,void 0,this.currentResult.error)),t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function iY(t,e){return!(!1===e.enabled||t.state.dataUpdatedAt||"error"===t.state.status&&!1===e.retryOn
1Mount)||t.state.dataUpdatedAt>0&&iX(t,e,e.refetchOnMount)}function iX(t,e,n){if(!1!==e.enabled){let i="function"==typeof n?n(t):n;return"always"===i||!1!==i&&i0(t,e)}return!1}function iZ(t,e,n,i){return!1!==n.enabled&&(t!==e||!1===i.enabled)&&(!n.suspense||"error"!==t.state.status)&&i0(t,n)}function i0(t,e){return t.isStaleByTime(e.staleTime)}let i1=f(634).useSyncExternalStore,i2=d.createContext((h=!1,{clearReset:()=>{h=!1},reset:()=>{h=!0},isReset:()=>h})),i4=d.createContext(!1);i4.Provider;let i3=t=>{let[e,n]=(0,d.useState)(()=>t.getKey()),i=ik();return(0,d.useEffect)(()=>(t.onUpdate(()=>{n(t.getKey())}),()=>{i.cancelQueries({queryKey:t.getKey(),exact:!0}),t.destroy()}),[t,i]),function(t,e){let n=ik({context:t.context}),i=d.useContext(i4),r=d.useContext(i2),s=n.defaultQueryOptions(t);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=ip.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ip.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ip.batchCalls(s.onSettled)),s.suspense&&"number"!=typeof s.staleTime&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(r.isReset()||(s.retryOnMount=!1)),d.useEffect(()=>{r.clearReset()},[r]);let[o]=d.useState(()=>new e(n,s)),a=o.getOptimisticResult(s);if(i1(d.useCallback(t=>{let e=i?()=>{}:o.subscribe(ip.batchCalls(t));return o.updateResult(),e},[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),(null==s?void 0:s.suspense)&&a.isLoading&&a.isFetching&&!i)throw o.fetchOptimistic(s).then(({data:t})=>{null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)}).catch(t=>{r.clearReset(),null==s.onError||s.onError(t),null==s.onSettled||s.onSettled(void 0,t)});if((({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>{var r;return t.isError&&!e.isReset()&&!t.isFetching&&(r=[t.error,i],"function"==typeof n?n(...r):!!n)})({result:a,errorResetBoundary:r,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}(n5({queryKey:e,queryFn:e=>t.run({signal:e.signal}).catch(t=>t instanceof iJ?i.cancelQueries({queryKey:e.queryKey,exact:!0}).then(()=>null):Promise.reject(t)),refetchOnMount:!1,enabled:t.isEnabled()},void 0,void 0),iz)},i5=()=>(0,d.useContext)(iH);function i6(){return(i6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function i8(t,e){return(i8=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i9=new Map,i7=new WeakMap,rt=0;function re(t,e,n,i){if(void 0===n&&(n={}),void 0===i&&(i=void 0),void 0===window.IntersectionObserver&&void 0!==i){var r=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=function(t){var e=Object.keys(t).sort().filter(function(e){return void 0!==t[e]}).map(function(e){var n;return e+"_"+("root"===e?(n=t.root)?(i7.has(n)||(rt+=1,i7.set(n,rt.toString())),i7.get(n)):"0":t[e])}).toString(),n=i9.get(e);if(!n){var i,r=new Map,s=new IntersectionObserver(function(e){e.forEach(function(e){var n,s=e.isIntersecting&&i.some(function(t){return e.intersectionRatio>=t});t.trackVisibility&&void 0===e.isVisible&&(e.isVisible=s),null==(n=r.get(e.target))||n.forEach(function(t){t(s,e)})})},t);i=s.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:s,elements:r},i9.set(e,n)}return n}(n),o=s.id,a=s.observer,c=s.elements,u=c.get(t)||[];return c.has(t)||c.set(t,u),u.push(e),a.observe(t),function(){u.splice(u.indexOf(e),1),0===u.length&&(c.delete(t),a.unobserve(t)),0===c.size&&(a.disconnect(),i9.delete(o))}}var rn=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function ri(t){return"function"!=typeof t.children}var rr=function(t){function e(e){var n;return(n=t.call(this,e)||this).node=null,n._unobserveCb=null,n.handleNode=function(t){n.node&&(n.unobserve(),t||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=t||null,n.observeNode()},n.handleChange=function(t,e){t&&n.props.triggerOnce&&n.unobserve(),ri(n.props)||n.setState({inView:t,entry:e}),n.props.onChange&&n.props.onChange(t,e)},n.state={inView:!!e.initialInView,entry:void 0},n}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i8(e,t);var n=e.prototype;return n.componentDidUpdate=function(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())},n.componentWillUnmount=function(){this.unobserve(),this.node=null},n.observeNode=function(){if(this.node&&!this.props.skip){var t=this.props,e=t.threshold,n=t.root,i=t.rootMargin,r=t.trackVisibility,s=t.delay,o=t.fallbackInView;this._unobserveCb=re(this.node,this.handleChange,{threshold:e,root:n,rootMargin:i,trackVisibility:r,delay:s},o)}},n.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},n.render=function(){if(!ri(this.props)){var t=this.state,e=t.inView,n=t.entry;return this.props.children({inView:e,entry:n,ref:this.handleNode})}var i=this.props,r=i.children,s=i.as,o=function(t,e){if(null==t)return{};var n,i,r={},s=Object.keys(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(i,rn);return d.createElement(s||"div",i6({ref:this.handleNode},o),r)},e}(d.Component);rr.displayName="InView",rr.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};let rs=t=>{t({type:nj.WIDGET_APPEAR,payload:{}})},ro=()=>{let{options:t}=i5(),{visibility:{onInView:e,onUpdate:n}={}}=t,{ref:i,inView:r,entry:s}=(()=>{var t,e,n,i,r,s,o,a,c,u,h,l,p,f,v,m,g;let{dispatch:w}=i$(),{options:{visibility:y={}}={}}=i5(),{triggerOnce:b=!0}=y,S=(0,d.useRef)(!0),{ref:C,inView:E,entry:A}=(n=(e={...y,triggerOnce:b}).threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,c=e.skip,u=e.initialInView,h=e.fallbackInView,l=d.useRef(),f=(p=d.useState({inView:!!u}))[0],v=p[1],m=d.useCallback(function(t){void 0!==l.current&&(l.current(),l.current=void 0),c||t&&(l.current=re(t,function(t,e){v({inView:t,entry:e}),e.isIntersecting&&a&&l.current&&(l.current(),l.current=void 0)},{root:o,rootMargin:s,threshold:n,trackVisibility:r,delay:i},h))},[Array.isArray(n)?n.toString():n,o,s,a,c,r,h,i]),(0,d.useEffect)(function(){l.current||!f.entry||a||c||v({inView:!!u})}),(g=[m,f.inView,f.entry]).ref=g[0],g.inView=g[1],g.entry=g[2],g),P=(0,d.useCallback)(()=>{rs(w)},[w]);return(0,d.useEffect)(()=>{S.current&&E&&(S.current=!b,rs(w))},[w,E,A,b]),{ref:C,inView:E,entry:A,trigger:P}})();return(0,d.useEffect)(()=>{r&&e&&e(s),n&&n(r,s)},[r,s,n,e]),i},ra=()=>{let t=i5(),{rfkId:e,instanceId:n}=i$(),[i,r]=(0,d.useState)(t.state),s=(0,d.useRef)({});return(0,d.useEffect)(()=>{let t={handleAction(t){if(t.type===nj.WIDGET_STATE_CHANGED){let{rfkId:i,instanceId:o=null,state:a}=t.payload;if(i===e&&n===o){let t=((t,e)=>{let n=Object.fromEntries(Object.entries(t).filter(([t])=>e[t]));return 0===Object.keys(n).length?null:n})(a,s.current);t&&r(e=>({...e,...t}))}}}};return nW.register(t),()=>nW.unregister(t)},[e,n]),((t,e)=>{let n={};for(let i in t)"request"!==i&&"response"!==i&&Object.defineProperty(n,i,{get:()=>(e[i]=!0,t[i])});return n})(i,s.current)}
1,rc=function(t){let{rfkId:e,dispatch:n}=i$(),i=i5();i.isInitialized()||i.initialize(t||{});let{query:r,options:s,actions:o}=i,a=ra(),c=i3(r);return{widgetRef:ro(),rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}},ru=()=>{let{rfkId:t}=rc(),{widgetRef:e,queryResult:{data:{appearance:{css_names:n=[],templates:{html:{devices:{[sI.DESKTOP]:{content:i=null}={}}={}}={},css:{devices:{[sI.DESKTOP]:{content:r=null}={}}={}}={}}={}}={}}={}}}=rc(),s=(0,d.useRef)(null);return(0,d.useLayoutEffect)(()=>{var e;let n;s.current&&r&&(e=s.current,(n=document.querySelector(`[data-rfk-id-style=${t}]`))||((n=document.createElement("style")).setAttribute("type","text/css"),n.dataset.rfkIdStyle=t,e.parentNode?.appendChild(n)),n.innerHTML=r)},[t,r]),(0,d.useLayoutEffect)(()=>{s.current&&i&&(s.current.innerHTML=i)},[i]),(0,d.createElement)("div",{ref:e,"data-rfkid":t,className:n.join(" ")},(0,d.createElement)("div",{ref:s}))},rh=()=>{let{queryResult:{data:{appearance:{templates:{html:{devices:{[sI.DESKTOP]:{content:t=null}={}}={}}={}}={}}={}}={}}}=rc();return(0,d.useLayoutEffect)(()=>{t&&document.head.insertAdjacentHTML("afterbegin",t)},[t]),null},rl={component:ru,options:{state:{}}},rp=(t,e)=>{tp.debug("setWidgetType",`Type: ${t}`,`Mapping: ${JSON.stringify(e)}`),nK.setWidgetType(t,e)},rd=class{constructor(){Object.defineProperty(this,"widgets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}getWidgetComponentConfig(t,e){let n=nK.get(t,e);if(n&&n.type&&n.component)return n}getWidget(t,e){if(!this.widgets[t]){let n=this.getWidgetComponentConfig(t,e);n&&(this.widgets[t]=this.doSetup({...n,entity:e},t))}return this.widgets[t]}setup(t,e){return this.getWidget(t,e)}},rf=({rfkId:t,entity:e,children:n})=>{let i=(0,d.useMemo)(()=>Math.random().toString(36).substring(2,9),[]),r=(0,d.useCallback)(n=>nV.dispatch({...n,payload:{rfkId:t,instanceId:i,entity:e,...n.payload}}),[t,e,i]),s=(0,d.useMemo)(()=>({rfkId:t,instanceId:i,dispatch:r,entity:e}),[t,r,e,i]);return(0,d.createElement)(iW.Provider,{value:s},n)},rv=t=>{let{children:e}=t,n=i$();return n?.rfkId===t.rfkId?(0,d.createElement)(d.Fragment,{},e||null):(0,d.createElement)(rf,t,e)},rm={visibility:{threshold:.2,triggerOnce:!0}},rg={name:"Ordercloud",buildInterface:!0,file:"ocContext",properties:{sellerId:{type:"string"},requiredInventoryLocations:{type:"array",name:"requiredInventoryLocations"}}},rw=K(rg);class ry extends rw{}let rb=new class extends nQ{constructor(){super(),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(new ry),nV.subscribe(this)}setContext(t){this.ocContext=t,this.ocContext.addListener(this)}getContext(){return this.ocContext}handleAction(t){switch(t.type){case nj.OC_CONTEXT_CHANGED:tp.info("OC Context changed");break;case nj.INITIALIZE:this.initialize()}}onChange(t,e,n){this.initialized&&nV.dispatch({type:nj.OC_CONTEXT_CHANGED,payload:{context:this.ocContext}})}};var rS=f(1);let rC=(t,e)=>(t.cancel=()=>{e.abort()},t),rE={async getData(t,e){let n=new AbortController,i={...e,signal:n.signal,abortController:n};return rC(this.fetch(t.toJson(),i),n)},async fetch(t,e){let n=String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,""),i=nW.getContext(),r=k({context:i.toJson()},t);nV.dispatch({type:nj.REQUEST,payload:{requestId:n,request:t,pageContext:i,payload:r}});try{let s=await n$(r,{signal:e?.signal});return nV.dispatch({type:nj.REQUEST_SUCCESS,payload:{requestId:n,request:t,pageContext:i,payload:r,response:s}}),{_requestId:n,...s}}catch(e){return nV.dispatch({type:nj.REQUEST_FAIL,payload:{error:e,requestId:n,request:t,pageContext:i,payload:r}}),Promise.reject(e)}}},rA={context:{type:"model",model:te},rfk_flags:{type:"array",name:"rfkFlags"},widget:{type:"model",model:{name:"Widget",properties:{items:{type:"array",model:J}}}}},rP=K({name:"OCSearchRequest",file:"OCSearchRequest",buildInterface:!0,properties:{...rA,ordercloud:{type:"model",model:rg,setter:"setOrderCloudContext",getter:"getOrderCloudContext"}}});class rT extends rP{getWidgetInfo(t){return this.getWidgetItems()?.find(e=>e.rfk_id&&e.rfk_id===t)}addWidgets(t){return t.forEach(t=>this.addWidgetItem(t)),this}}let rL=K({name:"SearchRequest",file:"SearchRequest",buildInterface:!0,properties:{...rA}});
1class rO extends rL{getWidgetInfo(t){return this.getWidgetItems()?.find(e=>e.rfk_id&&e.rfk_id===t)}addWidgets(t){return t.forEach(t=>this.addWidgetItem(t)),this}}let rR=()=>{let{connector:t}=tC();if("oc"===t){tp.info("Using OC Request");let t=new rT;return t.setOrderCloudContext(rb.getContext().toJson()),t}return tp.info("Using default Request"),new rO},rI=async t=>{let e=rR(),n=Array.from((t=>{let e=new Map;return t.slice().reverse().forEach(([t,n])=>{var i,r;let{rfkId:s,instanceId:o,payload:a}=t,c=(({rfkId:t,entity:e})=>`${t}@${e}`)(t);e.get(c)?.get(o||"")?n.abortController.abort():(i=o||"",r={...a,rfk_id:s},e.has(c)||e.set(c,new Map([[i,{}]])),e.get(c).set(i,r))}),e})(t.filter(([t,e])=>!e.signal.aborted)).values()).map(t=>Array.from(t.values())).flat();e.addWidgets(n),t[0][0].context&&e.setContext(t[0][0].context.toJson());let{requestMiddleware:i}=tC();i&&await i();let r=await rE.fetch(e.toJson());return t.map(([,{abortController:t}])=>t.signal.aborted?Object.assign({},r,{_canceled:!0}):r)},rD={},r_=(t,e)=>{if(e?.debounceBy)return`debounceBy@${e.debounceBy}`;let n=t.context?.toJson();return n?JSON.stringify(n):"default"},rk={async getWidgetData(t,e){let{rfkId:n,entity:i,request:r}=t,s=nW.getContext(),o=r.toJson();nV.dispatch({type:nj.WIDGET_DATA_REQUEST,payload:{...t,pageContext:s,payload:o}});try{let r=await this.fetchWidgetData({...t,payload:o},e);if(r._canceled)return nV.dispatch({type:nj.WIDGET_DATA_REQUEST_CANCELED,payload:{...t,pageContext:s,payload:o}}),Promise.reject(new iJ(r));let{_requestId:a,...c}=r,{widgets:u=[]}=c,h=u.find(({rfk_id:t,entity:e})=>t===n&&e===i);if(!h)throw Error(`Response processing error: could not find ${n} in response`);return nV.dispatch({type:nj.WIDGET_DATA_REQUEST_SUCCESS,payload:{...t,pageContext:s,response:h,payload:o,requestId:a}}),h}catch(e){return nV.dispatch({type:nj.WIDGET_DATA_REQUEST_FAIL,payload:{error:e,...t,pageContext:s,payload:o}}),Promise.reject(e)}},fetchWidgetData(t,e){var n;let i=new AbortController,r={...e,signal:i.signal,abortController:i,groupBy:r_(t,e)};return e?.signal?.addEventListener("abort",()=>{i.abort()}),rC(e?.debounce?(rD[n=r.groupBy]||(rD[n]=rS(rI,250,{accumulate:!0})),rD[n])(t,r):((t,e)=>{let{payload:n}=t,i=rR();return i.addWidgetItem(n),t.context&&i.setContext(t.context.toJson()),rE.fetch(i.toJson(),e)})(t,r),i)}};class rx{constructor(t,e){Object.defineProperty(this,"instanceId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:new ti}),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:new ry}),Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"debounced",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"debounceBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widgetRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"enabledChangeListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"destroyListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.widgetRequest=e,this.instanceId=t}onUpdate(t){var e;let n;let i=(e=()=>{t()},function(...t){let i=this;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(i,t)},50)}),r={handleAction(t){switch(t.type){case nj.OC_CONTEXT_CHANGED:case nj.PAGE_CONTEXT_CHANGED:i()}}};nW.register(r);let s={onChange(t,e,n){i()}};this.getRequest().addListener(s),this.getContext().addListener(s),this.getOCContext().addListener(s);let o=t=>{t&&i()};this.enabledChangeListeners.push(o),this.destroyListeners.push(()=>{nW.unregister(r),this.getRequest().removeListener(s),this.getContext().removeListener(s),this.getOCContext().removeListener(s),this.enabledChangeListeners=this.enabledChangeListeners.filter(t=>t!==o)})}
1destroy(){this.destroyListeners.forEach(t=>{t()}),this.destroyListeners=[]}getContext(){return this.context}getOCContext(){return this.ocContext}getRequest(){return this.widgetRequest}getKey(){return((t,e,...n)=>[e.getRfkId(),t,nW.getContext().toJson(),e.toJson(),rb.getContext().toJson(),...n])(this.instanceId,this.widgetRequest,this.context.toJson())}getLastResponse(){return this.lastResponse}getRequestContext(){return k(nW.getContext().toJson(),this.context.toJson())}getRequestOCContext(){return k(rb.getContext().toJson(),this.ocContext.toJson())}setDebounced(t){this.debounced=t}isDebounced(){return this.debounced}setDebounceBy(...t){this.debounceBy=t.join("#")}getDebounceBy(){return this.debounceBy}fetch(t={}){return this.run(t)}run(t={}){let e={rfkId:this.getRequest().getRfkId(),entity:this.getRequest().getEntity(),instanceId:this.instanceId,request:this.getRequest(),context:this.getContext(),ocContext:this.getOCContext()};return rk.getWidgetData(e,{debounceBy:this.getDebounceBy(),debounce:this.isDebounced(),...t}).then(t=>(this.lastResponse=t,t))}setEnabled(t){t!==this.enabled&&(this.enabled=t,this.enabledChangeListeners.forEach(e=>{e(t)}))}toggleEnabled(){this.setEnabled(!this.enabled)}isEnabled(){return this.enabled}getInstanceId(){return this.instanceId}}let rN=(t,e,n)=>{t({type:e,payload:n})},rG=({dispatch:t,entity:e,instanceId:n,rfkId:i})=>{let r={},s={},o=!1,a=(t=>{let{type:e,options:{setupRequest:n=()=>{}}={}}=nK.get(t)||{},i=e?((t,e)=>{if(tt[t])return tt[t](e);throw Error(`Invalid widget type: "${t}"`)})(e,t):new Y(t);return i.setRfkId(t),n(i),i})(i);a.setEntity(e);let c=new rx(n,a),u=k(rm,nK.get(i,e)?.options);return{actions:((t,e)=>{let{actionProps:n={}}=e;return Object.keys(n).reduce((e,i)=>({...e,[i]:rN.bind(null,t,n[i])}),{})})(t,u),options:u,query:c,state:r,config:s,updateState:s=>{let o=Object.fromEntries(Object.entries(s).filter(([t,e])=>r[t]!==e));Object.assign(r,s),t({type:nj.WIDGET_STATE_CHANGED,payload:{rfkId:i,entity:e,instanceId:n,state:o}})},initialize:t=>{var e,n;o||(Object.assign(r,"function"==typeof(n=t.state)?n():n),e=t.query,((t,e,n={})=>{let{options:{propStateMapping:i=null,props:{initial:r={}}={}}={}}=nK.get(t)||{};i&&((t,e,n)=>{Object.keys(n).forEach(i=>{"function"==typeof t[i]&&t[i](e,n)})})(i,e,k(r,n))})(c.getRequest().getRfkId(),c.getRequest(),r),e&&e(c),c.getRequest().takeSnapshot(),Object.assign(s,t.config),o=!0)},isInitialized:()=>o}},rF=({children:t})=>{let{rfkId:e,entity:n,dispatch:i,instanceId:r}=i$(),s=(0,d.useRef)();return s.current||(s.current=rG({dispatch:i,entity:n,instanceId:r,rfkId:e})),(0,d.useEffect)(()=>(i({type:nj.LOAD,payload:{rfkId:e,entity:n,instanceId:r}}),()=>{i({type:nj.UNLOAD,payload:{rfkId:e,entity:n,instanceId:r}})}),[i,e,n,r]),(0,d.createElement)(iH.Provider,{value:s.current},t)},rU=(t,e,n)=>((...t)=>(e,n)=>t.reduceRight((t,e)=>(0,d.createElement)(e,n,t),e))(rv,rF)((0,d.createElement)(n,t),e),rj=(t,e,n)=>(tp.debug("widget",t&&t.name,e),((t,e,n)=>{if(!0===t.__wrapped)throw Error(`Seems you are trying to wrap an already wrapped Widget component (entity: ${e})`);return n.__wrapped=!0,n})(t,n,i=>{let{rfkId:r}=i;return(0,d.useMemo)(()=>{nK.setType(r,e)},[r]),rU(i,{rfkId:r,entity:n},t)}));rj(ru,S.BANNER,"content"),rj(ru,S.HTML_BLOCK,"content"),rj(rh,S.SEO,"content");let rq=class extends rd{doSetup({type:t,entity:e,component:n}){return rj(n,t,e)}},rB=(...t)=>{rp(S.CONTENT_BLOCK,rl),rp(S.HTML_BLOCK,rl),rp(S.BANNER,rl),rp(S.SEO,{...rl,component:rh}),rp(S.PREVIEW_SEARCH,{options:{propStateMapping:iU,actionProps:ij,state:{}}}),rp(S.RECOMMENDATION,{options:{propStateMapping:iq,actionProps:iB,state:{}}}),rp(S.QUESTIONS,{options:{propStateMapping:iV,actionProps:iM,state:{}}}),rp(S.SEARCH_RESULTS,{options:{propStateMapping:iK,actionProps:iQ,state:{selectedFacets:{},page:1}}}),new iN,new rq,(t=>{let{autoIncludeNewWidgets:e=!1,autoIncludeWidgets:n=!0,uri:i}=t||{};if("undefined"==typeof document||!document.createElement)return i&&nW.getContext().setPageUri(i),void n0();if(nW.getContext().setPageUri(i||window.location.pathname),e&&iF(),n){let t=Array.from(document.querySelectorAll(`:not(${iG}) > [data-rfkid]:not(${iG})`)).filter((t,e,n)=>n.indexOf(t)===e).map(t=>
1({rfkId:t.dataset.rfkid,entity:t.dataset.entity,node:t}));t.length&&setTimeout(()=>{nW.getDispatcher().dispatch({type:nj.FOUND_WIDGETS,payload:{widgets:t}})},0)}n0()})(...t)},rV=({apiKey:t,children:e,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c="prod",orderCloudRegion:u,publicSuffix:h=!1,requestMiddleware:l,serviceHost:p,trackConsent:f=!0,uri:v,useAccessToken:m,useStorage:g,useToken:w,...y})=>{var b;return(0,d.useMemo)(()=>{nY({apiKey:t,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c,orderCloudRegion:u,publicSuffix:h,requestMiddleware:l,serviceHost:p,trackConsent:f,useAccessToken:m,useStorage:g,useToken:w},{processor:new nX}),rB({uri:v,autoIncludeWidgets:!1,autoIncludeNewWidgets:!1})},[]),(0,d.useEffect)(()=>{nW.toggleTrackConsent(f)},[f]),(0,d.createElement)(ix,{...y,client:(b=y.client,!o&&b?o=b:o||(o=new iR({defaultOptions:{queries:{retry:!1,keepPreviousData:!0,refetchOnWindowFocus:!1}}})),o)},e)},rM=async(t,{index:e,filters:n,...i})=>{if(t){if(!n||!n.find(({facetId:t})=>to(t)))return await (async(t,{index:e,request:n,filters:i})=>nD({name:"widget",action:"click",action_cause:"filter",value:{rfk_id:t,index:e,request:n,filters:i,context:tr.toJson()}}))(t,{index:e,request:nN(i),filters:nG(n)});tp.warn("trackEvent :::","Filter's name is not defined")}else tp.warn("trackEvent :::","Widget's rfkId mandatory field is empty")},rK=(t,e)=>{let n=(0,d.useRef)(e),i=(0,d.useRef)(t);return n.current!==e&&(n.current.length!==e.length||n.current.some((t,n)=>t!==e[n]))&&(n.current=e,i.current=t),i},rQ=t=>{let e=t.getRequest().getSearchLimit()?t.getRequest().getSearchLimit():t.getLastResponse()?.limit,n=e?Math.floor((t.getRequest().getSearchOffset()||0)/e+1):0;return{keyword:t.getRequest().getSearchQueryKeyphrase(),pageNumber:isNaN(n)?void 0:n,pageSize:e,numResults:t.getLastResponse()?.content?.length,totalResults:t.getLastResponse()?.total_item}},rW=class{static buildItem(t,e){let{facetId:n,facetValueId:i,type:r,facetValueText:s}=e;if("text"===r){if(s)return{type:"eq",value:s};let{facet:e=[]}=t.getLastResponse()||{},{value:r=[]}=e.find(({name:t})=>t===n)||{};return{type:"eq",value:r.find(({id:t})=>t===i)?.text||""}}return i}};class rH{getCurrentFacetInfo(t,e){let{facetId:n}=e,{facet:i=[]}=t.getLastResponse()||{},{value:r=[],label:s=""}=i.find(({name:t})=>t===n)||{};return{facetValues:r,facetTitle:s}}}let r$=new class extends rH{process(t,e,n){let{facetId:i,facetValueId:r,facetIndex:s,facetValueIndex:o,silentTracking:a,checked:c}=n,{facetValues:u,facetTitle:h}=this.getCurrentFacetInfo(e,n),l=u.find(({id:t})=>t===r)?.text||"";a||rM(t,{filters:[{facetId:i,facetValueId:r,facetValue:l,valueIndex:o,facetIndex:s,facetTitle:h}]}),e.getRequest().setSearchOffset(0),c?e.getRequest().addSearchFacetTypeFilter(i,rW.buildItem(e,n)):e.getRequest().removeSearchFacetTypeFilter(i,rW.buildItem(e,n))}},rJ={range:new class extends rH{process(t,e,n){let{facetId:i,min:r,max:s,facetIndex:o,silentTracking:a}=n;if(e.getRequest().resetSearchFacetTypeFilter(i),void 0!==r||void 0!==s){e.getRequest().addSearchFacetTypeFilter(i,{value:r,type:"gte"},"and"),e.getRequest().addSearchFacetTypeFilter(i,{value:s,type:"lte"},"and");let{facetTitle:c}=this.getCurrentFacetInfo(e,n);a||rM(t,{filters:[{facetId:i,...void 0!==r?{startValue:r.toString()}:{},...void 0!==s?{endValue:s.toString()}:{},facetValue:`${r} - ${s}`,valueIndex:0,facetIndex:o,facetTitle:c}]})}}},valueId:r$,text:r$},rz=class{},rY=new class extends rz{process(t,e){let{facetId:n}=e;t.getRequest().removeSearchFacetTypeFilter(n,rW.buildItem(t,e))}},rX={range:new class extends rz{process(t,e){let{facetId:n}=e;t.getRequest().resetSearchFacetTypeFilter(n)}},valueId:rY,text:rY};function rZ(t,e){return t?.facet.find(({name:t})=>t===e)}function r0(t,e,n){let i=rZ(t,e);if(i)return i.value.find(({id:t})=>n===t)}let r1=(t,e)=>"facetValueId"in e&&t.id===e.facetValueId||"facetValueText"in e&&t.text===e.facetValueText;function r2(t,e,n){return t.findIndex(t=>n&&t.facetId===e&&t.facetValueId===n)}let r4={range:new class{run(t,e){if("min"in e||"max"in e){let{min:n,max:i,facetId:r}=e;
1return t.getRequest().addSearchFacetTypeFilter(r,{value:n,type:"gte"},"and").addSearchFacetTypeFilter(r,{value:i,type:"lte"},"and"),!0}return tp.error("Type range expected properties min or max to be present on the initial state for selected facets. Since none of them has been provided, initializer will not run."),!1}},valueId:new class{run(t,e){if("facetValueId"in e){let{facetId:n,facetValueId:i}=e;return t.getRequest().addSearchFacetTypeFilter(n,i),!0}return tp.error("Type valueId expected property facetValueId to be present on the initial state for selected facets. Since it has not been provided, initializer will not run."),!1}},text:new class{run(t,e){if("facetValueText"in e){let{facetId:n,facetValueText:i}=e;return t.getRequest().addSearchFacetTypeFilter(n,{value:i,type:"eq"}),!0}return tp.error("Type text expected property facetValueText to be present on the initial state for selected facets. Since it has not been provided, initializer will not run."),!1}}};class r3{process(t,e,n){let{facetId:i,facetValueId:r,checked:s}=n,o=this.findPreviousValueIndex(t,i,r,e);if(!s&&o>-1)return t.filter((t,e)=>e!==o);let a=[...t],c=rZ(e,i),u=r0(e,i,r);return s&&-1===o&&a.push(this.buildNewItem(c,u,i,r)),a}}let r5={range:new class{process(t,e,n){let{facetId:i,min:r,max:s}=n,o=t.findIndex(t=>t.facetId===i),a=[...t],c=rZ(e,i);return o>-1?a[o]={...a[o],min:r,max:s,facetLabel:c?c.label:a[o].facetLabel}:a.push({min:r,max:s,facetId:i,facetLabel:c?c.label:""}),a}},valueId:new class extends r3{buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}findPreviousValueIndex(t,e,n){return r2(t,e,n)}},text:new class extends r3{findPreviousValueIndex(t,e,n,i){return function(t,e,n,i){if(void 0!==n){let r=r0(i,e,n);if(r)return t.findIndex(t=>t.facetId===e&&t.facetValueText===r.text)}return -1}(t,e,n,i)}buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetValueText:e?.text,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}}},r6={valueId:new class{process(t,e){let n=r2(t,e.facetId,e.facetValueId);return t.filter((t,e)=>e!==n)}},range:new class{process(t,e){return t.filter(t=>t.facetId!==e.facetId)}},text:new class{process(t,e,n){let{facetId:i,facetValueText:r}=e,s=t.findIndex(t=>t.facetId===i&&t.facetValueText===r);return t.filter((t,e)=>e!==s)}}},r8=(t,e)=>{switch(e.type){case nj.WIDGET_DATA_REQUEST_SUCCESS:return(t=>{let{selectedFacets:e=[],response:n}=t;return e.some(t=>{let e=rZ(n,t.facetId);if(!t.facetLabel)return!0;let i=e?.value?.find(e=>r1(e,t));return!(!i||!i.text||t.valueLabel)})?{...t,selectedFacets:e.map(t=>{let e=rZ(n,t.facetId);return e?((t,e)=>{let n=e.value.find(e=>r1(e,t));return{...t,facetValueId:n?n.id:t.facetValueId,facetLabel:e.label||t.facetLabel,valueLabel:n?n.text:t.valueLabel}})(t,e):t})}:t})(t);case sR.FILTER_CLICKED:case sR.REMOVE_FILTER:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=r6[r];return s?{...t,page:1,selectedFacets:s.process(n,e,i)}:(tp.warn(`${r} has not a valid reducer for REMOVE_FILTER action. No reduce transformation applied.`),{...t,page:1})})(t,e.payload);case sR.FACET_CLICKED:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=r5[r];return s?{...t,page:1,selectedFacets:s.process(n,i,e)}:(tp.warn(`${r} has not a valid action reducer. No reduce transformation applied.`),{...t,selectedFacets:n})})(t,e.payload);case sR.SORT_CHANGED:return{...t,page:1,sortType:e.payload.name};case sR.PAGE_NUMBER_CHANGED:return{...t,page:e.payload.page};case sR.RESULTS_PER_PAGE_CHANGED:return{...t,page:1,itemsPerPage:e.payload.numItems};case sR.KEYPHRASE_CHANGED:return{...t,page:1,keyphrase:e.payload.keyphrase,selectedFacets:[]};case sR.CLEAR_FILTERS:return{...t,page:1,selectedFacets:[]};default:return t}},r9=function(t){let{rfkId:e,dispatch:n}=i$(),i=i5();i.isInitialized()||(i.initialize(t||{}),(t=>{let{query:e,state:{selectedFacets:n=[]},config:i={}}=t;n.forEach(t=>{let n=function(t,e){let{facets:n={}}=t,{type:i}=n[e]||{};return i||t.defaultFacetType||"valueId"}(i,t.facetId),r=r4[n];if(!r)return tp.warn(`Facet type ${n} is not supported.`);r.run(e,t)})})(i));let{query:r,options:s,actions:o}=i,a=ra(),c=i3(r),u=ro();return((t,e)=>{let n=i5(),{rfkId:i,instanceId:r}=i$(),s=rK(t,e);(0,d.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:o=null}=t.payload;if(e===i&&r===o){let e=s.current(((t,e)=>{switch(e.type){case nj.WIDGET_DATA_REQUEST_SUCCESS:{let{response:n}=e.payload;return{...t,response:n}}case nj.WIDGET_DATA_REQUEST:{let{request:n}=e.payload;return{...t,request:n}}default:return t}})(n.state,t),t);e!==n.state&&n.updateState(e)}}};return nW.register(t),()=>nW.unregister(t)},[i,r,n,s])})(r8,[]),((t,e)=>{let{rfkId:n,instanceId:i}=i$(),r=rK(t,e);(0,d.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:s}=t.payload;e&&(e!==n||s!==i)||r.current(t)}};return nW.register(t),()=>nW.unregister(t)},[n,i,r])})(t=>{switch(t.type){case sR.FACET_CLICKED:!function(t,e){let{type:n,rfkId:i}=e,r=rJ[n];r?r.process(i,t,e):tp.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case sR.FILTER_CLICKED:case sR.REMOVE_FILTER:!function(t,e){let{type:n}=e,i=rX[n];i?i.process(t,e):tp.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case sR.ITEM_CLICKED:{let{index:n,id:i,entity:s,sourceId:o}=t.payload;(async(t,e,{index:n,items:i,...r})=>
1{if(t)return await (async(t,e,{actionCause:n,index:i,request:r,items:s})=>{let o=[];return e&&s&&(o=nk(e,s))&&!n_(o)?void tp.warn("trackEvent :::","A field is missing on one or more of the items provided"):n&&"entity"===n&&to(i)?void tp.warn("trackEvent :::","Field index is mandatory for widget click entity events and is having invalid/missing value"):nD({name:"widget",action:"click",action_cause:n,value:{rfk_id:t,index:i,entities:o,request:r,context:tr.toJson()}})})(t,e,{actionCause:"entity",index:n,request:nN(r),items:i});tp.warn("trackEvent :::","Widget's rfkId mandatory field is empty")})(e,s,{index:n,items:[{id:i,sourceId:o}],...rQ(r)});break}case sR.SORT_CHANGED:r.getRequest().resetSearchSortCriteria().setSearchSortCriteriaName(t.payload.name).setSearchOffset(0);break;case sR.PAGE_NUMBER_CHANGED:{let n=r.getRequest().getSearchLimit()??r.getLastResponse()?.limit;void 0===n?tp.warn(`Widget "${e}" has triggered a onPageNumberChanged action and there is no itemsPerPage state or query search limit defined`):r.getRequest().setSearchOffset(n*(t.payload.page-1));break}case sR.RESULTS_PER_PAGE_CHANGED:r.getRequest().setSearchLimit(t.payload.numItems).setSearchOffset(0);break;case sR.KEYPHRASE_CHANGED:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0),t.payload.keyphrase?r.getRequest().setSearchQueryKeyphrase(t.payload.keyphrase):r.getRequest().resetSearchQueryKeyphrase();break;case sR.CLEAR_FILTERS:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0)}},[e,r]),{widgetRef:u,rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}};var r7=f(33),st=f(824),se=f(625);function sn(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}var si=globalThis?.document?d.useLayoutEffect:()=>{},sr=t=>{let e;let{present:n,children:i}=t,r=function(t){var e,n;let[i,r]=d.useState(),s=d.useRef(null),o=d.useRef(t),a=d.useRef("none"),[c,u]=(e=t?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},d.useReducer((t,e)=>n[t][e]??t,e));return d.useEffect(()=>{let t=ss(s.current);a.current="mounted"===c?t:"none"},[c]),si(()=>{let e=s.current,n=o.current;if(n!==t){let i=a.current,r=ss(e);u(t?"MOUNT":"none"===r||"none"===e?.display?"UNMOUNT":n&&i!==r?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),si(()=>{if(i){let t;let e=i.ownerDocument.defaultView??window,n=n=>{let r=ss(s.current).includes(n.animationName);if(n.target===i&&r&&(u("ANIMATION_END"),!o.current)){let n=i.style.animationFillMode;i.style.animationFillMode="forwards",t=e.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=n)})}},r=t=>{t.target===i&&(a.current=ss(s.current))};return i.addEventListener("animationstart",r),i.addEventListener("animationcancel",n),i.addEventListener("animationend",n),()=>{e.clearTimeout(t),i.removeEventListener("animationstart",r),i.removeEventListener("animationcancel",n),i.removeEventListener("animationend",n)}}u("ANIMATION_END")},[i,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:d.useCallback(t=>{s.current=t?getComputedStyle(t):null,r(t)},[])}}(n),s="function"==typeof i?i({present:r.isPresent}):d.Children.only(i),o=function(...t){return d.useCallback(function(...t){return e=>{let n=!1,i=t.map(t=>{let i=sn(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){let n=i[e];"function"==typeof n?n():sn(t[e],null)}}}}(...t),t)}(r.ref,(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?s.ref:(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?s.props.ref:s.props.ref||s.ref);return"function"==typeof i||r.isPresent?d.cloneElement(s,{ref:o}):null};function ss(t){return t?.animationName||"none"}sr.displayName="Presence";var so,sa,sc,su,sh,sl,sp,sd,sf,sv,sm,sg,sw,sy,sb,sS,sC,sE,sA,sP,sT,sL,sO,sR,sI,sD,s_,sk,sx=f(266);(l=sk||(sk={})).PEOPLE="People",l.NEWS="News";var sN=f(816),sG=f(517),sF=f(483),sU=f(530),sj=f.n(sU);let sq=function(){return m().createElement(sr,{present:!0},m().createElement("div",{className:"news-card__loader"},m().createElement(sx.Loader,{params:{identifier:"Loader01",styles:""},fields:{content:""}})))};function sB({cardProps:t,isLoading:e,isFetching:n,isError:i,totalItems:r,cardType:s,searchResultsBottomCount:o,fields:a}){var c,u,h,l,p;return m().createElement(m().Fragment,null,m().createElement("div",{className:sj()("news-card"+(s===sk.PEOPLE?" news-card--people":""),{"news-card--fetching":n},{"news-card--loading":e})},e?m().createElement(sq,null):(null==t?void 0:t.length)?t.map(t=>m().createElement("div",{className:"news-card__listing",key:t.fields.title},s===sk.NEWS?m().createElement(sN.NewsListingCard,{params:t.params,fields:t.fields}):m().createElement(sF.PeopleCard,{params:t.params,fields:t.fields}))):m().createElement(sG.NoResultsContent,{params:null===(l=null==a?void 0:a.noResults)||void 0===l?void 0:l.params,fields:Object.assign(Object.assign({},null===(p=null==a?void 0:a.noResults)||void 0===p?void 0:p.fields),{hasFailed:i})})),m().createElement("div",{className:"news-card__pagination"},r?m().createElement("span",{className:"news-card__info"},(0,C.replaceStr)(o||"Viewing {PageSize} of {total} Items",{"{PageSize}":null!==(u=null===(c=null==t?void 0:t.length)||void 0===c?void 0:c.toString())&&void 0!==u?u:"0","{total}":null!==(h=null==r?void 0:r.toString())&&void 0!==h?h:"0"})):null))}let sV=rj(function({props:t}){var e,n,i,r,s,o,a,c,u,h,l,p,f,v,g,w,y,b,S,E,A,P,T,L;let{params:O,fields:R}=t,{sitecoreSource:I}=R,{isDesktop:D}=(0,C.useDeviceContext)(),_="title_ascending",k=(()=>{var t;if("undefined"!=typeof window){let e=new URLSearchParams(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.search);return(null==e?void 0:e.get("search"))||""}return""})(),{setSelectedAlphabet:x,selectedAlphabet:N,setPageOffset:G,setIsLoadMore:F,appendCardContent:U,setInitialRender:j,initialRender:q,removeFacet:B,filteredFacets:V,setFilteredFacets:M,clearAll:K,programSource:Q,programSourceInitial:W,setProgramSource:H,addFacet:$,replaceFacets:J,setPageSearchLimit:z,selectedFilters:Y,setSelectedFilters:X,deselectFilters:Z,replaceSelectedFilters:tt,setSelectedDropdownFilters:te,cardContent:tn,setSearchCardContent:ti,searchInput:tr,setSearchInput:ts,isFirstChangeDone:to,setIsFirstChangeDone:ta}=(0,C.useNewsStore)(t=>t),tc=(0,d.useRef)(null);(0,d.useEffect)(()=>{k&&tr!==k&&ts(k)},[]),(0,d.useEffect)(()=>{tc.current&&to&&tc.current.focus()},[tr]);let[tu,th]=(0,d.useState)(Q),[tl,tp]=(0,d.useState)(!1);(0,d.useEffect)(()=>{(null==R?void 0:R.pageSize)&&(null==Q?void 0:Q.limit)!==R.pageSize&&z(R.pageSize)},[null==R?void 0:R.pageSize,null==Q?void 0:Q.limit]);let{widgetRef:td,actions:{onSortChange:tf,onFacetClick:tv,onPageNumberChange:tm},queryResult:{isLoading:tg,isFetching:tw,isError:ty,data:{content:tb,total_item:tS=0,facet:tC=[],offset:tE=0,limit:tA=10}={}}}=r9({query:t=>
1{t.getRequest().setEntity("content").setSources(I).setSearch(Q)},state:{sortType:(null===(n=null===(e=null==Q?void 0:Q.sort)||void 0===e?void 0:e.value[0])||void 0===n?void 0:n.name)||_,page:1,itemsPerPage:null!==(i=null==R?void 0:R.pageSize)&&void 0!==i?i:10,keyphrase:tr}}),tP=(null==V?void 0:V.length)?null==V?void 0:V.map(t=>t.name):[];(0,d.useEffect)(()=>{var t,e;if(q){let n=null===(e=null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hash)||void 0===e?void 0:e.substring(1);if(n){let t=null==document?void 0:document.getElementById(n);tw||tg||requestAnimationFrame(()=>{null==t||t.scrollIntoView({behavior:"smooth",block:"start"}),j(!1)})}}},[tw,tg]);let tT=t=>{""!==(null==t?void 0:t.trim())&&H(Object.assign(Object.assign({},Q),{query:{keyphrase:t}}))},tL=(0,C.debounce)(tT,300),tO=()=>{var t,e,n,i;if(H(Object.assign({},W)),ts(""),K(),x("All"),"undefined"!=typeof window){let r=new URL(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.href);null==V||V.forEach(t=>{var e;null===(e=null==r?void 0:r.searchParams)||void 0===e||e.delete(null==t?void 0:t.name)}),null===(e=null==r?void 0:r.searchParams)||void 0===e||e.delete("sort"),null===(n=null==r?void 0:r.searchParams)||void 0===n||n.delete("search"),null===(i=null==window?void 0:window.history)||void 0===i||i.replaceState({},"",null==r?void 0:r.toString())}};(0,d.useEffect)(()=>{var t,e,n;if(null==Array?void 0:Array.isArray(tb)){if((null==tb?void 0:tb.length)>0){let t=[];t=(null==R?void 0:R.cardType)===(null==sk?void 0:sk.NEWS)?null==tb?void 0:tb.map(t=>({params:{variant:"horizontal",buttonIcon:"arrowRight",buttonVariant:null===se.ButtonVariant||void 0===se.ButtonVariant?void 0:se.ButtonVariant.TERTIARY,styles:"img-border-radius",identifier:null==t?void 0:t.id},fields:{eyebrow:Array.isArray(null==t?void 0:t.contenttopic)&&(null==t?void 0:t.contenttopic.length)>0?null==t?void 0:t.contenttopic[0]:"",author:null==t?void 0:t.authorname,date:null==t?void 0:t.publisheddateformatted,title:null==t?void 0:t.title,description:null==t?void 0:t.description,readTime:null==t?void 0:t.minstoread,button:{params:{identifier:`cta ${null==t?void 0:t.id}`,styles:"",variant:"tertiaryButton"},fields:{link:{params:{identifier:"",styles:""},fields:{linkType:"internal",url:null==t?void 0:t.url,label:null==R?void 0:R.newsCardCTALabel,target:"_self"}},icon:"arrowRight"},variant:null===se.ButtonVariant||void 0===se.ButtonVariant?void 0:se.ButtonVariant.TERTIARY},image:(null==t?void 0:t.image_url)?{fields:[{image:null==t?void 0:t.image_url,altText:"News Image",breakpoint:"desktop"}]}:void 0},id:null==t?void 0:t.id})):null==tb?void 0:tb.map(t=>{var e,n;return{params:{buttonVariant:null===se.ButtonVariant||void 0===se.ButtonVariant?void 0:se.ButtonVariant.TEXT,identifier:null==t?void 0:t.id},id:null==t?void 0:t.id,fields:{ctaLink:{params:{},fields:{link:{params:{identifier:`cta ${null==t?void 0:t.id}`,styles:""},fields:{linkType:"internal",url:null==t?void 0:t.url,label:null==R?void 0:R.newsCardCTALabel,target:"_self"}}}},name:((null==t?void 0:t.firstname)||"").concat(" ",(null==t?void 0:t.lastname)||"").trim(),department:Array.isArray(null==t?void 0:t.department)&&(null===(e=null==t?void 0:t.department)||void 0===e?void 0:e.length)?null==t?void 0:t.department[0]:null==t?void 0:t.department,facultyType:[...Array.isArray(null==t?void 0:t.personnel)?t.personnel:[],...(null==t?void 0:t.employmentstatus)?[t.employmentstatus]:[]].filter(t=>t&&""!==t.trim()),personnelTitle:null==t?void 0:t.personneltitle,email:null===(n=null==t?void 0:t.email)||void 0===n?void 0:n.toLowerCase(),image:(null==t?void 0:t.image_url)?{params:{identifier:null==t?void 0:t.id,styles:""},fields:[{image:null==t?void 0:t.image_url,altText:((null==t?void 0:t.firstname)||"").concat(" ",(null==t?void 0:t.lastname)||"").trim(),breakpoint:"desktop"}]}:null==R?void 0:R.defaultImage}}}),(null===(e=null===C.useNewsStore||void 0===C.useNewsStore?void 0:C.useNewsStore.getState())||void 0===e?void 0:e.isLoadMore)?(U(t),F(!1)):ti(t)}0!==(null==tb?void 0:tb.length)||(null===(n=null===C.useNewsStore||void 0===C.useNewsStore?void 0:C.useNewsStore.getState())||void 0===n?void 0:n.isLoadMore)||ti([])}else(null===(t=null===C.useNewsStore||void 0===C.useNewsStore?void 0:C.useNewsStore.getState())||void 0===t?void 0:t.isLoadMore)||ti([])},[tb]);let tR=(0,d.useRef)(!1);(0,d.useEffect)(()=>{var t,e,n;if(!(null==tR?void 0:tR.current)&&(null==tC?void 0:tC.length)&&0===(null==V?void 0:V.length)){let i=null!==(n=(null===(t=null==R?void 0:R.facets)||void 0===t?void 0:t.length)&&(null===(e=null==R?void 0:R.facets)||void 0===e?void 0:e.map(t=>{var e,n,i;return null===(i=null===(n=null===(e=null==t?void 0:t.fields)||void 0===e?void 0:e.FacetName)||void 0===n?void 0:n.value)||void 0===i?void 0:i.toLowerCase()})))&&void 0!==n?n:[];M((null==i?void 0:i.map(t=>{var e;return null===(e=(null==tC?void 0:tC.length)>(null==V?void 0:V.length)?tC:V)||void 0===e?void 0:e.find(e=>{var n;return(null===(n=null==e?void 0:e.name)||void 0===n?void 0:n.toLowerCase())===t})}
1)).filter(Boolean)),tR.current=!0}},[tC]),(0,d.useEffect)(()=>{var t,e,n;return tl?(document.body.style.overflow="hidden",th(Q),tt(Object.assign({},...null!==(n=null===(e=null===(t=null==Q?void 0:Q.facet)||void 0===t?void 0:t.types)||void 0===e?void 0:e.map(t=>{var e;return(null==tP?void 0:tP.includes(null==t?void 0:t.name))&&{[t.name]:null===(e=null==t?void 0:t.filter)||void 0===e?void 0:e.values[0]}}))&&void 0!==n?n:[]))):document.body.style.overflow="",()=>{document.body.style.overflow=""}},[tl]);let tI=!!Object.keys(Y).length||"All"!==N||""!==tr||(null===(s=null===(r=null==Q?void 0:Q.sort)||void 0===r?void 0:r.value[0])||void 0===s?void 0:s.name)!==_,tD=()=>{tp(t=>!t)},t_=t=>{var e;let{value:n,id:i}=t.target;te({[i]:n});let r=null==V?void 0:V.find(t=>(null==t?void 0:t.name)===i),s=null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.find(t=>(null==t?void 0:t.id)===n);r&&s&&th(t=>{var e,n;let i=null!==(n=null===(e=null==t?void 0:t.facet)||void 0===e?void 0:e.types)&&void 0!==n?n:[],o=i.some(t=>(null==t?void 0:t.name)===r.name)?i.map(t=>(null==t?void 0:t.name)===r.name?Object.assign(Object.assign({},t),{filter:Object.assign(Object.assign({},null==t?void 0:t.filter),{values:[s.id]})}):t):[...i,{name:r.name,filter:{type:"or",values:[s.id]}}];return Object.assign(Object.assign({},t),{facet:Object.assign(Object.assign({},null==t?void 0:t.facet),{types:o})})})},tk=m().createElement("div",{className:"search-bar__input-box"},m().createElement("label",{htmlFor:"news-search-input",className:"sr-only"},null!==(o=null==R?void 0:R.searchPlaceholderText)&&void 0!==o?o:"Search Keywords"),m().createElement("input",{id:"news-search-input",type:"text",ref:tc,onChange:t=>{if("Enter"===(null==t?void 0:t.key))return void(null==t||t.preventDefault());let{target:e}=t,n=null==e?void 0:e.value;""!==n?((n.length>=2||(null==n?void 0:n.length)<(null==tr?void 0:tr.length))&&(D?tL(n):th(t=>Object.assign(Object.assign({},t),{query:{keyphrase:n}}))),ts(n),to||ta(!0)):D?(()=>{let t=Object.assign({},Q);delete t.query,H(t),ts("")})():(th(t=>{let e=Object.assign({},t);return delete e.query,e}),ts(""))},onKeyDown:t=>{"Enter"===(null==t?void 0:t.key)&&(null==t||t.preventDefault(),tT(tr))},autoComplete:"off",placeholder:null!==(a=null==R?void 0:R.searchPlaceholderText)&&void 0!==a?a:"Search Keywords",value:tr,className:"search-bar__input"}),tr?m().createElement("button",{type:"button","aria-label":"clear search",onClick:()=>{ts(""),tO()},className:"search-bar__cross-button"},m().createElement(st.Icon,{name:"cross"})):m().createElement("button",{type:"button","aria-label":"search",className:"search-bar__search-icon"},m().createElement(st.Icon,{name:"search_white"})));(0,d.useEffect)(()=>{var t,e,n,i,r,s,o,a,c;if("undefined"==typeof window||!(null==V?void 0:V.length)||Object.keys(Y).length>0)return;let u=new URLSearchParams(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.search);V.forEach(t=>{var e;let n=u.get(null==t?void 0:t.name);if(n){let i=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.find(t=>{var e;return(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.toLowerCase())===(null==n?void 0:n.toLowerCase())||(null==t?void 0:t.id)===n});i&&(X({[null==t?void 0:t.name]:null==i?void 0:i.id}),$({name:null==t?void 0:t.name,filter:{type:"or",values:[null==i?void 0:i.id]}}))}});let h=u.get("sort");if(h&&(null===(e=null==R?void 0:R.sortOptions)||void 0===e?void 0:e.length)){let t=null===(n=null==R?void 0:R.sortOptions)||void 0===n?void 0:n.find(t=>{var e,n,i,r,s;return(null===(i=null===(n=null===(e=null==t?void 0:t.fields)||void 0===e?void 0:e.SortOptionsLabel)||void 0===n?void 0:n.value)||void 0===i?void 0:i.toLowerCase())===(null==h?void 0:h.toLowerCase())||(null===(s=null===(r=null==t?void 0:t.fields)||void 0===r?void 0:r.SortOptionsName)||void 0===s?void 0:s.value)===h});t&&(null===(r=null===(i=null==Q?void 0:Q.sort)||void 0===i?void 0:i.value[0])||void 0===r?void 0:r.name)!==(null===(o=null===(s=null==t?void 0:t.fields)||void 0===s?void 0:s.SortOptionsName)||void 0===o?void 0:o.value)&&tf({name:null===(c=null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.SortOptionsName)||void 0===c?void 0:c.value})}},[V,null==R?void 0:R.sortOptions,null===(c=null==Q?void 0:Q.sort)||void 0===c?void 0:c.value]);let tx=m().createElement("div",{className:"news-search__filter-group"},m().createElement("div",{className:"news-search__filter"},null!==(u=null==R?void 0:R.filtersLabel)&&void 0!==u?u:"Filter",":",null==V?void 0:V.map(t=>{var e;return m().createElement("div",{key:null==t?void 0:t.name,className:"news-search__dropdown "+(Y[null==t?void 0:t.name]?"news-search__dropdown--selected":"")},m().createElement("select",{id:null==t?void 0:t.name,className:"news-search__dropdown-select","aria-label":`Filter by ${null==t?void 0:t.label}`,value:Y[null==t?void 0:t.name]||"",onChange:t=>{(t=>{var e,n,i,r,s,o;let{value:a,id:c}=t.target;X({[c]:a});let u=null==V?void 0:V.find(t=>(null==t?void 0:t.name)===c),h=null===(e=null==u?void 0:u.value)||void 0===e?void 0:e.find(t=>(null==t?void 0:t.id)===a);if((null===(i=null===(n=null==Q?void 0:Q.facet)||void 0===n?void 0:n.types)||void 0===i?void 0:i.some(t=>t.name===(null==u?void 0:u.name)))&&J(null===(s=null===(r=null==Q?void 0:Q.facet)||void 0===r?void 0:r.types)||void 0===s?void 0:s.filter(t=>(null==t?void 0:t.name)!==(null==u?void 0:u.name))),u&&h&&($({name:null==u?void 0:u.name,filter:{type:"or",values:[null==h?void 0:h.id]}}),"undefined"!=typeof window)){let t=new URL(null===(o=null==window?void 0:window.location)||void 0===o?void 0:o.href);t.searchParams.set(c,null==h?void 0:h.text),window.history.replaceState({},"",t.toString())}})(t)}},m().createElement("option",{value:"",disabled:!0},null==t?void 0:t.label),null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.map(t=>{var e;return(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.length)>0&&m().createElement("option",{key:t.id,value:t.id},t.text.replace(/^\[|\]$/g,"")," ")})))}),m().createElement("button",{className:"news-search__clear-filters",type:"button","aria-hidden":!tl,onClick:tO,disabled:!tI},null!==(h=null==R?void 0:R.clearLabel)&&void 0!==h?h:"Clear")),m().createElement("div",{className:"news-search__filter-pills"},null==V?void 0:V.map(t=>{var e,n;return Y[null==t?void 0:t.name]&&m().createElement("div",{className:"news-search__pill",key:null==t?void 0:t.name},`${null==t?void 0:t.label}: `,null===(n=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.find(e=>(null==e?void 0:e.id)===Y[null==t?void 0:t.name]))||void 0===n?void 0:n.text,m().createElement("button",{type:"button",className:"news-search__pill-clear","aria-label":`Clear ${t.label} filter`,onClick:()=>{var e,n;if(Z([t.name]),B(t),"undefined"!=typeof window){let i=new URL(window.location.href);null===(e=null==i?void 0:i.searchParams)||void 0===e||e.delete(null==t?void 0:t.name),null===(n=null==window?void 0:window.history)||void 0===n||n.replaceState({},"",null==i?void 0:i.toString())}}},m().createElement(st.Icon,{name:"cross"})))}))),tN=m().createElement("div",{className:"news-search__sort "+(Y[null===(p=null===(l=null==Q?void 0:Q.sort)||void 0===l?void 0:l.value[0])||void 0===p?void 0:p.name]?"news-search__sort--selected":"")},m().createElement("label",{htmlFor:"sort-by",className:"news-search__sort-label"},null!==(f=null==R?void 0:R.sortByLabel)&&void 0!==f?f:"Sort by"),m().createElement("select",{id:"sort
1-by",className:"news-search__dropdown-select",value:(null===(g=null===(v=null==Q?void 0:Q.sort)||void 0===v?void 0:v.value[0])||void 0===g?void 0:g.name)||_,onChange:t=>{var e,n,i,r,s,o,a,c;if(tn.length&&z(tn.length),G(0),tf({name:null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.value}),"undefined"!=typeof window){let e=null===(n=null==R?void 0:R.sortOptions)||void 0===n?void 0:n.find(e=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.fields)||void 0===n?void 0:n.SortOptionsName)||void 0===i?void 0:i.value)===t.target.value}),u=(null===(r=null===(i=null==e?void 0:e.fields)||void 0===i?void 0:i.SortOptionsLabel)||void 0===r?void 0:r.value)||(null===(s=null==t?void 0:t.target)||void 0===s?void 0:s.value),h=new URL(null===(o=null==window?void 0:window.location)||void 0===o?void 0:o.href);null===(a=null==h?void 0:h.searchParams)||void 0===a||a.set("sort",u),null===(c=null==window?void 0:window.history)||void 0===c||c.replaceState({},"",null==h?void 0:h.toString())}}},null===(w=null==R?void 0:R.sortOptions)||void 0===w?void 0:w.map(t=>{var e,n,i,r;return m().createElement("option",{key:t.id,value:null===(n=null===(e=null==t?void 0:t.fields)||void 0===e?void 0:e.SortOptionsName)||void 0===n?void 0:n.value},null===(r=null===(i=null==t?void 0:t.fields)||void 0===i?void 0:i.SortOptionsLabel)||void 0===r?void 0:r.value)}))),tG=m().createElement("div",{className:"news-search__alphabet-facets"},["All",..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")].map(t=>{var e,n;let i="All"!==t&&!(null===(n=null===(e=null==tC?void 0:tC.find(t=>{var e,n,i,r;return t.name===(null===(r=null===(i=null===(n=null===(e=null==R?void 0:R.alphabetFacet)||void 0===e?void 0:e.fields)||void 0===n?void 0:n.FacetName)||void 0===i?void 0:i.value)||void 0===r?void 0:r.trim())}))||void 0===e?void 0:e.value)||void 0===n?void 0:n.some(e=>{var n;return(null===(n=null==e?void 0:e.text)||void 0===n?void 0:n.toUpperCase())===t}));return m().createElement("button",{key:t,type:"button",className:`news-search__alphabet ${N===t?"active":""} ${i?"disabled":""}`,onClick:()=>(t=>{var e,n,i,r,s,o,a,c,u,h,l;if(x(t),"all"===t.toLowerCase()){let t=null===(n=null===(e=null==Q?void 0:Q.facet)||void 0===e?void 0:e.types)||void 0===n?void 0:n.filter(t=>{var e,n,i,r,s;return(null===(e=null==t?void 0:t.name)||void 0===e?void 0:e.trim())!==(null===(s=null===(r=null===(i=null===(n=null==R?void 0:R.alphabetFacet)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.FacetName)||void 0===r?void 0:r.value)||void 0===s?void 0:s.trim())});J(t),(null==t?void 0:t.length)&&tv({facetId:null===(i=null==R?void 0:R.alphabetFacet)||void 0===i?void 0:i.id,facetIndex:null==t?void 0:t.length,type:"valueId"})}else{let e=null==tC?void 0:tC.find(t=>{var e,n,i,r;return(null==t?void 0:t.name)===(null===(r=null===(i=null===(n=null===(e=null==R?void 0:R.alphabetFacet)||void 0===e?void 0:e.fields)||void 0===n?void 0:n.FacetName)||void 0===i?void 0:i.value)||void 0===r?void 0:r.trim())});if((null===(s=null===(r=null==Q?void 0:Q.facet)||void 0===r?void 0:r.types)||void 0===s?void 0:s.some(t=>(null==t?void 0:t.name)===(null==e?void 0:e.name)))&&J(null===(a=null===(o=null==Q?void 0:Q.facet)||void 0===o?void 0:o.types)||void 0===a?void 0:a.filter(t=>(null==t?void 0:t.name)!==(null==e?void 0:e.name))),e){let n=null===(c=e.value)||void 0===c?void 0:c.filter(e=>{var n;return(null===(n=null==e?void 0:e.text)||void 0===n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())});(null==n?void 0:n.length)&&($({name:e.name,filter:{type:"or",values:[null===(u=n[0])||void 0===u?void 0:u.id]}}),tv({facetId:null==e?void 0:e.name,facetIndex:null===(l=null===(h=null==Q?void 0:Q.facet)||void 0===h?void 0:h.types)||void 0===l?void 0:l.length,type:"valueId"}))}}})(t),disabled:i},t)}));return m().createElement("div",Object.assign({id:null==O?void 0:O.identifier,className:"news-search"},(null==O?void 0:O.searchIgnore)?{"data-attribute-search-ignore":!0}:{}),m().createElement("div",{ref:td,className:"search-bar__content-wrapper"},m().createElement("form",{onSubmit:t=>{t.preventDefault(),(null==tr?void 0:tr.length)>0&&tT(tr)},className:"news-search__form"},m().createElement("button",{type:"submit",style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}},"Submit"),D?m().createElement("div",{className:"news-search__wrapper"},tk,tx):m().createElement("button",{className:"news-search__open-filters",type:"button",onClick:tD,disabled:tg||tw},null!==(y=null==R?void 0:R.searchAndRefineLabel)&&void 0!==y?y:"Search and Refine"),m().createElement("div",{className:(null==R?void 0:R.cardType)===sk.NEWS?"news-search__action-news":"people-search__action"},m().createElement("div",{className:"news-search__count","data-is-fetching":tw},!!tS&&!tw&&R.searchResultsTopCount.replace("{PageStart}","1").replace("{PageSize}",null===(b=null==tn?void 0:tn.length)||void 0===b?void 0:b.toString()).split("{total}").reduce((t,e,n,i)=>(null==t||t.push(e),n<i.length-1&&t.push(m().createElement("span",{id:"total-items",key:"total-items"},tS)),t),[])),D&&tN),D&&(null==R?void 0:R.alphabetFacet)&&tG,m().createElement("div",{className:"news-search__separator"}))),!D&&tl&&(0,r7.createPortal)(m().createElement("div",{className:"popup-backdrop"}),document.body),!D&&m().createElement("div",{className:"popup "+(tl?"popup--open":"popup--closed")},m().createElement("div",{className:"popup-title"},m().createElement("span",{className:"popup-title-text"},null!==(S=null==R?void 0:R.searchAndRefineLabel)&&void 0!==S?S:"Search and Refine"),m().createElement("button",{type:"button",className:"popup-title-close",onClick:tD},m().createElement(st.Icon,{name:"crossCircle"}))),tk,m().createElement("span",{className:"news-search__filter--text"},null!==(E=null==R?void 0:R.filtersLabel)&&void 0!==E?E:"Filter",":"),m().createElement("div",{className:"news-search__filter"},null==V?void 0:V.map(t=>{var e;return m().createElement("div",{key:null==t?void 0:t.name,className:"news-search__dropdown"},m().createElement("select",{id:null==t?void 0:t.name,className:"news-search__dropdown-select","aria-label":`Filter by ${null==t?void 0:t.label}`,value:Y[null==t?void 0:t.name]||"",onChange:t_},m().createElement("option",{value:"",disabled:!0},null==t?void 0:t.label),null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.map(t=>{var e;return(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.length)>0&&m().createElement("option",{key:t.id,value:t.id},t.text.replace(/^\[|\]$/g,"")," ")})))}),(null==V?void 0:V.some(t=>Y[null==t?void 0:t.name]))&&m().createElement("div",{className:"news-search__filter-pills"},null==V?void 0:V.map(t=>{var e,n;return Y[null==t?void 0:t.name]&&m().createElement("div",{className:"news-search__pill",key:t.name},`${null==t?void 0:t.label}: `,null===(n=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.find(e=>(null==e?void 0:e.id)===Y[null==t?void 0:t.name]))||void 0===n?void 0:n.text,m().createElement("button",{type:"button",className:"news-search__pill-clear","aria-label":`Clear ${null==t?void 0:t.label} filter`,onClick:()=>{Z([t.name]),th(e=>{var n,i;return Object.assign(Object.assign({},e),{facet:Object.assign(Object.assign({},null==e?void 0:e.facet),{types:null===(i=null===(n=null==e?void 0:e.facet)||void 0===n?void 0:n.types)||void 0===i?void 0:i.filter(e=>e.name!==t.name)})})})}},m().createElement(st.Icon,{name:"cross"})))}))),m().createElement("button",{className:"news-search__clear-filters",type:"button","aria-hidden":"true",onClick:tO,disabled:!tI},null!==(A=null==R?void 0:R.clearAllFiltersLabel)&&void 0!==A?A:"Clear All Filters"),m().createElement("div",{className:"news-search__sort--seperator"},tN,m().createElement("div",{className:"news-search__separator"})),m().createElement("div",{className:"news-search__footer"},m().createElement("button",{className:"news-search__filter-button",onClick:()=>{var t,e;H(tu);let n=new URL(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.href),i=new URLSearchParams;null===(e=Object.entries(Y))||void 0===e||e.forEach(([t,e])=>{var n;let r=null==V?void 0:V.find(e=>e.name===t),s=null===(n=null==r?void 0:r.value)||void 0===n?void 0:n.find(t=>
1t.id===e);(null==s?void 0:s.text)&&i.set(t,s.text)});let r=`${n.origin}${n.pathname}${(null==i?void 0:i.toString())?`?${i.toString()}`:""}`;window.history.replaceState({},"",r),tD()},type:"button"},null!==(P=null==R?void 0:R.filterCTALabel)&&void 0!==P?P:"Filter"))),m().createElement(sB,{cardProps:tn,isLoading:tg,isFetching:tw,isError:ty,fields:R,noResultsText:null==R?void 0:R.noResultsText,totalItems:tS,offset:tE,pageLimit:tA,loadMoreLabel:null==R?void 0:R.loadMoreLabel,searchResultsBottomCount:null==R?void 0:R.searchResultsBottomCount,cardType:null==R?void 0:R.cardType}),m().createElement("div",{className:"search__load-more-container"},tw&&(null!==(T=null==tb?void 0:tb.length)&&void 0!==T?T:0)>0?m().createElement(sr,{present:!0},m().createElement("div",{className:"load-more__loader"},m().createElement(sx.Loader,{params:{identifier:"Loader01",styles:""},fields:{content:""}}))):m().createElement("button",{type:"button",className:"news-card__load-more "+(tE+tA>=tS?"hidden":""),onClick:()=>{F(!0),tm({page:Math.floor(Number(tE)/Number(tA)+1)+1})}},null!==(L=null==R?void 0:R.loadMoreLabel)&&void 0!==L?L:"Load more"," ",m().createElement(st.Icon,{name:"arrowDownTriangle"}))))},S.SEARCH_RESULTS,"content");function sM({params:t,fields:e}){nW.getContext().setLocaleLanguage("en"),nW.getContext().setLocaleCountry("us");let n=(0,C.useNewsStore)(t=>t.programSourceInitial),i=(0,C.useNewsStore)(t=>t.programSource),r=(0,C.useNewsStore)(t=>t.setProgramSource),s=(0,C.useNewsStore)(t=>t.setProgramSourceInitial);return(0,d.useEffect)(()=>{r(JSON.parse(JSON.stringify(null==e?void 0:e.sourceBody))),s(JSON.parse(JSON.stringify(null==e?void 0:e.sourceBody)))},[null==e?void 0:e.sourceBody]),n&&i?m().createElement(rV,Object.assign({env:null==e?void 0:e.sitecoreEnv,customerKey:null==e?void 0:e.sitecoreCustomerKey},(null==e?void 0:e.sitecoreServiceHost)&&(null==e?void 0:e.sitecoreIsSubdomain)?{serviceHost:null==e?void 0:e.sitecoreServiceHost}:{apiKey:null==e?void 0:e.sitecoreApiKey},(null==t?void 0:t.searchIgnore)?{"data-attribute-search-ignore":!0}:{}),m().createElement(sV,{key:b(),rfkId:null==e?void 0:e.sitecoreWidgetId,props:{params:t,fields:e}})):null}})(),v})(),t.exports=i(n(7356),n(1136),n(2905),n(9065),n(5951),n(5667),n(6664),n(7294),n(3935))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.