1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206],{29:function(t,e,n){let i,r,s,o,a,c,u;var h=n(5364),p=n(2909).hp;i=n(5123),r=n(1742),s=n(8703),o=n(9506),a=n(4232),c=n(8477),u=n(7876),t.exports=(()=>{"use strict";let t,e,l,d,f;var m,g,v,w,y,b,S,C,A,E,P,T,I,R,_,L,O,D,x,k,N,j,G,F,U,q,V,M,B,K={1:t=>{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(),p=!i||h-i>u;i=h;for(var l=arguments.length,d=Array(l),f=0;f<l;f++)d[f]=arguments[f];if(p&&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 m=o.length-1;return r.promise.then(function(t){return t[m]})}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}}},416:t=>{t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},283:(t,e,n)=>{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}},785:(t,e,n)=>{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},634:(t,e,n)=>{t.exports=n(785)},667:t=>{t.exports=i},464:t=>{t.exports=r},815:t=>{t.exports=s},196:t=>{t.exports=o},12:t=>{t.exports=a},33:t=>{t.exports=c},550:t=>{t.exports=u}},H={};function Q(t){var e=H[t];if(void 0!==e)return e.exports;var n=H[t]={exports:{}};return K[t](n,n.exports,Q),n.exports}B=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,Q.t=function(t,e){if(1&e&&(t=this(t)),8&e||"object"==typeof t&&t&&(4&e&&t.__esModule||16&e&&"function"==typeof t.then))return t;var n=Object.create(null);Q.r(n);var i={};M=M||[null,B({}),B([]),B(B)];for(var r=2&e&&t;"object"==typeof r&&!~M.indexOf(r);r=B(r))Object.getOwnPropertyNames(r).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,Q.d(n,i),n},Q.d=(t,e)=>{for(var n in e)Q.o(e,n)&&!Q.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},Q.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Q.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var W={};Q.r(W),Q.d(W,{SitecoreSearchResults:()=>aj});var $={};Q.r($),Q.d($,{hasBrowserEnv:()=>eJ,hasStandardBrowserEnv:()=>eY,hasStandardBrowserWebWorkerEnv:()=>eX,navigator:()=>ez,origin:()=>eZ});var J,z=Q(550),Y=Q(12),X=Q.t(Y,2);(m=J||(J={})).RECOMMENDATION="recommendation",m.PREVIEW_SEARCH="preview_search",m.SEARCH_RESULTS="content_grid",m.CONTENT_BLOCK="content_block",m.QUESTIONS="questions_answers",m.HTML_BLOCK="html_block",m.BANNER="banner",m.SEO="seo";let Z=(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}`},tt=t=>{let e=typeof t;return null!==t&&("object"===e||"function"===e)},te=new Set(["__proto__","prototype","constructor"]),tn=new Set("0123456789");function ti(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(te.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(te.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&&!tn.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(te.has(n))return[];e.push(n);break;case"index":throw Error("Index was not closed");case"start":e.push("")}return e}function tr(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 ts(t,e){if(tr(t,e))throw Error("Cannot use string index")}function to(t,e,n){if(!tt(t)||"string"!=typeof e)return t;let i=t,r=ti(e);for(let e=0;e<r.length;e++){let i=r[e];ts(t,i),e===r.length-1?t[i]=n:tt(t[i])||(t[i]="number"==typeof r[e+1]?[]:{}),t=t[i]}return i}function ta(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 tc=t=>t&&"object"==typeof t&&!Array.isArray(t);function tu(t,e,{mutate:n=!1}={}){let i=n?t:Object.assign({},t);return tc(t)&&tc(e)&&Object.keys(e).forEach(n=>{tc(e[n])&&n in t?i[n]=tu(t[n],e[n]):Object.assign(i,{[n]:e[n]})}),i}let th=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]=th(t[n]));return e};var tp=Q(283);class tl{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]):to(this.data,i,e),this.onChange(t,e)}}return this}get(t,e,n){return t in this.props?function(t,e,n){if(!tt(t)||"string"!=typeof e)return void 0===n?t:n;let i=ti(e);if(0===i.length)return n;for(let e=0;e<i.length;e++){let r=i[e];if(null==(t=tr(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 ta(t,t=>!n.has(t))}return ta(t,(t,n,i)=>!e(t,n,i))}(this.data,[e]),this;let n=this.getValue(t,{});return function(t,e){if(!tt(t)||"string"!=typeof e)return;let n=ti(e);for(let e=0;e<n.length;e++){let i=n[e];if(ts(t,i),e===n.length-1)return delete t[i],!0;if(!tt(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,tu(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(th(this.data)):this.transformJson(tp(th(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 td(t,e){return(td=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tf(t){return(tf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tm(t){return(tm="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 tg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let tv=(t,e,n)=>{let{name:i=t}=e;return n?`${n.key}.${i}`:i},tw=(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},ty=(t,e,n,i,r)=>{let s={};return Object.keys(e).forEach(o=>{let{key:a,methodKey:c,config:u,config:{accessProp:h,exportKey:p,setter:l,getter:d,type:f,model:m,initialValue:g}}=((t,e,n)=>{let i,{exportKey:r=[t],getter:s,setter:o}=n,a="map"===e?.type,c=tv(t,n,e),u=e?`${e.accessProp}.${t}`:t,h=[...a?["#KEY#"]:[],..."__constructor__"===t?[]:r],p=e?.exportKey?.concat(...h)||h,l=(i=c,"__constructor__"===t&&(i=tv(t,n,e?.parent||null)),i.replace(/\./g,"_")),d=s||Z("get",l),f=o||Z("set",l);return{config:{...n,key:c,accessProp:u,exportKey:p,keyPath:h,getter:d,setter:f,parent:e},key:c,methodKey:l}})(o,t,e[o]),v={type:f,...r};s[a]=u;let w=g?g():void 0;if(void 0===w||a.includes("#KEY#")||to(n,p.join("."),w),i.push({typeOptions:v,prop:h,key:d,value:function(...t){return this.getValue(a,...tw(t,v,1,1))}}),i.push({typeOptions:v,prop:h,key:l,value:function(...t){return this.setValue(a,...tw(t,v,1))}}),i.push({typeOptions:v,prop:h,key:Z("reset",c),value:function(...t){return this.resetValue(a,...tw(t,v,0))}}),"array"===f){let t=c.replace(/s$/,"").replace(/ie$/,"y");i.push({typeOptions:v,prop:h,key:Z("add",t),value:function(...t){return this.addValue(a,...tw(t,v,1))}}),i.push({typeOptions:v,prop:h,key:Z("remove",t),value:function(...t){return this.removeValue(a,...tw(t,v,2,1))}})}else"model"===f&&m?(Object.assign(s,ty(u,m.properties,n,i,r)),i.push({typeOptions:v,prop:h,key:Z("update",c),value:function(...t){return this.updateV
1alue(a,...tw(t,v,1))}})):"map"===f&&m&&Object.assign(s,ty(u,m.properties,n,i,{parent:u,...r}))}),s},tb=t=>{let{name:e,properties:n={}}=t,i={},r=[],s=ty(null,n,i,r);!1;a.prototype=Object.create(tl&&tl.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),tl&&td(a,tl);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,i=tf(t);if(n=e?Reflect.construct(i,arguments,tf(this).constructor):i.apply(this,arguments),n&&("object"===tm(n)||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this}}(a);function a(...t){let e=o.call.apply(o,[this].concat(t));return tg(e,"listeners",[]),tg(e,"props",s),tg(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},tS={name:"Content",properties:{fields:{type:"array"}}},tC={name:"SearchFilter",properties:{type:{},name:{required:!0},values:{type:"array",required:!0}}},tA={name:"Rule",properties:{behaviors:{}
1,blacklist:{type:"model",model:{name:"Blacklist",properties:{filter:{type:"model",model:tC,required:!0}}}},boost:{type:"array",model:{name:"Boost",properties:{filter:{type:"model",model:tC,required:!0},slots:{type:"array",required:!0}}}},bury:{type:"model",model:{name:"Bury",properties:{filter:{type:"model",model:tC,required:!0}}}},include:{type:"array",model:{name:"Include",properties:{filter:{type:"model",model:tC,required:!0},slots:{type:"array",required:!0}}}},pin:{type:"array",model:{name:"Pin",properties:{id:{required:!0},slot:{type:"array",required:!0}}}}}},tE={name:"FacetSort",properties:{name:{required:!0},order:{required:!0}}};(g=P||(P={})).HARD_FILTERS="hard_filters",g.OTHER_FACET_VALUES="other_facet_values",g.OWN_VALUES="own_values";let tP={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:tS},filter:{type:"model",model:tC},recipe:{type:"model",model:{name:"RecommendationsRecipe",properties:{id:{},version:{}}}},limit:{},rule:{type:"model",model:tA}}}},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:tS},facet:{type:"model",model:{name:"Facet",properties:{all:{},max:{},sort:{type:"model",model:tE},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:tE}}}}}}},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:tA},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"}}}}}}}}},tT=tb(tP);class tI extends tT{constructor(t){super(),this.setRfkId(t)}setSearchFilter(t){return this.setValue("search.filter",t.toJson()),this}}let tR=t=>{let e=new tI(t);return e.setAppearance({}),e.setAppearanceTemplates({}),e.setAppearanceVariables({}),e};class t_ extends tI{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 tL={[J.RECOMMENDATION]:t=>{let e=new tI(t);return e.setRecommendationsContent({}),e},[J.SEARCH_RESULTS]:t=>{let e=new t_(t);return e.setSearchContent({}),e.setSearchFacetAll(!0),e.setSearchOffset(0),e.setSearchSortChoices(!0),e},[J.PREVIEW_SEARCH]:t=>{let e=new tI(t);return e.setSearchContent({}),e},[J.QUESTIONS]:t=>{let e=new t_(t);return e.setQuestionsRelatedQuestionsLimit(5),e.setQuestionsExactAnswer({}),e},[J.CONTENT_BLOCK]:tR,[J.HTML_BLOCK]:tR,[J.SEO]:tR,[J.BANNER]:tR},tO={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:{}}}}}},tD=tb(tO);class tx extends tD{}class tk{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(tk,"context",{enumerable:!0,configurable:!0,writable:!0,value:new tx});let tN=t=>0===Object.keys(t||{}).length,tj=t=>{try{return t?JSON.parse(t):""}catch(e){return t}},tG=(t={})=>"undefined"!=typeof window?window:t;(v=T||(T={}))[v.NONE=0]="NONE",v[v.ERROR=1]="ERROR",v[v.WARN=2]="WARN",v[v.INFO=3]="INFO",v[v.DEBUG=4]="DEBUG",v[v.TRACE=5]="TRACE";let tF={none:T.NONE,error:T.ERROR,warn:T.WARN,info:T.INFO,debug:T.DEBUG,trace:T.TRACE},tU="Sitecore Search SDK",tq=[console],tV=new class{constructor(t,e=T.NONE,n=tU){Object.defineProperty(this,"NONE",{enumerable:!0,configurable:!0,writable:!0,value:T.NONE}),Object.defineProperty(this,"ERROR",{enumerable:!0,configurable:!0,writable:!0,value:T.ERROR}),Object.defineProperty(this,"WARN",{enumerable:!0,configurable:!0,writable:!0,value:T.WARN}),Object.defineProperty(this,"INFO",{enumerable:!0,configurable:!0,writable:!0,value:T.INFO}),Object.defineProperty(this,"DEBUG",{enumerable:!0,configurable:!0,writable:!0,value:T.DEBUG}),Object.defineProperty(this,"TRACE",{enumerable:!0,configurable:!0,writable:!0,value:T.TRACE}),Object.defineProperty(this,"transports",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:T.NONE}),Object.defineProperty(this,"namespace",{enumerable:!0,configurable:!0,writable:!0,value:tU}),this.transports=t,this.namespace=n,this.setLogLevel(e)}setLogLevel(t){if("string"!=typeof t)this.logLevel=t;else{if(!tF[t])throw Error(`Logger :: Invalid logLevel (${t})`);this.logLevel=tF[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(T.ERROR,"error",...t)}warn(...t){return this.send(T.WARN,"warn",...t)}info(...t){return this.send(T.INFO,"info",...t)}debug(...t){return this.send(T.DEBUG,"debug",...t)}trace(...t){return this.send(T.TRACE,"log",...t)}}(tq),tM={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"},tB={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"},tK="/event/{{key}}/v4/publish",tH=t=>{let e=t.split("-");return 2===e.length&&e[1]||""},tQ={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},tW=t=>tQ[t],t$=()=>{let t=tG({location:{hostname:""}}),{publicSuffix:e}=tQ;return e?t.location.hostname:t.location.hostname.split(".").reverse().splice(0,2).reverse().join(".")},tJ=Date.now(),tz=((t={})=>"undefined"!=typeof document?document:t)({cookie:""});tz.cookie||(tz.cookie="");class tY{getCookieValue(t,e){let n=t.slice(e.length+1,t.length);return n?decodeURIComponent(n):""}getCookieFromBrowser(t){let e=tz.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=${t$()};path=/;`,r+=n?`;expires=${i.toUTCString()}`:"",r+=";secure;SameSite=None;",tz.cookie=`${t}=${r}`}removeCookieFromBrowser(t){tz.cookie=`${t}=;domain=${t$()};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 tX{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=tj(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 tZ=class{static init(e){t=e&&tG().localStorage?new tX:new tY}static set(e,n,i){t.set(e,n,i||3e5)}static get(e){let n=t.get(e),i=n?tj(n):{};return"undefined"===n&&(n=void 0),n&&i?i:n}static remove(e){t.remove(e)}},t0={},t1=()=>{let{domainId:t,customerKey:e}=tQ;return e?tH(e):t},t2=()=>{let t=tW("userId");if(t)return{user_id:t};let{uid:e}=(()=>{var t;let e,n,{domainHash:i}=tQ;t0.domainHashCkey=i,t0.domainHash=t0.domainHashCkey,t0.domainRoot=t$();let r=(e=0,n=tZ.get("__rutma"),tZ.get("__rutmb")||(tZ.set("__rutmb",t1(),18e5),e=1),n=n?((t,e)=>{let n=t.split(".");return n.length>3&&(e&&(n[1]=n[2],n[2]=tJ,n[3]=+n[3]+1),4===n.length&&(n[4]=1),5===n.length&&(n[5]=1),n[4]=+n[4]+1,n[5]=1+(e?0:+n[5]),t=n.join(".")),t})(n,e):`${(()=>{let t=tZ.get("__ruid");if(t)return t;t="xx-xx-4x-1p-".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=t1()+"-"+t+"-"+tJ;return tZ.set("__ruid",e),e})()}.${tJ}.${tJ}.1.1.1`,tZ.set("__rutma",n,18e5),n),s=r.split(".");return t0.uid=s[0],t0.usetLastDigit=(t=s[0]).length?t[t.length-1]:void 0,t0.previousSessionStartTime=parseInt(s[1]),t0.currentSessionStartTime=parseInt(s[2]),t0.visitCount=parseInt(s[3]),t0.pageViewCount=parseInt(s[4]),t0.visitPageCount=parseInt(s[5]),t0.utma=r,t0})();return{uuid:e}},t4=tG();function t5(t,e){return function(){return t.apply(e,arguments)}}let{toString:t3}=Object.prototype,{getPrototypeOf:t6}=Object,t7=(d=Object.create(null),t=>{let e=t3.call(t);return d[e]||(d[e]=e.slice(8,-1).toLowerCase())}),t8=t=>(t=t.toLowerCase(),e=>t7(e)===t),t9=t=>e=>typeof e===t,{isArray:et}=Array,ee=t9("undefined"),en=t8("ArrayBuffer"),ei=t9("string"),er=t9("function"),es=t9("number"),eo=t=>null!==t&&"object"==typeof t,ea=t=>{if("object"!==t7(t))return!1;let e=t6(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},ec=t8("Date"),eu=t8("File"),eh=t8("Blob"),ep=t8("FileList"),el=t8("URLSearchParams"),[ed,ef,em,eg]=["ReadableStream","Request","Response","Headers"].map(t8);function ev(t,e,{allOwnKeys:n=!1}={}){let i,r;if(null!=t)if("object"!=typeof t&&(t=[t]),et(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{let r,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 ew(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 ey="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,eb=t=>!ee(t)&&t!==ey,eS=(I="undefined"!=typeof Uint8Array&&t6(Uint8Array),t=>I&&t instanceof I),eC=t8("HTMLFormElement"),eA=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),eE=t8("RegExp"),eP=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),i={};ev(n,(n,r)=>{let s;!1!==(s=e(n,r,t))&&(i[r]=s||n)}),Object.defineProperties(t,i)}
1,eT="abcdefghijklmnopqrstuvwxyz",eI="0123456789",eR={DIGIT:eI,ALPHA:eT,ALPHA_DIGIT:eT+eT.toUpperCase()+eI},e_=t8("AsyncFunction"),eL=(R="function"==typeof setImmediate,_=er(ey.postMessage),R?setImmediate:_?(L=`axios@${Math.random()}`,O=[],ey.addEventListener("message",({source:t,data:e})=>{t===ey&&e===L&&O.length&&O.shift()()},!1),t=>{O.push(t),ey.postMessage(L,"*")}):t=>setTimeout(t)),eO="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ey):void 0!==h&&h.nextTick||eL,eD={isArray:et,isArrayBuffer:en,isBuffer:function(t){return null!==t&&!ee(t)&&null!==t.constructor&&!ee(t.constructor)&&er(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||er(t.append)&&("formdata"===(e=t7(t))||"object"===e&&er(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&en(t.buffer)},isString:ei,isNumber:es,isBoolean:t=>!0===t||!1===t,isObject:eo,isPlainObject:ea,isReadableStream:ed,isRequest:ef,isResponse:em,isHeaders:eg,isUndefined:ee,isDate:ec,isFile:eu,isBlob:eh,isRegExp:eE,isFunction:er,isStream:t=>eo(t)&&er(t.pipe),isURLSearchParams:el,isTypedArray:eS,isFileList:ep,forEach:ev,merge:function t(){let{caseless:e}=eb(this)&&this||{},n={},i=(i,r)=>{let s=e&&ew(n,r)||r;ea(n[s])&&ea(i)?n[s]=t(n[s],i):ea(i)?n[s]=t({},i):et(i)?n[s]=i.slice():n[s]=i};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&ev(arguments[t],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(ev(e,(e,i)=>{n&&er(e)?t[i]=t5(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)=>{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,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&&t6(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:t7,kindOfTest:t8,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(et(t))return t;let e=t.length;if(!es(e))return null;let n=Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{let n,i=(t&&t[Symbol.iterator]).call(t);for(;(n=i.next())&&!n.done;){let i=n.value;e.call(t,i[0],i[1])}},matchAll:(t,e)=>{let n,i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:eC,hasOwnProperty:eA,hasOwnProp:eA,reduceDescriptors:eP,freezeMethods:t=>{eP(t,(e,n)=>{if(er(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;er(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={};
1return(et(t)?t:String(t).split(e)).forEach(t=>{n[t]=!0}),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*=1)?t:e,findKey:ew,global:ey,isContextDefined:eb,ALPHABET:eR,generateString:(t=16,e=eR.ALPHA_DIGIT)=>{let n="",{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&er(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{let e=Array(10),n=(t,i)=>{if(eo(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;let r=et(t)?[]:{};return ev(t,(t,e)=>{let s=n(t,i+1);ee(s)||(r[e]=s)}),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:e_,isThenable:t=>t&&(eo(t)||er(t))&&er(t.then)&&er(t.catch),setImmediate:eL,asap:eO};function ex(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)}eD.inherits(ex,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:eD.toJSONObject(this.config),code:this.code,status:this.status}}});let ek=ex.prototype,eN={};function ej(t){return eD.isPlainObject(t)||eD.isArray(t)}function eG(t){return eD.endsWith(t,"[]")?t.slice(0,-2):t}function eF(t,e,n){return t?t.concat(e).map(function(t,e){return t=eG(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=>{eN[t]={value:t}}),Object.defineProperties(ex,eN),Object.defineProperty(ek,"isAxiosError",{value:!0}),ex.from=(t,e,n,i,r,s)=>{let o=Object.create(ek);return eD.toFlatObject(t,o,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),ex.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};let eU=eD.toFlatObject(eD,{},null,function(t){return/^is[A-Z]/.test(t)}),eq=function(t,e,n){if(!eD.isObject(t))throw TypeError("target must be an object");e=e||new FormData;let i=(n=eD.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!eD.isUndefined(e[t])})).metaTokens,r=n.visitor||u,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&eD.isSpecCompliantForm(e);if(!eD.isFunction(r))throw TypeError("visitor must be a function");function c(t){if(null===t)return"";if(eD.isDate(t))return t.toISOString();if(!a&&eD.isBlob(t))throw new ex("Blob is not supported. Use a Buffer instead.");return eD.isArrayBuffer(t)||eD.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):p.from(t):t}function u(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(eD.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else{var u;if(eD.isArray(t)&&(u=t,eD.isArray(u)&&!u.some(ej))||(eD.isFileList(t)||eD.endsWith(n,"[]"))&&(a=eD.toArray(t)))return n=eG(n),a.forEach(function(t,i){eD.isUndefined(t)||null===t||e.append(!0===o?eF([n],i,s):null===o?n:n+"[]",c(t))}),!1}return!!ej(t)||(e.append(eF(r,n,s),c(t)),!1)}let h=[],l=Object.assign(eU,{defaultVisitor:u,convertValue:c,isVisitable:ej});if(!eD.isObject(t))throw TypeError("data must be an object");return function t(n,i){if(!eD.isUndefined(n)){if(-1!==h.indexOf(n))throw Error("Circular reference detected in "+i.join("."));h.push(n),eD.forEach(n,function(n,s){!0===(!(eD.isUndefined(n)||null===n)&&r.call(e,n,eD.isString(s)?s.trim():s,i,l))&&t(n,i?i.concat(s):[s])}),h.pop()}}(t),e};function eV(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function eM(t,e){this._pairs=[],t&&eq(t,this,e)}let eB=eM.prototype;function eK(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eH(t,e,n){let i;if(!e)return t;let r=n&&n.encode||eK,s=n&&n.serialize;if(i=s?s(e,n):eD.isURLSearchParams(e)?e.toString():new eM(e,n).toString(r)){let e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}eB.append=function(t,e){this._pairs.push([t,e])},eB.toString=function(t){let e=t?function(e){return t.call(this,e,eV)}:eV;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};let eQ=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){eD.forEach(this.handlers,function(e){null!==e&&t(e)})}},eW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}
1,e$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:eM,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},eJ="undefined"!=typeof window&&"undefined"!=typeof document,ez="object"==typeof navigator&&navigator||void 0,eY=eJ&&(!ez||0>["ReactNative","NativeScript","NS"].indexOf(ez.product)),eX="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eZ=eJ&&window.location.href||"http://localhost",e0={...$,...e$},e1=function(t){if(eD.isFormData(t)&&eD.isFunction(t.entries)){let e={};return eD.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&&eD.isArray(i)?i.length:s,a?eD.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n:(i[s]&&eD.isObject(i[s])||(i[s]=[]),t(e,n,i[s],r)&&eD.isArray(i[s])&&(i[s]=function(t){let e,n,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}(eD.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0]),n,e,0)}),e}return null},e2={transitional:eW,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){let n,i=e.getContentType()||"",r=i.indexOf("application/json")>-1,s=eD.isObject(t);if(s&&eD.isHTMLForm(t)&&(t=new FormData(t)),eD.isFormData(t))return r?JSON.stringify(e1(t)):t;if(eD.isArrayBuffer(t)||eD.isBuffer(t)||eD.isStream(t)||eD.isFile(t)||eD.isBlob(t)||eD.isReadableStream(t))return t;if(eD.isArrayBufferView(t))return t.buffer;if(eD.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,eq(o,new e0.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return e0.isNode&&eD.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))).toString()}if((n=eD.isFileList(t))||i.indexOf("multipart/form-data")>-1){let e=this.env&&this.env.FormData;return eq(n?{"files[]":t}:t,e&&new e,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),function(t){if(eD.isString(t))try{return(0,JSON.parse)(t),eD.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){let e=this.transitional||e2.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(eD.isResponse(t)||eD.isReadableStream(t))return t;if(t&&eD.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 ex.from(t,ex.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:e0.classes.FormData,Blob:e0.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eD.forEach(["delete","get","head","post","put","patch"],t=>{e2.headers[t]={}});let e4=eD.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"]),e5=Symbol("internals");function e3(t){return t&&String(t).trim().toLowerCase()}function e6(t){return!1===t||null==t?t:eD.isArray(t)?t.map(e6):String(t)}function e7(t,e,n,i,r){return eD.isFunction(i)?i.call(this,e,n):(r&&(e=n),eD.isString(e)?eD.isString(i)?-1!==e.indexOf(i):eD.isRegExp(i)?i.test(e):void 0:void 0)}class e8{constructor(t){t&&this.set(t)}set(t,e,n){let i=this;function r(t,e,n){let r=e3(e);if(!r)throw Error("header name must be a non-empty string");let s=eD.findKey(i,r);s&&void 0!==i[s]&&!0!==n&&(void 0!==n||!1===i[s])||(i[s||e]=e6(t))}let s=(t,e)=>eD.forEach(t,(t,n)=>r(t,n,e));if(eD.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(eD.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{let e,n,i,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]&&e4[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(eD.isHeaders(t))for(let[e,i]of t.entries())r(i,e,n);else null!=t&&r(e,t,n);return this}get(t,e){if(t=e3(t)){let n=eD.findKey(this,t);if(n){let t=this[n];if(!e)return t;if(!0===e){let e,n=Object.create(null),i=/([^\s,;
1=]+)\s*(?:=\s*([^,;]+))?/g;for(;e=i.exec(t);)n[e[1]]=e[2];return n}if(eD.isFunction(e))return e.call(this,t,n);if(eD.isRegExp(e))return e.exec(t);throw TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=e3(t)){let n=eD.findKey(this,t);return!(!n||void 0===this[n]||e&&!e7(0,this[n],n,e))}return!1}delete(t,e){let n=this,i=!1;function r(t){if(t=e3(t)){let r=eD.findKey(n,t);r&&(!e||e7(0,n[r],r,e))&&(delete n[r],i=!0)}}return eD.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&&!e7(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){let e=this,n={};return eD.forEach(this,(i,r)=>{let s=eD.findKey(n,r);if(s)return e[s]=e6(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]=e6(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let e=Object.create(null);return eD.forEach(this,(n,i)=>{null!=n&&!1!==n&&(e[i]=t&&eD.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")}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[e5]=this[e5]={accessors:{}}).accessors,n=this.prototype;function i(t){let i=e3(t);e[i]||(function(t,e){let n=eD.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 eD.isArray(t)?t.forEach(i):i(t),this}}function e9(t,e){let n=this||e2,i=e||n,r=e8.from(i.headers),s=i.data;return eD.forEach(t,function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function nt(t){return!(!t||!t.__CANCEL__)}function ne(t,e,n){ex.call(this,null==t?"canceled":t,ex.ERR_CANCELED,e,n),this.name="CanceledError"}function nn(t,e,n){let i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ex("Request failed with status code "+n.status,[ex.ERR_BAD_REQUEST,ex.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}e8.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eD.reduceDescriptors(e8.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),eD.freezeMethods(e8),eD.inherits(ne,ex,{__CANCEL__:!0});let ni=(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,p=0;for(;h!==s;)p+=n[h++],h%=t;if((s=(s+1)%t)===o&&(o=(o+1)%t),c-r<e)return;let l=u&&c-u;return l?Math.round(1e3*p/l):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)},nr=(t,e)=>{let n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},ns=t=>(...e)=>eD.asap(()=>t(...e)),no=e0.hasStandardBrowserEnv?function(){let t,e=e0.navigator&&/(msie|trident)/i.test(e0.navigator.userAgent),n=document.createElement("a");function i(t){let i=t;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){let n=eD.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},na=e0.hasStandardBrowserEnv?{write(t,e,n,i,r,s){let o=[t+"="+encodeURIComponent(e)];eD.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),eD.isString(i)&&o.push("path="+i),eD.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 nc(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t:e}let nu=t=>t instanceof e8?{...t}:t;function nh(t,e){e=e||{};let n={};function i(t,e,n){return eD.isPlainObject(t)&&eD.isPlainObject(e)?eD.merge.call({caseless:n},t,e):eD.isPlainObject(e)?eD.merge({},e):eD.isArray(e)?e.slice():e}function r(t,e,n){return eD.isUndefined(e)?eD.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function s(t,e){if(!eD.isUndefined(e))return i(void 0,e)}function o(t,e){return eD.isUndefined(e)?eD.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)=>r(nu(t),nu(e),!0)};return eD.forEach(Object.keys(Object.assign({},t,e)),function(i){let s=c[i]||r,o=s(t[i],e[i],i);eD.isUndefined(o)&&s!==a||(n[i]=o)}),n}let np=t=>{let e=nh({},t),n,{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=e;if(e.headers=a=e8.from(a),e.url=eH(nc(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),eD.isFormData(i)){if(e0.hasStandardBrowserEnv||e0.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(e0.hasStandardBrowserEnv&&(r&&eD.isFunction(r)&&(r=r(e)),r||!1!==r&&no(e.url))){let t=s&&o&&na.read(o);t&&a.set(s,t)}return e},nl="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){let i=np(t),r=i.data,s=e8.from(i.headers).normalize(),o,a,c,u,h,{responseType:p,onUploadProgress:l,onDownloadProgress:d}=i;function f(){u&&u(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function g(){if(!m)return;let i=e8.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());nn(function(t){e(t),f()},function(t){n(t),f()},{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:i,config:t,request:m}),m=null}m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new ex("Request aborted",ex.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new ex("Network Error",ex.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",r=i.transitional||eW;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ex(e,r.clarifyTimeoutError?ex.ETIMEDOUT:ex.ECONNABORTED,t,m)),m=null},void 0===r&&s.setContentType(null),"setRequestHeader"in m&&eD.forEach(s.toJSON(),function(t,e){m.setRequestHeader(e,t)}),eD.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),p&&"json"!==p&&(m.responseType=i.responseType),d&&([c,h]=ni(d,!0),m.addEventListener("progress",c)),l&&m.upload&&([a,u]=ni(l),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(o=e=>{m&&(n(!e||e.type?new ne(null,t,m):e),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o))
1);let v=function(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);v&&-1===e0.protocols.indexOf(v)?n(new ex("Unsupported protocol "+v+":",ex.ERR_BAD_REQUEST,t)):m.send(r||null)})},nd=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},nf=(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*nd(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})},nm="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ng=nm&&"function"==typeof ReadableStream,nv=nm&&("function"==typeof TextEncoder?(D=new TextEncoder,t=>D.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer())),nw=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},ny=ng&&nw(()=>{let t=!1,e=new Request(e0.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),nb=ng&&nw(()=>eD.isReadableStream(new Response("").body)),nS={stream:nb&&(t=>t.body)};nm&&(x=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(t=>{nS[t]||(nS[t]=eD.isFunction(x[t])?e=>e[t]():(e,n)=>{throw new ex(`Response type '${t}' is not supported`,ex.ERR_NOT_SUPPORT,n)})}));let nC={http:null,xhr:nl,fetch:nm&&(async t=>{let e,{url:n,method:i,data:r,signal:s,cancelToken:o,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:h,headers:p,withCredentials:l="same-origin",fetchOptions:d}=np(t);h=h?(h+"").toLowerCase():"text";let f,m=((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 ex?e:new ne(e instanceof Error?e.message:e))}},s=e&&setTimeout(()=>{s=null,r(new ex(`timeout ${e} of ms exceeded`,ex.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=()=>eD.asap(o),a}})([s,o&&o.toAbortSignal()],a),g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});try{if(u&&ny&&"get"!==i&&"head"!==i&&0!==(e=await (async(t,e)=>{let n=eD.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(eD.isBlob(t))return t.size;if(eD.isSpecCompliantForm(t)){let e=new Request(e0.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return eD.isArrayBufferView(t)||eD.isArrayBuffer(t)?t.byteLength:(eD.isURLSearchParams(t)&&(t+=""),eD.isString(t)?(await nv(t)).byteLength:void 0)})(e):n})(p,r))){let t,i=new Request(n,{method:"POST",body:r,duplex:"half"});if(eD.isFormData(r)&&(t=i.headers.get("content-type"))&&p.setContentType(t),i.body){let[t,n]=nr(e,ni(ns(u)));r=nf(i.body,65536,t,n)}}eD.isString(l)||(l=l?"include":"omit");let s="credentials"in Request.prototype;f=new Request(n,{...d,signal:m,method:i.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:s?l:void 0});let o=await fetch(f),a=nb&&("stream"===h||"response"===h);if(nb&&(c||a&&g)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=o[e]});let e=eD.toFiniteNumber(o.headers.get("content-length")),[n,i]=c&&nr(e,ni(ns(c),!0))||[];o=new Response(nf(o.body,65536,n,()=>{i&&i(),g&&g()}),t)}h=h||"text";let v=await nS[eD.findKey(nS,h)||"text"](o,t);return!a&&g&&g(),await new Promise((e,n)=>{nn(e,n,{data:v,headers:e8.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:f})})}catch(e){if(g&&g(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new ex("Network Error",ex.ERR_NETWORK,t,f),{cause:e.cause||e});throw ex.from(e,e&&e.code,t,f)}})};eD.forEach(nC,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});let nA=t=>`- ${t}`,nE=t=>eD.isFunction(t)||null===t||!1===t,nP=t=>{let e,n,{length:i}=t=eD.isArray(t)?t:[t],r={};for(let s=0;s<i;s++){let i;if(n=e=t[s],!nE(e)&&void 0===(n=nC[(i=String(e)).toLowerCase()]))throw new ex(`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 ex("There is no suitable adapter to dispatch the request "+(i?t.length>
11?"since :\n"+t.map(nA).join("\n"):" "+nA(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function nT(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function nI(t){return nT(t),t.headers=e8.from(t.headers),t.data=e9.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nP(t.adapter||e2.adapter)(t).then(function(e){return nT(t),e.data=e9.call(t,t.transformResponse,e),e.headers=e8.from(e.headers),e},function(e){return nt(e)||(nT(t),e&&e.response&&(e.response.data=e9.call(t,t.transformResponse,e.response),e.response.headers=e8.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 n_={};nR.transitional=function(t,e,n){function i(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new ex(i(r," has been removed"+(e?" in "+e:"")),ex.ERR_DEPRECATED);return e&&!n_[r]&&(n_[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)}};let nL=function(t,e,n){if("object"!=typeof t)throw new ex("options must be an object",ex.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 ex("option "+s+" must be "+n,ex.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ex("Unknown option "+s,ex.ERR_BAD_OPTION)}};class nO{constructor(t){this.defaults=t,this.interceptors={request:new eQ,response:new eQ}}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=nh(this.defaults,e);void 0!==i&&nL(i,{silentJSONParsing:nR.transitional(nR.boolean),forcedJSONParsing:nR.transitional(nR.boolean),clarifyTimeoutError:nR.transitional(nR.boolean)},!1),null!=r&&(eD.isFunction(r)?e.paramsSerializer={serialize:r}:nL(r,{encode:nR.function,serialize:nR.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&eD.merge(s.common,s[e.method]);s&&eD.forEach(["delete","get","head","post","put","patch","common"],t=>{delete s[t]}),e.headers=e8.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,p=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);p<h;)n=n.then(t[p++],t[p++]);return n}h=a.length;let l=e;for(p=0;p<h;){let t=a[p++],e=a[p++];try{l=t(l)}catch(t){e.call(this,t);break}}try{n=nI.call(this,l)}catch(t){return Promise.reject(t)}for(p=0,h=u.length;p<h;)n=n.then(u[p++],u[p++]);return n}getUri(t){return eH(nc((t=nh(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}eD.forEach(["delete","get","head","options"],function(t){nO.prototype[t]=function(e,n){return this.request(nh(n||{},{method:t,url:e,data:(n||{}).data}))}}),eD.forEach(["post","put","patch"],function(t){function e(e){return function(n,i,r){return this.request(nh(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}nO.prototype[t]=e(),nO.prototype[t+"Form"]=e(!0)});class nD{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,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 ne(t,i,r),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
1subscribe(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 nD(function(e){t=e}),cancel:t}}}let nx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,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(nx).forEach(([t,e])=>{nx[e]=t});let nk=function t(e){let n=new nO(e),i=t5(nO.prototype.request,n);return eD.extend(i,nO.prototype,n,{allOwnKeys:!0}),eD.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(nh(e,n))},i}(e2);nk.Axios=nO,nk.CanceledError=ne,nk.CancelToken=nD,nk.isCancel=nt,nk.VERSION="1.7.7",nk.toFormData=eq,nk.AxiosError=ex,nk.Cancel=nk.CanceledError,nk.all=function(t){return Promise.all(t)},nk.spread=function(t){return function(e){return t.apply(null,e)}},nk.isAxiosError=function(t){return eD.isObject(t)&&!0===t.isAxiosError},nk.mergeConfig=nh,nk.AxiosHeaders=e8,nk.formToJSON=t=>e1(eD.isHTMLForm(t)?new FormData(t):t),nk.getAdapter=nP,nk.HttpStatusCode=nx,nk.default=nk;var nN=function(t,e){return(nN=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)},nj=function(){return(nj=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 nG(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 nF(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){var c=[s,a];if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&c[0]?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,i=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(t){c=[6,t],i=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var nU=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
1=this.Set.bind(this),this.Get=this.Get.bind(this)}return t.prototype.Set=function(t){this.config=nj(nj(nj({},this.defaultConfig),this.config),t||{}),this.config.cookieOptions=nj(nj(nj({},this.defaultConfig.cookieOptions),this.config.cookieOptions),(null==t?void 0:t.cookieOptions)||{})},t.prototype.Get=function(){return this.config},t}()),nq=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.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}nN(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(Error),nV=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}()),nM=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=nU.Get().cookieOptions.prefix+t;return nV.read(e)},t.prototype.set=function(t,e){var n=nU.Get(),i=n.cookieOptions.prefix+t;nV.write(i,e,n.cookieOptions)},t.prototype.remove=function(t){var e=nU.Get(),n=e.cookieOptions.prefix+t;nV.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):p.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 nK={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://ordercloud.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("&")):""}},nH=new(function(){function t(){if(void 0===nk)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={}),nG(this,void 0,void 0,function(){var o,a,c;return nF(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=nU.Get(),[4,nk.post("".concat(c.baseApiUrl,"/oauth/token"),nK.seri
1alize(a),nj({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:c.axiosAdapter},s)).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var a,c,u;return nF(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=nU.Get(),[4,nk.post("".concat(u.baseApiUrl,"/oauth/token"),nK.serialize(c),nj({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:u.axiosAdapter},o)).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,h.sent().data]}})})},t.prototype.ClientCredentials=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s,o,a;return nF(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=nU.Get(),[4,nk.post("".concat(a.baseApiUrl,"/oauth/token"),nK.seri
1alize(o),nj({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:a.axiosAdapter},r)).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,c.sent().data]}})})},t.prototype.RefreshToken=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i,r;return nF(this,function(s){switch(s.label){case 0:return i={grant_type:"refresh_token",client_id:e,refresh_token:t},r=nU.Get(),[4,nk.post("".concat(r.baseApiUrl,"/oauth/token"),nK.serialize(i),nj({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:r.axiosAdapter},n)).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent().data]}})})},t.prototype.Anonymous=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r,s,o;return nF(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=nU.Get(),[4,nk.post("".concat(o.baseApiUrl,"/oauth/token"),nK.seri
1alize(s),nj({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:o.axiosAdapter},i)).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,a.sent().data]}})})},t}()),nQ=Function("try {return this===global;}catch(e){return false;}"),nW=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 nQ()?this.accessToken:nM.get(this.accessTokenCookieName)},t.prototype.SetAccessToken=function(t){nB(t),nQ()?this.accessToken=t:nM.set(this.accessTokenCookieName,t)},t.prototype.RemoveAccessToken=function(){nQ()?this.accessToken="":nM.remove(this.accessTokenCookieName)},t.prototype.GetImpersonationToken=function(){return nQ()?this.impersonationToken:nM.get(this.impersonationTokenCookieName)},t.prototype.SetImpersonationToken=function(t){nB(t),nQ()?this.impersonationToken=t:nM.set(this.impersonationTokenCookieName,t)},t.prototype.RemoveImpersonationToken=function(){nQ()?this.impersonationToken=null:nM.remove(this.impersonationTokenCookieName)},t.prototype.GetRefreshToken=function(){return nQ()?this.refreshToken:nM.get(this.refreshTokenCookieName)},t.prototype.SetRefreshToken=function(t){nQ()?this.refreshToken=t:nM.set(this.refreshTokenCookieName,t)},t.prototype.RemoveRefreshToken=function(){nQ()?this.refreshToken=null:nM.remove(this.refreshTokenCookieName)},t.prototype.GetIdentityToken=function(){return nQ()?this.identityToken:nM.get(this.identityTokenCookieName)},t.prototype.SetIdentityToken=function(t){nQ()?this.identityToken=t:nM.set(this.identityTokenCookieName,t)},t.prototype.RemoveIdentityToken=function(){nQ()?this.identityToken=null:nM.remove(this.identityTokenCookieName)},t.prototype.GetValidToken=function(t){return nG(this,void 0,void 0,function(){var e;return nF(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 nG(this,void 0,void 0,function(){var e,n,i,r;return nF(this,function(s){switch(s.label){case 0:if(!(e=this.GetRefreshToken())||(n=nU.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,nH.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}()),n$=new(function(){function t(){var t=this;if(this.get=function(e,n){return nG(t,void 0,void 0,function(){return nF(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 nG(t,void 0,void 0,function(){return nF(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 nG(t,void 0,void 0,function(){return nF(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 nG(t,void 0,void 0,function(){return nF(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 nG(t,void 0,void 0,function(){return nF(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("delete",e,n)];case 1:return[2,t.sent()]}})})},void 0===nk)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 nG(this,void 0,void 0,function(){var i,r,s;return nF(this,function(o){switch(o.label){case 0:return[4,this._buildRequestConfig(n)];case 1:return i=o.sent(),r=e.includes("oauth/")?"".concat(nU.Get().baseApiUrl,"/").concat(e):"".concat(nU.Get().baseApiUrl,"/").concat(nU.Get().apiVersion).concat(e),"put"!==t&&"post"!==t&&"patch"!==t?[3,3]:(s=i.data,delete i.data,[4,nk[t](r,s,i)]);case 2:case 4:return[2,o.sent().data];case 3:return[4,nk[t](r,i)]}})})},t.prototype._addTokenToConfig=function(t){return nG(this,void 0,void 0,function(){var e,n;return nF(this,function(i){switch(i.label){case 0:return e=this._resolveToken(t),[4,nW.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?nW.GetImpersonationToken():nW.GetAccessToken(),delete t.accessToken,delete t.impersonating,e},t.prototype._buildRequestConfig=function(t){var e=nU.Get(),n=nj(nj({},t),{paramsSerializer:nK,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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/securityprofiles",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/securityprofiles",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/securityprofiles/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/securityprofiles/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/securityprofiles/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/securityprofiles/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/securityprofiles/".concat(t,"/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/securityprofiles/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/securityprofiles/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/password/reset",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByVerificationCode=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/password/reset/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/impersonationconfig",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/impersonationconfig",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/impersonationconfig/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/impersonationconfig/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/impersonationconfig/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/impersonationconfig/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("oauth/certs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/openidconnects",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/openidconnects",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/openidconnects/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/openidconnects/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/openidconnects/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/openidconnects/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/adminusers",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/adminusers",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/adminusers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/adminusers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/adminusers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/adminusers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonat
1ing=!1,[4,n$.get("/usergroups",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/usergroups",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/usergroups/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/usergroups/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/usergroups/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/usergroups/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/usergroups/".concat(t,"/assignments/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListUserAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/usergroups/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/usergroups/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/addresses",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/addresses",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/addresses/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/addresses/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/addresses/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/addresses/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/apiclients",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/apiclients",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/apiclients/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/apiclients/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/apiclients/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/apiclients/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/apiclients/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/apiclients/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeleteBuyerAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(e,"/ApiClients/Assignments/").concat(t),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSupplierAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(e,"/ApiClients/Assignments/").concat(t),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/incrementors",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/incrementors",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/incrementors/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/incrementors/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/incrementors/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/incrementors/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/locales",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/locales",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/locales/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/locales/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/locales/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/locales/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/locales/".concat(t,"/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/locales/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/locales/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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.Crea
1te.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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/webhooks",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/webhooks",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/webhooks/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/webhooks/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/webhooks/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/webhooks/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/xpindices",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Put=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/xpindices",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/xpindices/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/sellers"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/users"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/users"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/users/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/users/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/users/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/users/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetAccessToken=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/users/").concat(e,"/accesstoken"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/users/").concat(e,"/moveto/").concat(n),nj(nj({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.ListAcrossBuyers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/buyerusers",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(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(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/usergroups"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/usergroups"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/usergroups/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/usergroups/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/usergroups/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/usergroups/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/usergroups/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/usergroups/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/addresses"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/addresses"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/addresses/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/addresses
1/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/addresses/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/addresses/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/addresses/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/addresses/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/addresses/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/costcenters"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/costcenters"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/costcenters/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/costcenters/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/costcenters/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/costcenters/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/costcenters/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/costcenters/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/costcenters/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/creditcards"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/creditcards"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/creditcards/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/creditcards/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/creditcards/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/creditcards/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/creditcards/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/creditcards/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/creditcards/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/spendingaccounts"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/spendingaccounts"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/spendingaccounts/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/spendingaccounts/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/spendingaccounts/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/spendingaccounts/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/spendingaccounts/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/approvalrules"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/buyers/".concat(t,"/approvalrules"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/approvalrules/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/buyers/".concat(t,"/approvalrules/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,
1[4,n$.delete("/buyers/".concat(t,"/approvalrules/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/buyers/".concat(t,"/approvalrules/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/productcollections"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/productcollections/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/buyers/".concat(t,"/productcollections/").concat(e,"/products"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/suppliers",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/suppliers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/suppliers/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/buyers"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBuyer=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/suppliers/".concat(t,"/buyers/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBuyer=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t,"/buyers/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/users"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/suppliers/".concat(t,"/users"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/users/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/suppliers/".concat(t,"/users/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t,"/users/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/suppliers/".concat(t,"/users/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/usergroups"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/suppliers/".concat(t,"/usergroups"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/usergroups/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/suppliers/".concat(t,"/usergroups/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t,"/usergroups/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/suppliers/".concat(t,"/usergroups/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/usergroups/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/suppliers/".concat(t,"/usergroups/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/addresses"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/suppliers/".concat(t,"/addresses"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/suppliers/".concat(t,"/addresses/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/suppliers/".concat(t,"/addresses/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/suppliers/".concat(t,"/addresses/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/suppliers/".concat(t,"/addresses/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=functio
1n(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/catalogs/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/catalogs/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/bundleassignments/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/productassignments/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListBundleAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/bundleassignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/bundleassignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/productassignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/productassignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t,"/categories"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/".concat(t,"/categories"),nj(nj({},i),{data:e,impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t,"/categories/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.put("/catalogs/".concat(t,"/categories/").concat(e),nj(nj({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/categories/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.patch("/catalogs/".concat(t,"/categories/").concat(e),nj(nj({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/categories/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/categories/").concat(e,"/bundleassignments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/catalogs/".concat(t,"/categories/").concat(e,"/productassignments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t,"/categories/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/".concat(t,"/categories/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t,"/categories/bundleassignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/".concat(t,"/categories/bundleassignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/catalogs/".concat(t,"/categories/productassignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/catalogs/".concat(t,"/categories/productassignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/products",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/products",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/products/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/products/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/assignments/").concat(e),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/specs"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(t
1his,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/suppliers"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/products/".concat(t,"/suppliers/").concat(e),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemoveSupplier=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/suppliers/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/variants"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/variants/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/products/".concat(t,"/variants/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/products/".concat(t,"/variants/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/products/".concat(t,"/variants/generate"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/products/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/products/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/priceschedules",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/priceschedules",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/priceschedules/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/priceschedules/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/priceschedules/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/priceschedules/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SavePriceBreak=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/priceschedules/".concat(t,"/PriceBreaks"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/priceschedules/".concat(t,"/PriceBreaks"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/specs",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/specs",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/specs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/specs/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/specs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/specs/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/specs/".concat(t,"/options"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateOption=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/specs/".concat(t,"/options"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetOption=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/specs/".concat(t,"/options/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveOption=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/specs/".concat(t,"/options/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteOption=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/specs/".concat(t,"/options/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchOption=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/specs/".concat(t,"/options/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/specs/".concat(t,"/productassignments/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/specs/productassignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/specs/productassignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/productfacets",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/productfacets",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/productfacets/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/productfacets/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/productfacets/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/productfacets/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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.Crea
1te=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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/inventoryrecords"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/products/".concat(t,"/inventoryrecords"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/inventoryrecords/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/products/".concat(t,"/inventoryrecords/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/inventoryrecords/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/products/".concat(t,"/inventoryrecords/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/inventoryrecords/").concat(e,"/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/inventoryrecords/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/products/".concat(t,"/inventoryrecords/assignments"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateVariant=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetVariant=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.put("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteVariant=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.patch("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n,"/assignments"),nj(nj({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariantAssignment=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/bundles",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/bundles",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/bundles/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/bundles/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/bundles/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/bundles/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/bundles/".concat(t,"/assignments/").concat(e),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/bundles/".concat(t,"/productassignments/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/bundles/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/bundles/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/bundles/productassignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/bundles/productassignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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.Ap
1plyPromotions=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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/orders/".concat(t,"/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ApplyPromotions=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/applypromotions"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/approvals"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Approve=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/approve"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/orders/".concat(t,"/").concat(e,"/billto"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/billto"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Cancel=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/cancel"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Complete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/complete"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Decline=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/decline"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/eligibleapprovers"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/eligiblepromotions"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Forward=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/forward"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchFromUser=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/fromuser"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/promotions"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AddPromotion=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemovePromotion=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Ship=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/ship"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/shipments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/orders/".concat(t,"/").concat(e,"/shipto"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/shipto"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Split=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/split"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/submit"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Validate=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/validate"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/cart",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/cart",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetActiveCart=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/cart/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ApplyPromotions=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/applypromotions",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.SetBillingAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/cart/billto",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart/billto",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateBundleItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/bundles/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart/bundles/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/calculate",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.ListEligiblePromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/eligiblepromotions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.EstimateShipping=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/estimateshipping",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.PatchFromUser=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart/fromuser",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListLineItems=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/lineitems",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateLineItem=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/lineitems",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetLineItem=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/lineitems/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveLineItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/cart/lineitems/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteLineItem=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart/lineitems/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchLineItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart/lineitems/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPayments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/payments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreatePayment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/payments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPayment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/payments/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePayment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart/payments/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchPayment=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart/payments/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreatePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/payments/".concat(t,"/transactions"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeletePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart/payments/".concat(t,"/transactions/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/promotions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.AddPromotion=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/promotions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePromotion=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/cart/promotions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SelectShipMethods=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/shipmethods",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetShippingAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/cart/shipto",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/cart/shipto",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Submit=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/submit",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/cart/validate",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.GetOrderWorksheet=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/cart/worksheet",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/lineitems/".concat(t),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/lineitems"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this
1.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/lineitems"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Save=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/promotions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/promotions",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/promotions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/promotions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/promotions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/promotions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/promotions/".concat(t,"/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/promotions/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/promotions/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/payments"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/payments"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.patch("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.CreateTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions"),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions/").concat(i),nj(nj({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/shipments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/shipments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/shipments/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/shipments/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/shipments/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/shipments/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/shipments/".concat(t,"/items"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/shipments/".concat(t,"/items"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShipFromAddress=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/shipments/".concat(t,"/shipfrom"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SetShipToAddress=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/shipments/".concat(t,"/shipto"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/orderreturns",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/orderreturns/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/orderreturns/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/orderreturns/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/orderreturns/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/orderreturns/".concat(t,"/approvals"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Approve=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns/".concat(t,"/approve"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Cancel=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns/".concat(t,"/cancel"),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Complete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns/".concat(t,"/complete"),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Decline=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns/".concat(t,"/decline"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/orderreturns/".concat(t,"/eligibleapprovers"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/orderreturns/".concat(t,"/items/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/orderreturns/".concat(t,"/submit"),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/approvalrules",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/approvalrules",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/approvalrules/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/approvalrules/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/approvalrules/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/approvalrules/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n),nj(nj({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i,r){return void 0===r&&(r={}),nG(this,void 0,void 0,function(){var s;return nF(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,n$.delete("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n,"/").concat(i),nj(nj({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/subscriptions/".concat(t,"/bundles/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/subscriptions/".concat(t,"/bundles/").concat(e,"/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/subscriptions/".concat(t,"/items"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/subscriptions/".concat(t,"/items"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/subscriptions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/subscriptions",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/subscriptions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/subscriptions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/subscriptions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/subscriptions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/me",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/me",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/me",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListAddresses=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/addresses",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/me/addresses",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/addresses/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAddress=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/addresses/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAddress=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/addresses/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchAddress=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/addresses/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/catalogs",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCatalog=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/catalogs/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCategories=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/categories",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/categories/".concat(t),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListCostCenters=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/costcenters",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCreditCards=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/creditcards",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateCreditCard=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/me/creditcards",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCreditCard=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/creditcards/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCreditCard=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/creditcards/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteCreditCard=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/creditcards/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchCreditCard=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/creditcards/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/orders",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.TransferAnonUserOrder=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/me/orders",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListApprovableOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/orders/approvable",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByToken=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/me/password",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductCollections=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/productcollections",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateProductCollection=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/me/productcollections",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetProductCollection=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/productcollections/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductCollection=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/productcollections/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollection=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/productcollections/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchProductCollection=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/productcollections/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/productcollections/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/productcollections/".concat(t,"/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/productcollections/".concat(t,"/invitations"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/me/productcollections/".concat(t,"/invitations"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/productcollections/".concat(t,"/invitations/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/productcollections/".concat(t,"/invitations/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchProductCollectionInvitation=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/productcollections/".concat(t,"/invitations/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AcceptProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/me/productcollections/".concat(t,"/invitations/accept/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeclineProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/me/productcollections/".concat(t,"/invitations/decline/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/productcollections/".concat(t,"/products"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProducts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/inventoryrecords"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/sellers"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/specs"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/specs/").concat(e),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/variants"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/variants/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.get("/me/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nj(nj({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/promotions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPromotion=function(t,e){return void 0===e&&(e={}),nG(this,void 0,v
1oid 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/promotions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/register",nj(nj({},n),{data:t,impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyerSellers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/sellers",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListShipments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/shipments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetShipment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/shipments/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/shipments/".concat(t,"/items"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSpendingAccounts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/spendingAccounts",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSpendingAccount=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/spendingaccounts/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListSubscriptions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/subscriptions",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateSubscription=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/me/subscriptions",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSubscription=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/subscriptions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveSubscription=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/me/subscriptions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSubscription=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/subscriptions/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchSubscription=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/subscriptions/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/subscriptions/".concat(t,"/items"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/me/subscriptions/".concat(t,"/items"),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/me/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.put("/me/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.patch("/me/subscriptions/".concat(t,"/items/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/me/subscriptions/".concat(t,"/items/bundles/").concat(e),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.delete("/me/subscriptions/".concat(t,"/items/bundles/").concat(e,"/").concat(n),nj(nj({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserGroups=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/me/usergroups",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/trackingEvents",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/integrations/trackingEvents",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/trackingEvents/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/trackingEvents/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/trackingEvents/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/trackingEvents/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/deliveryconfig",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/integrations/deliveryconfig",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/deliveryconfig/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/deliveryconfig/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/deliveryconfig/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/deliveryconfig/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/ErrorConfig",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/ErrorConfig",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/ErrorConfig",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/ErrorConfig",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.post("/integrations/ErrorConfig/validate",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrationEvents",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/integrationEvents",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/integrationEvents/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/integrationEvents/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrationEvents/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrationEvents/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/calculate"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.EstimateShipping=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/estimateshipping"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SelectShipmethods=function(t,e,n,i){return void 0===i&&(i={}),nG(this,void 0,void 0,function(){var r;return nF(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,n$.post("/orders/".concat(t,"/").concat(e,"/shipmethods"),nj(nj({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetWorksheet=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.get("/orders/".concat(t,"/").concat(e,"/worksheet"),nj(nj({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/messagesenders",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/messagesenders",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/messagesenders/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.put("/messagesenders/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.delete("/messagesenders/".concat(t),nj(nj({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.patch("/messagesenders/".concat(t),nj(nj({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var i;return nF(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,n$.delete("/messagesenders/".concat(t,"/assignments"),nj(nj({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/messagesenders/assignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/messagesenders/assignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.get("/messagesenders/CCListenerAssignments",nj(nj({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCCListenerAssignment=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.post("/messagesenders/CCListenerAssignments",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/OrderSync",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/OrderSync",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/OrderSync",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/OrderSync",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/productsync",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/productsync",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/productsync",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/productsync",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("/integrations/subscription",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.put("/integrations/subscription",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.delete("/integrations/subscription",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nG(this,void 0,void 0,function(){var n;return nF(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,n$.patch("/integrations/subscription",nj(nj({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nq(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={}),nG(this,void 0,void 0,function(){var e;return nF(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,n$.get("oauth/userinfo",nj(nj({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nq(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}());let nJ={sitecore:{async getAuthHeader(){let{apiKey:t}=tQ;return Promise.resolve(t)}},oc:{async getAuthHeader(){let t=nW.GetIdentityToken();if(!t)throw tV.error("Could not found an Order Cloud Cloud logged user."),Error("Could not found an Order Cloud Cloud logged user.");return tV.info("Using existing Order Cloud Token."),`Bearer ${t}`}}},nz=async()=>{let{connector:t="oc"}=tQ;return{"Content-Type":"application/json",Authorization:await nJ[t].getAuthHeader()||""}}
1,nY=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={},t4.RFK_CACHE||(t4.RFK_CACHE={}),t4.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 tW("debug")?(tV.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"),nX={cache:!0};class nZ{static async trackEvent(t){let e=n5(t),{eventUrl:n,apiKey:i}=tQ;try{return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(e)})).json()}catch(t){return tV.error(t),tV.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 tV.error(t),tV.error("There was a problem on the service call"),t.message||null}}static async callApiWithCache(t,e){let n=nY.createKey(e);if(nY.has(n))return nY.get(n);let i=await nZ.callApiWithoutCache(t,e);return nY.set(n,i),i}static async callApi(t,e=nX){let{searchUrl:n}=tQ,i={method:"POST",headers:await nz(),body:JSON.stringify(t),signal:e.signal};return e.cache?nZ.callApiWithCache(n,i):nZ.callApiWithoutCache(n,i)}static clearCache(){nY.clear()}}let n0=async t=>{let{trackConsent:e}=tQ;if(tV.debug("trackEvent ",`Consent: ${e} `,n5(t)),!e)return;let n={...t,...t2(),client_time_ms:Date.now()};return tV.debug("trackEvent","Sending: ",JSON.stringify(n,null,4)),await nZ.trackEvent(n)},n1=t=>!t.find(({id:t,entity_type:e})=>void 0===t||void 0===e),n2=(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&&!tN(i)?{attributes:i}:{},...r?{variant:r}:{},...s?{uri:s}:{},...o?{source_id:o}:{}})),n4=({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}:{}});function n5(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=n5(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=n5(i);(Object.keys(t).length>0||Array.isArray(t))&&(e[n]=t)}else e[n]=i}return e}let n3=async(t,e,{review:n,transaction:i,items:r,customAttributes:s,actionSubtype:o})=>{if(!e)return void tV.warn("trackEvent :::","Event name is not defined");let a=[];return t&&r&&(a=n2(t,r)),n0({name:e,action:"add",action_sub_type:o,value:{entities:a,transaction:i,review:n,custom_attributes:s,context:tk.toJson()}})};(w=k||(k={})).LOAD="core/LOAD",w.UNLOAD="core/UNLOAD",w.REQUEST="core/REQUEST",w.REQUEST_SUCCESS="core/REQUEST_SUCCESS",w.REQUEST_FAIL="core/REQUEST_FAIL",w.REQUEST_CANCELED="core/REQUEST_CANCELED",w.WIDGET_DATA_REQUEST="core/WIDGET_DATA_REQUEST",w.WIDGET_DATA_REQUEST_SUCCESS="core/WIDGET_DATA_REQUEST_SUCCESS",w.WIDGET_DATA_REQUEST_FAIL="core/WIDGET_DATA_REQUEST_FAIL",w.WIDGET_DATA_REQUEST_CANCELED="core/WIDGET_DATA_REQUEST_CANCELED",w.WIDGET_STATE_CHANGED="core/WIDGET_STATE_CHANGED",w.WIDGET_APPEAR="core/WIDGET_APPEAR",w.PAGE_CONTAINER_READY="core/PAGE_CONTAINER_READY",w.WIDGET_READY="core/WIDGET_READY",w.INITIALIZE="core/INITIALIZE",w.INITIALIZED="core/INITIALIZED",w.RESET_WIDGET="core/RESET_WIDGET",w.PAGE_CONTEXT_CHANGED="core/PAGE_CONTEXT_CHANGED",w.OC_CONTEXT_CHANGED="core/OC_CONTEXT_CHANGED",w.FOUND_WIDGETS="core/FOUND_WIDGETS",w.ADD_TO_CART="core/interaction/ADD_TO_CART",w.ORDER_CONFIRM="core/interaction/ORDER_CONFIRM",w.USER_LOGIN="core/interaction/USER_LOGIN",w.ADD_TO_WISHLIST="core/interaction/ADD_TO_WISHLIST",w.CART_STATUS="core/interaction/CART_STATUS",w.ITEM_CLICKED="core/interaction/ITEM_CLICKED",w.PAGE_WIDGETS_DATA_REQUEST="core/PAGE_WIDGETS_DATA_REQUEST",w.PAGE_WIDGETS_DATA_REQUEST_SUCCESS="core/PAGE_WIDGETS_DATA_REQUEST_SUCCESS",w.PAGE_WIDGETS_DATA_REQUEST_FAIL="core/PAGE_WIDGETS_DATA_REQUEST_FAIL",w.PAGE_WIDGETS_DATA_REQUEST_CANCELED="core/PAGE_WIDGETS_DATA_REQUEST_CANCELED";let n6=k,n7=[],n8=[];class n9{static addActionHandler(t){n7.push(t)}static removeActionHandler(t){let e=n8.indexOf(t);-1!==e&&n8.splice(e,1)}static subscribe(t){n7.push(t)}static unsubscribe(t){let e=n7.indexOf(t);-1!==e&&n7.splice(e,1)}static dispatch(t){tV.debug("dispatcher ::: dispatch",`[${t.type}
1]`,t.payload),n7.forEach(e=>{e.handleAction(t)}),n8.forEach(e=>{e.handleAction(t)})}}let it=(t,e)=>`${t}${e?`@${e}`:""}`,ie={widgetTypesConfigMapping:{},widgetsConfigMapping:{},setWidgetType(t,e){tu(this.widgetTypesConfigMapping,{[t]:e},{mutate:!0})},getType(t){let{type:e}=this.widgetsConfigMapping[it(t)]||{};return e},set(t,e,n){"string"==typeof e?this.widgetsConfigMapping[it(t,e)]=n:this.widgetsConfigMapping[it(t)]=e},update(t,e,n){tu("string"==typeof e?this.getOrCreate(t,e):this.getOrCreate(t),n,{mutate:!0})},get(t,e){let n=this.widgetsConfigMapping[it(t,e)],i=this.widgetsConfigMapping[it(t)];if(!i&&!n)return;let r=tu(i||{},n||{}),{component:s,options:o}=this.getForType(t)||{},{component:a=s,options:c}=r;return{...r,component:a,options:c?tu(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[it(t,e)]||(this.widgetsConfigMapping[it(t,e)]={}),this.widgetsConfigMapping[it(t,e)]},getMetadata(t){let{metadata:e}=this.widgetsConfigMapping[it(t)]||{};return e},setMetadata(t,e){Object.assign(this.getOrCreate(t),{metadata:e}),this.setType(t,e.type)},updateMetadata(t,e){tu(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 ii{constructor(){Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1})}register(t){n9.subscribe(t)}unregister(t){n9.unsubscribe(t)}getDispatcher(){return n9}initialize(){this.initialized=!0,n9.dispatch({type:n6.INITIALIZED,payload:{}})}}let ir=new class extends ii{constructor(){super(),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(tk.get()),n9.subscribe(this)}getContext(){return this.context}setContext(t){this.context=t,this.context.addListener(this)}toggleTrackConsent(t){t?this.context.setUserUuid(t2().uuid):(tZ.remove("__ruid"),tZ.remove("__rutma"),tZ.remove("__rutmb"),tZ.remove("__ec"),tQ.trackConsent=!1)}handleAction(t){switch(t.type){case n6.INITIALIZE:this.initialize();break;case n6.ADD_TO_CART:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n3(t,"cart",e)})(e,{items:n});break}case n6.ADD_TO_WISHLIST:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n3(t,"wishlist",e)})(e,{items:n});break}case n6.USER_LOGIN:{let{id:e,email:n}=t.payload;(async t=>{if(!t||tN(t))return tV.warn("trackEvent :::","User information is empty or not complete");n0({action:"identify",name:"login",action_sub_type:void 0,value:{context:tu(tk.toJson(),{user:{...t.id?{cuid:t.id}:{},...t.email?{email:t.email}:{}}})}})})({id:e,email:n});break}case n6.CART_STATUS:{let{entity:e,items:n}=t.payload;(async(t,{items:e,actionSubtype:n})=>{let i=[];if(t&&e&&(i=n2(t,e))&&!n1(i))return tV.warn("trackEvent :::","A field is missing on one or more of the items provided");n0({action:"view",name:"cart",action_sub_type:n,value:{entities:i,context:tk.toJson()}})})(e,{items:n});break}case n6.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(void 0!==n)return n3(t,"order_confirm",{items:o,transaction:{order_id:n,...i?{order_total:i}:{},...r?{order_subtotal:r}:{},...s?{coupon:s}:{}},actionSubtype:a});tV.warn("trackEvent :::","Transaction orderId is not defined")})(e,{orderId:i,orderTotal:r,orderSubtotal:s,coupon:o,items:n});break}case n6.WIDGET_APPEAR:{let{rfkId:e,entity:n}=t.payload;(async(t,e,{request:n,items:i}={})=>{let r=[];if(e&&i&&(r=n2(e,i))&&!n1(r))return tV.warn("trackEvent :::","A field is missing on one or more of the items provided");n0({action:"view",name:"widget",value:{rfk_id:t,request:n,entities:r,context:tk.toJson()}})})(e,n)}}}onChange(t,e,n){this.initialized&&n9.dispatch({type:n6.PAGE_CONTEXT_CHANGED,payload:{context:this.context}})}},is=null,io=async(t,e)=>{if(!is)return Promise.reject(Error("No data processor configured"));try{let n=await nZ.callApi(t,{cache:!1,...e}),i=is.validateResponse(n,t);return i?Promise.reject(i):Promise.resolve(is.processResponse(n,t))}catch(t){return Promise.reject(t)}};class ia{validateResponse(t,e){return t&&(t.errors||[]).length>0?t:null}processResponse(t,e){return t}}class ic extends ia{processResponse(t){return t.widgets?.forEach(({rfk_id:t,type:e,variation_id:n,used_in:i})=>{ie.setMetadata(t,{rfkId:t,type:e,variationId:n,usedIn:i})}),t}}let iu=!1,ih=()=>{iu||((()=>{let{trackConsent:t}=tQ;ir.toggleTrackConsent(t),ir.getContext().setBrowserUserAgent(tG({navigator:{userAgent:""}}).navigator.userAgent)})(),iu=!0,ir.getDispatcher().dispatch({type:n6.INITIALIZE,payload:{options:{}}}))},ip="undefined"==typeof window||"Deno"in window;function il(){}function id(t){return"number"==typeof t&&t>=0&&t!==1/0}function im(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ig(t,e,n){return iI(t)?"function"==typeof e?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function iv(t,e,n){return iI(t)?[{...e,queryKey:t},n]:[t||{},e]}function iw(t,e){let{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(iI(o)){if(i){if(e.queryHash!==ib(o,e.options))return!1}else if(!iC(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 iy(t,e){let{exact:n,fetching:i,predicate:r,mutationKey:s}=t;if(iI(s)){if(!e.options.mutationKey)return!1;if(n){if(iS(e.options.mutationKey)!==iS(s))return!1}else if(!iC(e.options.mutationKey,s))return!1}return!("boolean"==typeof i&&"loading"===e.state.status!==i||r&&!r(e))}function ib(t,e){return((null==e?void 0:e.queryKeyHashFn)||iS)(t)}function iS(t){return JSON.stringify(t,(t,e)=>iP(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e)}function iC(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some(n=>!iC(t[n],e[n]))}function iA(t,e){if(t&&!e||e&&!t)return!1;for(let n in t)if(t[n]!==e[n])return!1;return!0}function iE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function iP(t){if(!iT(t))return!1;let e=t.constructor;if(void 0===e)return!0;let n=e.prototype;return!!iT(n)&&!!n.hasOwnProperty("isPrototypeOf")}function iT(t){return"[object Object]"===Object.prototype.toString.call(t)}function iI(t){return Array.isArray(t)}function iR(t){return new Promise(e=>{setTimeout(e,t)})}function i_(t){iR(0).then(t)}function iL(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=iE(e)&&iE(n);if(i||iP(e)&&iP(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 iO=console,iD=function(){let t=[],e=0,n=t=>{t()},i=t=>{t()},r=i=>{e?t.push(i):i_(()=>{n(i)})};return{batch:r=>{let s;e++;try{s=r()}finally{--e||(()=>{let e=t;t=[],e.length&&i_(()=>{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 ix{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 ik=new class extends ix{constructor(){super(),this.setup=t=>{if(!ip&&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())}
1onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},iN=["online","offline"],ij=new class extends ix{constructor(){super(),this.setup=t=>{if(!ip&&window.addEventListener){let e=()=>t();return iN.forEach(t=>{window.addEventListener(t,e,!1)}),()=>{iN.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())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function iG(t){return Math.min(1e3*2**t,3e4)}function iF(t){return"online"!==(null!=t?t:"online")||ij.isOnline()}class iU{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function iq(t){return t instanceof iU}function iV(t){let e,n,i,r=!1,s=0,o=!1,a=new Promise((t,e)=>{n=t,i=e}),c=()=>!ik.isFocused()||"always"!==t.networkMode&&!ij.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))},p=()=>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()}),l=()=>{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:iG,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),iR(d).then(()=>{if(c())return p()}).then(()=>{r?h(e):l()})):h(e)})}};return iF(t.networkMode)?l():p().then(l),{promise:a,cancel:e=>{o||(h(new iU(e)),null==t.abort||t.abort())},continue:()=>(null==e?void 0:e())?a:Promise.resolve(),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1}}}class iM{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),id(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,null!=t?t:ip?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class iB extends iM{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||iO,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=iL(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(il).catch(il):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||!im(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;iq(t)&&t.silent||this.dispatch({type:"error",error:t}),iq(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=iV({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:iF(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 iq(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),iD.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}class iK extends ix{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:ib(r,e),o=this.get(s);return o||(o=new iB({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(){iD.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,e){let[n]=iv(t,e);return void 0===n.exact&&(n.exact=!0),this.queries.find(t=>iw(n,t))}findAll(t,e){let[n]=iv(t,e);return Object.keys(n).length>0?this.queries.filter(t=>iw(n,t)):this.queries}notify(t){iD.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}onFocus(){iD.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){iD.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class iH extends iM{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||iO,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,p,l,d,f,m,g,v,w,y;let b=()=>{var t;return this.retryer=iV({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},S="loading"===this.state.status;try{if(!S){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=(p=this.options).onMutate)?void 0:h.call(p,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}let l=await b();return await (null==(t=(e=this.mutationCache.config).onSuccess)?void 0:t.call(e,l,this.state.variables,this.state.context,this)),await (null==(n=(i=this.options).onSuccess)?void 0:n.call(i,l,this.state.variables,this.state.context)),await (null==(r=(s=this.mutationCache.config).onSettled)?void 0:r.call(s,l,null,this.state.variables,this.state.context,this)),await (null==(o=(a=this.options).onSettled)?void 0:o.call(a,l,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:l}),l}catch(t){try{throw await (null==(l=(d=this.mutationCache.config).onError)?void 0:l.call(d,t,this.state.variables,this.state.context,this)),await (null==(f=(m=this.options).onError)?void 0:f.call(m,t,this.state.variables,this.state.context)),await (null==(g=(v=this.mutationCache.config).onSettled)?void 0:g.call(v,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:!iF(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),iD.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}class iQ extends ix{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,n){let i=new iH({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(){iD.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=>iy(t,e))}findAll(t){return this.mutations.filter(e=>iy(t,e))}notify(t){iD.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 iD.batch(()=>t.reduce((t,e)=>t.then(()=>e.continue().catch(il)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function iW(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}class i${constructor(t={}){this.queryCache=t.queryCache||new iK,this.mutationCache=t.mutationCache||new iQ,this.logger=t.logger||iO,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=ik.subscribe(()=>{ik.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=ij.subscribe(()=>{ij.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]=iv(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=ig(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=ig(t),a=this.defaultQueryOptions(o);return this.queryCache.build(this,a).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return iD.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]=iv(t,e),i=this.queryCache;iD.batch(()=>{i.findAll(n).forEach(t=>{i.remove(t)})})}resetQueries(t,e,n){let[i,r]=iv(t,e,n),s=this.queryCache,o={type:"active",...i};return iD.batch(()=>(s.findAll(i).forEach(t=>{t.reset()}),this.refetchQueries(o,r)))}cancelQueries(t,e,n){let[i,r={}]=iv(t,e,n);return void 0===r.revert&&(r.revert=!0),Promise.all(iD.batch(()=>this.queryCache.findAll(i).map(t=>t.cancel(r)))).then(il).catch(il)}invalidateQueries(t,e,n){let[i,r]=iv(t,e,n);return iD.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]=iv(t,e,n),s=Promise.all(iD.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(il);return null!=r&&r.throwOnError||(s=s.catch(il)),s}fetchQuery(t,e,n){let i=ig(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(il).catch(il)}fetchInfiniteQuery(t,e,n){let i=ig(t,e,n);return i.behavior={onFetch:t=>{t.fetchFn=()=>{var e,n,i,r,s,o,a;let c,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,p=null==h?void 0:h.pageParam,l="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)||[],m=(null==(o=t.state.data)?void 0:o.pageParams)||[],g=m,v=!1,w=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),y=(t,e,n,i)=>(g=i?[e,...g]:[...g,e],i?[n,...t]:[...t,n]),b=(e,n,i,r)=>{if(v)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?v=!0:null==(n=t.signal)||n.addEventListener("abort",()=>{v=!0}),t.signal}}),Promise.resolve(w(s)).then(t=>y(e,i,t,r))};if(f.length)if(l){let e=void 0!==p,n=e?p:iW(t.options,f);c=b(f,e,n)}else if(d){let e=void 0!==p,n=e?p:null==(a=t.options).getPreviousPageParam?void 0:a.getPreviousPageParam(f[0],f);c=b(f,e,n,!0)}else{g=[];let e=void 0===t.options.getNextPageParam;c=u&&f[0]&&!u(f[0],0,f)?Promise.resolve(y([],m[0],f[0])):b([],e,m[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?m[n]:iW(t.options,i);return b(i,e,r)}return Promise.resolve(y(i,m[n],f[n]))})}else c=b([]);return c.then(t=>({pages:t,pageParams:g}))}}},this.fetchQuery(i)}prefetchInfiniteQuery(t,e,n){return this.fetchInfiniteQuery(t,e,n).then(il).catch(il)}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=>iS(t)===iS(e.queryKey));n?n.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;let e=this.queryDefaults.find(e=>iC(t,e.queryKey));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){let n=this.mutationDefaults.find(e=>iS(t)===iS(e.mutationKey));n?n.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;let e=this.mutationDefaults.find(e=>iC(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=ib(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 iJ=Y.createContext(void 0),iz=Y.createContext(!1);function iY(t,e){return t||(e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=iJ),window.ReactQueryClientContext):iJ)}let iX=({context:t}={})=>{let e=Y.useContext(iY(t,Y.useContext(iz)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},iZ=({client:t,children:e,context:n,contextSharing:i=!1})=>{Y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);let r=iY(n,i);return Y.createElement(iz.Provider,{value:!n&&i},Y.createElement(r.Provider,{value:t},e))};class i0{constructor(){Object.defineProperty(this,"containerHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),ir.register(this)}handleAction(t){switch(t.type){case n6.PAGE_CONTAINER_READY:this.containerHandled||(this.containerHandled=this.handlePageContainerReadyAction(t.payload));break;case n6.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 i1='[data-rfkid="rfkid_container"]',i2={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)};(y=N||(N={})).ITEM_CLICKED="search/ITEM_CLICKED",y.SUGGESTION_CLICKED="search/SUGGESTION_CLICKED",y.SUGGESTION_ADDED="search/SUGGESTION_ADDED",y.SUGGESTION_REMOVED="search/SUGGESTION_REMOVED",y.KEYPHRASE_CHANGED="search/KEYPHRASE_CHANGED";let i4={onItemClick:N.ITEM_CLICKED,onSuggestionClick:N.SUGGESTION_CLICKED,onSuggestionAdded:N.SUGGESTION_ADDED,onSuggestionRemoved:N.SUGGESTION_REMOVED,onKeyphraseChange:N.KEYPHRASE_CHANGED},i5={itemsPerPage:(t,e)=>t.setRecommendationsLimit(e.itemsPerPage)};(b=j||(j={})).ITEM_CLICKED="recommendation/ITEM_CLICKED",b.NAVIGATION_NEXT="recommendation/NAVIGATION_NEXT",b.NAVIGATION_PREV="recommendation/NAVIGATION_PREV";let i3={onNavigationNext:j.NAVIGATION_NEXT,onNavigationPrev:j.NAVIGATION_PREV,onItemClick:j.ITEM_CLICKED},i6={keyphrase:(t,e)=>e.keyphrase&&t.setQuestionsKeyphrase(e.keyphrase),relatedQuestions:(t,e)=>e.relatedQuestions&&t.setQuestionsRelatedQuestionsLimit(e.relatedQuestions)};(G||(G={})).KEYPHRASE_CHANGED="questions/KEYPHRASE_CHANGED";let i7={onKeyphraseChanged:G.KEYPHRASE_CHANGED},i8={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)};(S=F||(F={})).FACET_CLICKED="searchResults/FACET_CLICKED",S.FILTER_CLICKED="searchResults/FILTER_CLICKED",S.REMOVE_FILTER="searchResults/REMOVE_FILTER",S.SORT_CHANGED="searchResults/SORT_CHANGED",S.PAGE_NUMBER_CHANGED="searchResults/PAGE_NUMBER_CHANGED",S.ITEM_CLICKED="searchResults/ITEM_CLICKED",S.RESULTS_PER_PAGE_CHANGED="searchResults/RESULTS_PER_PAGE_CHANGED",S.KEYPHRASE_CHANGED="searchResults/KEYPHRASE_CHANGED",S.CLEAR_FILTERS="searchResults/CLEAR_FILTERS";let i9={onKeyphraseChange:F.KEYPHRASE_CHANGED,onClearFilters:F.CLEAR_FILTERS,onResultsPerPageChange:F.RESULTS_PER_PAGE_CHANGED,onPageNumberChange:F.PAGE_NUMBER_CHANGED,onItemClick:F.ITEM_CLICKED,onSortChange:F.SORT_CHANGED,onFacetClick:F.FACET_CLICKED,onFilterClick:F.FILTER_CLICKED,onRemoveFilter:F.REMOVE_FILTER};(C=U||(U={})).DESKTOP="pc",C.MOBILE="mobile",C.TABLET="tablet",(A=q||(q={})).JS="js",A.HTML="html",A.CSS="css",(E=V||(V={})).PAGE="page",E.COMMON_ACROSS_PAGES="common_across_pages",E.DIALOG="dialog";let rt=(0,Y.createContext)({}),re=(0,Y.createContext)({}),rn=()=>(0,Y.useContext)(rt);
1class ri 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 rr extends ix{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),rs(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ro(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ro(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),iA(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&&ra(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:iA(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(il)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),ip||this.currentResult.isStale||!id(this.options.staleTime))return;let t=im(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,!ip&&!1!==this.options.enabled&&id(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ik.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,p,{dataUpdatedAt:l,error:d,errorUpdatedAt:f,fetchStatus:m,status:g}=h,v=!1,w=!1;if(e._optimisticResults){let r=this.hasListeners(),s=!r&&rs(t,e),o=r&&ra(t,n,e,i);(s||o)&&(m=iF(t.options.networkMode)?"fetching":"paused",l||(g="loading")),"isRestoring"===e._optimisticResults&&(m="idle")}if(e.keepPreviousData&&!h.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==g)p=u.data,l=u.dataUpdatedAt,g=u.status,v=!0;else if(e.select&&void 0!==h.data)if(r&&h.data===(null==s?void 0:s.data)&&e.select===this.selectFn)p=this.selectResult;else try{this.selectFn=e.select,p=e.select(h.data),p=iL(null==r?void 0:r.data,p,e),this.selectResult=p,this.selectError=null}catch(t){this.selectError=t}else p=h.data;if(void 0!==e.placeholderData&&void 0===p&&"loading"===g){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&&(g="success",p=iL(null==r?void 0:r.data,t,e),w=!0)}this.selectError&&(d=this.selectError,p=this.selectResult,f=Date.now(),g="error");let y="fetching"===m,b="loading"===g,S="error"===g;return{status:g,fetchStatus:m,isLoading:b,isSuccess:"success"===g,isError:S,isInitialLoading:b&&y,data:p,dataUpdatedAt:l,error:d,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
1Count: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"===m,isPlaceholderData:w,isPreviousData:v,isRefetchError:S&&0!==h.dataUpdatedAt,isStale:rc(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,iA(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||iq(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){iD.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 rs(t,e){return!(!1===e.enabled||t.state.dataUpdatedAt||"error"===t.state.status&&!1===e.retryOnMount)||t.state.dataUpdatedAt>0&&ro(t,e,e.refetchOnMount)}function ro(t,e,n){if(!1!==e.enabled){let i="function"==typeof n?n(t):n;return"always"===i||!1!==i&&rc(t,e)}return!1}function ra(t,e,n,i){return!1!==n.enabled&&(t!==e||!1===i.enabled)&&(!n.suspense||"error"!==t.state.status)&&rc(t,n)}function rc(t,e){return t.isStaleByTime(e.staleTime)}let ru=Q(634).useSyncExternalStore,rh=Y.createContext((f=!1,{clearReset:()=>{f=!1},reset:()=>{f=!0},isReset:()=>f})),rp=Y.createContext(!1);rp.Provider;let rl=t=>{let[e,n]=(0,Y.useState)(()=>t.getKey()),i=iX();return(0,Y.useEffect)(()=>(t.onUpdate(()=>{n(t.getKey())}),()=>{i.cancelQueries({queryKey:t.getKey(),exact:!0}),t.destroy()}),[t,i]),function(t,e){let n=iX({context:t.context}),i=Y.useContext(rp),r=Y.useContext(rh),s=n.defaultQueryOptions(t);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=iD.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=iD.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=iD.batchCalls(s.onSettled)),s.suspense&&"number"!=typeof s.staleTime&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(r.isReset()||(s.retryOnMount=!1)),Y.useEffect(()=>{r.clearReset()},[r]);let[o]=Y.useState(()=>new e(n,s)),a=o.getOptimisticResult(s);if(ru(Y.useCallback(t=>{let e=i?()=>{}:o.subscribe(iD.batchCalls(t));return o.updateResult(),e},[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),Y.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)}(ig({queryKey:e,queryFn:e=>t.run({signal:e.signal}).catch(t=>t instanceof ri?i.cancelQueries({queryKey:e.queryKey,exact:!0}).then(()=>null):Promise.reject(t)),refetchOnMount:!1,enabled:t.isEnabled()},void 0,void 0),rr)},rd=()=>(0,Y.useContext)(re);function rf(){return(rf=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 rm(t,e){return(rm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var rg=new Map,rv=new WeakMap,rw=0;function ry(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)?(rv.has(n)||(rw+=1,rv.set(n,rw.toString())),rv.get(n)):"0":t[e])}).toString(),n=rg.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.forEac
1h(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},rg.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(),rg.delete(o))}}var rb=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function rS(t){return"function"!=typeof t.children}var rC=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(),rS(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,rm(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=ry(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(!rS(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,rb);return Y.createElement(s||"div",rf({ref:this.handleNode},o),r)},e}(Y.Component);rC.displayName="InView",rC.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};let rA=t=>{t({type:n6.WIDGET_APPEAR,payload:{}})},rE=()=>{let{options:t}=rd(),{visibility:{onInView:e,onUpdate:n}={}}=t,{ref:i,inView:r,entry:s}=(()=>{var t,e,n,i,r,s,o,a,c,u,h,p,l,d,f,m;let{dispatch:g}=rn(),{options:{visibility:v={}}={}}=rd(),{triggerOnce:w=!0}=v,y=(0,Y.useRef)(!0),{ref:b,inView:S,entry:C}=(e=(t={...v,triggerOnce:w}).threshold,n=t.delay,i=t.trackVisibility,r=t.rootMargin,s=t.root,o=t.triggerOnce,a=t.skip,c=t.initialInView,u=t.fallbackInView,h=Y.useRef(),l=(p=Y.useState({inView:!!c}))[0],d=p[1],f=Y.useCallback(function(t){void 0!==h.current&&(h.current(),h.current=void 0),a||t&&(h.current=ry(t,function(t,e){d({inView:t,entry:e}),e.isIntersecting&&o&&h.current&&(h.current(),h.current=void 0)},{root:s,rootMargin:r,threshold:e,trackVisibility:i,delay:n},u))},[Array.isArray(e)?e.toString():e,s,r,o,a,i,u,n]),(0,Y.useEffect)(function(){h.current||!l.entry||o||a||d({inView:!!c})}),(m=[f,l.inView,l.entry]).ref=m[0],m.inView=m[1],m.entry=m[2],m),A=(0,Y.useCallback)(()=>{rA(g)},[g]);return(0,Y.useEffect)(()=>{y.current&&S&&(y.current=!w,rA(g))},[g,S,C,w]),{ref:b,inView:S,entry:C,trigger:A}})();return(0,Y.useEffect)(()=>{r&&e&&e(s),n&&n(r,s)},[r,s,n,e]),i},rP=()=>{let t=rd(),{rfkId:e,instanceId:n}=rn(),[i,r]=(0,Y.useState)(t.state),s=(0,Y.useRef)({});return(0,Y.useEffect)(()=>{let t={handleAction(t){if(t.type===n6.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 ir.register(t),()=>ir.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,rT=function(t){let{rfkId:e,dispatch:n}=rn(),i=rd();i.isInitialized()||i.initialize(t||{});let{query:r,options:s,actions:o}=i,a=rP(),c=rl(r);return{widgetRef:rE(),rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}},rI=()=>{let{rfkId:t}=rT(),{widgetRef:e,queryResult:{data:{appearance:{css_names:n=[],templates:{html:{devices:{[U.DESKTOP]:{content:i=null}={}}={}}={},css:{devices:{[U.DESKTOP]:{content:r=null}={}}={}}={}}={}}={}}={}}}=rT(),s=(0,Y.useRef)(null);return(0,Y.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,Y.useLayoutEffect)(()=>{s.current&&i&&(s.current.innerHTML=i)},[i]),(0,Y.createElement)("div",{ref:e,"data-rfkid":t,className:n.join(" ")},(0,Y.createElement)("div",{ref:s}))},rR=()=>{let{queryResult:{data:{appearance:{templates:{html:{devices:{[U.DESKTOP]:{content:t=null}={}}={}}={}}={}}={}}={}}}=rT();return(0,Y.useLayoutEffect)(()=>{t&&document.head.insertAdjacentHTML("afterbegin",t)},[t]),null},r_={component:rI,options:{state:{}}},rL=(t,e)=>{tV.debug("setWidgetType",`Type: ${t}`,`Mapping: ${JSON.stringify(e)}`),ie.setWidgetType(t,e)},rO=class{constructor(){Object.defineProperty(this,"widgets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}getWidgetComponentConfig(t,e){let n=ie.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)}},rD=({rfkId:t,entity:e,children:n})=>{let i=(0,Y.useMemo)(()=>Math.random().toString(36).substring(2,9),[]),r=(0,Y.useCallback)(n=>n9.dispatch({...n,payload:{rfkId:t,instanceId:i,entity:e,...n.payload}}),[t,e,i]),s=(0,Y.useMemo)(()=>({rfkId:t,instanceId:i,dispatch:r,entity:e}),[t,r,e,i]);return(0,Y.createElement)(rt.Provider,{value:s},n)},rx=t=>{let{children:e}=t,n=rn();return n?.rfkId===t.rfkId?(0,Y.createElement)(Y.Fragment,{},e||null):(0,Y.createElement)(rD,t,e)},rk={visibility:{threshold:.2,triggerOnce:!0}},rN={name:"Ordercloud",buildInterface:!0,file:"ocContext",properties:{sellerId:{type:"string"},requiredInventoryLocations:{type:"array",name:"requiredInventoryLocations"}}},rj=tb(rN);class rG extends rj{}let rF=new class extends ii{constructor(){super(),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(new rG),n9.subscribe(this)}setContext(t){this.ocContext=t,this.ocContext.addListener(this)}getContext(){return this.ocContext}handleAction(t){switch(t.type){case n6.OC_CONTEXT_CHANGED:tV.info("OC Context changed");break;case n6.INITIALIZE:this.initialize()}}onChange(t,e,n){this.initialized&&n9.dispatch({type:n6.OC_CONTEXT_CHANGED,payload:{context:this.ocContext}})}};var rU=Q(1);let rq=(t,e)=>(t.cancel=()=>{e.abort()},t),rV={async getData(t,e){let n=new AbortController,i={...e,signal:n.signal,abortController:n};return rq(this.fetch(t.toJson(),i),n)},async fetch(t,e){let n=String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,""),i=ir.getContext(),r=tu({context:i.toJson()},t);n9.dispatch({type:n6.REQUEST,payload:{requestId:n,request:t,pageContext:i,payload:r}});try{let s=await io(r,{signal:e?.signal});return n9.dispatch({type:n6.REQUEST_SUCCESS,payload:{requestId:n,request:t,pageContext:i,payload:r,response:s}}),{_requestId:n,...s}}catch(e){return n9.dispatch({type:n6.REQUEST_FAIL,payload:{error:e,requestId:n,request:t,pageContext:i,payload:r}}),Promise.reject(e)}}},rM={context:{type:"model",model:tO},rfk_flags:{type:"array",name:"rfkFlags"},widget:{type:"model",model:{name:"Widget",properties:{items:{type:"array",model:tP}}}}},rB=tb({name:"OCSearchRequest",file:"OCSearchRequest",buildInterface:!0,properties:{...rM,ordercloud:{type:"model",model:rN,setter:"setOrderCloudContext",getter:"getOrderCloudContext"}}});class rK extends rB{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 rH=tb({name:"SearchRequest",file:"SearchRequest",buildInterface:!0,properties:{...rM}});class rQ extends rH{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 rW=()=>{let{connector:t}=tQ;if("oc"===t){tV.info("Using OC Request");let t=new rK;return t.setOrderCloudContext(rF.getContext().toJson()),t}return tV.info("Using default Request"),new rQ},r$=async t=>{let e=rW(),n=Array.from((t=>{let e=new Map;
1return 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}=tQ;i&&await i();let r=await rV.fetch(e.toJson());return t.map(([,{abortController:t}])=>t.signal.aborted?Object.assign({},r,{_canceled:!0}):r)},rJ={},rz={async getWidgetData(t,e){let{rfkId:n,entity:i,request:r}=t,s=ir.getContext(),o=r.toJson();n9.dispatch({type:n6.WIDGET_DATA_REQUEST,payload:{...t,pageContext:s,payload:o}});try{let r=await this.fetchWidgetData({...t,payload:o},e);if(r._canceled)return n9.dispatch({type:n6.WIDGET_DATA_REQUEST_CANCELED,payload:{...t,pageContext:s,payload:o}}),Promise.reject(new ri(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 n9.dispatch({type:n6.WIDGET_DATA_REQUEST_SUCCESS,payload:{...t,pageContext:s,response:h,payload:o,requestId:a}}),h}catch(e){return n9.dispatch({type:n6.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:((t,e)=>{if(e?.debounceBy)return`debounceBy@${e.debounceBy}`;let n=t.context?.toJson();return n?JSON.stringify(n):"default"})(t,e)};return e?.signal?.addEventListener("abort",()=>{i.abort()}),rq(e?.debounce?(rJ[n=r.groupBy]||(rJ[n]=rU(r$,250,{accumulate:!0})),rJ[n])(t,r):((t,e)=>{let{payload:n}=t,i=rW();return i.addWidgetItem(n),t.context&&i.setContext(t.context.toJson()),rV.fetch(i.toJson(),e)})(t,r),i)}};class rY{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 tx}),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:new rG}),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,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 n6.OC_CONTEXT_CHANGED:case n6.PAGE_CONTEXT_CHANGED:i()}}};ir.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(()=>{ir.unregister(r),this.getRequest().removeListener(s),this.getContext().removeListener(s),this.getOCContext().removeListener(s),this.enabledChangeListeners=this.enabledChangeListeners.filter(t=>t!==o)})}destroy(){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,ir.getContext().toJson(),e.toJson(),rF.getContext().toJson(),...n])(this.instanceId,this.widgetRequest,this.context.toJson())}getLastResponse(){return this.lastResponse}getRequestContext(){return tu(ir.getContext().toJson(),this.context.toJson())}getRequestOCContext(){return tu(rF.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={}
1){let e={rfkId:this.getRequest().getRfkId(),entity:this.getRequest().getEntity(),instanceId:this.instanceId,request:this.getRequest(),context:this.getContext(),ocContext:this.getOCContext()};return rz.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 rX=(t,e,n)=>{t({type:e,payload:n})},rZ=({children:t})=>{let{rfkId:e,entity:n,dispatch:i,instanceId:r}=rn(),s=(0,Y.useRef)();return s.current||(s.current=(({dispatch:t,entity:e,instanceId:n,rfkId:i})=>{let r={},s={},o=!1,a=(t=>{let{type:e,options:{setupRequest:n=()=>{}}={}}=ie.get(t)||{},i=e?((t,e)=>{if(tL[t])return tL[t](e);throw Error(`Invalid widget type: "${t}"`)})(e,t):new tI(t);return i.setRfkId(t),n(i),i})(i);a.setEntity(e);let c=new rY(n,a),u=tu(rk,ie.get(i,e)?.options);return{actions:((t,e)=>{let{actionProps:n={}}=e;return Object.keys(n).reduce((e,i)=>({...e,[i]:rX.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:n6.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={})=>{var i;let{options:{propStateMapping:r=null,props:{initial:s={}}={}}={}}=ie.get(t)||{};r&&Object.keys(i=tu(s,n)).forEach(t=>{"function"==typeof r[t]&&r[t](e,i)})})(c.getRequest().getRfkId(),c.getRequest(),r),e&&e(c),c.getRequest().takeSnapshot(),Object.assign(s,t.config),o=!0)},isInitialized:()=>o}})({dispatch:i,entity:n,instanceId:r,rfkId:e})),(0,Y.useEffect)(()=>(i({type:n6.LOAD,payload:{rfkId:e,entity:n,instanceId:r}}),()=>{i({type:n6.UNLOAD,payload:{rfkId:e,entity:n,instanceId:r}})}),[i,e,n,r]),(0,Y.createElement)(re.Provider,{value:s.current},t)},r0=(t,e,n)=>((...t)=>(e,n)=>t.reduceRight((t,e)=>(0,Y.createElement)(e,n,t),e))(rx,rZ)((0,Y.createElement)(n,t),e),r1=(t,e,n)=>(tV.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,Y.useMemo)(()=>{ie.setType(r,e)},[r]),r0(i,{rfkId:r,entity:n},t)}));r1(rI,J.BANNER,"content"),r1(rI,J.HTML_BLOCK,"content"),r1(rR,J.SEO,"content");let r2=class extends rO{doSetup({type:t,entity:e,component:n}){return r1(n,t,e)}},r4=({apiKey:t,children:n,clientId:i,cookieOptions:r,customerKey:s,debug:o,discoverDomainId:a,env:c="prod",orderCloudRegion:u,publicSuffix:h=!1,requestMiddleware:p,serviceHost:d,trackConsent:f=!0,uri:m,useAccessToken:g,useStorage:v,useToken:w,...y})=>{var b;return(0,Y.useMemo)(()=>{((t,{processor:e=new ia}={})=>{let n;n=tQ,"useToken"in t&&void 0!==t.useToken&&tV.warn('Parameter "useToken" has been deprecated'),tQ=t.customerKey?((t,e)=>{let n,i=Object.assign({},t,e),{env:r="prod",customerKey:s=""}=i,{serviceHost:o,apiKey:a}=e,c=(t=>{if(t){let e=t.match(/^(\d+)-(\d+)$/);if(e)return[e[1],e[2]]}return null})(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=tM[r],a?{apiDomain:n,searchUrl:`${n}${"/discover/v2/{{key}}".replace("{{key}}",tH(s))}`,eventUrl:`${n}${tK.replace("{{key}}",s)}`}:{apiDomain:o,searchUrl:`${o}/api/discover/v2`,eventUrl:`${o}/api/event/v4/publish`}))})(n,t):((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:tB[i],searchUrl:`${tB[i]}${"/api/v1/search/{{domain}}".replace("{{domain}}",s)}`,eventUrl:`${tM[r]}${tK.replace("{{key}}",s)}`})})(n,t);
1let{useStorage:i=!1}=t;tZ.init(i),e&&(is=e)})({apiKey:t,clientId:i,cookieOptions:r,customerKey:s,debug:o,discoverDomainId:a,env:c,orderCloudRegion:u,publicSuffix:h,requestMiddleware:p,serviceHost:d,trackConsent:f,useAccessToken:g,useStorage:v,useToken:w},{processor:new ic}),((...t)=>{rL(J.CONTENT_BLOCK,r_),rL(J.HTML_BLOCK,r_),rL(J.BANNER,r_),rL(J.SEO,{...r_,component:rR}),rL(J.PREVIEW_SEARCH,{options:{propStateMapping:i2,actionProps:i4,state:{}}}),rL(J.RECOMMENDATION,{options:{propStateMapping:i5,actionProps:i3,state:{}}}),rL(J.QUESTIONS,{options:{propStateMapping:i6,actionProps:i7,state:{}}}),rL(J.SEARCH_RESULTS,{options:{propStateMapping:i8,actionProps:i9,state:{selectedFacets:{},page:1}}}),new i0,new r2,(t=>{let{autoIncludeNewWidgets:n=!1,autoIncludeWidgets:i=!0,uri:r}=t||{};if("undefined"==typeof document||!document.createElement)return r&&ir.getContext().setPageUri(r),ih();if(ir.getContext().setPageUri(r||window.location.pathname),n&&(()=>{if(e)return;let t=document.querySelector(i1);(e=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&&ir.getDispatcher().dispatch({type:n6.FOUND_WIDGETS,payload:{widgets:n}})})).observe(document.body,{subtree:!0,childList:!0,characterData:!0})})(),i){let t=Array.from(document.querySelectorAll(`:not(${i1}) > [data-rfkid]:not(${i1})`)).filter((t,e,n)=>n.indexOf(t)===e).map(t=>({rfkId:t.dataset.rfkid,entity:t.dataset.entity,node:t}));t.length&&setTimeout(()=>{ir.getDispatcher().dispatch({type:n6.FOUND_WIDGETS,payload:{widgets:t}})},0)}ih()})(...t)})({uri:m,autoIncludeWidgets:!1,autoIncludeNewWidgets:!1})},[]),(0,Y.useEffect)(()=>{ir.toggleTrackConsent(f)},[f]),(0,Y.createElement)(iZ,{...y,client:(b=y.client,!l&&b?l=b:l||(l=new i$({defaultOptions:{queries:{retry:!1,keepPreviousData:!0,refetchOnWindowFocus:!1}}})),l)},n)};var r5=Q(667),r3=Q(464),r6=Q(815),r7=Q(196);class r8{}class r9 extends r8{constructor(t,e,n=[]){super(),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"values",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.type=t,this.name=e,this.values=n}add(t){this.values.push(t)}getName(){return this.name}getType(){return this.type}getValues(){return this.values}toJson(){return{type:this.type,name:this.name,values:this.values}}}class st extends r8{constructor(t,e,n){super(),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.type=t,this.name=e,this.value=n}getType(){return this.type}getName(){return this.name}getValue(){return this.value}toJson(){return{type:this.type,name:this.name,value:this.value}}}class se extends r8{constructor(t,e){super(),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"filters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.type=t,this.filters=e}add(t){this.filters.push(t)}get(){return this.filters}getType(){return this.type}toJson(){return{type:this.type,filters:this.filters}}}class sn extends st{constructor(t,e){super("eq",t,e)}}class si extends r9{constructor(t,e=[]){super("anyOf",t,e)}}class sr extends se{constructor(t=[]){super("and",t)}}class ss extends r8{constructor(t){super(),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.type="not",this.filter=t}get(){return this.filter}getType(){return this.type}toJson(){return{type:this.type,filter:this.filter}}}let so=async(t,{index:e,filters:n,...i})=>{if(t){if(!n||!n.find(({facetId:t})=>void 0===t))return await (async(t,{index:e,request:n,filters:i})=>n0({name:"widget",action:"click",action_cause:"filter",value:{rfk_id:t,index:e,request:n,filters:i,context:tk.toJson()}}
1))(t,{index:e,request:n4(i),filters:n.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}:{}}))});tV.warn("trackEvent :::","Filter's name is not defined")}else tV.warn("trackEvent :::","Widget's rfkId mandatory field is empty")},sa=(t,e)=>{let n=(0,Y.useRef)(e),i=(0,Y.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},sc=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 su{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 sh=new class extends su{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),p=u.find(({id:t})=>t===r)?.text||"";a||so(t,{filters:[{facetId:i,facetValueId:r,facetValue:p,valueIndex:o,facetIndex:s,facetTitle:h}]}),e.getRequest().setSearchOffset(0),c?e.getRequest().addSearchFacetTypeFilter(i,sc.buildItem(e,n)):e.getRequest().removeSearchFacetTypeFilter(i,sc.buildItem(e,n))}},sp={range:new class extends su{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||so(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:sh,text:sh},sl=class{},sd=new class extends sl{process(t,e){let{facetId:n}=e;t.getRequest().removeSearchFacetTypeFilter(n,sc.buildItem(t,e))}},sf={range:new class extends sl{process(t,e){let{facetId:n}=e;t.getRequest().resetSearchFacetTypeFilter(n)}},valueId:sd,text:sd};function sm(t,e){return t?.facet.find(({name:t})=>t===e)}function sg(t,e,n){let i=sm(t,e);if(i)return i.value.find(({id:t})=>n===t)}function sv(t,e){let{facets:n={}}=t,{type:i}=n[e]||{};return i||t.defaultFacetType||"valueId"}let sw=(t,e)=>"facetValueId"in e&&t.id===e.facetValueId||"facetValueText"in e&&t.text===e.facetValueText;function sy(t,e,n){return t.findIndex(t=>n&&t.facetId===e&&t.facetValueId===n)}let sb={range:new class{run(t,e){if("min"in e||"max"in e){let{min:n,max:i,facetId:r}=e;return t.getRequest().addSearchFacetTypeFilter(r,{value:n,type:"gte"},"and").addSearchFacetTypeFilter(r,{value:i,type:"lte"},"and"),!0}return tV.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 tV.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 tV.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 sS{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);
1let a=[...t],c=sm(e,i),u=sg(e,i,r);return s&&-1===o&&a.push(this.buildNewItem(c,u,i,r)),a}}let sC={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=sm(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 sS{buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}findPreviousValueIndex(t,e,n){return sy(t,e,n)}},text:new class extends sS{findPreviousValueIndex(t,e,n,i){if(void 0!==n){let r=sg(i,e,n);if(r)return t.findIndex(t=>t.facetId===e&&t.facetValueText===r.text)}return -1}buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetValueText:e?.text,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}}},sA={valueId:new class{process(t,e){let n=sy(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)}}},sE=(t,e)=>{switch(e.type){case n6.WIDGET_DATA_REQUEST_SUCCESS:let{selectedFacets:n=[],response:i}=t;return n.some(t=>{let e=sm(i,t.facetId);if(!t.facetLabel)return!0;let n=e?.value?.find(e=>sw(e,t));return!(!n||!n.text||t.valueLabel)})?{...t,selectedFacets:n.map(t=>{let e=sm(i,t.facetId);return e?((t,e)=>{let n=e.value.find(e=>sw(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;case F.FILTER_CLICKED:case F.REMOVE_FILTER:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sA[r];return s?{...t,page:1,selectedFacets:s.process(n,e,i)}:(tV.warn(`${r} has not a valid reducer for REMOVE_FILTER action. No reduce transformation applied.`),{...t,page:1})})(t,e.payload);case F.FACET_CLICKED:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sC[r];return s?{...t,page:1,selectedFacets:s.process(n,i,e)}:(tV.warn(`${r} has not a valid action reducer. No reduce transformation applied.`),{...t,selectedFacets:n})})(t,e.payload);case F.SORT_CHANGED:return{...t,page:1,sortType:e.payload.name};case F.PAGE_NUMBER_CHANGED:return{...t,page:e.payload.page};case F.RESULTS_PER_PAGE_CHANGED:return{...t,page:1,itemsPerPage:e.payload.numItems};case F.KEYPHRASE_CHANGED:return{...t,page:1,keyphrase:e.payload.keyphrase,selectedFacets:[]};case F.CLEAR_FILTERS:return{...t,page:1,selectedFacets:[]};default:return t}},sP=function(t){let{rfkId:e,dispatch:n}=rn(),i=rd();i.isInitialized()||(i.initialize(t||{}),(t=>{let{query:e,state:{selectedFacets:n=[]},config:i={}}=t;n.forEach(t=>{let n=sv(i,t.facetId),r=sb[n];if(!r)return tV.warn(`Facet type ${n} is not supported.`);r.run(e,t)})})(i));let{query:r,options:s,actions:o}=i,a=rP(),c=rl(r),u=rE();return((t,e)=>{let n=rd(),{rfkId:i,instanceId:r}=rn(),s=sa(t,e);(0,Y.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 n6.WIDGET_DATA_REQUEST_SUCCESS:{let{response:n}=e.payload;return{...t,response:n}}case n6.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 ir.register(t),()=>ir.unregister(t)},[i,r,n,s])})(sE,[]),((t,e)=>{let{rfkId:n,instanceId:i}=rn(),r=sa(t,e);(0,Y.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:s}=t.payload;e&&(e!==n||s!==i)||r.current(t)}};return ir.register(t),()=>ir.unregister(t)},[n,i,r])})(t=>{switch(t.type){case F.FACET_CLICKED:var n=t.payload;let{type:i,rfkId:s}=n,o=sp[i];o?o.process(s,r,n):tV.warn(`${i} has not a valid action handler`);break;case F.FILTER_CLICKED:case F.REMOVE_FILTER:var a=t.payload;let{type:c}=a,u=sf[c];u?u.process(r,a):tV.warn(`${c} has not a valid action handler`);break;case F.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=n2(e,s))&&!n1(o)?void tV.warn("trackEvent :::","A field is missing on one or more of the items provided"):n&&"entity"===n&&void 0===i?void tV.warn("trackEvent :::","Field index is mandatory for widget click entity events and is having invalid/missing value"):n0({name:"widget",action:"click",action_cause:n,value:{rfk_id:t,index:i,entities:o,request:r,context:tk.toJson()}})})(t,e,{actionCause:"entity",index:n,request:n4(r),items:i});tV.warn("trackEvent :::","Widget's rfkId mandatory field is empty")})(e,s,{index:n,items:[{id:i,sourceId:o}],...(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}})(r)});break}case F.SORT_CHANGED:r.getRequest().resetSearchSortCriteria().setSearchSortCriteriaName(t.payload.name).setSearchOffset(0);break;case F.PAGE_NUMBER_CHANGED:{let n=r.getRequest().getSearchLimit()??r.getLastResponse()?.limit;void 0===n?tV.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 F.RESULTS_PER_PAGE_CHANGED:r.getRequest().setSearchLimit(t.payload.numItems).setSearchOffset(0);break;case F.KEYPHRASE_CHANGED:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0),t.payload.keyphrase?r.getRequest().setSearchQueryKeyphrase(t.payload.keyphrase):r.getRequest().resetSearchQueryKeyphrase();break;case F.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}};function sT(t,e=[]){let n=[],i=()=>{let e=n.map(t=>Y.createContext(t));return function(n){let i=n?.[t]||e;return Y.useMemo(()=>({[`__scope${t}`]:{...n,[t]:i}}),[n,i])}};return i.scopeName=t,[function(e,i){let r=Y.createContext(i),s=n.length;n=[...n,i];let o=e=>{let{scope:n,children:i,...o}=e,a=n?.[t]?.[s]||r,c=Y.useMemo(()=>o,Object.values(o));return(0,z.jsx)(a.Provider,{value:c,children:i})};return o.displayName=e+"Provider",[o,function(n,o){let a=o?.[t]?.[s]||r,c=Y.useContext(a);if(c)return c;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${e}\``)}]},function(...t){let e=t[0];if(1===t.length)return e;let n=()=>{let n=t.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(t){let i=n.reduce((e,{useScope:n,scopeName:i})=>({...e,...n(t)[`__scope${i}`]}),{});return Y.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}(i,...e)]}function sI(...t){return e=>t.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}function sR(...t){return Y.useCallback(sI(...t),t)}var s_=Y.forwardRef((t,e)=>{let{children:n,...i}=t,r=Y.Children.toArray(n),s=r.find(sD);if(s){let t=s.props.children,n=r.map(e=>e===s?Y.Children.count(t)>1?Y.Children.only(null):Y.isValidElement(t)?t.props.children:null:e);return(0,z.jsx)(sL,{...i,ref:e,children:Y.isValidElement(t)?Y.cloneElement(t,void 0,n):null})}return(0,z.jsx)(sL,{...i,ref:e,children:n})});s_.displayName="Slot";var sL=Y.forwardRef((t,e)=>{let{children:n,...i}=t;if(Y.isValidElement(n)){let t,r=(t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?n.props.ref:n.props.ref||n.ref;return Y.cloneElement(n,{...function(t,e){let n={...e};for(let i in e){let r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...t)=>{s(...t),r(...t)}:r&&(n[i]=r):"style"===i?n[i]={...r,...s}:"className"===i&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}(i,n.props),ref:e?sI(e,r):r})}return Y.Children.count(n)>1?Y.Children.only(null):null});sL.displayName="SlotClone";var sO=({children:t})=>(0,z.jsx)(z.Fragment,{children:t});function sD(t){return Y.isValidElement(t)&&t.type===sO}function sx(t){let e=t+"CollectionProvider",[n,i]=function(t,e=[]){let n=[],i=()=>{let e=n.map(t=>Y.createContext(t));return function(n){let i=n?.[t]||e;return Y.useMemo(()=>({[`__scope${t}`]:{...n,[t]:i}}),[n,i])}};return i.scopeName=t,[function(e,i){let r=Y.createContext(i),s=n.length;function o(e){let{scope:n,children:i,...o}=e,a=n?.[t][s]||r,c=Y.useMemo(()=>o,Object.values(o));return(0,z.jsx)(a.Provider,{value:c,children:i})}return n=[...n,i],o.displayName=e+"Provider",[o,function(n,o){let a=o?.[t][s]||r,c=Y.useContext(a);if(c)return c;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${e}\``)}]},function(...t){let e=t[0];if(1===t.length)return e;let n=()=>{let n=t.map(t=>({useScope:t(),scopeName:t.scopeName}));
1return function(t){let i=n.reduce((e,{useScope:n,scopeName:i})=>({...e,...n(t)[`__scope${i}`]}),{});return Y.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}(i,...e)]}(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=t=>{let{scope:e,children:n}=t,i=Y.useRef(null),s=Y.useRef(new Map).current;return(0,z.jsx)(r,{scope:e,itemMap:s,collectionRef:i,children:n})};o.displayName=e;let a=t+"CollectionSlot",c=Y.forwardRef((t,e)=>{let{scope:n,children:i}=t,r=sR(e,s(a,n).collectionRef);return(0,z.jsx)(s_,{ref:r,children:i})});c.displayName=a;let u=t+"CollectionItemSlot",h="data-radix-collection-item",p=Y.forwardRef((t,e)=>{let{scope:n,children:i,...r}=t,o=Y.useRef(null),a=sR(e,o),c=s(u,n);return Y.useEffect(()=>(c.itemMap.set(o,{ref:o,...r}),()=>{c.itemMap.delete(o)})),(0,z.jsx)(s_,{[h]:"",ref:a,children:i})});return p.displayName=u,[{Provider:o,Slot:c,ItemSlot:p},function(e){let n=s(t+"CollectionConsumer",e);return Y.useCallback(()=>{let t=n.collectionRef.current;if(!t)return[];let e=Array.from(t.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((t,n)=>e.indexOf(t.ref.current)-e.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},i]}function sk(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),!1===n||!i.defaultPrevented)return e?.(i)}}function sN(t){let e=Y.useRef(t);return Y.useEffect(()=>{e.current=t}),Y.useMemo(()=>(...t)=>e.current?.(...t),[])}function sj({prop:t,defaultProp:e,onChange:n=()=>{}}){let[i,r]=function({defaultProp:t,onChange:e}){let n=Y.useState(t),[i]=n,r=Y.useRef(i),s=sN(e);return Y.useEffect(()=>{r.current!==i&&(s(i),r.current=i)},[i,r,s]),n}({defaultProp:e,onChange:n}),s=void 0!==t,o=s?t:i,a=sN(n);return[o,Y.useCallback(e=>{if(s){let n="function"==typeof e?e(t):e;n!==t&&a(n)}else r(e)},[s,t,r,a])]}Q(33);var sG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,e)=>{let n=Y.forwardRef((t,n)=>{let{asChild:i,...r}=t,s=i?s_:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,z.jsx)(s,{...r,ref:n})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),sF=globalThis?.document?Y.useLayoutEffect:()=>{},sU=t=>{let e,{present:n,children:i}=t,r=function(t){var e,n;let[i,r]=Y.useState(),s=Y.useRef({}),o=Y.useRef(t),a=Y.useRef("none"),[c,u]=(e=t?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},Y.useReducer((t,e)=>n[t][e]??t,e));return Y.useEffect(()=>{let t=sq(s.current);a.current="mounted"===c?t:"none"},[c]),sF(()=>{let e=s.current,n=o.current;if(n!==t){let i=a.current,r=sq(e);u(t?"MOUNT":"none"===r||"none"===e?.display?"UNMOUNT":n&&i!==r?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),sF(()=>{if(i){let t,e=i.ownerDocument.defaultView??window,n=n=>{let r=sq(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=sq(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:Y.useCallback(t=>{t&&(s.current=getComputedStyle(t)),r(t)},[])}}(n),s="function"==typeof i?i({present:r.isPresent}):Y.Children.only(i),o=sR(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?Y.cloneElement(s,{ref:o}):null};function sq(t){return t?.animationName||"none"}sU.displayName="Presence";var sV=X["useId".toString()]||(()=>{}),sM=0;function sB(t){let[e,n]=Y.useState(sV());return sF(()=>{t||n(t=>t??String(sM++))},[t]),t||(e?`radix-${e}
1`:"")}var sK="Collapsible",[sH,sQ]=sT(sK),[sW,s$]=sH(sK),sJ=Y.forwardRef((t,e)=>{let{__scopeCollapsible:n,open:i,defaultOpen:r,disabled:s,onOpenChange:o,...a}=t,[c=!1,u]=sj({prop:i,defaultProp:r,onChange:o});return(0,z.jsx)(sW,{scope:n,disabled:s,contentId:sB(),open:c,onOpenToggle:Y.useCallback(()=>u(t=>!t),[u]),children:(0,z.jsx)(sG.div,{"data-state":s1(c),"data-disabled":s?"":void 0,...a,ref:e})})});sJ.displayName=sK;var sz="CollapsibleTrigger",sY=Y.forwardRef((t,e)=>{let{__scopeCollapsible:n,...i}=t,r=s$(sz,n);return(0,z.jsx)(sG.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":s1(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...i,ref:e,onClick:sk(t.onClick,r.onOpenToggle)})});sY.displayName=sz;var sX="CollapsibleContent",sZ=Y.forwardRef((t,e)=>{let{forceMount:n,...i}=t,r=s$(sX,t.__scopeCollapsible);return(0,z.jsx)(sU,{present:n||r.open,children:({present:t})=>(0,z.jsx)(s0,{...i,ref:e,present:t})})});sZ.displayName=sX;var s0=Y.forwardRef((t,e)=>{let{__scopeCollapsible:n,present:i,children:r,...s}=t,o=s$(sX,n),[a,c]=Y.useState(i),u=Y.useRef(null),h=sR(e,u),p=Y.useRef(0),l=p.current,d=Y.useRef(0),f=d.current,m=o.open||a,g=Y.useRef(m),v=Y.useRef();return Y.useEffect(()=>{let t=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(t)},[]),sF(()=>{let t=u.current;if(t){v.current=v.current||{transitionDuration:t.style.transitionDuration,animationName:t.style.animationName},t.style.transitionDuration="0s",t.style.animationName="none";let e=t.getBoundingClientRect();p.current=e.height,d.current=e.width,g.current||(t.style.transitionDuration=v.current.transitionDuration,t.style.animationName=v.current.animationName),c(i)}},[o.open,i]),(0,z.jsx)(sG.div,{"data-state":s1(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:h,style:{"--radix-collapsible-content-height":l?`${l}px`:void 0,"--radix-collapsible-content-width":f?`${f}px`:void 0,...t.style},children:m&&r})});function s1(t){return t?"open":"closed"}var s2=Y.createContext(void 0),s4="Accordion",s5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[s3,s6,s7]=sx(s4),[s8,s9]=sT(s4,[s7,sQ]),ot=sQ(),oe=Y.forwardRef((t,e)=>{let{type:n,...i}=t;return(0,z.jsx)(s3.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?(0,z.jsx)(oa,{...i,ref:e}):(0,z.jsx)(oo,{...i,ref:e})})});oe.displayName=s4;var[on,oi]=s8(s4),[or,os]=s8(s4,{collapsible:!1}),oo=Y.forwardRef((t,e)=>{let{value:n,defaultValue:i,onValueChange:r=()=>{},collapsible:s=!1,...o}=t,[a,c]=sj({prop:n,defaultProp:i,onChange:r});return(0,z.jsx)(on,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:Y.useCallback(()=>s&&c(""),[s,c]),children:(0,z.jsx)(or,{scope:t.__scopeAccordion,collapsible:s,children:(0,z.jsx)(oh,{...o,ref:e})})})}),oa=Y.forwardRef((t,e)=>{let{value:n,defaultValue:i,onValueChange:r=()=>{},...s}=t,[o=[],a]=sj({prop:n,defaultProp:i,onChange:r}),c=Y.useCallback(t=>a((e=[])=>[...e,t]),[a]),u=Y.useCallback(t=>a((e=[])=>e.filter(e=>e!==t)),[a]);return(0,z.jsx)(on,{scope:t.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:(0,z.jsx)(or,{scope:t.__scopeAccordion,collapsible:!0,children:(0,z.jsx)(oh,{...s,ref:e})})})}),[oc,ou]=s8(s4),oh=Y.forwardRef((t,e)=>{let{__scopeAccordion:n,disabled:i,dir:r,orientation:s="vertical",...o}=t,a=sR(Y.useRef(null),e),c=s6(n),u="ltr"===function(t){let e=Y.useContext(s2);return t||e||"ltr"}(r),h=sk(t.onKeyDown,t=>{if(!s5.includes(t.key))return;let e=t.target,n=c().filter(t=>!t.ref.current?.disabled),i=n.findIndex(t=>t.ref.current===e),r=n.length;if(-1===i)return;t.preventDefault();let o=i,a=r-1,h=()=>{(o=i+1)>a&&(o=0)},p=()=>{(o=i-1)<0&&(o=a)};switch(t.key){case"Home":o=0;break;case"End":o=a;break;case"ArrowRight":"horizontal"===s&&(u?h():p());break;case"ArrowDown":"vertical"===s&&h();break;case"ArrowLeft":"horizontal"===s&&(u?p():h());break;case"ArrowUp":"vertical"===s&&p()}let l=o%r;n[l].ref.current?.focus()});return(0,z.jsx)(oc,{scope:n,disabled:i,direction:r,orientation:s,children:(0,z.jsx)(s3.Slot,{scope:n,children:(0,z.jsx)(sG.div,{...o,"data-orientation":s,ref:a,onKeyDown:i?void 0:h})})})}),op="AccordionItem",[ol,od]=s8(op),of=Y.forwardRef((t,e)=>{let{__scopeAccordion:n,value:i,...r}=t,s=ou(op,n),o=oi(op,n),a=ot(n),c=sB(),u=i&&o.value.includes(i)||!1,h=s.disabled||t.disabled;return(0,z.jsx)(ol,{scope:n,open:u,disabled:h,triggerId:c,children:(0,z.jsx)(sJ,{"data-orientation":s.orientation,"data-state":oS(u),...a,...r,ref:e,disabled:h,open:u,onOpenChange:t=>{t?o.onItemOpen(i):o.onItemClose(i)}})})});of.displayName=op;var om="AccordionHeader",og=Y.forwardRef((t,e)=>{let{__scopeAccordion:n,...i}=t,r=ou(s4,n),s=od(om,n);return(0,z.jsx)(sG.h3,{"data-orientation":r.orientation,"data-state":oS(s.open),"data-disabled":s.disabled?"":void 0,...i,ref:e})});og.displayName=om;var ov="AccordionTrigger",ow=Y.forwardRef((t,e)=>{let{__scopeAccordion:n,...i}=t,r=ou(s4,n),s=od(ov,n),o=os(ov,n),a=ot(n);return(0,z.jsx)(s3.ItemSlot,{scope:n,children:(0,z.jsx)(sY,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...a,...i,ref:e})})});ow.displayName=ov;var oy="AccordionContent",ob=Y.forwardRef((t,e)=>{let{__scopeAccordion:n,...i}=t,r=ou(s4,n),s=od(oy,n),o=ot(n);return(0,z.jsx)(sZ,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...o,...i,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function oS(t){return t?"open":"closed"}function oC(t){let[e,n,i]=sx(t+"CollectionIndex");return[e,function(t,e){let i=n(e);return Y.useCallback(()=>i().findIndex(({ref:e})=>e.current===t.current),[i,t])},i]}ob.displayName=oy;var oA="Checkbox",[oE,oP]=sT(oA),[oT,oI]=oE(oA),oR=Y.forwardRef((t,e)=>{let{__scopeCheckbox:n,name:i,checked:r,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:u,form:h,...p}=t,[l,d]=Y.useState(null),f=sR(e,t=>d(t)),m=Y.useRef(!1),g=!l||h||!!l.closest("form"),[v=!1,w]=sj({prop:r,defaultProp:s,onChange:u}),y=Y.useRef(v);return Y.useEffect(()=>{let t=l?.form;if(t){let e=()=>w(y.current);return t.addEventListener("reset",e),()=>t.removeEventListener("reset",e)}},[l,w]),(0,z.jsxs)(oT,{scope:n,state:v,disabled:a,children:[(0,z.jsx)(sG.button,{type:"button",role:"checkbox","aria-checked":oD(v)?"mixed":v,"aria-required":o,"data-state":ox(v),"data-disabled":a?"":void 0,disabled:a,value:c,...p,ref:f,onKeyDown:sk(t.onKeyDown,t=>{"Enter"===t.key&&t.preventDefault()}),onClick:sk(t.onClick,t=>{w(t=>!!oD(t)||!t),g&&(m.current=t.isPropagationStopped(),m.current||t.stopPropagation())})}),g&&(0,z.jsx)(oO,{control:l,bubbles:!m.current,name:i,value:c,checked:v,required:o,disabled:a,form:h,style:{transform:"translateX(-100%)"},defaultChecked:!oD(s)&&s})]})});oR.displayName=oA;var o_="CheckboxIndicator",oL=Y.forwardRef((t,e)=>{let{__scopeCheckbox:n,forceMount:i,...r}=t,s=oI(o_,n);return(0,z.jsx)(sU,{present:i||oD(s.state)||!0===s.state,children:(0,z.jsx)(sG.span,{"data-state":ox(s.state),"data-disabled":s.disabled?"":void 0,...r,ref:e,style:{pointerEvents:"none",...t.style}})})});oL.displayName=o_;var oO=t=>{let{control:e,checked:n,bubbles:i=!0,defaultChecked:r,...s}=t,o=Y.useRef(null),a=function(t){let e=Y.useRef({value:t,previous:t});return Y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}(n),c=function(t){let[e,n]=Y.useState(void 0);return sF(()=>
1{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let e=new ResizeObserver(e=>{let i,r;if(!Array.isArray(e)||!e.length)return;let s=e[0];if("borderBoxSize"in s){let t=s.borderBoxSize,e=Array.isArray(t)?t[0]:t;i=e.inlineSize,r=e.blockSize}else i=t.offsetWidth,r=t.offsetHeight;n({width:i,height:r})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)},[t]),e}(e);Y.useEffect(()=>{let t=o.current,e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(a!==n&&e){let r=new Event("click",{bubbles:i});t.indeterminate=oD(n),e.call(t,!oD(n)&&n),t.dispatchEvent(r)}},[a,n,i]);let u=Y.useRef(!oD(n)&&n);return(0,z.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r??u.current,...s,tabIndex:-1,ref:o,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function oD(t){return"indeterminate"===t}function ox(t){return oD(t)?"indeterminate":t?"checked":"unchecked"}var ok=Y.forwardRef((t,e)=>(0,z.jsx)(sG.label,{...t,ref:e,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));function oN(){return(oN=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}ok.displayName="Label";let oj=(0,Y.forwardRef)((t,e)=>{let{children:n,...i}=t,r=Y.Children.toArray(n),s=r.find(oU);if(s){let t=s.props.children,n=r.map(e=>e===s?Y.Children.count(t)>1?Y.Children.only(null):(0,Y.isValidElement)(t)?t.props.children:null:e);return(0,Y.createElement)(oG,oN({},i,{ref:e}),(0,Y.isValidElement)(t)?(0,Y.cloneElement)(t,void 0,n):null)}return(0,Y.createElement)(oG,oN({},i,{ref:e}),n)});oj.displayName="Slot";let oG=(0,Y.forwardRef)((t,e)=>{let{children:n,...i}=t;return(0,Y.isValidElement)(n)?(0,Y.cloneElement)(n,{...function(t,e){let n={...e};for(let i in e){let r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...t)=>{s(...t),r(...t)}:r&&(n[i]=r):"style"===i?n[i]={...r,...s}:"className"===i&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}(i,n.props),ref:e?function(...t){return e=>t.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}(e,n.ref):n.ref}):Y.Children.count(n)>1?Y.Children.only(null):null});oG.displayName="SlotClone";let oF=({children:t})=>(0,Y.createElement)(Y.Fragment,null,t);function oU(t){return(0,Y.isValidElement)(t)&&t.type===oF}let oq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,e)=>{let n=(0,Y.forwardRef)((t,n)=>{let{asChild:i,...r}=t,s=i?oj:e;return(0,Y.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,Y.createElement)(s,oN({},r,{ref:n}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});var oV=Y.forwardRef((t,e)=>
1{let{pressed:n,defaultPressed:i=!1,onPressedChange:r,...s}=t,[o=!1,a]=sj({prop:n,onChange:r,defaultProp:i});return(0,z.jsx)(sG.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:e,onClick:sk(t.onClick,()=>{t.disabled||a(!o)})})});oV.displayName="Toggle";let oM="FacetValueList",[oB,oK,oH]=oC(oM),oQ="FacetValueListItem",[oW,o$]=sT(oQ),[oJ,oz]=sT(oM,[oH,o$]),[oY,oX]=oJ(oM),oZ=Y.forwardRef(({__scopeFacetValueList:t,facetId:e,onFacetClick:n,orientation:i="vertical",...r},s)=>(0,z.jsx)(oB.Provider,{scope:t,children:(0,z.jsx)(oY,{scope:t,onFacetClick:n,facetId:e,children:(0,z.jsx)(oB.Slot,{scope:t,children:(0,z.jsx)(oq.ul,{"data-orientation":i,...r,ref:s})})})}));oZ.displayName=oM;let[o0,o1]=oW(oQ),o2=Y.forwardRef((t,e)=>{let{__scopeFacetValueList:n,defaultSelected:i,facetValueId:r,selected:s,...o}=t,{facetId:a,onFacetClick:c=()=>{}}=oX(oQ,n),u=Y.useRef(null),h=sR(e,u),p=oK(u,n),[l=!1,d]=sj({prop:s,defaultProp:i,onChange:sN(t=>{c({facetId:a,facetValueId:r,facetValueIndex:p(),checked:t})})});return(0,z.jsx)(o0,{scope:n,onFacetItemChange:d,selected:l,id:r,children:(0,z.jsx)(oB.ItemSlot,{scope:n,children:(0,z.jsx)(oq.li,{"data-state":l?"selected":"unselected",ref:h,...o})})})});o2.displayName=oQ;let o4="FacetValueListItemLabel",o5=Y.forwardRef((t,e)=>{let{__scopeFacetValueList:n,...i}=t,{id:r}=o1(o4,n);return(0,z.jsx)(ok,{htmlFor:r,...i,ref:e})});o5.displayName=o4;let o3="FacetValueListItemCheckbox",o6=Y.forwardRef((t,e)=>{let{__scopeFacetValueList:n,...i}=t,{id:r,selected:s,onFacetItemChange:o}=o1(o3,n);return(0,z.jsx)(oR,{checked:s,id:r,onCheckedChange:o,ref:e,...i})});o6.displayName=o3,oL.displayName="FacetValueListItemCheckboxIndicator";let o7="FacetValueListItemToggle",o8=Y.forwardRef((t,e)=>{let{__scopeFacetValueList:n,...i}=t,{id:r,selected:s,onFacetItemChange:o}=o1(o7,n);return(0,z.jsx)(oV,{pressed:s,id:r,onPressedChange:o,ref:e,...i})});o8.displayName=o7;let o9="AccordionFacets",[at,ae,an]=oC(o9),[ai,ar]=sT(o9,[s9,an,oz]),as=s9(),ao=oz(),[aa,ac]=ai(o9),au=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,defaultFacetTypesExpandedList:i,facetTypesExpandedList:r,onFacetTypesExpandedListChange:s,onFacetValueClick:o=()=>{},...a}=t,c=as(n);return(0,z.jsx)(at.Provider,{scope:n,children:(0,z.jsx)(aa,{scope:n,onFacetValueClick:o,children:(0,z.jsx)(at.Slot,{scope:n,children:(0,z.jsx)(oe,{...c,defaultValue:i,onValueChange:s,type:"multiple",ref:e,value:r,...a})})})})});au.displayName=o9;let ah="AccordionFacet",[ap]=sT(ah),[al,ad]=ap(ah),af=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,facetId:i,...r}=t,s=as(n),o=Y.useRef(null),a=sR(e,o),c=ae(o,n),{onFacetValueClick:u}=ac(ah,n),h=sN(({facetId:t,...e})=>{u({facetId:t,facetIndex:c(),...e})});return(0,z.jsx)(al,{scope:n,facetId:i,onFacetItemClick:h,children:(0,z.jsx)(at.ItemSlot,{scope:n,children:(0,z.jsx)(of,{...s,value:i,...r,ref:a})})})});af.displayName=ah;let am=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=as(n);return(0,z.jsx)(ob,{...r,...i,ref:e})});am.displayName="AccordionFacetContent";let ag="AccordionFacetValueList",av=t=>{let{__scopeAccordionFacets:e,...n}=t,i=ao(e),{facetId:r,onFacetItemClick:s}=ad(ag,e);return(0,z.jsx)(oZ,{...i,...n,facetId:r,onFacetClick:s})};av.displayName=ag;let aw=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=ao(n);return(0,z.jsx)(o2,{...r,...i,ref:e})});aw.displayName="AccordionFacetValueListItem";let ay=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=ao(n);return(0,z.jsx)(o5,{...r,...i,ref:e})});ay.displayName="AccordionFacetValueListItemLabel";let ab=Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=ao(n);return(0,z.jsx)(o6,{...r,...i,ref:e})});ab.displayName="AccordionFacetValueListItemCheckbox",oL.displayName="AccordionFacetValueListItemCheckboxIndicator",Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=ao(n);return(0,z.jsx)(o8,{...r,...i,ref:e})}).displayName="AccordionFacetValueListItemItemToggle",Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=as(n);return(0,z.jsx)(og,{...r,...i,ref:e})}).displayName="AccordionFacetHeader",Y.forwardRef((t,e)=>{let{__scopeAccordionFacets:n,...i}=t,r=as(n);return(0,z.jsx)(ow,{...r,...i,ref:e})}).displayName="AccordionFacetTrigger";let aS=Y.forwardRef((t,e)=>{let{onFacetValueClick:n=()=>{},...i}=t,r=(()=>{let{config:t}=rd();return t})();return(0,z.jsx)(au,{...i,ref:e,onFacetValueClick:t=>n({...t,type:sv(r,t.facetId)})})}),aC={valueId:{isSelectedFacet:(t,e,n)=>t.some(t=>"facetValueId"in t&&t.facetId===e&&t.facetValueId===n)},text:{isSelectedFacet:(t,e,n,i)=>{let r=sg(i,e,n);return!(!r||!r.text)&&t.some(t=>"facetValueText"in t&&t.facetId===e&&t.facetValueText===r.text)}},range:{isSelectedFacet:()=>!1}},aA=t=>{let{__scopeAccordionFacets:e}=t,{facetId:n}=ad("AccordionFacet",e),i=((t,e)=>{let{config:n,state:{response:i}={}}=rd(),r=sv(n,t),{selectedFacets:s=[]}=rP(),o=aC[r]?aC[r]:void 0;return void 0!==o&&o.isSelectedFacet(s,t,e,i)})(n,t.facetValueId);return(0,z.jsx)(aw,{selected:i,...t})},aE=Y.forwardRef((t,e)=>{let{onLoadMoreClick:n=()=>{},...i}=t,{state:{page:r=1,itemsPerPage:s=10},queryResult:{data:{content:o=[]}={}}}=sP(),a=o.length<s;return(0,z.jsx)("button",{"data-disabled":a,...i,ref:e,onClick:()=>!a&&n({page:r+1})})}),aP=({children:t})=>(0,z.jsx)("div",{className:"sitecore-search-results__widget-metadata",children:t}),aT=({label:t})=>(0,z.jsx)("div",{className:"sitecore-search-results__widget-metadata-name",children:t}),aI=({children:t})=>(0,z.jsx)("div",{className:"sitecore-search-results__widget-metadata-values",children:t}),aR=({icon:t,label:e,value:n})=>(0,z.jsxs)("div",{className:"sitecore-search-results__widget-metadata-unit",children:[t&&(0,z.jsx)(r5.Icons,{name:t}),e?`${e}: `:null,n]}),a_=({item:t,label:e})=>(0,z.jsxs)(aP,{children:[(0,z.jsx)(aT,{label:e}),(0,z.jsx)(aI,{children:(0,z.jsx)(aR,{icon:"circleInfo",label:"Last Race",value:(0,r7.withSearchMetadataFallback)(null==t?void 0:t.last_race_year)})})]}),aL=({dateDisplay:t,label:e})=>(0,z.jsxs)(aP,{children:[(0,z.jsx)(aT,{label:e}),t&&(0,z.jsx)(aI,{children:(0,z.jsx)(aR,{icon:"calendar",value:t})})]}),aO=({item:t})=>(0,z.jsx)(aL,{dateDisplay:(0,r7.resolveEventDateDisplay)(null==t?void 0:t.event_start_time),label:"EVENT"}),aD={Horse:({item:t})=>(0,z.jsxs)(aP,{children:[(0,z.jsx)(aT,{label:"HORSE PROFILE"}),(0,z.jsxs)(aI,{children:[(0,z.jsx)(aR,{icon:"circleInfo",label:"Foal Year",value:(0,r7.withSearchMetadataFallback)(null==t?void 0:t.foal_year)}),(0,z.jsx)(aR,{label:"Status",value:(0,r7.resolveHorseStatusLabel)(null==t?void 0:t.status)})]})]}),Jockey:({item:t})=>(0,z.jsx)(a_,{item:t,label:"JOCKEY PROFILE"}),Trainer:({item:t})=>(0,z.jsx)(a_,{item:t,label:"TRAINER PROFILE"}),News:({item:t})=>(0,z.jsx)(aL,{dateDisplay:(0,r7.resolveTimeStampDisplay)(null==t?void 0:t.date_published),label:"NEWS ARTICLE"}),Video:({item:t})=>(0,z.jsx)(aL,{dateDisplay:(0,r7.resolveTimeStampDisplay)(null==t?void 0:t.date_published),label:(0,r7.resolveVideoCategoryLabel)(null==t?void 0:t.video_content_type)}),Event:aO,Events:aO},ax=({item:t})=>{let e=aD[t.type];return e?(0,z.jsx)(e,{item:t}):null},ak=()=>(0,z.jsx)(sU,{present:!0,children:(0,z.jsx)("svg",{"aria-busy":!0,"aria-hidden":!1,focusable:"false",role:"progressbar",viewBox:"0 0 20 20",className:"sitecore-search-results__loader",children:(0,z.jsx)("path",{d:"M7.229 1.173a9.25 9.25 0 1 0 11.655 11.412 1.25 1.25 0 1 0-2.4-.698 6.75 6.75 0 1 1-8.506-8.329 1.25 1.25 0 1 0-.75-2.385z"})})}),aN=r1(t=>{let{defaultSortType:e="featured_desc",defaultPage:n=1,defaultKeyphrase:i="",defaultItemsPerPage:r=10,Fields:s}=t,{IgnoreSiteFilter:o,SitecoreSource:a,SitecoreEnv:c,SitecoreSite:u,FilterHeading:h,ResultsTitle:p,LoadMoreButtonLabel:l,TypesToExclude:d}=s,[f,m]=(0,Y.useState)(i),[g,v]=(0,Y.useState)(!1),{isDesktop:w}=(0,r7.useDeviceContext)(),y=o?[new sn("environment",c)]:[new sn("environment",c),new si("site",u)];null==d||d.forEach(t=>{y.push(new ss(new sn("type",t)))});let{widgetRef:b,actions:{onPageNumberChange:S,onKeyphraseChange:C,onItemClick:A,onFacetClick:E,onClearFilters:P},queryResult:{isLoading:T,isFetching:I,data:{total_item:R=0,facet:_=[]}={}}}=sP({query:t=>
1t.getRequest().setEntity("content").setSources(a).setSearchFilter(new sr(y)),state:{sortType:e,page:n,itemsPerPage:r,keyphrase:f}});(0,Y.useEffect)(()=>{window&&(m(i),C({keyphrase:i}))},[i]);let L=(()=>{let[t,e]=(0,Y.useState)([]),{state:{page:n},queryResult:{isLoading:i,isFetching:r,data:{content:s=[]}={}}}=sP();return(0,Y.useEffect)(()=>{i||r||e(n>1?t=>[...t,...s]:s)},[s,r,i]),t})(),O=(()=>{let{config:t}=rd(),{selectedFacets:e=[]}=rP();return e.map(e=>{let n=sv(t,e.facetId);return{...e,valueLabel:e.valueLabel||e?.facetValueText||"",type:n}})})();if(T)return(0,z.jsx)(ak,{});let D=()=>{let t=(0,z.jsx)("button",{type:"button",className:"sitecore-search-results__widget-clear",onClick:P,children:"Clear all"}),e=(0,z.jsxs)(aS,{defaultFacetTypesExpandedList:[],onFacetTypesExpandedListChange:()=>{},onFacetValueClick:E,className:"sitecore-search-results__widget-facets-root",children:[!w&&(0,z.jsx)("button",{type:"button",className:"sitecore-search-results__widget-close",onClick:()=>{v(!1)},children:(0,z.jsx)(r5.Icons,{name:"cross"})}),!w&&(0,z.jsx)("h2",{children:"Filters"}),_.map(t=>(0,z.jsxs)(af,{facetId:t.name,className:"sitecore-search-results__widget-facets-facet",children:[(0,z.jsx)(av,{className:"sitecore-search-results__widget-facets-value-list",children:t.value.map((t,e)=>(0,z.jsxs)(aA,{index:e,facetValueId:t.id,className:"sitecore-search-results__widget-facets-item",children:[(0,z.jsx)(ab,{className:"sitecore-search-results__widget-facets-item-checkbox",children:(0,z.jsx)(oL,{className:"sitecore-search-results__widget-facets-item-checkbox-indicator",children:(0,z.jsx)(r5.Icons,{name:"check"})})}),(0,z.jsxs)(ay,{className:"sitecore-search-results__widget-facets-item-checkbox-label",children:[(0,r7.resolveSearchFacetLabel)(t.text)," ",t.count&&`(${t.count})`]})]},t.id))}),(0,z.jsx)(am,{className:"sitecore-search-results__widget-facets-facets-content"})]},t.name)),O.length>0&&!w&&t]});return(0,z.jsxs)("div",{className:"sitecore-search-results__widget-filter",children:[(()=>{let t=(0,z.jsx)(r6.PlainText,{Params:{Identifier:"",Styles:""},Fields:{Content:h}});return w?(0,z.jsxs)("div",{className:"sitecore-search-results__widget-label",children:[(0,z.jsx)(r5.Icons,{name:"filter"}),t]}):(0,z.jsxs)("button",{type:"button",className:"sitecore-search-results__widget-label",onClick:()=>{v(!0)},children:[t,(0,z.jsx)(r5.Icons,{name:"filter"})]})})(),w?(0,z.jsx)("div",{className:"sitecore-search-results__widget-dialog",children:e}):(0,z.jsx)("dialog",{className:"sitecore-search-results__widget-dialog",open:g,children:e}),O.length>0&&w&&t]})},x=t=>{var e;return"string"==typeof t?t.replace("${{Result_Count}}",null!=(e=R.toString())?e:""):(0,z.jsx)(r6.PlainText,{Params:{Identifier:"",Styles:""},Fields:{Content:t}})};return(0,z.jsxs)("div",{ref:b,className:"sitecore-search-results__widget",children:[i&&(0,z.jsxs)("h2",{children:[(0,z.jsx)(r6.PlainText,{Params:{Identifier:"",Styles:""},Fields:{Content:p}})," ",(0,z.jsxs)("span",{children:['"',i,'"']})]}),(0,z.jsxs)("div",{className:"sitecore-search-results__widget-main "+(I?"sitecore-search-results__widget-main--fetching":""),children:[I&&(0,z.jsx)(ak,{}),w&&(0,z.jsx)("section",{className:"sitecore-search-results__widget-column sitecore-search-results__widget-column--left",children:D()}),R>0&&(0,z.jsx)("section",{className:"sitecore-search-results__widget-column sitecore-search-results__widget-column--right",children:R>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("section",{className:"sitecore-search-results__widget-header",children:[R>0&&(0,z.jsx)("p",{className:"sitecore-search-results__widget-summary",children:x(null==s?void 0:s.ResultsFoundLabel)}),!w&&D()]}),L&&(0,z.jsx)("ul",{className:"sitecore-search-results__widget-results",children:L.map((t,e)=>{var n;return(0,z.jsx)("li",{children:(0,z.jsxs)("a",{href:t.url,className:"sitecore-search-results__widget-card",onClick:()=>{A({id:t.id,index:e,sourceId:t.source_id})},children:[(0,z.jsxs)("div",{className:"sitecore-search-results__widget-content",children:[(0,z.jsx)("span",{className:"sitecore-search-results__widget-title",children:t.name}),(0,z.jsx)(ax,{item:t})]}),(0,z.jsxs)("div",{className:"sitecore-search-results__widget-image "+(t.image_url?"":"sitecore-search-results__widget-image--no-image"),children:[t.image_url?(0,z.jsx)(r3.Image,{Params:{Identifier:"",Styles:""},Fields:[{Image:(0,r7.appendQueryParam)(t.image_url,"t=m16x9card"),AltText:"",Breakp
1oint:"mobile"},{Image:(0,r7.appendQueryParam)(t.image_url,"t=t16x9card"),AltText:"",Breakpoint:"tablet"},{Image:(0,r7.appendQueryParam)(t.image_url,"t=d16x9card"),AltText:"",Breakpoint:"desktop"}]}):(t=>{let e=(0,r7.resolveSearchFacetIconName)(t);return e&&(0,z.jsx)(r5.Icons,{name:e})})(t.type),"video"===(null==(n=null==t?void 0:t.type)?void 0:n.toLowerCase())&&(t=>{let e=null==t?void 0:t.video_duration;return!e||e<=0?null:(0,z.jsxs)("span",{className:"sitecore-search-results__widget-duration",children:[(0,z.jsx)(r5.Icons,{name:"play"}),(0,z.jsx)("span",{className:"sitecore-search-results__widget-duration-time",children:(0,r7.secondsToMinutes)(e)})]})})(t)]})]})},t.id)})})]})}),R<=0&&!I&&(0,z.jsx)("div",{className:"sitecore-search-results__widget-no-results",children:(0,z.jsx)("p",{children:x(null==s?void 0:s.ResultsFoundLabel)})})]}),(0,z.jsxs)(aE,{className:"sitecore-search-results__widget-search "+(R>11&&w&&L&&L.length<R||R>10&&!w&&L&&L.length<R?"":"sitecore-search-results__widget-search--hidden"),onLoadMoreClick:S,disabled:I,children:[(0,z.jsx)(r6.PlainText,{Params:{Identifier:"",Styles:""},Fields:{Content:l}}),(0,z.jsx)(r5.Icons,{name:"add"})]})]})},J.SEARCH_RESULTS,"content"),aj=t=>{let{Params:e,Fields:n}=t,[i,r]=(0,Y.useState)("");return ir.getContext().setLocaleLanguage("en"),ir.getContext().setLocaleCountry("us"),(0,Y.useEffect)(()=>{window&&r(decodeURIComponent(new URLSearchParams(window.location.search).get("q")))},[]),(0,z.jsx)("div",Object.assign({},t.Params.SearchIgnore?{"data-attribute-search-ignore":!0}:{},{className:`component sitecore-search-results ${e.Styles}`,children:(0,z.jsx)(r4,{env:n.Env,customerKey:n.CustomerKey,apiKey:n.ApiKey,children:(0,z.jsx)(aN,{Fields:n,rfkId:"rfkid_7",defaultKeyphrase:i})})}))};return W})()}}]);
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.