commerce-sdk-isomorphic 2.0.0 → 2.1.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,o,s=function(e){return e&&e.Math==Math&&e},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!d((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),f=Function.prototype.call,l=h?f.bind(f):function(){return f.apply(f,arguments)},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v={f:g&&!p.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I=Function.prototype,m=I.bind,k=I.call,y=h&&m.bind(k,k),x=h?function(e){return e&&y(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},w=x({}.toString),C=x("".slice),P=function(e){return C(w(e),8,-1)},z=Object,O=x("".split),E=d((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==P(e)?O(e,""):z(e)}:z,q=TypeError,j=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(j(e))},T=function(e){return"function"==typeof e},M=function(e){return"object"==typeof e?null!==e:T(e)},_=function(e){return T(e)?e:void 0},A=function(e,t){return arguments.length<2?_(c[e]):c[e]&&c[e][t]},U=x({}.isPrototypeOf),R=A("navigator","userAgent")||"",B=c.process,L=c.Deno,N=B&&B.versions||L&&L.version,D=N&&N.v8;D&&(o=(a=D.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&R&&(!(a=R.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=R.match(/Chrome\/(\d+)/))&&(o=+a[1]);var W=o,F=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),G=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=A("Symbol");return T(t)&&U(t.prototype,H(e))},$=String,Y=function(e){try{return $(e)}catch(e){return"Object"}},J=TypeError,K=function(e){if(T(e))return e;throw J(Y(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__core-js_shared__"]||ee("__core-js_shared__",{}),re=i((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,ie=function(e){return ne(j(e))},ae=x({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,ce=Math.random(),de=x(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+de(++se+ce,36)},he=re("wks"),fe=c.Symbol,le=fe&&fe.for,pe=G?fe:fe&&fe.withoutSetter||ue,ge=function(e){if(!oe(he,e)||!F&&"string"!=typeof he[e]){var t="Symbol."+e;F&&oe(fe,e)?he[e]=fe[e]:he[e]=G&&le?le(t):pe(t)}return he[e]},ve=TypeError,be=ge("toPrimitive"),Ie=function(e,t){if(!M(e)||V(e))return e;var r,n=Q(e,be);if(n){if(void 0===t&&(t="default"),r=l(n,e,t),!M(r)||V(r))return r;throw ve("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&T(r=e.toString)&&!M(n=l(r,e)))return n;if(T(r=e.valueOf)&&!M(n=l(r,e)))return n;if("string"!==t&&T(r=e.toString)&&!M(n=l(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},me=function(e){var t=Ie(e,"string");return V(t)?t:t+""},ke=c.document,ye=M(ke)&&M(ke.createElement),xe=function(e){return ye?ke.createElement(e):{}},we=!u&&!d((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Ce=Object.getOwnPropertyDescriptor,Pe={f:u?Ce:function(e,t){if(e=S(e),t=me(t),we)try{return Ce(e,t)}catch(e){}if(oe(e,t))return b(!l(v.f,e,t),e[t])}},ze=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(M(e))return e;throw Ee(Oe(e)+" is not an object")},je=TypeError,Se=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,Me={f:u?ze?function(e,t,r){if(qe(e),t=me(t),qe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Te(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=me(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw je("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},_e=u?function(e,t,r){return Me.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Ae=Function.prototype,Ue=u&&Object.getOwnPropertyDescriptor,Re=oe(Ae,"name"),Be={EXISTS:Re,PROPER:Re&&"something"===function(){}.name,CONFIGURABLE:Re&&(!u||u&&Ue(Ae,"name").configurable)},Le=x(Function.toString);T(te.inspectSource)||(te.inspectSource=function(e){return Le(e)});var Ne,De,We,Fe=te.inspectSource,Ge=c.WeakMap,He=T(Ge)&&/native code/.test(Fe(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=ue(e))},Ye={},Je=c.TypeError,Ke=c.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Ke),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);Ne=function(e,t){if(Ze(Qe,e))throw new Je("Object already initialized");return t.facade=e,et(Qe,e,t),t},De=function(e){return Xe(Qe,e)||{}},We=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ye[tt]=!0,Ne=function(e,t){if(oe(e,tt))throw new Je("Object already initialized");return t.facade=e,_e(e,tt,t),t},De=function(e){return oe(e,tt)?e[tt]:{}},We=function(e){return oe(e,tt)}}var rt={set:Ne,get:De,has:We,enforce:function(e){return We(e)?De(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!M(t)||(r=De(t)).type!==e)throw Je("Incompatible receiver, "+e+" required");return r}}},nt=i((function(e){var t=Be.CONFIGURABLE,r=rt.enforce,n=rt.get,i=Object.defineProperty,a=u&&!d((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!oe(e,"name")||t&&e.name!==n)&&(u?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&oe(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&oe(s,"constructor")&&s.constructor?u&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return oe(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return T(this)&&n(this).source||Fe(this)}),"toString")})),it=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(T(r)&&nt(r,a,n),n.global)i?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Me.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,ot=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?ot:at)(t)},ct=function(e){var t=+e;return t!=t||0===t?0:st(t)},dt=Math.max,ut=Math.min,ht=function(e,t){var r=ct(e);return r<0?dt(r+t,0):ut(r,t)},ft=Math.min,lt=function(e){return e>0?ft(ct(e),9007199254740991):0},pt=function(e){return lt(e.length)},gt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=ht(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},vt={includes:gt(!0),indexOf:gt(!1)},bt=vt.indexOf,It=x([].push),mt=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!oe(Ye,r)&&oe(n,r)&&It(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~bt(a,r)||It(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=kt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return mt(e,yt)}},wt={f:Object.getOwnPropertySymbols},Ct=x([].concat),Pt=A("Reflect","ownKeys")||function(e){var t=xt.f(qe(e)),r=wt.f;return r?Ct(t,r(e)):t},zt=function(e,t,r){for(var n=Pt(t),i=Me.f,a=Pe.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=jt[qt(e)];return r==Tt||r!=St&&(T(t)?d(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},jt=Et.data={},St=Et.NATIVE="N",Tt=Et.POLYFILL="P",Mt=Et,_t=Pe.f,At=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,u=e.stat;if(r=d?c:u?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=_t(r,n))&&o.value:r[n],!Mt(d?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;zt(a,i)}(e.sham||i&&i.sham)&&_e(a,"sham",!0),it(r,n,a,e)}},Ut=Object.keys||function(e){return mt(e,kt)},Rt=d((function(){Ut(1)}));At({target:"Object",stat:!0,forced:Rt},{keys:function(e){return Ut(ie(e))}});var Bt={};Bt[ge("toStringTag")]="z";var Lt,Nt="[object z]"===String(Bt),Dt=ge("toStringTag"),Wt=Object,Ft="Arguments"==P(function(){return arguments}()),Gt=Nt?P:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wt(e),Dt))?r:Ft?P(t):"Object"==(n=P(t))&&T(t.callee)?"Arguments":n},Ht=String,Vt=function(e){if("Symbol"===Gt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ht(e)},$t={f:u&&!ze?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=Ut(t),a=i.length,o=0;a>o;)Me.f(e,r=i[o++],n[r]);return e}},Yt=A("document","documentElement"),Jt=$e("IE_PROTO"),Kt=function(){},Qt=function(e){return"<script>"+e+"<\/script>"},Xt=function(e){e.write(Qt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zt=function(){try{Lt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Zt="undefined"!=typeof document?document.domain&&Lt?Xt(Lt):((t=xe("iframe")).style.display="none",Yt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qt("document.F=Object")),e.close(),e.F):Xt(Lt);for(var r=kt.length;r--;)delete Zt.prototype[kt[r]];return Zt()};Ye[Jt]=!0;var er=Object.create||function(e,t){var r;return null!==e?(Kt.prototype=qe(e),r=new Kt,Kt.prototype=null,r[Jt]=e):r=Zt(),void 0===t?r:$t.f(r,t)},tr=function(e,t,r){var n=me(t);n in e?Me.f(e,n,b(0,r)):e[n]=r},rr=Array,nr=Math.max,ir=function(e,t,r){for(var n=pt(e),i=ht(t,n),a=ht(void 0===r?n:r,n),o=rr(nr(a-i,0)),s=0;i<a;i++,s++)tr(o,s,e[i]);return o.length=s,o},ar=xt.f,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sr={f:function(e){return or&&"Window"==P(e)?function(e){try{return ar(e)}catch(e){return ir(or)}}(e):ar(S(e))}},cr={f:ge},dr=c,ur=Me.f,hr=Me.f,fr=ge("toStringTag"),lr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,fr)&&hr(e,fr,{configurable:!0,value:t})},pr=x(x.bind),gr=function(e,t){return K(e),void 0===t?e:h?pr(e,t):function(){return e.apply(t,arguments)}},vr=Array.isArray||function(e){return"Array"==P(e)},br=function(){},Ir=[],mr=A("Reflect","construct"),kr=/^\s*(?:class|function)\b/,yr=x(kr.exec),xr=!kr.exec(br),wr=function(e){if(!T(e))return!1;try{return mr(br,Ir,e),!0}catch(e){return!1}},Cr=function(e){if(!T(e))return!1;switch(Gt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!yr(kr,Fe(e))}catch(e){return!0}};Cr.sham=!0;var Pr=!mr||d((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?Cr:wr,zr=ge("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return vr(e)&&(t=e.constructor,(Pr(t)&&(t===Or||vr(t.prototype))||M(t)&&null===(t=t[zr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=x([].push),jr=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,d,u,h){for(var f,l,p=ie(c),g=E(p),v=gr(d,u),b=pt(g),I=0,m=h||Er,k=t?m(c,b):r||o?m(c,0):void 0;b>I;I++)if((s||I in g)&&(l=v(f=g[I],I,p),e))if(t)k[I]=l;else if(l)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:qr(k,f)}else switch(e){case 4:return!1;case 7:qr(k,f)}return a?-1:n||i?i:k}},Sr={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},Tr=Sr.forEach,Mr=$e("hidden"),_r=rt.set,Ar=rt.getterFor("Symbol"),Ur=Object.prototype,Rr=c.Symbol,Br=Rr&&Rr.prototype,Lr=c.TypeError,Nr=c.QObject,Dr=Pe.f,Wr=Me.f,Fr=sr.f,Gr=v.f,Hr=x([].push),Vr=re("symbols"),$r=re("op-symbols"),Yr=re("wks"),Jr=!Nr||!Nr.prototype||!Nr.prototype.findChild,Kr=u&&d((function(){return 7!=er(Wr({},"a",{get:function(){return Wr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Dr(Ur,t);n&&delete Ur[t],Wr(e,t,r),n&&e!==Ur&&Wr(Ur,t,n)}:Wr,Qr=function(e,t){var r=Vr[e]=er(Br);return _r(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},Xr=function(e,t,r){e===Ur&&Xr($r,t,r),qe(e);var n=me(t);return qe(r),oe(Vr,n)?(r.enumerable?(oe(e,Mr)&&e[Mr][n]&&(e[Mr][n]=!1),r=er(r,{enumerable:b(0,!1)})):(oe(e,Mr)||Wr(e,Mr,b(1,{})),e[Mr][n]=!0),Kr(e,n,r)):Wr(e,n,r)},Zr=function(e,t){qe(e);var r=S(t),n=Ut(r).concat(nn(r));return Tr(n,(function(t){u&&!l(en,r,t)||Xr(e,t,r[t])})),e},en=function(e){var t=me(e),r=l(Gr,this,t);return!(this===Ur&&oe(Vr,t)&&!oe($r,t))&&(!(r||!oe(this,t)||!oe(Vr,t)||oe(this,Mr)&&this[Mr][t])||r)},tn=function(e,t){var r=S(e),n=me(t);if(r!==Ur||!oe(Vr,n)||oe($r,n)){var i=Dr(r,n);return!i||!oe(Vr,n)||oe(r,Mr)&&r[Mr][n]||(i.enumerable=!0),i}},rn=function(e){var t=Fr(S(e)),r=[];return Tr(t,(function(e){oe(Vr,e)||oe(Ye,e)||Hr(r,e)})),r},nn=function(e){var t=e===Ur,r=Fr(t?$r:S(e)),n=[];return Tr(r,(function(e){!oe(Vr,e)||t&&!oe(Ur,e)||Hr(n,Vr[e])})),n};F||(Br=(Rr=function(){if(U(Br,this))throw Lr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Vt(arguments[0]):void 0,t=ue(e),r=function(e){this===Ur&&l(r,$r,e),oe(this,Mr)&&oe(this[Mr],t)&&(this[Mr][t]=!1),Kr(this,t,b(1,e))};return u&&Jr&&Kr(Ur,t,{configurable:!0,set:r}),Qr(t,e)}).prototype,it(Br,"toString",(function(){return Ar(this).tag})),it(Rr,"withoutSetter",(function(e){return Qr(ue(e),e)})),v.f=en,Me.f=Xr,$t.f=Zr,Pe.f=tn,xt.f=sr.f=rn,wt.f=nn,cr.f=function(e){return Qr(ge(e),e)},u&&(Wr(Br,"description",{configurable:!0,get:function(){return Ar(this).description}}),it(Ur,"propertyIsEnumerable",en,{unsafe:!0}))),At({global:!0,constructor:!0,wrap:!0,forced:!F,sham:!F},{Symbol:Rr}),Tr(Ut(Yr),(function(e){!function(e){var t=dr.Symbol||(dr.Symbol={});oe(t,e)||ur(t,e,{value:cr.f(e)})}(e)})),At({target:"Symbol",stat:!0,forced:!F},{useSetter:function(){Jr=!0},useSimple:function(){Jr=!1}}),At({target:"Object",stat:!0,forced:!F,sham:!u},{create:function(e,t){return void 0===t?er(e):Zr(er(e),t)},defineProperty:Xr,defineProperties:Zr,getOwnPropertyDescriptor:tn}),At({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:rn}),function(){var e=A("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&it(t,n,(function(e){return l(r,this)}),{arity:1})}(),lr(Rr,"Symbol"),Ye[Mr]=!0;var an=F&&!!Symbol.for&&!!Symbol.keyFor,on=re("string-to-symbol-registry"),sn=re("symbol-to-string-registry");At({target:"Symbol",stat:!0,forced:!an},{for:function(e){var t=Vt(e);if(oe(on,t))return on[t];var r=A("Symbol")(t);return on[t]=r,sn[r]=t,r}});var cn=re("symbol-to-string-registry");At({target:"Symbol",stat:!0,forced:!an},{keyFor:function(e){if(!V(e))throw TypeError(Y(e)+" is not a symbol");if(oe(cn,e))return cn[e]}});var dn=Function.prototype,un=dn.apply,hn=dn.call,fn="object"==typeof Reflect&&Reflect.apply||(h?hn.bind(un):function(){return hn.apply(un,arguments)}),ln=x([].slice),pn=A("JSON","stringify"),gn=x(/./.exec),vn=x("".charAt),bn=x("".charCodeAt),In=x("".replace),mn=x(1..toString),kn=/[\uD800-\uDFFF]/g,yn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,wn=!F||d((function(){var e=A("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),Cn=d((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Pn=function(e,t){var r=ln(arguments),n=t;if((M(t)||void 0!==e)&&!V(e))return vr(t)||(t=function(e,t){if(T(n)&&(t=l(n,this,e,t)),!V(t))return t}),r[1]=t,fn(pn,null,r)},zn=function(e,t,r){var n=vn(r,t-1),i=vn(r,t+1);return gn(yn,e)&&!gn(xn,i)||gn(xn,e)&&!gn(yn,n)?"\\u"+mn(bn(e,0),16):e};pn&&At({target:"JSON",stat:!0,arity:3,forced:wn||Cn},{stringify:function(e,t,r){var n=ln(arguments),i=fn(wn?Pn:pn,null,n);return Cn&&"string"==typeof i?In(i,kn,zn):i}});var On=!F||d((function(){wt.f(1)}));At({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ie(e)):[]}});var En=ge("species"),qn=function(e){return W>=51||!d((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},jn=Sr.filter,Sn=qn("filter");At({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return jn(this,e,arguments.length>1?arguments[1]:void 0)}});var Tn=Nt?{}.toString:function(){return"[object "+Gt(this)+"]"};Nt||it(Object.prototype,"toString",Tn,{unsafe:!0});var Mn=Pe.f,_n=d((function(){Mn(1)}));At({target:"Object",stat:!0,forced:!u||_n,sham:!u},{getOwnPropertyDescriptor:function(e,t){return Mn(S(e),t)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Un=xe("span").classList,Rn=Un&&Un.constructor&&Un.constructor.prototype,Bn=Rn===Object.prototype?void 0:Rn,Ln=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){return 1},1)}))},Nn=Sr.forEach,Dn=Ln("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Wn=function(e){if(e&&e.forEach!==Dn)try{_e(e,"forEach",Dn)}catch(t){e.forEach=Dn}};for(var Fn in An)An[Fn]&&Wn(c[Fn]&&c[Fn].prototype);Wn(Bn),At({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Pe.f,a=Pt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&tr(o,t,r);return o}});var Gn=$t.f;At({target:"Object",stat:!0,forced:Object.defineProperties!==Gn,sham:!u},{defineProperties:Gn});var Hn=Me.f;At({target:"Object",stat:!0,forced:Object.defineProperty!==Hn,sham:!u},{defineProperty:Hn});var Vn,$n=ge("match"),Yn=TypeError,Jn=function(e){if(function(e){var t;return M(e)&&(void 0!==(t=e[$n])?!!t:"RegExp"==P(e))}(e))throw Yn("The method doesn't accept regular expressions");return e},Kn=ge("match"),Qn=Pe.f,Xn=x("".startsWith),Zn=x("".slice),ei=Math.min,ti=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ri=!(ti||(Vn=Qn(String.prototype,"startsWith"),!Vn||Vn.writable));At({target:"String",proto:!0,forced:!ri&&!ti},{startsWith:function(e){var t=Vt(j(this));Jn(e);var r=lt(ei(arguments.length>1?arguments[1]:void 0,t.length)),n=Vt(e);return Xn?Xn(t,n,r):Zn(t,r,r+n.length)===n}});var ni=function(){var e=qe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ii=RegExp.prototype,ai=Be.PROPER,oi=RegExp.prototype.toString,si=d((function(){return"/a/b"!=oi.call({source:"a",flags:"b"})})),ci=ai&&"toString"!=oi.name;function di(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function ui(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){di(a,n,i,o,s,"next",e)}function s(e){di(a,n,i,o,s,"throw",e)}o(void 0)}))}}function hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function li(e,t,r){return t&&fi(e.prototype,t),r&&fi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(si||ci)&&it(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Vt(e.source)+"/"+Vt(function(e){var t=e.flags;return void 0!==t||"flags"in ii||oe(e,"flags")||!U(ii,e)?t:l(ni,e)}(e))}),{unsafe:!0});var gi=Object.prototype,vi=gi.hasOwnProperty,bi="function"==typeof Symbol?Symbol:{},Ii=bi.iterator||"@@iterator",mi=bi.asyncIterator||"@@asyncIterator",ki=bi.toStringTag||"@@toStringTag";function yi(e,t,r,n){var i=t&&t.prototype instanceof Ci?t:Ci,a=Object.create(i.prototype),o=new Ri(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return Li()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=_i(o,r);if(s){if(s===wi)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=xi(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===wi)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function xi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var wi={};function Ci(){}function Pi(){}function zi(){}var Oi={};Oi[Ii]=function(){return this};var Ei=Object.getPrototypeOf,qi=Ei&&Ei(Ei(Bi([])));qi&&qi!==gi&&vi.call(qi,Ii)&&(Oi=qi);var ji=zi.prototype=Ci.prototype=Object.create(Oi);function Si(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Ti(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Pi||"GeneratorFunction"===(t.displayName||t.name))}function Mi(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=xi(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&vi.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function _i(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_i(e,t),"throw"===t.method))return wi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return wi}var n=xi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,wi;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,wi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,wi)}function Ai(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Ui(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ri(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ai,this),this.reset(!0)}function Bi(e){if(e){var t=e[Ii];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(vi.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Li}}function Li(){return{value:void 0,done:!0}}Pi.prototype=ji.constructor=zi,zi.constructor=Pi,zi[ki]=Pi.displayName="GeneratorFunction",Si(Mi.prototype),Mi.prototype[mi]=function(){return this},Si(ji),ji[ki]="Generator",ji[Ii]=function(){return this},ji.toString=function(){return"[object Generator]"},Ri.prototype={constructor:Ri,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ui),!e)for(var t in this)"t"===t.charAt(0)&&vi.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=vi.call(i,"catchLoc"),s=vi.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&vi.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,wi):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),wi},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Ui(r),wi}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;Ui(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Bi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),wi}};var Ni={wrap:yi,isGeneratorFunction:Ti,AsyncIterator:Mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,zi):(e.__proto__=zi,ki in e||(e[ki]="GeneratorFunction")),e.prototype=Object.create(ji),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Mi(yi(e,t,r,n),i);return Ti(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Bi},Di=Me.f,Wi=ge("unscopables"),Fi=Array.prototype;null==Fi[Wi]&&Di(Fi,Wi,{configurable:!0,value:er(null)});var Gi,Hi,Vi,$i=function(e){Fi[Wi][e]=!0},Yi={},Ji=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ki=$e("IE_PROTO"),Qi=Object,Xi=Qi.prototype,Zi=Ji?Qi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,Ki))return t[Ki];var r=t.constructor;return T(r)&&t instanceof r?r.prototype:t instanceof Qi?Xi:null},ea=ge("iterator"),ta=!1;[].keys&&("next"in(Vi=[].keys())?(Hi=Zi(Zi(Vi)))!==Object.prototype&&(Gi=Hi):ta=!0),(null==Gi||d((function(){var e={};return Gi[ea].call(e)!==e})))&&(Gi={}),T(Gi[ea])||it(Gi,ea,(function(){return this}));var ra={IteratorPrototype:Gi,BUGGY_SAFARI_ITERATORS:ta},na=ra.IteratorPrototype,ia=function(){return this},aa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=er(na,{next:b(+!n,r)}),lr(e,i,!1),Yi[i]=ia,e},oa=String,sa=TypeError,ca=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return qe(r),function(e){if("object"==typeof e||T(e))return e;throw sa("Can't set "+oa(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),da=Be.PROPER,ua=Be.CONFIGURABLE,ha=ra.IteratorPrototype,fa=ra.BUGGY_SAFARI_ITERATORS,la=ge("iterator"),pa=function(){return this},ga=function(e,t,r,n,i,a,o){aa(r,t,n);var s,c,d,u=function(e){if(e===i&&v)return v;if(!fa&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,p=e.prototype,g=p[la]||p["@@iterator"]||i&&p[i],v=!fa&&g||u(i),b="Array"==t&&p.entries||g;if(b&&(s=Zi(b.call(new e)))!==Object.prototype&&s.next&&(Zi(s)!==ha&&(ca?ca(s,ha):T(s[la])||it(s,la,pa)),lr(s,h,!0)),da&&"values"==i&&g&&"values"!==g.name&&(ua?_e(p,"name","values"):(f=!0,v=function(){return l(g,this)})),i)if(c={values:u("values"),keys:a?v:u("keys"),entries:u("entries")},o)for(d in c)(fa||f||!(d in p))&&it(p,d,c[d]);else At({target:t,proto:!0,forced:fa||f},c);return p[la]!==v&&it(p,la,v,{name:i}),Yi[t]=v,c},va=Me.f,ba=rt.set,Ia=rt.getterFor("Array Iterator"),ma=ga(Array,"Array",(function(e,t){ba(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=Ia(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),ka=Yi.Arguments=Yi.Array;if($i("keys"),$i("values"),$i("entries"),u&&"values"!==ka.name)try{va(ka,"name",{value:"values"})}catch(e){}var ya=x("".charAt),xa=x("".charCodeAt),wa=x("".slice),Ca=function(e){return function(t,r){var n,i,a=Vt(j(t)),o=ct(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=xa(a,o))<55296||n>56319||o+1===s||(i=xa(a,o+1))<56320||i>57343?e?ya(a,o):n:e?wa(a,o,o+2):i-56320+(n-55296<<10)+65536}},Pa={codeAt:Ca(!1),charAt:Ca(!0)},za=Pa.charAt,Oa=rt.set,Ea=rt.getterFor("String Iterator");ga(String,"String",(function(e){Oa(this,{type:"String Iterator",string:Vt(e),index:0})}),(function(){var e,t=Ea(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=za(r,n),t.index+=e.length,{value:e,done:!1})}));var qa=ge("iterator"),ja=ge("toStringTag"),Sa=ma.values,Ta=function(e,t){if(e){if(e[qa]!==Sa)try{_e(e,qa,Sa)}catch(t){e[qa]=Sa}if(e[ja]||_e(e,ja,t),An[t])for(var r in ma)if(e[r]!==ma[r])try{_e(e,r,ma[r])}catch(t){e[r]=ma[r]}}};for(var Ma in An)Ta(c[Ma]&&c[Ma].prototype,Ma);Ta(Bn,"DOMTokenList");var _a=ge("iterator"),Aa=!d((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[_a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ua=function(e,t,r){for(var n in t)it(e,n,t[n],r);return e},Ra=TypeError,Ba=function(e,t){if(U(t,e))return e;throw Ra("Incorrect invocation")},La=ge("iterator"),Na=function(e){if(null!=e)return Q(e,La)||Q(e,"@@iterator")||Yi[Gt(e)]},Da=TypeError,Wa=function(e,t){var r=arguments.length<2?Na(e):t;if(K(r))return qe(l(r,e));throw Da(Y(e)+" is not iterable")},Fa=TypeError,Ga=function(e,t){if(e<t)throw Fa("Not enough arguments");return e},Ha=Math.floor,Va=function(e,t){var r=e.length,n=Ha(r/2);return r<8?$a(e,t):Ya(e,Va(ir(e,0,n),t),Va(ir(e,n),t),t)},$a=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ya=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Ja=Va,Ka=ge("iterator"),Qa=rt.set,Xa=rt.getterFor("URLSearchParams"),Za=rt.getterFor("URLSearchParamsIterator"),eo=Object.getOwnPropertyDescriptor,to=function(e){if(!u)return c[e];var t=eo(c,e);return t&&t.value},ro=to("fetch"),no=to("Request"),io=to("Headers"),ao=no&&no.prototype,oo=io&&io.prototype,so=c.RegExp,co=c.TypeError,uo=c.decodeURIComponent,ho=c.encodeURIComponent,fo=x("".charAt),lo=x([].join),po=x([].push),go=x("".replace),vo=x([].shift),bo=x([].splice),Io=x("".split),mo=x("".slice),ko=/\+/g,yo=Array(4),xo=function(e){return yo[e-1]||(yo[e-1]=so("((?:%[\\da-f]{2}){"+e+"})","gi"))},wo=function(e){try{return uo(e)}catch(t){return e}},Co=function(e){var t=go(e,ko," "),r=4;try{return uo(t)}catch(e){for(;r;)t=go(t,xo(r--),wo);return t}},Po=/[!'()~]|%20/g,zo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oo=function(e){return zo[e]},Eo=function(e){return go(ho(e),Po,Oo)},qo=aa((function(e,t){Qa(this,{type:"URLSearchParamsIterator",iterator:Wa(Xa(e).entries),kind:t})}),"Iterator",(function(){var e=Za(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),jo=function(e){this.entries=[],this.url=null,void 0!==e&&(M(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===fo(e,0)?mo(e,1):e:Vt(e)))};jo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Na(e);if(c)for(r=(t=Wa(e,c)).next;!(n=l(r,t)).done;){if(a=(i=Wa(qe(n.value))).next,(o=l(a,i)).done||(s=l(a,i)).done||!l(a,i).done)throw co("Expected sequence with length 2");po(this.entries,{key:Vt(o.value),value:Vt(s.value)})}else for(var d in e)oe(e,d)&&po(this.entries,{key:d,value:Vt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=Io(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Io(t,"="),po(this.entries,{key:Co(vo(r)),value:Co(lo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Eo(e.key)+"="+Eo(e.value));return lo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var So=function(){Ba(this,To);var e=arguments.length>0?arguments[0]:void 0;Qa(this,new jo(e))},To=So.prototype;if(Ua(To,{append:function(e,t){Ga(arguments.length,2);var r=Xa(this);po(r.entries,{key:Vt(e),value:Vt(t)}),r.updateURL()},delete:function(e){Ga(arguments.length,1);for(var t=Xa(this),r=t.entries,n=Vt(e),i=0;i<r.length;)r[i].key===n?bo(r,i,1):i++;t.updateURL()},get:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&po(n,t[i].value);return n},has:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ga(arguments.length,1);for(var r,n=Xa(this),i=n.entries,a=!1,o=Vt(e),s=Vt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?bo(i,c--,1):(a=!0,r.value=s));a||po(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Xa(this);Ja(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Xa(this).entries,n=gr(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new qo(this,"keys")},values:function(){return new qo(this,"values")},entries:function(){return new qo(this,"entries")}},{enumerable:!0}),it(To,Ka,To.entries,{name:"entries"}),it(To,"toString",(function(){return Xa(this).serialize()}),{enumerable:!0}),lr(So,"URLSearchParams"),At({global:!0,constructor:!0,forced:!Aa},{URLSearchParams:So}),!Aa&&T(io)){var Mo=x(oo.has),_o=x(oo.set),Ao=function(e){if(M(e)){var t,r=e.body;if("URLSearchParams"===Gt(r))return t=e.headers?new io(e.headers):new io,Mo(t,"content-type")||_o(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),er(e,{body:b(0,Vt(r)),headers:b(0,t)})}return e};if(T(ro)&&At({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ro(e,arguments.length>1?Ao(arguments[1]):{})}}),T(no)){var Uo=function(e){return Ba(this,ao),new no(e,arguments.length>1?Ao(arguments[1]):{})};ao.constructor=Uo,Uo.prototype=ao,At({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Uo})}}var Ro={URLSearchParams:So,getState:Xa};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=li((function e(t){if(hi(this,e),pi(this,"baseUri",void 0),pi(this,"proxy",void 0),pi(this,"headers",void 0),pi(this,"parameters",void 0),pi(this,"fetchOptions",void 0),pi(this,"transformRequest",void 0),pi(this,"throwOnBadResponse",void 0),this.headers=Lo({},t.headers),this.parameters=Lo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Lo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Do(e){return(Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pi(No,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),At({global:!0},{globalThis:c});var Wo="object"===("undefined"==typeof window?"undefined":Do(window))&&"object"===Do(window.document),Fo="object"===("undefined"==typeof process?"undefined":Do(process))&&"object"===Do(process.versions)&&"string"==typeof process.versions.node,Go=Wo?window:globalThis,Ho="function"==typeof Go.fetch,Vo=function(){if(Fo)return require("node-fetch").default;if(!Ho)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Go.fetch}(),$o=Function,Yo=x([].concat),Jo=x([].join),Ko={},Qo=function(e,t,r){if(!oe(Ko,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ko[t]=$o("C,a","return new C("+Jo(n,",")+")")}return Ko[t](e,r)},Xo=h?$o.bind:function(e){var t=K(this),r=t.prototype,n=ln(arguments,1),i=function(){var r=Yo(n,ln(arguments));return this instanceof i?Qo(t,r.length,r):t.apply(e,r)};return M(r)&&(i.prototype=r),i},Zo=TypeError,es=function(e){if(Pr(e))return e;throw Zo(Y(e)+" is not a constructor")},ts=A("Reflect","construct"),rs=Object.prototype,ns=[].push,is=d((function(){function e(){}return!(ts((function(){}),[],e)instanceof e)})),as=!d((function(){ts((function(){}))})),os=is||as;At({target:"Reflect",stat:!0,forced:os,sham:os},{construct:function(e,t){es(e),qe(t);var r=arguments.length<3?e:es(arguments[2]);if(as&&!is)return ts(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return fn(ns,n,t),new(fn(Xo,e,n))}var i=r.prototype,a=er(M(i)?i:rs),o=fn(e,a,t);return M(o)?o:a}});var ss=TypeError,cs=function(e){if(e>9007199254740991)throw ss("Maximum allowed index exceeded");return e},ds=ge("isConcatSpreadable"),us=W>=51||!d((function(){var e=[];return e[ds]=!1,e.concat()[0]!==e})),hs=qn("concat"),fs=function(e){if(!M(e))return!1;var t=e[ds];return void 0!==t?!!t:vr(e)};function ls(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ps(e,t){return(ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ps(e,t)}function vs(e,t){if(t&&("object"===Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ls(e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Is(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ms(e,t,r){return(ms=Is()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&ps(i,r.prototype),i}).apply(null,arguments)}function ks(e){var t="function"==typeof Map?new Map:void 0;return(ks=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ms(e,arguments,bs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ps(n,e)})(e)}function ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vs(this,r)}}At({target:"Array",proto:!0,arity:1,forced:!us||!hs},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Er(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(fs(a=-1===t?o:arguments[t]))for(i=pt(a),cs(c+i),r=0;r<i;r++,c++)r in a&&tr(s,c,a[r]);else cs(c+1),tr(s,c++,a);return s.length=c,s}});var xs=function(e){gs(r,ks(Error));var t=ys(r);function r(e){var n;return hi(this,r),pi(ls(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return li(r)}();function ws(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ws(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ws(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ps,zs,Os=function(){var e=ui(Ni.mark((function e(t,r,n,i){var a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Cs(Cs({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=Cs(Cs({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Vo(t,s);case 4:if(c=e.sent,!i){e.next=7;break}return e.abrupt("return",c);case 7:if(null==n||!n.throwOnBadResponse||c.ok||304===c.status){e.next=11;break}throw new xs(c);case 11:return e.next=13,c.text();case 13:return d=e.sent,e.abrupt("return",d?JSON.parse(d):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),Es=c.RegExp,qs=d((function(){var e=Es("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),js=qs||d((function(){return!Es("a","y").sticky})),Ss={BROKEN_CARET:qs||d((function(){var e=Es("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:js,UNSUPPORTED_Y:qs},Ts=c.RegExp,Ms=d((function(){var e=Ts(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_s=c.RegExp,As=d((function(){var e=_s("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Us=rt.get,Rs=re("native-string-replace",String.prototype.replace),Bs=RegExp.prototype.exec,Ls=Bs,Ns=x("".charAt),Ds=x("".indexOf),Ws=x("".replace),Fs=x("".slice),Gs=(zs=/b*/g,l(Bs,Ps=/a/,"a"),l(Bs,zs,"a"),0!==Ps.lastIndex||0!==zs.lastIndex),Hs=Ss.BROKEN_CARET,Vs=void 0!==/()??/.exec("")[1];(Gs||Vs||Hs||Ms||As)&&(Ls=function(e){var t,r,n,i,a,o,s,c=this,d=Us(c),u=Vt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=l(Ls,h,u),c.lastIndex=h.lastIndex,t;var f=d.groups,p=Hs&&c.sticky,g=l(ni,c),v=c.source,b=0,I=u;if(p&&(g=Ws(g,"y",""),-1===Ds(g,"g")&&(g+="g"),I=Fs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ns(u,c.lastIndex-1))&&(v="(?: "+v+")",I=" "+I,b++),r=new RegExp("^(?:"+v+")",g)),Vs&&(r=new RegExp("^"+v+"$(?!\\s)",g)),Gs&&(n=c.lastIndex),i=l(Bs,p?r:c,I),p?i?(i.input=Fs(i.input,b),i[0]=Fs(i[0],b),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Gs&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Vs&&i&&i.length>1&&l(Rs,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&f)for(i.groups=o=er(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var $s=Ls;At({target:"RegExp",proto:!0,forced:/./.exec!==$s},{exec:$s});var Ys=ge("species"),Js=RegExp.prototype,Ks=function(e,t,r,n){var i=ge(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ys]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=x(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=x(e),c=t.exec;return c===$s||c===Js.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));it(String.prototype,e,c[0]),it(Js,i,c[1])}n&&_e(Js[i],"sham",!0)},Qs=Pa.charAt,Xs=function(e,t,r){return t+(r?Qs(e,t).length:1)},Zs=Math.floor,ec=x("".charAt),tc=x("".replace),rc=x("".slice),nc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ic=/\$([$&'`]|\d{1,2})/g,ac=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=ic;return void 0!==i&&(i=ie(i),c=nc),tc(a,c,(function(a,c){var d;switch(ec(c,0)){case"$":return"$";case"&":return e;case"`":return rc(t,0,r);case"'":return rc(t,o);case"<":d=i[rc(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=Zs(u/10);return 0===h?a:h<=s?void 0===n[h-1]?ec(c,1):n[h-1]+ec(c,1):a}d=n[u-1]}return void 0===d?"":d}))},oc=TypeError,sc=function(e,t){var r=e.exec;if(T(r)){var n=l(r,e,t);return null!==n&&qe(n),n}if("RegExp"===P(e))return l($s,e,t);throw oc("RegExp#exec called on incompatible receiver")},cc=ge("replace"),dc=Math.max,uc=Math.min,hc=x([].concat),fc=x([].push),lc=x("".indexOf),pc=x("".slice),gc="$0"==="a".replace(/./,"$0"),vc=!!/./[cc]&&""===/./[cc]("a","$0");Ks("replace",(function(e,t,r){var n=vc?"$":"$0";return[function(e,r){var n=j(this),i=null==e?void 0:Q(e,cc);return i?l(i,e,n,r):l(t,Vt(n),e,r)},function(e,i){var a=qe(this),o=Vt(e);if("string"==typeof i&&-1===lc(i,n)&&-1===lc(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=T(i);c||(i=Vt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var f=sc(a,o);if(null===f)break;if(fc(h,f),!d)break;""===Vt(f[0])&&(a.lastIndex=Xs(o,lt(a.lastIndex),u))}for(var l,p="",g=0,v=0;v<h.length;v++){for(var b=Vt((f=h[v])[0]),I=dc(uc(ct(f.index),o.length),0),m=[],k=1;k<f.length;k++)fc(m,void 0===(l=f[k])?l:String(l));var y=f.groups;if(c){var x=hc([b],m,I,o);void 0!==y&&fc(x,y);var w=Vt(fn(i,void 0,x))}else w=ac(b,o,I,m,y,i);I>=g&&(p+=pc(o,g,I)+w,g=I+b.length)}return p+pc(o,g)}]}),!!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!gc||vc);var bc,Ic=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),Me.f(e,t,r)},mc=Object.assign,kc=Object.defineProperty,yc=x([].concat),xc=!mc||d((function(){if(u&&1!==mc({b:1},mc(kc({},"a",{enumerable:!0,get:function(){kc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=mc({},e)[r]||"abcdefghijklmnopqrst"!=Ut(mc({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=wt.f,o=v.f;n>i;)for(var s,c=E(arguments[i++]),d=a?yc(Ut(c),a(c)):Ut(c),h=d.length,f=0;h>f;)s=d[f++],u&&!l(o,c,s)||(r[s]=c[s]);return r}:mc,wc=function(e,t,r){var n,i;qe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=l(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return qe(n),r},Cc=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){wc(e,"throw",t)}},Pc=ge("iterator"),zc=Array.prototype,Oc=function(e){return void 0!==e&&(Yi.Array===e||zc[Pc]===e)},Ec=Array,qc=function(e){var t=ie(e),r=Pr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=gr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,f=Na(t),p=0;if(!f||this===Ec&&Oc(f))for(o=pt(t),s=r?new this(o):Ec(o);o>p;p++)h=a?i(t[p],p):t[p],tr(s,p,h);else for(u=(d=Wa(t,f)).next,s=r?new this:[];!(c=l(u,d)).done;p++)h=a?Cc(d,i,[c.value,p],!0):c.value,tr(s,p,h);return s.length=p,s},jc=/[^\0-\u007E]/,Sc=/[.\u3002\uFF0E\uFF61]/g,Tc="Overflow: input needs wider integers to process",Mc=RangeError,_c=x(Sc.exec),Ac=Math.floor,Uc=String.fromCharCode,Rc=x("".charCodeAt),Bc=x([].join),Lc=x([].push),Nc=x("".replace),Dc=x("".split),Wc=x("".toLowerCase),Fc=function(e){return e+22+75*(e<26)},Gc=function(e,t,r){var n=0;for(e=r?Ac(e/700):e>>1,e+=Ac(e/t);e>455;)e=Ac(e/35),n+=36;return Ac(n+36*e/(e+38))},Hc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Rc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Rc(e,r++);56320==(64512&a)?Lc(t,((1023&i)<<10)+(1023&a)+65536):(Lc(t,i),r--)}else Lc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Lc(n,Uc(r));var c=n.length,d=c;for(c&&Lc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=d+1;if(u-a>Ac((2147483647-o)/h))throw Mc(Tc);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Mc(Tc);if(r==a){for(var f=o,l=36;;){var p=l<=s?1:l>=s+26?26:l-s;if(f<p)break;var g=f-p,v=36-p;Lc(n,Uc(Fc(p+g%v))),f=Ac(g/v),l+=36}Lc(n,Uc(Fc(f))),s=Gc(o,h,d==c),o=0,d++}}o++,a++}return Bc(n,"")},Vc=Pa.codeAt,$c=rt.set,Yc=rt.getterFor("URL"),Jc=Ro.URLSearchParams,Kc=Ro.getState,Qc=c.URL,Xc=c.TypeError,Zc=c.parseInt,ed=Math.floor,td=Math.pow,rd=x("".charAt),nd=x(/./.exec),id=x([].join),ad=x(1..toString),od=x([].pop),sd=x([].push),cd=x("".replace),dd=x([].shift),ud=x("".split),hd=x("".slice),fd=x("".toLowerCase),ld=x([].unshift),pd=/[a-z]/i,gd=/[\d+-.a-z]/i,vd=/\d/,bd=/^0x/i,Id=/^[0-7]+$/,md=/^\d+$/,kd=/^[\da-f]+$/i,yd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xd=/[\0\t\n\r #/:<>?@[\\\]^|]/,wd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Cd=/[\t\n\r]/g,Pd=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)ld(t,e%256),e=ed(e/256);return id(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=ad(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},zd={},Od=xc({},zd,{" ":1,'"':1,"<":1,">":1,"`":1}),Ed=xc({},Od,{"#":1,"?":1,"{":1,"}":1}),qd=xc({},Ed,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),jd=function(e,t){var r=Vc(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},Sd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Td=function(e,t){var r;return 2==e.length&&nd(pd,rd(e,0))&&(":"==(r=rd(e,1))||!t&&"|"==r)},Md=function(e){var t;return e.length>1&&Td(hd(e,0,2))&&(2==e.length||"/"===(t=rd(e,2))||"\\"===t||"?"===t||"#"===t)},_d=function(e){return"."===e||"%2e"===fd(e)},Ad={},Ud={},Rd={},Bd={},Ld={},Nd={},Dd={},Wd={},Fd={},Gd={},Hd={},Vd={},$d={},Yd={},Jd={},Kd={},Qd={},Xd={},Zd={},eu={},tu={},ru=function(e,t,r){var n,i,a,o=Vt(e);if(t){if(i=this.parse(o))throw Xc(i);this.searchParams=null}else{if(void 0!==r&&(n=new ru(r,!0)),i=this.parse(o,null,n))throw Xc(i);(a=Kc(new Jc)).bindURL(this),this.searchParams=a}};ru.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Ad,u=0,h="",f=!1,l=!1,p=!1;for(e=Vt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=cd(e,wd,"")),e=cd(e,Cd,""),n=qc(e);u<=n.length;){switch(i=n[u],d){case Ad:if(!i||!nd(pd,i)){if(t)return"Invalid scheme";d=Rd;continue}h+=fd(i),d=Ud;break;case Ud:if(i&&(nd(gd,i)||"+"==i||"-"==i||"."==i))h+=fd(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",d=Rd,u=0;continue}if(t&&(c.isSpecial()!=oe(Sd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Sd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Yd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Bd:c.isSpecial()?d=Wd:"/"==n[u+1]?(d=Ld,u++):(c.cannotBeABaseURL=!0,sd(c.path,""),d=Zd)}break;case Rd:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=ir(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=tu;break}d="file"==r.scheme?Yd:Nd;continue;case Bd:if("/"!=i||"/"!=n[u+1]){d=Nd;continue}d=Fd,u++;break;case Ld:if("/"==i){d=Gd;break}d=Xd;continue;case Nd:if(c.scheme=r.scheme,i==bc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Dd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query="",d=eu;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.path.length--,d=Xd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query=r.query,c.fragment="",d=tu}break;case Dd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Xd;continue}d=Gd}else d=Fd;break;case Wd:if(d=Fd,"/"!=i||"/"!=rd(h,u+1))continue;u++;break;case Fd:if("/"!=i&&"\\"!=i){d=Gd;continue}break;case Gd:if("@"==i){f&&(h="%40"+h),f=!0,a=qc(h);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var b=jd(v,qd);p?c.password+=b:c.username+=b}else p=!0}h=""}else if(i==bc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=qc(h).length+1,h="",d=Hd}else h+=i;break;case Hd:case Vd:if(t&&"file"==c.scheme){d=Kd;continue}if(":"!=i||l){if(i==bc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Qd,t)return;continue}"["==i?l=!0:"]"==i&&(l=!1),h+=i}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=$d,t==Vd)return}break;case $d:if(!nd(vd,i)){if(i==bc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var I=Zc(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Sd[c.scheme]?null:I,h=""}if(t)return;d=Qd;continue}return"Invalid port"}h+=i;break;case Yd:if(c.scheme="file","/"==i||"\\"==i)d=Jd;else{if(!r||"file"!=r.scheme){d=Xd;continue}if(i==bc)c.host=r.host,c.path=ir(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=ir(r.path),c.query="",d=eu;else{if("#"!=i){Md(id(ir(n,u),""))||(c.host=r.host,c.path=ir(r.path),c.shortenPath()),d=Xd;continue}c.host=r.host,c.path=ir(r.path),c.query=r.query,c.fragment="",d=tu}}break;case Jd:if("/"==i||"\\"==i){d=Kd;break}r&&"file"==r.scheme&&!Md(id(ir(n,u),""))&&(Td(r.path[0],!0)?sd(c.path,r.path[0]):c.host=r.host),d=Xd;continue;case Kd:if(i==bc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Td(h))d=Xd;else if(""==h){if(c.host="",t)return;d=Qd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Qd}continue}h+=i;break;case Qd:if(c.isSpecial()){if(d=Xd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=bc&&(d=Xd,"/"!=i))continue}else c.fragment="",d=tu;else c.query="",d=eu;break;case Xd:if(i==bc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=fd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||sd(c.path,"")):_d(h)?"/"==i||"\\"==i&&c.isSpecial()||sd(c.path,""):("file"==c.scheme&&!c.path.length&&Td(h)&&(c.host&&(c.host=""),h=rd(h,0)+":"),sd(c.path,h)),h="","file"==c.scheme&&(i==bc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)dd(c.path);"?"==i?(c.query="",d=eu):"#"==i&&(c.fragment="",d=tu)}else h+=jd(i,Ed);break;case Zd:"?"==i?(c.query="",d=eu):"#"==i?(c.fragment="",d=tu):i!=bc&&(c.path[0]+=jd(i,zd));break;case eu:t||"#"!=i?i!=bc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":jd(i,zd)):(c.fragment="",d=tu);break;case tu:i!=bc&&(c.fragment+=jd(i,Od))}u++}},parseHost:function(e){var t,r,n;if("["==rd(e,0)){if("]"!=rd(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return rd(e,h)};if(":"==f()){if(":"!=rd(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&nd(kd,f());)t=16*t+Zc(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!nd(vd,f()))return;for(;nd(vd,f());){if(a=Zc(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(hd(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Dc(Nc(Wc(e),Sc,"."),".");for(t=0;t<i.length;t++)r=i[t],Lc(n,_c(jc,r)?"xn--"+Hc(r):r);return Bc(n,".")}(e),nd(yd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=ud(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==rd(i,0)&&(a=nd(bd,i)?16:8,i=hd(i,8==a?1:2)),""===i)o=0;else{if(!nd(10==a?md:8==a?Id:kd,i))return e;o=Zc(i,a)}sd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=td(256,5-t))return null}else if(o>255)return null;for(s=od(r),n=0;n<r.length;n++)s+=r[n]*td(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(nd(xd,e))return"Invalid host";for(t="",r=qc(e),n=0;n<r.length;n++)t+=jd(r[n],zd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(Sd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Td(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=Pd(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+id(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Xc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nu(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Pd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Vt(e)+":",Ad)},getUsername:function(){return this.username},setUsername:function(e){var t=qc(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=jd(t[r],qd)}},getPassword:function(){return this.password},setPassword:function(e){var t=qc(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=jd(t[r],qd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Pd(e):Pd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Hd)},getHostname:function(){var e=this.host;return null===e?"":Pd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vd)},getPort:function(){var e=this.port;return null===e?"":Vt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Vt(e))?this.port=null:this.parse(e,$d))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+id(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Qd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Vt(e))?this.query=null:("?"==rd(e,0)&&(e=hd(e,1)),this.query="",this.parse(e,eu)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Vt(e))?("#"==rd(e,0)&&(e=hd(e,1)),this.fragment="",this.parse(e,tu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nu=function(e){var t=Ba(this,iu),r=Ga(arguments.length,1)>1?arguments[1]:void 0,n=$c(t,new ru(e,!1,r));u||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},iu=nu.prototype,au=function(e,t){return{get:function(){return Yc(this)[e]()},set:t&&function(e){return Yc(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&(Ic(iu,"href",au("serialize","setHref")),Ic(iu,"origin",au("getOrigin")),Ic(iu,"protocol",au("getProtocol","setProtocol")),Ic(iu,"username",au("getUsername","setUsername")),Ic(iu,"password",au("getPassword","setPassword")),Ic(iu,"host",au("getHost","setHost")),Ic(iu,"hostname",au("getHostname","setHostname")),Ic(iu,"port",au("getPort","setPort")),Ic(iu,"pathname",au("getPathname","setPathname")),Ic(iu,"search",au("getSearch","setSearch")),Ic(iu,"searchParams",au("getSearchParams")),Ic(iu,"hash",au("getHash","setHash"))),it(iu,"toJSON",(function(){return Yc(this).serialize()}),{enumerable:!0}),it(iu,"toString",(function(){return Yc(this).serialize()}),{enumerable:!0}),Qc){var ou=Qc.createObjectURL,su=Qc.revokeObjectURL;ou&&it(nu,"createObjectURL",gr(ou,Qc)),su&&it(nu,"revokeObjectURL",gr(su,Qc))}function cu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vs(this,r)}}lr(nu,"URL"),At({global:!0,constructor:!0,forced:!Aa,sham:!u},{URL:nu});var du=function(e){gs(r,ks(URL));var t=cu(r);function r(e,n,i){var a;return hi(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return li(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(),uu="commerce-sdk-isomorphic@2.0.0";function hu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var lu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=fu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q,j,S,T,M,_,A,U;return li(e,[{key:"createBasket",value:(U=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=30,Os(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 30:return d=e.sent,e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(_=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(M=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(O=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(x=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=48,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(b=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=48,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=49,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 49:return d=e.sent,e.abrupt("return",d);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new du("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var vu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return li(e,[{key:"getShopperContext",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new du("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new du("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new du("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 29:if(d=e.sent,!r){e.next=32;break}return e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new du("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var mu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Iu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q;return li(e,[{key:"registerCustomer",value:(q=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:if(d=e.sent,!r){e.next=31;break}return e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(P=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getCustomer",value:(C=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(b=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=43,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 43:return d=e.sent,e.abrupt("return",d);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 55:if(d=e.sent,!r){e.next=58;break}return e.abrupt("return",d);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new du("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new du("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new du("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new du("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var xu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return li(e,[{key:"retrieveResults",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new du("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new du("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function wu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Pu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return li(e,[{key:"getPages",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new du("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=42,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 42:return d=e.sent,e.abrupt("return",d);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new du("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function zu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var Eu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return li(e,[{key:"getGiftCertificate",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new du("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ju(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Su=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=ju({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b;return li(e,[{key:"authenticateCustomer",value:(b=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"logoutCustomer",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=61,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 61:if(d=e.sent,!r){e.next=64;break}return e.abrupt("return",d);case 64:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=82,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 82:if(d=e.sent,!r){e.next=85;break}return e.abrupt("return",d);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=20,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 20:return d=e.sent,e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new du("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var _u=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c;return li(e,[{key:"createOrder",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new du("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Au(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(_u,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Ru=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Uu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return li(e,[{key:"getProducts",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new du("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=44,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new du("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=44,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new du("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new du("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Ru,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Nu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return li(e,[{key:"getPromotions",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new du("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new du("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(Nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Du=TypeError,Wu=function(e,t){if(!delete e[t])throw Du("Cannot delete property "+Y(t)+" of "+Y(e))},Fu=R.match(/firefox\/(\d+)/i),Gu=!!Fu&&+Fu[1],Hu=/MSIE|Trident/.test(R),Vu=R.match(/AppleWebKit\/(\d+)\./),$u=!!Vu&&+Vu[1],Yu=[],Ju=x(Yu.sort),Ku=x(Yu.push),Qu=d((function(){Yu.sort(void 0)})),Xu=d((function(){Yu.sort(null)})),Zu=Ln("sort"),eh=!d((function(){if(W)return W<70;if(!(Gu&&Gu>3)){if(Hu)return!0;if($u)return $u<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Yu.push({k:t+n,v:r})}for(Yu.sort((function(e,t){return t.v-e.v})),n=0;n<Yu.length;n++)t=Yu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function th(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?th(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):th(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}At({target:"Array",proto:!0,forced:Qu||!Xu||!Zu||!eh},{sort:function(e){void 0!==e&&K(e);var t=ie(this);if(eh)return void 0===e?Ju(t):Ju(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Ku(i,t[n]);for(Ja(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Vt(t)>Vt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Wu(t,n++);return t}});var nh=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=rh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return li(e,[{key:"productSearch",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new du("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=rh(rh({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new du("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=rh(rh({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ah(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ih(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(nh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var oh=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=ah({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return li(e,[{key:"getUrlMapping",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new du("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ah(ah({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ch(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sh(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(oh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var dh=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=ch({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return li(e,[{key:"searchStores",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new du("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ch(ch({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,c,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new du("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ch(ch({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(dh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}");var uh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Ks("search",(function(e,t,r){return[function(t){var r=j(this),n=null==t?void 0:Q(t,e);return n?l(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=qe(this),i=Vt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;uh(o,0)||(n.lastIndex=0);var s=sc(n,i);return uh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var hh=Sr.map,fh=qn("map");At({target:"Array",proto:!0,forced:!fh},{map:function(e){return hh(this,e,arguments.length>1?arguments[1]:void 0)}});var lh=ge("iterator"),ph=!1;try{var gh=0,vh={next:function(){return{done:!!gh++}},return:function(){ph=!0}};vh[lh]=function(){return this},Array.from(vh,(function(){throw 2}))}catch(e){}var bh,Ih,mh,kh=function(e,t){if(!t&&!ph)return!1;var r=!1;try{var n={};n[lh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},yh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xh=Me.f,wh=rt.enforce,Ch=rt.get,Ph=c.Int8Array,zh=Ph&&Ph.prototype,Oh=c.Uint8ClampedArray,Eh=Oh&&Oh.prototype,qh=Ph&&Zi(Ph),jh=zh&&Zi(zh),Sh=Object.prototype,Th=c.TypeError,Mh=ge("toStringTag"),_h=ue("TYPED_ARRAY_TAG"),Ah=yh&&!!ca&&"Opera"!==Gt(c.opera),Uh=!1,Rh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Bh={BigInt64Array:8,BigUint64Array:8},Lh=function(e){var t=Zi(e);if(M(t)){var r=Ch(t);return r&&oe(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Lh(t)}},Nh=function(e){if(!M(e))return!1;var t=Gt(e);return oe(Rh,t)||oe(Bh,t)};for(bh in Rh)(mh=(Ih=c[bh])&&Ih.prototype)?wh(mh).TypedArrayConstructor=Ih:Ah=!1;for(bh in Bh)(mh=(Ih=c[bh])&&Ih.prototype)&&(wh(mh).TypedArrayConstructor=Ih);if((!Ah||!T(qh)||qh===Function.prototype)&&(qh=function(){throw Th("Incorrect invocation")},Ah))for(bh in Rh)c[bh]&&ca(c[bh],qh);if((!Ah||!jh||jh===Sh)&&(jh=qh.prototype,Ah))for(bh in Rh)c[bh]&&ca(c[bh].prototype,jh);if(Ah&&Zi(Eh)!==jh&&ca(Eh,jh),u&&!oe(jh,Mh))for(bh in Uh=!0,xh(jh,Mh,{get:function(){return M(this)?this[_h]:void 0}}),Rh)c[bh]&&_e(c[bh],_h,bh);var Dh={NATIVE_ARRAY_BUFFER_VIEWS:Ah,TYPED_ARRAY_TAG:Uh&&_h,aTypedArray:function(e){if(Nh(e))return e;throw Th("Target is not a typed array")},aTypedArrayConstructor:function(e){if(T(e)&&(!ca||U(qh,e)))return e;throw Th(Y(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Rh){var a=c[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}jh[e]&&!r||it(jh,e,r?t:Ah&&zh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(ca){if(r)for(n in Rh)if((i=c[n])&&oe(i,e))try{delete i[e]}catch(e){}if(qh[e]&&!r)return;try{return it(qh,e,r?t:Ah&&qh[e]||t)}catch(e){}}for(n in Rh)!(i=c[n])||i[e]&&!r||it(i,e,t)}},getTypedArrayConstructor:Lh,isView:function(e){if(!M(e))return!1;var t=Gt(e);return"DataView"===t||oe(Rh,t)||oe(Bh,t)},isTypedArray:Nh,TypedArray:qh,TypedArrayPrototype:jh},Wh=Dh.NATIVE_ARRAY_BUFFER_VIEWS,Fh=c.ArrayBuffer,Gh=c.Int8Array,Hh=!Wh||!d((function(){Gh(1)}))||!d((function(){new Gh(-1)}))||!kh((function(e){new Gh,new Gh(null),new Gh(1.5),new Gh(e)}),!0)||d((function(){return 1!==new Gh(new Fh(2),1,void 0).length})),Vh=RangeError,$h=function(e){if(void 0===e)return 0;var t=ct(e),r=lt(t);if(t!==r)throw Vh("Wrong length or index");return r},Yh=Array,Jh=Math.abs,Kh=Math.pow,Qh=Math.floor,Xh=Math.log,Zh=Math.LN2,ef=function(e,t,r){var n,i,a,o=Yh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Kh(2,-24)-Kh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Jh(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Qh(Xh(e)/Zh),e*(a=Kh(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Kh(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Kh(2,t),n+=d):(i=e*Kh(2,d-1)*Kh(2,t),n=0));t>=8;)o[f++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},tf=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=Kh(2,t),u-=o}return(d?-1:1)*r*Kh(2,u-t)},rf=function(e){for(var t=ie(this),r=pt(t),n=arguments.length,i=ht(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ht(a,r);o>i;)t[i++]=e;return t},nf=xt.f,af=Me.f,of=Be.PROPER,sf=Be.CONFIGURABLE,cf=rt.get,df=rt.set,uf=c.ArrayBuffer,hf=uf,ff=hf&&hf.prototype,lf=c.DataView,pf=lf&&lf.prototype,gf=Object.prototype,vf=c.Array,bf=c.RangeError,If=x(rf),mf=x([].reverse),kf=ef,yf=tf,xf=function(e){return[255&e]},wf=function(e){return[255&e,e>>8&255]},Cf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Pf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},zf=function(e){return kf(e,23,4)},Of=function(e){return kf(e,52,8)},Ef=function(e,t){af(e.prototype,t,{get:function(){return cf(this)[t]}})},qf=function(e,t,r,n){var i=$h(r),a=cf(e);if(i+t>a.byteLength)throw bf("Wrong index");var o=cf(a.buffer).bytes,s=i+a.byteOffset,c=ir(o,s,s+t);return n?c:mf(c)},jf=function(e,t,r,n,i,a){var o=$h(r),s=cf(e);if(o+t>s.byteLength)throw bf("Wrong index");for(var c=cf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),h=0;h<t;h++)c[d+h]=u[a?h:t-h-1]};if(yh){var Sf=of&&"ArrayBuffer"!==uf.name;if(d((function(){uf(1)}))&&d((function(){new uf(-1)}))&&!d((function(){return new uf,new uf(1.5),new uf(NaN),Sf&&!sf})))Sf&&sf&&_e(uf,"name","ArrayBuffer");else{(hf=function(e){return Ba(this,ff),new uf($h(e))}).prototype=ff;for(var Tf,Mf=nf(uf),_f=0;Mf.length>_f;)(Tf=Mf[_f++])in hf||_e(hf,Tf,uf[Tf]);ff.constructor=hf}ca&&Zi(pf)!==gf&&ca(pf,gf);var Af=new lf(new hf(2)),Uf=x(pf.setInt8);Af.setInt8(0,2147483648),Af.setInt8(1,2147483649),!Af.getInt8(0)&&Af.getInt8(1)||Ua(pf,{setInt8:function(e,t){Uf(this,e,t<<24>>24)},setUint8:function(e,t){Uf(this,e,t<<24>>24)}},{unsafe:!0})}else ff=(hf=function(e){Ba(this,ff);var t=$h(e);df(this,{bytes:If(vf(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,pf=(lf=function(e,t,r){Ba(this,pf),Ba(e,ff);var n=cf(e).byteLength,i=ct(t);if(i<0||i>n)throw bf("Wrong offset");if(i+(r=void 0===r?n-i:lt(r))>n)throw bf("Wrong length");df(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Ef(hf,"byteLength"),Ef(lf,"buffer"),Ef(lf,"byteLength"),Ef(lf,"byteOffset")),Ua(pf,{getInt8:function(e){return qf(this,1,e)[0]<<24>>24},getUint8:function(e){return qf(this,1,e)[0]},getInt16:function(e){var t=qf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=qf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Pf(qf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Pf(qf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return yf(qf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return yf(qf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){jf(this,1,e,xf,t)},setUint8:function(e,t){jf(this,1,e,xf,t)},setInt16:function(e,t){jf(this,2,e,wf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){jf(this,2,e,wf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){jf(this,4,e,Cf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){jf(this,4,e,Cf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){jf(this,4,e,zf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){jf(this,8,e,Of,t,arguments.length>2?arguments[2]:void 0)}});lr(hf,"ArrayBuffer"),lr(lf,"DataView");var Rf={ArrayBuffer:hf,DataView:lf},Bf=Math.floor,Lf=Number.isInteger||function(e){return!M(e)&&isFinite(e)&&Bf(e)===e},Nf=RangeError,Df=RangeError,Wf=function(e,t){var r=function(e){var t=ct(e);if(t<0)throw Nf("The argument can't be less than 0");return t}(e);if(r%t)throw Df("Wrong offset");return r},Ff=Dh.aTypedArrayConstructor,Gf=function(e){var t,r,n,i,a,o,s=es(this),c=ie(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,f=Na(c);if(f&&!Oc(f))for(o=(a=Wa(c,f)).next,c=[];!(i=l(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=gr(u,arguments[2])),r=pt(c),n=new(Ff(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},Hf=ge("species"),Vf=function(e){var t=A(e),r=Me.f;u&&t&&!t[Hf]&&r(t,Hf,{configurable:!0,get:function(){return this}})};i((function(e){var t=xt.f,r=Sr.forEach,n=rt.get,i=rt.set,a=rt.enforce,o=Me.f,s=Pe.f,d=Math.round,h=c.RangeError,f=Rf.ArrayBuffer,p=f.prototype,g=Rf.DataView,v=Dh.NATIVE_ARRAY_BUFFER_VIEWS,I=Dh.TYPED_ARRAY_TAG,m=Dh.TypedArray,k=Dh.TypedArrayPrototype,y=Dh.aTypedArrayConstructor,x=Dh.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},P=function(e){var t;return U(p,e)||"ArrayBuffer"==(t=Gt(e))||"SharedArrayBuffer"==t},z=function(e,t){return x(e)&&!V(t)&&t in e&&Lf(+t)&&t>=0},O=function(e,t){return t=me(t),z(e,t)?b(2,e[t]):s(e,t)},E=function(e,t,r){return t=me(t),!(z(e,t)&&M(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};u?(v||(Pe.f=O,Me.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),At({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,u){var p=e.match(/\d+$/)[0]/8,b=e+(u?"Clamped":"")+"Array",y="get"+e,C="set"+e,z=c[b],O=z,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=d(r))<0?0:r>255?255:255&r),i.view[C](t*p+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Hh&&(O=s((function(e,t,r,n){return Ba(e,E),function(e,t,r){var n,i;return ca&&T(n=t.constructor)&&n!==r&&M(i=n.prototype)&&i!==r.prototype&&ca(e,i),e}(M(t)?P(t)?void 0!==n?new z(t,Wf(r,p),n):void 0!==r?new z(t,Wf(r,p)):new z(t):x(t)?w(O,t):l(Gf,O,t):new z($h(t)),e,O)})),ca&&ca(O,m),r(t(z),(function(e){e in O||_e(O,e,z[e])})),O.prototype=E):(O=s((function(e,t,r,n){Ba(e,E);var a,o,s,c=0,d=0;if(M(t)){if(!P(t))return x(t)?w(O,t):l(Gf,O,t);a=t,d=Wf(r,p);var u=t.byteLength;if(void 0===n){if(u%p)throw h("Wrong length");if((o=u-d)<0)throw h("Wrong length")}else if((o=lt(n)*p)+d>u)throw h("Wrong length");s=o/p}else s=$h(t),a=new f(o=s*p);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)j(e,c++)})),ca&&ca(O,m),E=O.prototype=er(k)),E.constructor!==O&&_e(E,"constructor",O),a(E).TypedArrayConstructor=O,I&&_e(E,I,b);var S=O!=z;q[b]=O,At({global:!0,constructor:!0,forced:S,sham:!v},q),"BYTES_PER_ELEMENT"in O||_e(O,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in E||_e(E,"BYTES_PER_ELEMENT",p),Vf(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var $f=Math.min,Yf=x([].copyWithin||function(e,t){var r=ie(this),n=pt(r),i=ht(e,n),a=ht(t,n),o=arguments.length>2?arguments[2]:void 0,s=$f((void 0===o?n:ht(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Wu(r,i),i+=c,a+=c;return r}),Jf=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Yf(Jf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Kf=Sr.every,Qf=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("every",(function(e){return Kf(Qf(this),e,arguments.length>1?arguments[1]:void 0)}));var Xf=TypeError,Zf=function(e){var t=Ie(e,"number");if("number"==typeof t)throw Xf("Can't convert number to bigint");return BigInt(t)},el=Dh.aTypedArray,tl=Dh.exportTypedArrayMethod,rl=x("".slice);tl("fill",(function(e){var t=arguments.length;el(this);var r="Big"===rl(Gt(this),0,3)?Zf(e):+e;return l(rf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),d((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var nl=ge("species"),il=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[nl])?t:es(r)},al=Dh.aTypedArrayConstructor,ol=Dh.getTypedArrayConstructor,sl=function(e){return al(il(e,ol(e)))},cl=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(sl(e),t)},dl=Sr.filter,ul=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("filter",(function(e){var t=dl(ul(this),e,arguments.length>1?arguments[1]:void 0);return cl(this,t)}));var hl=Sr.find,fl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("find",(function(e){return hl(fl(this),e,arguments.length>1?arguments[1]:void 0)}));var ll=Sr.findIndex,pl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("findIndex",(function(e){return ll(pl(this),e,arguments.length>1?arguments[1]:void 0)}));var gl=Sr.forEach,vl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("forEach",(function(e){gl(vl(this),e,arguments.length>1?arguments[1]:void 0)}));var bl=vt.includes,Il=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("includes",(function(e){return bl(Il(this),e,arguments.length>1?arguments[1]:void 0)}));var ml=vt.indexOf,kl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("indexOf",(function(e){return ml(kl(this),e,arguments.length>1?arguments[1]:void 0)}));var yl=ge("iterator"),xl=c.Uint8Array,wl=x(ma.values),Cl=x(ma.keys),Pl=x(ma.entries),zl=Dh.aTypedArray,Ol=Dh.exportTypedArrayMethod,El=xl&&xl.prototype,ql=!d((function(){El[yl].call([1])})),jl=!!El&&El.values&&El[yl]===El.values&&"values"===El.values.name,Sl=function(){return wl(zl(this))};Ol("entries",(function(){return Pl(zl(this))}),ql),Ol("keys",(function(){return Cl(zl(this))}),ql),Ol("values",Sl,ql||!jl,{name:"values"}),Ol(yl,Sl,ql||!jl,{name:"values"});var Tl=Dh.aTypedArray,Ml=Dh.exportTypedArrayMethod,_l=x([].join);Ml("join",(function(e){return _l(Tl(this),e)}));var Al=Math.min,Ul=[].lastIndexOf,Rl=!!Ul&&1/[1].lastIndexOf(1,-0)<0,Bl=Ln("lastIndexOf"),Ll=Rl||!Bl?function(e){if(Rl)return fn(Ul,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=Al(n,ct(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Ul,Nl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return fn(Ll,Nl(this),t>1?[e,arguments[1]]:[e])}));var Dl=Sr.map,Wl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("map",(function(e){return Dl(Wl(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(sl(e))(t)}))}));var Fl=TypeError,Gl=function(e){return function(t,r,n,i){K(r);var a=ie(t),o=E(a),s=pt(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Fl("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},Hl={left:Gl(!1),right:Gl(!0)},Vl=Hl.left,$l=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Vl($l(this),e,t,t>1?arguments[1]:void 0)}));var Yl=Hl.right,Jl=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Yl(Jl(this),e,t,t>1?arguments[1]:void 0)}));var Kl=Dh.aTypedArray,Ql=Dh.exportTypedArrayMethod,Xl=Math.floor;Ql("reverse",(function(){for(var e,t=Kl(this).length,r=Xl(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Zl=c.RangeError,ep=c.Int8Array,tp=ep&&ep.prototype,rp=tp&&tp.set,np=Dh.aTypedArray,ip=Dh.exportTypedArrayMethod,ap=!d((function(){var e=new Uint8ClampedArray(2);return l(rp,e,{length:1,0:3},1),3!==e[1]})),op=ap&&Dh.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new ep(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));ip("set",(function(e){np(this);var t=Wf(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(ap)return l(rp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Zl("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!ap||op);var sp=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=ln(sp(this),e,t),n=sl(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var cp=Sr.some,dp=Dh.aTypedArray;(0,Dh.exportTypedArrayMethod)("some",(function(e){return cp(dp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=Dh.aTypedArray,hp=Dh.exportTypedArrayMethod,fp=c.Uint16Array,lp=fp&&x(fp.prototype.sort),pp=!(!lp||d((function(){lp(new fp(2),null)}))&&d((function(){lp(new fp(2),{})}))),gp=!!lp&&!d((function(){if(W)return W<74;if(Gu)return Gu<67;if(Hu)return!0;if($u)return $u<602;var e,t,r=new fp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(lp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));hp("sort",(function(e){return void 0!==e&&K(e),gp?lp(this,e):Ja(up(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!gp||pp);var vp=c.Int8Array,bp=Dh.aTypedArray,Ip=Dh.exportTypedArrayMethod,mp=[].toLocaleString,kp=!!vp&&d((function(){mp.call(new vp(1))}));Ip("toLocaleString",(function(){return fn(mp,kp?ln(bp(this)):bp(this),ln(arguments))}),d((function(){return[1,2].toLocaleString()!=new vp([1,2]).toLocaleString()}))||!d((function(){vp.prototype.toLocaleString.call([1,2])})));var yp=Dh.exportTypedArrayMethod,xp=c.Uint8Array,wp=xp&&xp.prototype||{},Cp=[].toString,Pp=x([].join);d((function(){Cp.call({})}))&&(Cp=function(){return Pp(this)});var zp=wp.toString!=Cp;yp("toString",Cp,zp);var Op,Ep,qp,jp,Sp="process"==P(c.process),Tp=/(?:ipad|iphone|ipod).*applewebkit/i.test(R),Mp=c.setImmediate,_p=c.clearImmediate,Ap=c.process,Up=c.Dispatch,Rp=c.Function,Bp=c.MessageChannel,Lp=c.String,Np=0,Dp={};try{Op=c.location}catch(e){}var Wp=function(e){if(oe(Dp,e)){var t=Dp[e];delete Dp[e],t()}},Fp=function(e){return function(){Wp(e)}},Gp=function(e){Wp(e.data)},Hp=function(e){c.postMessage(Lp(e),Op.protocol+"//"+Op.host)};Mp&&_p||(Mp=function(e){Ga(arguments.length,1);var t=T(e)?e:Rp(e),r=ln(arguments,1);return Dp[++Np]=function(){fn(t,void 0,r)},Ep(Np),Np},_p=function(e){delete Dp[e]},Sp?Ep=function(e){Ap.nextTick(Fp(e))}:Up&&Up.now?Ep=function(e){Up.now(Fp(e))}:Bp&&!Tp?(jp=(qp=new Bp).port2,qp.port1.onmessage=Gp,Ep=gr(jp.postMessage,jp)):c.addEventListener&&T(c.postMessage)&&!c.importScripts&&Op&&"file:"!==Op.protocol&&!d(Hp)?(Ep=Hp,c.addEventListener("message",Gp,!1)):Ep="onreadystatechange"in xe("script")?function(e){Yt.appendChild(xe("script")).onreadystatechange=function(){Yt.removeChild(this),Wp(e)}}:function(e){setTimeout(Fp(e),0)});var Vp,$p,Yp,Jp,Kp,Qp,Xp,Zp,eg={set:Mp,clear:_p},tg=/ipad|iphone|ipod/i.test(R)&&void 0!==c.Pebble,rg=/web0s(?!.*chrome)/i.test(R),ng=Pe.f,ig=eg.set,ag=c.MutationObserver||c.WebKitMutationObserver,og=c.document,sg=c.process,cg=c.Promise,dg=ng(c,"queueMicrotask"),ug=dg&&dg.value;ug||(Vp=function(){var e,t;for(Sp&&(e=sg.domain)&&e.exit();$p;){t=$p.fn,$p=$p.next;try{t()}catch(e){throw $p?Jp():Yp=void 0,e}}Yp=void 0,e&&e.enter()},Tp||Sp||rg||!ag||!og?!tg&&cg&&cg.resolve?((Xp=cg.resolve(void 0)).constructor=cg,Zp=gr(Xp.then,Xp),Jp=function(){Zp(Vp)}):Sp?Jp=function(){sg.nextTick(Vp)}:(ig=gr(ig,c),Jp=function(){ig(Vp)}):(Kp=!0,Qp=og.createTextNode(""),new ag(Vp).observe(Qp,{characterData:!0}),Jp=function(){Qp.data=Kp=!Kp}));var hg=ug||function(e){var t={fn:e,next:void 0};Yp&&(Yp.next=t),$p||($p=t,Jp()),Yp=t},fg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},lg=function(){this.head=null,this.tail=null};lg.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var pg=lg,gg=c.Promise,vg="object"==typeof window&&"object"!=typeof Deno;gg&&gg.prototype;var bg,Ig,mg,kg=ge("species"),yg=!1,xg=T(c.PromiseRejectionEvent),wg={CONSTRUCTOR:Mt("Promise",(function(){var e=Fe(gg),t=e!==String(gg);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new gg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[kg]=n,!(yg=r.then((function(){}))instanceof n)||!t&&vg&&!xg})),REJECTION_EVENT:xg,SUBCLASSING:yg},Cg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=K(t),this.reject=K(r)},Pg={f:function(e){return new Cg(e)}},zg=eg.set,Og=wg.CONSTRUCTOR,Eg=wg.REJECTION_EVENT,qg=wg.SUBCLASSING,jg=rt.getterFor("Promise"),Sg=rt.set,Tg=gg&&gg.prototype,Mg=gg,_g=Tg,Ag=c.TypeError,Ug=c.document,Rg=c.process,Bg=Pg.f,Lg=Bg,Ng=!!(Ug&&Ug.createEvent&&c.dispatchEvent),Dg=function(e){var t;return!(!M(e)||!T(t=e.then))&&t},Wg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&$g(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Ag("Promise-chain cycle")):(n=Dg(r))?l(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Fg=function(e,t){e.notified||(e.notified=!0,hg((function(){for(var r,n=e.reactions;r=n.get();)Wg(r,e);e.notified=!1,t&&!e.rejection&&Hg(e)})))},Gg=function(e,t,r){var n,i;Ng?((n=Ug.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!Eg&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Hg=function(e){l(zg,c,(function(){var t,r=e.facade,n=e.value;if(Vg(e)&&(t=fg((function(){Sp?Rg.emit("unhandledRejection",n,r):Gg("unhandledrejection",r,n)})),e.rejection=Sp||Vg(e)?2:1,t.error))throw t.value}))},Vg=function(e){return 1!==e.rejection&&!e.parent},$g=function(e){l(zg,c,(function(){var t=e.facade;Sp?Rg.emit("rejectionHandled",t):Gg("rejectionhandled",t,e.value)}))},Yg=function(e,t,r){return function(n){e(t,n,r)}},Jg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Fg(e,!0))},Kg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ag("Promise can't be resolved itself");var n=Dg(t);n?hg((function(){var r={done:!1};try{l(n,t,Yg(Kg,r,e),Yg(Jg,r,e))}catch(t){Jg(r,t,e)}})):(e.value=t,e.state=1,Fg(e,!1))}catch(t){Jg({done:!1},t,e)}}};if(Og&&(_g=(Mg=function(e){Ba(this,_g),K(e),l(bg,this);var t=jg(this);try{e(Yg(Kg,t),Yg(Jg,t))}catch(e){Jg(t,e)}}).prototype,(bg=function(e){Sg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new pg,rejection:!1,state:0,value:void 0})}).prototype=it(_g,"then",(function(e,t){var r=jg(this),n=Bg(il(this,Mg));return r.parent=!0,n.ok=!T(e)||e,n.fail=T(t)&&t,n.domain=Sp?Rg.domain:void 0,0==r.state?r.reactions.add(n):hg((function(){Wg(n,r)})),n.promise})),Ig=function(){var e=new bg,t=jg(e);this.promise=e,this.resolve=Yg(Kg,t),this.reject=Yg(Jg,t)},Pg.f=Bg=function(e){return e===Mg||void 0===e?new Ig(e):Lg(e)},T(gg)&&Tg!==Object.prototype)){mg=Tg.then,qg||it(Tg,"then",(function(e,t){var r=this;return new Mg((function(e,t){l(mg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Tg.constructor}catch(e){}ca&&ca(Tg,_g)}At({global:!0,constructor:!0,wrap:!0,forced:Og},{Promise:Mg}),lr(Mg,"Promise",!1),Vf("Promise");var Qg=TypeError,Xg=function(e,t){this.stopped=e,this.result=t},Zg=Xg.prototype,ev=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),v=gr(t,u),b=function(e){return n&&wc(n,"normal",e),new Xg(!0,e)},I=function(e){return h?(qe(e),g?v(e[0],e[1],b):v(e[0],e[1])):g?v(e,b):v(e)};if(f)n=e.iterator;else if(p)n=e;else{if(!(i=Na(e)))throw Qg(Y(e)+" is not iterable");if(Oc(i)){for(a=0,o=pt(e);o>a;a++)if((s=I(e[a]))&&U(Zg,s))return s;return new Xg(!1)}n=Wa(e,i)}for(c=f?e.next:n.next;!(d=l(c,n)).done;){try{s=I(d.value)}catch(e){wc(n,"throw",e)}if("object"==typeof s&&s&&U(Zg,s))return s}return new Xg(!1)},tv=wg.CONSTRUCTOR||!kh((function(e){gg.all(e).then(void 0,(function(){}))}));At({target:"Promise",stat:!0,forced:tv},{all:function(e){var t=this,r=Pg.f(t),n=r.resolve,i=r.reject,a=fg((function(){var r=K(t.resolve),a=[],o=0,s=1;ev(e,(function(e){var c=o++,d=!1;s++,l(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var rv=wg.CONSTRUCTOR,nv=gg&&gg.prototype;if(At({target:"Promise",proto:!0,forced:rv,real:!0},{catch:function(e){return this.then(void 0,e)}}),T(gg)){var iv=A("Promise").prototype.catch;nv.catch!==iv&&it(nv,"catch",iv,{unsafe:!0})}At({target:"Promise",stat:!0,forced:tv},{race:function(e){var t=this,r=Pg.f(t),n=r.reject,i=fg((function(){var i=K(t.resolve);ev(e,(function(e){l(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),At({target:"Promise",stat:!0,forced:wg.CONSTRUCTOR},{reject:function(e){var t=Pg.f(this);return l(t.reject,void 0,e),t.promise}});var av=wg.CONSTRUCTOR;function ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sv(e){return function(e){if(Array.isArray(e))return ov(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ov(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ov(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cv(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}A("Promise"),At({target:"Promise",stat:!0,forced:av},{resolve:function(e){return function(e,t){if(qe(e),M(t)&&t.constructor===e)return t;var r=Pg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),At({target:"Object",stat:!0},{fromEntries:function(e){var t={};return ev(e,(function(e,r){tr(t,e,r)}),{AS_ENTRIES:!0}),t}});var uv=Wo?btoa:function(e){return Buffer.from(e).toString("base64")},hv=function(e){var t,r,n=new URL(e),i=new URLSearchParams(n.search),a=null!==(t=i.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=i.get("code"))&&void 0!==r?r:"",usid:a}},fv=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},lv=function(){var e=ui(Ni.mark((function e(t){var r,n,i,a,o,s,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Wo||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,sv(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function pv(e,t,r){return gv.apply(this,arguments)}function gv(){return(gv=ui(Ni.mark((function e(t,r,n){var i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lv(r);case 2:return a=e.sent,(o=new Su(t.clientConfig)).clientConfig.fetchOptions=dv(dv({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),s={parameters:dv(dv({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new xs(c);case 14:return e.abrupt("return",dv({url:d},hv(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vv(){return(vv=ui(Ni.mark((function e(t,r,n){var i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(uv("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:dv({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bv(){return(bv=ui(Ni.mark((function e(t,r){var n,i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=fv(),e.next=3,pv(t,n,dv({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Iv(){return(Iv=ui(Ni.mark((function e(t,r,n){var i,a,o,s,c,d,u,h,f,l,p,g,v,b;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=fv(),e.next=3,lv(a);case 3:return o=e.sent,(s=new Su(t.clientConfig)).clientConfig.fetchOptions=dv(dv({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),c="Basic ".concat(uv("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:dv({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,f=new URL(h),l=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||l.error)){e.next=16;break}throw new xs(u);case 16:if(p=hv(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:p.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:p.usid},!r.clientSecret){e.next=22;break}return v="Basic ".concat(uv("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),b={headers:{Authorization:v},body:g},e.abrupt("return",t.getAccessToken(b));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mv=Sr.find,kv=!0;"find"in[]&&Array(1).find((function(){kv=!1})),At({target:"Array",proto:!0,forced:kv},{find:function(e){return mv(this,e,arguments.length>1?arguments[1]:void 0)}}),$i("find");function yv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yv(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wv=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},Cv=function(){var e=ui(Ni.mark((function e(t){var r,n,i,a,o,s,c,d,u,h,f,l;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],c=xv(xv({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!c[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),c.apiVersion||(c.apiVersion="v1"),d=a,a.baseUri||(d=xv(xv({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),h=wv(i.headers)||wv(d.headers),f=i,h&&!u||(f=xv(xv({},i),{},{headers:xv(xv({},i.headers),!h&&{"Content-Type":"application/json"}),parameters:xv(xv({},i.parameters),u&&{siteId:a.parameters.siteId})})),l=new du("/organizations/{organizationId}/{endpointPath}",d.baseUri,{pathParams:c,queryParams:f.parameters,origin:d.proxy}),e.abrupt("return",Os(l.toString(),f,d,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pv=Object.freeze({__proto__:null,isBrowser:Wo,isNode:Fo,globalObject:Go,hasFetchAvailable:Ho,fetch:Vo,stringToBase64:uv,getCodeAndUsidFromUrl:hv,createCodeVerifier:fv,generateCodeChallenge:lv,authorize:pv,loginGuestUserPrivate:function(e,t,r){return vv.apply(this,arguments)},loginGuestUser:function(e,t){return bv.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return Iv.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(uv("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:Cv,doFetch:Os});export{No as ClientConfig,lu as ShopperBaskets,vu as ShopperContexts,mu as ShopperCustomers,xu as ShopperDiscoverySearch,Pu as ShopperExperience,Eu as ShopperGiftCertificates,Su as ShopperLogin,_u as ShopperOrders,Ru as ShopperProducts,Nu as ShopperPromotions,nh as ShopperSearch,oh as ShopperSeo,dh as ShopperStores,du as TemplateURL,Pv as helpers};
1
+ import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,o,s=function(e){return e&&e.Math==Math&&e},d=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),l=Function.prototype.call,f=h?l.bind(l):function(){return l.apply(l,arguments)},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,I={f:g&&!p.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:p},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m=Function.prototype,b=m.bind,k=m.call,y=h&&b.bind(k,k),x=h?function(e){return e&&y(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},w=x({}.toString),z=x("".slice),C=function(e){return z(w(e),8,-1)},P=Object,O=x("".split),E=c((function(){return!P("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?O(e,""):P(e)}:P,q=TypeError,j=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(j(e))},T=function(e){return"function"==typeof e},M=function(e){return"object"==typeof e?null!==e:T(e)},_=function(e){return T(e)?e:void 0},A=function(e,t){return arguments.length<2?_(d[e]):d[e]&&d[e][t]},R=x({}.isPrototypeOf),U=A("navigator","userAgent")||"",B=d.process,L=d.Deno,N=B&&B.versions||L&&L.version,F=N&&N.v8;F&&(o=(a=F.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&U&&(!(a=U.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=U.match(/Chrome\/(\d+)/))&&(o=+a[1]);var D=o,W=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&D&&D<41})),G=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=A("Symbol");return T(t)&&R(t.prototype,H(e))},$=String,Y=function(e){try{return $(e)}catch(e){return"Object"}},K=TypeError,J=function(e){if(T(e))return e;throw K(Y(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:J(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(d,e,{value:t,configurable:!0,writable:!0})}catch(r){d[e]=t}return t},te=d["__core-js_shared__"]||ee("__core-js_shared__",{}),re=i((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,ie=function(e){return ne(j(e))},ae=x({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,de=Math.random(),ce=x(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++se+de,36)},he=re("wks"),le=d.Symbol,fe=le&&le.for,pe=G?le:le&&le.withoutSetter||ue,ge=function(e){if(!oe(he,e)||!W&&"string"!=typeof he[e]){var t="Symbol."+e;W&&oe(le,e)?he[e]=le[e]:he[e]=G&&fe?fe(t):pe(t)}return he[e]},Ie=TypeError,ve=ge("toPrimitive"),me=function(e,t){if(!M(e)||V(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!M(r)||V(r))return r;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&T(r=e.toString)&&!M(n=f(r,e)))return n;if(T(r=e.valueOf)&&!M(n=f(r,e)))return n;if("string"!==t&&T(r=e.toString)&&!M(n=f(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},be=function(e){var t=me(e,"string");return V(t)?t:t+""},ke=d.document,ye=M(ke)&&M(ke.createElement),xe=function(e){return ye?ke.createElement(e):{}},we=!u&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),ze=Object.getOwnPropertyDescriptor,Ce={f:u?ze:function(e,t){if(e=S(e),t=be(t),we)try{return ze(e,t)}catch(e){}if(oe(e,t))return v(!f(I.f,e,t),e[t])}},Pe=u&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(M(e))return e;throw Ee(Oe(e)+" is not an object")},je=TypeError,Se=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,Me={f:u?Pe?function(e,t,r){if(qe(e),t=be(t),qe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Te(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=be(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw je("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},_e=u?function(e,t,r){return Me.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ae=Function.prototype,Re=u&&Object.getOwnPropertyDescriptor,Ue=oe(Ae,"name"),Be={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!u||u&&Re(Ae,"name").configurable)},Le=x(Function.toString);T(te.inspectSource)||(te.inspectSource=function(e){return Le(e)});var Ne,Fe,De,We=te.inspectSource,Ge=d.WeakMap,He=T(Ge)&&/native code/.test(We(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=ue(e))},Ye={},Ke=d.TypeError,Je=d.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Je),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);Ne=function(e,t){if(Ze(Qe,e))throw new Ke("Object already initialized");return t.facade=e,et(Qe,e,t),t},Fe=function(e){return Xe(Qe,e)||{}},De=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ye[tt]=!0,Ne=function(e,t){if(oe(e,tt))throw new Ke("Object already initialized");return t.facade=e,_e(e,tt,t),t},Fe=function(e){return oe(e,tt)?e[tt]:{}},De=function(e){return oe(e,tt)}}var rt={set:Ne,get:Fe,has:De,enforce:function(e){return De(e)?Fe(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!M(t)||(r=Fe(t)).type!==e)throw Ke("Incompatible receiver, "+e+" required");return r}}},nt=i((function(e){var t=Be.CONFIGURABLE,r=rt.enforce,n=rt.get,i=Object.defineProperty,a=u&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!oe(e,"name")||t&&e.name!==n)&&(u?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&oe(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&oe(s,"constructor")&&s.constructor?u&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return oe(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return T(this)&&n(this).source||We(this)}),"toString")})),it=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(T(r)&&nt(r,a,n),n.global)i?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Me.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,ot=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?ot:at)(t)},dt=function(e){var t=+e;return t!=t||0===t?0:st(t)},ct=Math.max,ut=Math.min,ht=function(e,t){var r=dt(e);return r<0?ct(r+t,0):ut(r,t)},lt=Math.min,ft=function(e){return e>0?lt(dt(e),9007199254740991):0},pt=function(e){return ft(e.length)},gt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=ht(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},It={includes:gt(!0),indexOf:gt(!1)},vt=It.indexOf,mt=x([].push),bt=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!oe(Ye,r)&&oe(n,r)&&mt(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~vt(a,r)||mt(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=kt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return bt(e,yt)}},wt={f:Object.getOwnPropertySymbols},zt=x([].concat),Ct=A("Reflect","ownKeys")||function(e){var t=xt.f(qe(e)),r=wt.f;return r?zt(t,r(e)):t},Pt=function(e,t,r){for(var n=Ct(t),i=Me.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=jt[qt(e)];return r==Tt||r!=St&&(T(t)?c(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},jt=Et.data={},St=Et.NATIVE="N",Tt=Et.POLYFILL="P",Mt=Et,_t=Ce.f,At=function(e,t){var r,n,i,a,o,s=e.target,c=e.global,u=e.stat;if(r=c?d:u?d[s]||ee(s,{}):(d[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=_t(r,n))&&o.value:r[n],!Mt(c?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Pt(a,i)}(e.sham||i&&i.sham)&&_e(a,"sham",!0),it(r,n,a,e)}},Rt=Object.keys||function(e){return bt(e,kt)},Ut=c((function(){Rt(1)}));At({target:"Object",stat:!0,forced:Ut},{keys:function(e){return Rt(ie(e))}});var Bt={};Bt[ge("toStringTag")]="z";var Lt,Nt="[object z]"===String(Bt),Ft=ge("toStringTag"),Dt=Object,Wt="Arguments"==C(function(){return arguments}()),Gt=Nt?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Dt(e),Ft))?r:Wt?C(t):"Object"==(n=C(t))&&T(t.callee)?"Arguments":n},Ht=String,Vt=function(e){if("Symbol"===Gt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ht(e)},$t={f:u&&!Pe?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=Rt(t),a=i.length,o=0;a>o;)Me.f(e,r=i[o++],n[r]);return e}},Yt=A("document","documentElement"),Kt=$e("IE_PROTO"),Jt=function(){},Qt=function(e){return"<script>"+e+"<\/script>"},Xt=function(e){e.write(Qt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zt=function(){try{Lt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Zt="undefined"!=typeof document?document.domain&&Lt?Xt(Lt):((t=xe("iframe")).style.display="none",Yt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qt("document.F=Object")),e.close(),e.F):Xt(Lt);for(var r=kt.length;r--;)delete Zt.prototype[kt[r]];return Zt()};Ye[Kt]=!0;var er=Object.create||function(e,t){var r;return null!==e?(Jt.prototype=qe(e),r=new Jt,Jt.prototype=null,r[Kt]=e):r=Zt(),void 0===t?r:$t.f(r,t)},tr=function(e,t,r){var n=be(t);n in e?Me.f(e,n,v(0,r)):e[n]=r},rr=Array,nr=Math.max,ir=function(e,t,r){for(var n=pt(e),i=ht(t,n),a=ht(void 0===r?n:r,n),o=rr(nr(a-i,0)),s=0;i<a;i++,s++)tr(o,s,e[i]);return o.length=s,o},ar=xt.f,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sr={f:function(e){return or&&"Window"==C(e)?function(e){try{return ar(e)}catch(e){return ir(or)}}(e):ar(S(e))}},dr={f:ge},cr=d,ur=Me.f,hr=Me.f,lr=ge("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,lr)&&hr(e,lr,{configurable:!0,value:t})},pr=x(x.bind),gr=function(e,t){return J(e),void 0===t?e:h?pr(e,t):function(){return e.apply(t,arguments)}},Ir=Array.isArray||function(e){return"Array"==C(e)},vr=function(){},mr=[],br=A("Reflect","construct"),kr=/^\s*(?:class|function)\b/,yr=x(kr.exec),xr=!kr.exec(vr),wr=function(e){if(!T(e))return!1;try{return br(vr,mr,e),!0}catch(e){return!1}},zr=function(e){if(!T(e))return!1;switch(Gt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!yr(kr,We(e))}catch(e){return!0}};zr.sham=!0;var Cr=!br||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?zr:wr,Pr=ge("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return Ir(e)&&(t=e.constructor,(Cr(t)&&(t===Or||Ir(t.prototype))||M(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=x([].push),jr=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(d,c,u,h){for(var l,f,p=ie(d),g=E(p),I=gr(c,u),v=pt(g),m=0,b=h||Er,k=t?b(d,v):r||o?b(d,0):void 0;v>m;m++)if((s||m in g)&&(f=I(l=g[m],m,p),e))if(t)k[m]=f;else if(f)switch(e){case 3:return!0;case 5:return l;case 6:return m;case 2:qr(k,l)}else switch(e){case 4:return!1;case 7:qr(k,l)}return a?-1:n||i?i:k}},Sr={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},Tr=Sr.forEach,Mr=$e("hidden"),_r=rt.set,Ar=rt.getterFor("Symbol"),Rr=Object.prototype,Ur=d.Symbol,Br=Ur&&Ur.prototype,Lr=d.TypeError,Nr=d.QObject,Fr=Ce.f,Dr=Me.f,Wr=sr.f,Gr=I.f,Hr=x([].push),Vr=re("symbols"),$r=re("op-symbols"),Yr=re("wks"),Kr=!Nr||!Nr.prototype||!Nr.prototype.findChild,Jr=u&&c((function(){return 7!=er(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Fr(Rr,t);n&&delete Rr[t],Dr(e,t,r),n&&e!==Rr&&Dr(Rr,t,n)}:Dr,Qr=function(e,t){var r=Vr[e]=er(Br);return _r(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},Xr=function(e,t,r){e===Rr&&Xr($r,t,r),qe(e);var n=be(t);return qe(r),oe(Vr,n)?(r.enumerable?(oe(e,Mr)&&e[Mr][n]&&(e[Mr][n]=!1),r=er(r,{enumerable:v(0,!1)})):(oe(e,Mr)||Dr(e,Mr,v(1,{})),e[Mr][n]=!0),Jr(e,n,r)):Dr(e,n,r)},Zr=function(e,t){qe(e);var r=S(t),n=Rt(r).concat(nn(r));return Tr(n,(function(t){u&&!f(en,r,t)||Xr(e,t,r[t])})),e},en=function(e){var t=be(e),r=f(Gr,this,t);return!(this===Rr&&oe(Vr,t)&&!oe($r,t))&&(!(r||!oe(this,t)||!oe(Vr,t)||oe(this,Mr)&&this[Mr][t])||r)},tn=function(e,t){var r=S(e),n=be(t);if(r!==Rr||!oe(Vr,n)||oe($r,n)){var i=Fr(r,n);return!i||!oe(Vr,n)||oe(r,Mr)&&r[Mr][n]||(i.enumerable=!0),i}},rn=function(e){var t=Wr(S(e)),r=[];return Tr(t,(function(e){oe(Vr,e)||oe(Ye,e)||Hr(r,e)})),r},nn=function(e){var t=e===Rr,r=Wr(t?$r:S(e)),n=[];return Tr(r,(function(e){!oe(Vr,e)||t&&!oe(Rr,e)||Hr(n,Vr[e])})),n};W||(Br=(Ur=function(){if(R(Br,this))throw Lr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Vt(arguments[0]):void 0,t=ue(e),r=function(e){this===Rr&&f(r,$r,e),oe(this,Mr)&&oe(this[Mr],t)&&(this[Mr][t]=!1),Jr(this,t,v(1,e))};return u&&Kr&&Jr(Rr,t,{configurable:!0,set:r}),Qr(t,e)}).prototype,it(Br,"toString",(function(){return Ar(this).tag})),it(Ur,"withoutSetter",(function(e){return Qr(ue(e),e)})),I.f=en,Me.f=Xr,$t.f=Zr,Ce.f=tn,xt.f=sr.f=rn,wt.f=nn,dr.f=function(e){return Qr(ge(e),e)},u&&(Dr(Br,"description",{configurable:!0,get:function(){return Ar(this).description}}),it(Rr,"propertyIsEnumerable",en,{unsafe:!0}))),At({global:!0,constructor:!0,wrap:!0,forced:!W,sham:!W},{Symbol:Ur}),Tr(Rt(Yr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});oe(t,e)||ur(t,e,{value:dr.f(e)})}(e)})),At({target:"Symbol",stat:!0,forced:!W},{useSetter:function(){Kr=!0},useSimple:function(){Kr=!1}}),At({target:"Object",stat:!0,forced:!W,sham:!u},{create:function(e,t){return void 0===t?er(e):Zr(er(e),t)},defineProperty:Xr,defineProperties:Zr,getOwnPropertyDescriptor:tn}),At({target:"Object",stat:!0,forced:!W},{getOwnPropertyNames:rn}),function(){var e=A("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&it(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ur,"Symbol"),Ye[Mr]=!0;var an=W&&!!Symbol.for&&!!Symbol.keyFor,on=re("string-to-symbol-registry"),sn=re("symbol-to-string-registry");At({target:"Symbol",stat:!0,forced:!an},{for:function(e){var t=Vt(e);if(oe(on,t))return on[t];var r=A("Symbol")(t);return on[t]=r,sn[r]=t,r}});var dn=re("symbol-to-string-registry");At({target:"Symbol",stat:!0,forced:!an},{keyFor:function(e){if(!V(e))throw TypeError(Y(e)+" is not a symbol");if(oe(dn,e))return dn[e]}});var cn=Function.prototype,un=cn.apply,hn=cn.call,ln="object"==typeof Reflect&&Reflect.apply||(h?hn.bind(un):function(){return hn.apply(un,arguments)}),fn=x([].slice),pn=A("JSON","stringify"),gn=x(/./.exec),In=x("".charAt),vn=x("".charCodeAt),mn=x("".replace),bn=x(1..toString),kn=/[\uD800-\uDFFF]/g,yn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,wn=!W||c((function(){var e=A("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),zn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=fn(arguments),n=t;if((M(t)||void 0!==e)&&!V(e))return Ir(t)||(t=function(e,t){if(T(n)&&(t=f(n,this,e,t)),!V(t))return t}),r[1]=t,ln(pn,null,r)},Pn=function(e,t,r){var n=In(r,t-1),i=In(r,t+1);return gn(yn,e)&&!gn(xn,i)||gn(xn,e)&&!gn(yn,n)?"\\u"+bn(vn(e,0),16):e};pn&&At({target:"JSON",stat:!0,arity:3,forced:wn||zn},{stringify:function(e,t,r){var n=fn(arguments),i=ln(wn?Cn:pn,null,n);return zn&&"string"==typeof i?mn(i,kn,Pn):i}});var On=!W||c((function(){wt.f(1)}));At({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ie(e)):[]}});var En=ge("species"),qn=function(e){return D>=51||!c((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},jn=Sr.filter,Sn=qn("filter");At({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return jn(this,e,arguments.length>1?arguments[1]:void 0)}});var Tn=Nt?{}.toString:function(){return"[object "+Gt(this)+"]"};Nt||it(Object.prototype,"toString",Tn,{unsafe:!0});var Mn=Ce.f,_n=c((function(){Mn(1)}));At({target:"Object",stat:!0,forced:!u||_n,sham:!u},{getOwnPropertyDescriptor:function(e,t){return Mn(S(e),t)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rn=xe("span").classList,Un=Rn&&Rn.constructor&&Rn.constructor.prototype,Bn=Un===Object.prototype?void 0:Un,Ln=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Nn=Sr.forEach,Fn=Ln("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Dn=function(e){if(e&&e.forEach!==Fn)try{_e(e,"forEach",Fn)}catch(t){e.forEach=Fn}};for(var Wn in An)An[Wn]&&Dn(d[Wn]&&d[Wn].prototype);Dn(Bn),At({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&tr(o,t,r);return o}});var Gn=$t.f;At({target:"Object",stat:!0,forced:Object.defineProperties!==Gn,sham:!u},{defineProperties:Gn});var Hn=Me.f;At({target:"Object",stat:!0,forced:Object.defineProperty!==Hn,sham:!u},{defineProperty:Hn});var Vn,$n=ge("match"),Yn=TypeError,Kn=function(e){if(function(e){var t;return M(e)&&(void 0!==(t=e[$n])?!!t:"RegExp"==C(e))}(e))throw Yn("The method doesn't accept regular expressions");return e},Jn=ge("match"),Qn=Ce.f,Xn=x("".startsWith),Zn=x("".slice),ei=Math.min,ti=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Jn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ri=!(ti||(Vn=Qn(String.prototype,"startsWith"),!Vn||Vn.writable));At({target:"String",proto:!0,forced:!ri&&!ti},{startsWith:function(e){var t=Vt(j(this));Kn(e);var r=ft(ei(arguments.length>1?arguments[1]:void 0,t.length)),n=Vt(e);return Xn?Xn(t,n,r):Zn(t,r,r+n.length)===n}});var ni=function(){var e=qe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ii=RegExp.prototype,ai=Be.PROPER,oi=RegExp.prototype.toString,si=c((function(){return"/a/b"!=oi.call({source:"a",flags:"b"})})),di=ai&&"toString"!=oi.name;function ci(e,t,r,n,i,a,o){try{var s=e[a](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,i)}function ui(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){ci(a,n,i,o,s,"next",e)}function s(e){ci(a,n,i,o,s,"throw",e)}o(void 0)}))}}function hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fi(e,t,r){return t&&li(e.prototype,t),r&&li(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(si||di)&&it(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Vt(e.source)+"/"+Vt(function(e){var t=e.flags;return void 0!==t||"flags"in ii||oe(e,"flags")||!R(ii,e)?t:f(ni,e)}(e))}),{unsafe:!0});var gi=Object.prototype,Ii=gi.hasOwnProperty,vi="function"==typeof Symbol?Symbol:{},mi=vi.iterator||"@@iterator",bi=vi.asyncIterator||"@@asyncIterator",ki=vi.toStringTag||"@@toStringTag";function yi(e,t,r,n){var i=t&&t.prototype instanceof zi?t:zi,a=Object.create(i.prototype),o=new Ui(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return Li()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=_i(o,r);if(s){if(s===wi)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var d=xi(e,t,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===wi)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(e,r,o),a}function xi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var wi={};function zi(){}function Ci(){}function Pi(){}var Oi={};Oi[mi]=function(){return this};var Ei=Object.getPrototypeOf,qi=Ei&&Ei(Ei(Bi([])));qi&&qi!==gi&&Ii.call(qi,mi)&&(Oi=qi);var ji=Pi.prototype=zi.prototype=Object.create(Oi);function Si(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Ti(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ci||"GeneratorFunction"===(t.displayName||t.name))}function Mi(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=xi(e[n],e,i);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&Ii.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(c).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function _i(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_i(e,t),"throw"===t.method))return wi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return wi}var n=xi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,wi;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,wi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,wi)}function Ai(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Ri(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ui(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ai,this),this.reset(!0)}function Bi(e){if(e){var t=e[mi];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(Ii.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Li}}function Li(){return{value:void 0,done:!0}}Ci.prototype=ji.constructor=Pi,Pi.constructor=Ci,Pi[ki]=Ci.displayName="GeneratorFunction",Si(Mi.prototype),Mi.prototype[bi]=function(){return this},Si(ji),ji[ki]="Generator",ji[mi]=function(){return this},ji.toString=function(){return"[object Generator]"},Ui.prototype={constructor:Ui,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ri),!e)for(var t in this)"t"===t.charAt(0)&&Ii.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=Ii.call(i,"catchLoc"),s=Ii.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&Ii.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,wi):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),wi},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Ri(r),wi}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;Ri(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Bi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),wi}};var Ni={wrap:yi,isGeneratorFunction:Ti,AsyncIterator:Mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Pi):(e.__proto__=Pi,ki in e||(e[ki]="GeneratorFunction")),e.prototype=Object.create(ji),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Mi(yi(e,t,r,n),i);return Ti(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Bi},Fi=Me.f,Di=ge("unscopables"),Wi=Array.prototype;null==Wi[Di]&&Fi(Wi,Di,{configurable:!0,value:er(null)});var Gi,Hi,Vi,$i=function(e){Wi[Di][e]=!0},Yi={},Ki=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ji=$e("IE_PROTO"),Qi=Object,Xi=Qi.prototype,Zi=Ki?Qi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,Ji))return t[Ji];var r=t.constructor;return T(r)&&t instanceof r?r.prototype:t instanceof Qi?Xi:null},ea=ge("iterator"),ta=!1;[].keys&&("next"in(Vi=[].keys())?(Hi=Zi(Zi(Vi)))!==Object.prototype&&(Gi=Hi):ta=!0),(null==Gi||c((function(){var e={};return Gi[ea].call(e)!==e})))&&(Gi={}),T(Gi[ea])||it(Gi,ea,(function(){return this}));var ra={IteratorPrototype:Gi,BUGGY_SAFARI_ITERATORS:ta},na=ra.IteratorPrototype,ia=function(){return this},aa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=er(na,{next:v(+!n,r)}),fr(e,i,!1),Yi[i]=ia,e},oa=String,sa=TypeError,da=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return qe(r),function(e){if("object"==typeof e||T(e))return e;throw sa("Can't set "+oa(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ca=Be.PROPER,ua=Be.CONFIGURABLE,ha=ra.IteratorPrototype,la=ra.BUGGY_SAFARI_ITERATORS,fa=ge("iterator"),pa=function(){return this},ga=function(e,t,r,n,i,a,o){aa(r,t,n);var s,d,c,u=function(e){if(e===i&&I)return I;if(!la&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",l=!1,p=e.prototype,g=p[fa]||p["@@iterator"]||i&&p[i],I=!la&&g||u(i),v="Array"==t&&p.entries||g;if(v&&(s=Zi(v.call(new e)))!==Object.prototype&&s.next&&(Zi(s)!==ha&&(da?da(s,ha):T(s[fa])||it(s,fa,pa)),fr(s,h,!0)),ca&&"values"==i&&g&&"values"!==g.name&&(ua?_e(p,"name","values"):(l=!0,I=function(){return f(g,this)})),i)if(d={values:u("values"),keys:a?I:u("keys"),entries:u("entries")},o)for(c in d)(la||l||!(c in p))&&it(p,c,d[c]);else At({target:t,proto:!0,forced:la||l},d);return p[fa]!==I&&it(p,fa,I,{name:i}),Yi[t]=I,d},Ia=Me.f,va=rt.set,ma=rt.getterFor("Array Iterator"),ba=ga(Array,"Array",(function(e,t){va(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=ma(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),ka=Yi.Arguments=Yi.Array;if($i("keys"),$i("values"),$i("entries"),u&&"values"!==ka.name)try{Ia(ka,"name",{value:"values"})}catch(e){}var ya=x("".charAt),xa=x("".charCodeAt),wa=x("".slice),za=function(e){return function(t,r){var n,i,a=Vt(j(t)),o=dt(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=xa(a,o))<55296||n>56319||o+1===s||(i=xa(a,o+1))<56320||i>57343?e?ya(a,o):n:e?wa(a,o,o+2):i-56320+(n-55296<<10)+65536}},Ca={codeAt:za(!1),charAt:za(!0)},Pa=Ca.charAt,Oa=rt.set,Ea=rt.getterFor("String Iterator");ga(String,"String",(function(e){Oa(this,{type:"String Iterator",string:Vt(e),index:0})}),(function(){var e,t=Ea(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Pa(r,n),t.index+=e.length,{value:e,done:!1})}));var qa=ge("iterator"),ja=ge("toStringTag"),Sa=ba.values,Ta=function(e,t){if(e){if(e[qa]!==Sa)try{_e(e,qa,Sa)}catch(t){e[qa]=Sa}if(e[ja]||_e(e,ja,t),An[t])for(var r in ba)if(e[r]!==ba[r])try{_e(e,r,ba[r])}catch(t){e[r]=ba[r]}}};for(var Ma in An)Ta(d[Ma]&&d[Ma].prototype,Ma);Ta(Bn,"DOMTokenList");var _a=ge("iterator"),Aa=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[_a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ra=function(e,t,r){for(var n in t)it(e,n,t[n],r);return e},Ua=TypeError,Ba=function(e,t){if(R(t,e))return e;throw Ua("Incorrect invocation")},La=ge("iterator"),Na=function(e){if(null!=e)return Q(e,La)||Q(e,"@@iterator")||Yi[Gt(e)]},Fa=TypeError,Da=function(e,t){var r=arguments.length<2?Na(e):t;if(J(r))return qe(f(r,e));throw Fa(Y(e)+" is not iterable")},Wa=TypeError,Ga=function(e,t){if(e<t)throw Wa("Not enough arguments");return e},Ha=Math.floor,Va=function(e,t){var r=e.length,n=Ha(r/2);return r<8?$a(e,t):Ya(e,Va(ir(e,0,n),t),Va(ir(e,n),t),t)},$a=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ya=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Ka=Va,Ja=ge("iterator"),Qa=rt.set,Xa=rt.getterFor("URLSearchParams"),Za=rt.getterFor("URLSearchParamsIterator"),eo=Object.getOwnPropertyDescriptor,to=function(e){if(!u)return d[e];var t=eo(d,e);return t&&t.value},ro=to("fetch"),no=to("Request"),io=to("Headers"),ao=no&&no.prototype,oo=io&&io.prototype,so=d.RegExp,co=d.TypeError,uo=d.decodeURIComponent,ho=d.encodeURIComponent,lo=x("".charAt),fo=x([].join),po=x([].push),go=x("".replace),Io=x([].shift),vo=x([].splice),mo=x("".split),bo=x("".slice),ko=/\+/g,yo=Array(4),xo=function(e){return yo[e-1]||(yo[e-1]=so("((?:%[\\da-f]{2}){"+e+"})","gi"))},wo=function(e){try{return uo(e)}catch(t){return e}},zo=function(e){var t=go(e,ko," "),r=4;try{return uo(t)}catch(e){for(;r;)t=go(t,xo(r--),wo);return t}},Co=/[!'()~]|%20/g,Po={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oo=function(e){return Po[e]},Eo=function(e){return go(ho(e),Co,Oo)},qo=aa((function(e,t){Qa(this,{type:"URLSearchParamsIterator",iterator:Da(Xa(e).entries),kind:t})}),"Iterator",(function(){var e=Za(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),jo=function(e){this.entries=[],this.url=null,void 0!==e&&(M(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===lo(e,0)?bo(e,1):e:Vt(e)))};jo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,d=Na(e);if(d)for(r=(t=Da(e,d)).next;!(n=f(r,t)).done;){if(a=(i=Da(qe(n.value))).next,(o=f(a,i)).done||(s=f(a,i)).done||!f(a,i).done)throw co("Expected sequence with length 2");po(this.entries,{key:Vt(o.value),value:Vt(s.value)})}else for(var c in e)oe(e,c)&&po(this.entries,{key:c,value:Vt(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=mo(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=mo(t,"="),po(this.entries,{key:zo(Io(r)),value:zo(fo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Eo(e.key)+"="+Eo(e.value));return fo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var So=function(){Ba(this,To);var e=arguments.length>0?arguments[0]:void 0;Qa(this,new jo(e))},To=So.prototype;if(Ra(To,{append:function(e,t){Ga(arguments.length,2);var r=Xa(this);po(r.entries,{key:Vt(e),value:Vt(t)}),r.updateURL()},delete:function(e){Ga(arguments.length,1);for(var t=Xa(this),r=t.entries,n=Vt(e),i=0;i<r.length;)r[i].key===n?vo(r,i,1):i++;t.updateURL()},get:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&po(n,t[i].value);return n},has:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ga(arguments.length,1);for(var r,n=Xa(this),i=n.entries,a=!1,o=Vt(e),s=Vt(t),d=0;d<i.length;d++)(r=i[d]).key===o&&(a?vo(i,d--,1):(a=!0,r.value=s));a||po(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Xa(this);Ka(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Xa(this).entries,n=gr(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new qo(this,"keys")},values:function(){return new qo(this,"values")},entries:function(){return new qo(this,"entries")}},{enumerable:!0}),it(To,Ja,To.entries,{name:"entries"}),it(To,"toString",(function(){return Xa(this).serialize()}),{enumerable:!0}),fr(So,"URLSearchParams"),At({global:!0,constructor:!0,forced:!Aa},{URLSearchParams:So}),!Aa&&T(io)){var Mo=x(oo.has),_o=x(oo.set),Ao=function(e){if(M(e)){var t,r=e.body;if("URLSearchParams"===Gt(r))return t=e.headers?new io(e.headers):new io,Mo(t,"content-type")||_o(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),er(e,{body:v(0,Vt(r)),headers:v(0,t)})}return e};if(T(ro)&&At({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ro(e,arguments.length>1?Ao(arguments[1]):{})}}),T(no)){var Ro=function(e){return Ba(this,ao),new no(e,arguments.length>1?Ao(arguments[1]):{})};ao.constructor=Ro,Ro.prototype=ao,At({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ro})}}var Uo={URLSearchParams:So,getState:Xa};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=fi((function e(t){if(hi(this,e),pi(this,"baseUri",void 0),pi(this,"proxy",void 0),pi(this,"headers",void 0),pi(this,"parameters",void 0),pi(this,"fetchOptions",void 0),pi(this,"transformRequest",void 0),pi(this,"throwOnBadResponse",void 0),this.headers=Lo({},t.headers),this.parameters=Lo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Lo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Fo(e){return(Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pi(No,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),At({global:!0},{globalThis:d});var Do="object"===("undefined"==typeof window?"undefined":Fo(window))&&"object"===Fo(window.document),Wo="object"===("undefined"==typeof process?"undefined":Fo(process))&&"object"===Fo(process.versions)&&"string"==typeof process.versions.node,Go=Do?window:globalThis,Ho="function"==typeof Go.fetch,Vo=function(){if(Wo)return require("node-fetch").default;if(!Ho)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Go.fetch}(),$o=Function,Yo=x([].concat),Ko=x([].join),Jo={},Qo=function(e,t,r){if(!oe(Jo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Jo[t]=$o("C,a","return new C("+Ko(n,",")+")")}return Jo[t](e,r)},Xo=h?$o.bind:function(e){var t=J(this),r=t.prototype,n=fn(arguments,1),i=function(){var r=Yo(n,fn(arguments));return this instanceof i?Qo(t,r.length,r):t.apply(e,r)};return M(r)&&(i.prototype=r),i},Zo=TypeError,es=function(e){if(Cr(e))return e;throw Zo(Y(e)+" is not a constructor")},ts=A("Reflect","construct"),rs=Object.prototype,ns=[].push,is=c((function(){function e(){}return!(ts((function(){}),[],e)instanceof e)})),as=!c((function(){ts((function(){}))})),os=is||as;At({target:"Reflect",stat:!0,forced:os,sham:os},{construct:function(e,t){es(e),qe(t);var r=arguments.length<3?e:es(arguments[2]);if(as&&!is)return ts(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return ln(ns,n,t),new(ln(Xo,e,n))}var i=r.prototype,a=er(M(i)?i:rs),o=ln(e,a,t);return M(o)?o:a}});var ss=TypeError,ds=function(e){if(e>9007199254740991)throw ss("Maximum allowed index exceeded");return e},cs=ge("isConcatSpreadable"),us=D>=51||!c((function(){var e=[];return e[cs]=!1,e.concat()[0]!==e})),hs=qn("concat"),ls=function(e){if(!M(e))return!1;var t=e[cs];return void 0!==t?!!t:Ir(e)};function fs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ps(e,t){return(ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ps(e,t)}function Is(e,t){if(t&&("object"===Fo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fs(e)}function vs(e){return(vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ms(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function bs(e,t,r){return(bs=ms()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&ps(i,r.prototype),i}).apply(null,arguments)}function ks(e){var t="function"==typeof Map?new Map:void 0;return(ks=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return bs(e,arguments,vs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ps(n,e)})(e)}function ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vs(e);if(t){var i=vs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Is(this,r)}}At({target:"Array",proto:!0,arity:1,forced:!us||!hs},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Er(o,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(ls(a=-1===t?o:arguments[t]))for(i=pt(a),ds(d+i),r=0;r<i;r++,d++)r in a&&tr(s,d,a[r]);else ds(d+1),tr(s,d++,a);return s.length=d,s}});var xs=function(e){gs(r,ks(Error));var t=ys(r);function r(e){var n;return hi(this,r),pi(fs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fi(r)}();function ws(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ws(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ws(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cs,Ps,Os=function(){var e=ui(Ni.mark((function e(t,r,n,i){var a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=zs(zs({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=zs(zs({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Vo(t,s);case 4:if(d=e.sent,!i){e.next=7;break}return e.abrupt("return",d);case 7:if(null==n||!n.throwOnBadResponse||d.ok||304===d.status){e.next=11;break}throw new xs(d);case 11:return e.next=13,d.text();case 13:return c=e.sent,e.abrupt("return",c?JSON.parse(c):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),Es=d.RegExp,qs=c((function(){var e=Es("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),js=qs||c((function(){return!Es("a","y").sticky})),Ss={BROKEN_CARET:qs||c((function(){var e=Es("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:js,UNSUPPORTED_Y:qs},Ts=d.RegExp,Ms=c((function(){var e=Ts(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_s=d.RegExp,As=c((function(){var e=_s("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Rs=rt.get,Us=re("native-string-replace",String.prototype.replace),Bs=RegExp.prototype.exec,Ls=Bs,Ns=x("".charAt),Fs=x("".indexOf),Ds=x("".replace),Ws=x("".slice),Gs=(Ps=/b*/g,f(Bs,Cs=/a/,"a"),f(Bs,Ps,"a"),0!==Cs.lastIndex||0!==Ps.lastIndex),Hs=Ss.BROKEN_CARET,Vs=void 0!==/()??/.exec("")[1];(Gs||Vs||Hs||Ms||As)&&(Ls=function(e){var t,r,n,i,a,o,s,d=this,c=Rs(d),u=Vt(e),h=c.raw;if(h)return h.lastIndex=d.lastIndex,t=f(Ls,h,u),d.lastIndex=h.lastIndex,t;var l=c.groups,p=Hs&&d.sticky,g=f(ni,d),I=d.source,v=0,m=u;if(p&&(g=Ds(g,"y",""),-1===Fs(g,"g")&&(g+="g"),m=Ws(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Ns(u,d.lastIndex-1))&&(I="(?: "+I+")",m=" "+m,v++),r=new RegExp("^(?:"+I+")",g)),Vs&&(r=new RegExp("^"+I+"$(?!\\s)",g)),Gs&&(n=d.lastIndex),i=f(Bs,p?r:d,m),p?i?(i.input=Ws(i.input,v),i[0]=Ws(i[0],v),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:Gs&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),Vs&&i&&i.length>1&&f(Us,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&l)for(i.groups=o=er(null),a=0;a<l.length;a++)o[(s=l[a])[0]]=i[s[1]];return i});var $s=Ls;At({target:"RegExp",proto:!0,forced:/./.exec!==$s},{exec:$s});var Ys=ge("species"),Ks=RegExp.prototype,Js=function(e,t,r,n){var i=ge(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ys]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=x(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=x(e),d=t.exec;return d===$s||d===Ks.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));it(String.prototype,e,d[0]),it(Ks,i,d[1])}n&&_e(Ks[i],"sham",!0)},Qs=Ca.charAt,Xs=function(e,t,r){return t+(r?Qs(e,t).length:1)},Zs=Math.floor,ed=x("".charAt),td=x("".replace),rd=x("".slice),nd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,id=/\$([$&'`]|\d{1,2})/g,ad=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,d=id;return void 0!==i&&(i=ie(i),d=nd),td(a,d,(function(a,d){var c;switch(ed(d,0)){case"$":return"$";case"&":return e;case"`":return rd(t,0,r);case"'":return rd(t,o);case"<":c=i[rd(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>s){var h=Zs(u/10);return 0===h?a:h<=s?void 0===n[h-1]?ed(d,1):n[h-1]+ed(d,1):a}c=n[u-1]}return void 0===c?"":c}))},od=TypeError,sd=function(e,t){var r=e.exec;if(T(r)){var n=f(r,e,t);return null!==n&&qe(n),n}if("RegExp"===C(e))return f($s,e,t);throw od("RegExp#exec called on incompatible receiver")},dd=ge("replace"),cd=Math.max,ud=Math.min,hd=x([].concat),ld=x([].push),fd=x("".indexOf),pd=x("".slice),gd="$0"==="a".replace(/./,"$0"),Id=!!/./[dd]&&""===/./[dd]("a","$0");Js("replace",(function(e,t,r){var n=Id?"$":"$0";return[function(e,r){var n=j(this),i=null==e?void 0:Q(e,dd);return i?f(i,e,n,r):f(t,Vt(n),e,r)},function(e,i){var a=qe(this),o=Vt(e);if("string"==typeof i&&-1===fd(i,n)&&-1===fd(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var d=T(i);d||(i=Vt(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var l=sd(a,o);if(null===l)break;if(ld(h,l),!c)break;""===Vt(l[0])&&(a.lastIndex=Xs(o,ft(a.lastIndex),u))}for(var f,p="",g=0,I=0;I<h.length;I++){for(var v=Vt((l=h[I])[0]),m=cd(ud(dt(l.index),o.length),0),b=[],k=1;k<l.length;k++)ld(b,void 0===(f=l[k])?f:String(f));var y=l.groups;if(d){var x=hd([v],b,m,o);void 0!==y&&ld(x,y);var w=Vt(ln(i,void 0,x))}else w=ad(v,o,m,b,y,i);m>=g&&(p+=pd(o,g,m)+w,g=m+v.length)}return p+pd(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!gd||Id);var vd,md=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),Me.f(e,t,r)},bd=Object.assign,kd=Object.defineProperty,yd=x([].concat),xd=!bd||c((function(){if(u&&1!==bd({b:1},bd(kd({},"a",{enumerable:!0,get:function(){kd(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=bd({},e)[r]||"abcdefghijklmnopqrst"!=Rt(bd({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=wt.f,o=I.f;n>i;)for(var s,d=E(arguments[i++]),c=a?yd(Rt(d),a(d)):Rt(d),h=c.length,l=0;h>l;)s=c[l++],u&&!f(o,d,s)||(r[s]=d[s]);return r}:bd,wd=function(e,t,r){var n,i;qe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return qe(n),r},zd=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){wd(e,"throw",t)}},Cd=ge("iterator"),Pd=Array.prototype,Od=function(e){return void 0!==e&&(Yi.Array===e||Pd[Cd]===e)},Ed=Array,qd=function(e){var t=ie(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=gr(i,n>2?arguments[2]:void 0));var o,s,d,c,u,h,l=Na(t),p=0;if(!l||this===Ed&&Od(l))for(o=pt(t),s=r?new this(o):Ed(o);o>p;p++)h=a?i(t[p],p):t[p],tr(s,p,h);else for(u=(c=Da(t,l)).next,s=r?new this:[];!(d=f(u,c)).done;p++)h=a?zd(c,i,[d.value,p],!0):d.value,tr(s,p,h);return s.length=p,s},jd=/[^\0-\u007E]/,Sd=/[.\u3002\uFF0E\uFF61]/g,Td="Overflow: input needs wider integers to process",Md=RangeError,_d=x(Sd.exec),Ad=Math.floor,Rd=String.fromCharCode,Ud=x("".charCodeAt),Bd=x([].join),Ld=x([].push),Nd=x("".replace),Fd=x("".split),Dd=x("".toLowerCase),Wd=function(e){return e+22+75*(e<26)},Gd=function(e,t,r){var n=0;for(e=r?Ad(e/700):e>>1,e+=Ad(e/t);e>455;)e=Ad(e/35),n+=36;return Ad(n+36*e/(e+38))},Hd=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Ud(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Ud(e,r++);56320==(64512&a)?Ld(t,((1023&i)<<10)+(1023&a)+65536):(Ld(t,i),r--)}else Ld(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Ld(n,Rd(r));var d=n.length,c=d;for(d&&Ld(n,"-");c<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=c+1;if(u-a>Ad((2147483647-o)/h))throw Md(Td);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Md(Td);if(r==a){for(var l=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(l<p)break;var g=l-p,I=36-p;Ld(n,Rd(Wd(p+g%I))),l=Ad(g/I),f+=36}Ld(n,Rd(Wd(l))),s=Gd(o,h,c==d),o=0,c++}}o++,a++}return Bd(n,"")},Vd=Ca.codeAt,$d=rt.set,Yd=rt.getterFor("URL"),Kd=Uo.URLSearchParams,Jd=Uo.getState,Qd=d.URL,Xd=d.TypeError,Zd=d.parseInt,ec=Math.floor,tc=Math.pow,rc=x("".charAt),nc=x(/./.exec),ic=x([].join),ac=x(1..toString),oc=x([].pop),sc=x([].push),dc=x("".replace),cc=x([].shift),uc=x("".split),hc=x("".slice),lc=x("".toLowerCase),fc=x([].unshift),pc=/[a-z]/i,gc=/[\d+-.a-z]/i,Ic=/\d/,vc=/^0x/i,mc=/^[0-7]+$/,bc=/^\d+$/,kc=/^[\da-f]+$/i,yc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xc=/[\0\t\n\r #/:<>?@[\\\]^|]/,wc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,zc=/[\t\n\r]/g,Cc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)fc(t,e%256),e=ec(e/256);return ic(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=ac(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Pc={},Oc=xd({},Pc,{" ":1,'"':1,"<":1,">":1,"`":1}),Ec=xd({},Oc,{"#":1,"?":1,"{":1,"}":1}),qc=xd({},Ec,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),jc=function(e,t){var r=Vd(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},Sc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tc=function(e,t){var r;return 2==e.length&&nc(pc,rc(e,0))&&(":"==(r=rc(e,1))||!t&&"|"==r)},Mc=function(e){var t;return e.length>1&&Tc(hc(e,0,2))&&(2==e.length||"/"===(t=rc(e,2))||"\\"===t||"?"===t||"#"===t)},_c=function(e){return"."===e||"%2e"===lc(e)},Ac={},Rc={},Uc={},Bc={},Lc={},Nc={},Fc={},Dc={},Wc={},Gc={},Hc={},Vc={},$c={},Yc={},Kc={},Jc={},Qc={},Xc={},Zc={},eu={},tu={},ru=function(e,t,r){var n,i,a,o=Vt(e);if(t){if(i=this.parse(o))throw Xd(i);this.searchParams=null}else{if(void 0!==r&&(n=new ru(r,!0)),i=this.parse(o,null,n))throw Xd(i);(a=Jd(new Kd)).bindURL(this),this.searchParams=a}};ru.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,d=this,c=t||Ac,u=0,h="",l=!1,f=!1,p=!1;for(e=Vt(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=dc(e,wc,"")),e=dc(e,zc,""),n=qd(e);u<=n.length;){switch(i=n[u],c){case Ac:if(!i||!nc(pc,i)){if(t)return"Invalid scheme";c=Uc;continue}h+=lc(i),c=Rc;break;case Rc:if(i&&(nc(gc,i)||"+"==i||"-"==i||"."==i))h+=lc(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",c=Uc,u=0;continue}if(t&&(d.isSpecial()!=oe(Sc,h)||"file"==h&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=h,t)return void(d.isSpecial()&&Sc[d.scheme]==d.port&&(d.port=null));h="","file"==d.scheme?c=Yc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Bc:d.isSpecial()?c=Dc:"/"==n[u+1]?(c=Lc,u++):(d.cannotBeABaseURL=!0,sc(d.path,""),c=Zc)}break;case Uc:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){d.scheme=r.scheme,d.path=ir(r.path),d.query=r.query,d.fragment="",d.cannotBeABaseURL=!0,c=tu;break}c="file"==r.scheme?Yc:Nc;continue;case Bc:if("/"!=i||"/"!=n[u+1]){c=Nc;continue}c=Wc,u++;break;case Lc:if("/"==i){c=Gc;break}c=Xc;continue;case Nc:if(d.scheme=r.scheme,i==vd)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query=r.query;else if("/"==i||"\\"==i&&d.isSpecial())c=Fc;else if("?"==i)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query="",c=eu;else{if("#"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.path.length--,c=Xc;continue}d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query=r.query,d.fragment="",c=tu}break;case Fc:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,c=Xc;continue}c=Gc}else c=Wc;break;case Dc:if(c=Wc,"/"!=i||"/"!=rc(h,u+1))continue;u++;break;case Wc:if("/"!=i&&"\\"!=i){c=Gc;continue}break;case Gc:if("@"==i){l&&(h="%40"+h),l=!0,a=qd(h);for(var g=0;g<a.length;g++){var I=a[g];if(":"!=I||p){var v=jc(I,qc);p?d.password+=v:d.username+=v}else p=!0}h=""}else if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(l&&""==h)return"Invalid authority";u-=qd(h).length+1,h="",c=Hc}else h+=i;break;case Hc:case Vc:if(t&&"file"==d.scheme){c=Jc;continue}if(":"!=i||f){if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(h))return o;if(h="",c=Qc,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),h+=i}else{if(""==h)return"Invalid host";if(o=d.parseHost(h))return o;if(h="",c=$c,t==Vc)return}break;case $c:if(!nc(Ic,i)){if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=h){var m=Zd(h,10);if(m>65535)return"Invalid port";d.port=d.isSpecial()&&m===Sc[d.scheme]?null:m,h=""}if(t)return;c=Qc;continue}return"Invalid port"}h+=i;break;case Yc:if(d.scheme="file","/"==i||"\\"==i)c=Kc;else{if(!r||"file"!=r.scheme){c=Xc;continue}if(i==vd)d.host=r.host,d.path=ir(r.path),d.query=r.query;else if("?"==i)d.host=r.host,d.path=ir(r.path),d.query="",c=eu;else{if("#"!=i){Mc(ic(ir(n,u),""))||(d.host=r.host,d.path=ir(r.path),d.shortenPath()),c=Xc;continue}d.host=r.host,d.path=ir(r.path),d.query=r.query,d.fragment="",c=tu}}break;case Kc:if("/"==i||"\\"==i){c=Jc;break}r&&"file"==r.scheme&&!Mc(ic(ir(n,u),""))&&(Tc(r.path[0],!0)?sc(d.path,r.path[0]):d.host=r.host),c=Xc;continue;case Jc:if(i==vd||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Tc(h))c=Xc;else if(""==h){if(d.host="",t)return;c=Qc}else{if(o=d.parseHost(h))return o;if("localhost"==d.host&&(d.host=""),t)return;h="",c=Qc}continue}h+=i;break;case Qc:if(d.isSpecial()){if(c=Xc,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=vd&&(c=Xc,"/"!=i))continue}else d.fragment="",c=tu;else d.query="",c=eu;break;case Xc:if(i==vd||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=lc(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||sc(d.path,"")):_c(h)?"/"==i||"\\"==i&&d.isSpecial()||sc(d.path,""):("file"==d.scheme&&!d.path.length&&Tc(h)&&(d.host&&(d.host=""),h=rc(h,0)+":"),sc(d.path,h)),h="","file"==d.scheme&&(i==vd||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)cc(d.path);"?"==i?(d.query="",c=eu):"#"==i&&(d.fragment="",c=tu)}else h+=jc(i,Ec);break;case Zc:"?"==i?(d.query="",c=eu):"#"==i?(d.fragment="",c=tu):i!=vd&&(d.path[0]+=jc(i,Pc));break;case eu:t||"#"!=i?i!=vd&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":jc(i,Pc)):(d.fragment="",c=tu);break;case tu:i!=vd&&(d.fragment+=jc(i,Oc))}u++}},parseHost:function(e){var t,r,n;if("["==rc(e,0)){if("]"!=rc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,l=function(){return rc(e,h)};if(":"==l()){if(":"!=rc(e,1))return;h+=2,u=++c}for(;l();){if(8==c)return;if(":"!=l()){for(t=r=0;r<4&&nc(kc,l());)t=16*t+Zd(l(),16),h++,r++;if("."==l()){if(0==r)return;if(h-=r,c>6)return;for(n=0;l();){if(i=null,n>0){if(!("."==l()&&n<4))return;h++}if(!nc(Ic,l()))return;for(;nc(Ic,l());){if(a=Zd(l(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==l()){if(h++,!l())return}else if(l())return;d[c++]=t}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d}(hc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Fd(Nd(Dd(e),Sd,"."),".");for(t=0;t<i.length;t++)r=i[t],Ld(n,_d(jd,r)?"xn--"+Hd(r):r);return Bd(n,".")}(e),nc(yc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,d=uc(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=d[n]))return e;if(a=10,i.length>1&&"0"==rc(i,0)&&(a=nc(vc,i)?16:8,i=hc(i,8==a?1:2)),""===i)o=0;else{if(!nc(10==a?bc:8==a?mc:kc,i))return e;o=Zd(i,a)}sc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=tc(256,5-t))return null}else if(o>255)return null;for(s=oc(r),n=0;n<r.length;n++)s+=r[n]*tc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(nc(xc,e))return"Invalid host";for(t="",r=qd(e),n=0;n<r.length;n++)t+=jc(r[n],Pc);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(Sc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tc(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Cc(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+ic(o,"/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw Xd(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nu(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Cc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Vt(e)+":",Ac)},getUsername:function(){return this.username},setUsername:function(e){var t=qd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=jc(t[r],qc)}},getPassword:function(){return this.password},setPassword:function(e){var t=qd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=jc(t[r],qc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Cc(e):Cc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Hc)},getHostname:function(){var e=this.host;return null===e?"":Cc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vc)},getPort:function(){var e=this.port;return null===e?"":Vt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Vt(e))?this.port=null:this.parse(e,$c))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ic(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Qc))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Vt(e))?this.query=null:("?"==rc(e,0)&&(e=hc(e,1)),this.query="",this.parse(e,eu)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Vt(e))?("#"==rc(e,0)&&(e=hc(e,1)),this.fragment="",this.parse(e,tu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nu=function(e){var t=Ba(this,iu),r=Ga(arguments.length,1)>1?arguments[1]:void 0,n=$d(t,new ru(e,!1,r));u||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},iu=nu.prototype,au=function(e,t){return{get:function(){return Yd(this)[e]()},set:t&&function(e){return Yd(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&(md(iu,"href",au("serialize","setHref")),md(iu,"origin",au("getOrigin")),md(iu,"protocol",au("getProtocol","setProtocol")),md(iu,"username",au("getUsername","setUsername")),md(iu,"password",au("getPassword","setPassword")),md(iu,"host",au("getHost","setHost")),md(iu,"hostname",au("getHostname","setHostname")),md(iu,"port",au("getPort","setPort")),md(iu,"pathname",au("getPathname","setPathname")),md(iu,"search",au("getSearch","setSearch")),md(iu,"searchParams",au("getSearchParams")),md(iu,"hash",au("getHash","setHash"))),it(iu,"toJSON",(function(){return Yd(this).serialize()}),{enumerable:!0}),it(iu,"toString",(function(){return Yd(this).serialize()}),{enumerable:!0}),Qd){var ou=Qd.createObjectURL,su=Qd.revokeObjectURL;ou&&it(nu,"createObjectURL",gr(ou,Qd)),su&&it(nu,"revokeObjectURL",gr(su,Qd))}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vs(e);if(t){var i=vs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Is(this,r)}}fr(nu,"URL"),At({global:!0,constructor:!0,forced:!Aa,sham:!u},{URL:nu});var cu=function(e){gs(r,ks(URL));var t=du(r);function r(e,n,i){var a;return hi(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return fi(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(),uu="commerce-sdk-isomorphic@2.1.0-dev.0";function hu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v,m,b,k,y,x,w,z,C,P,O,E,q,j,S,T,M,_,A,R;return fi(e,[{key:"createBasket",value:(R=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"transferBasket",value:(A=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,Os(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(_=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(M=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(O=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(P=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(C=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(z=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(x=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(m=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(I=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=49,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}"),pi(fu,"paramKeys",{createBasket:["organizationId","taxMode","temporary","siteId","locale"],createBasketRequired:["organizationId","siteId"],transferBasket:["organizationId","overrideExisting","siteId","locale"],transferBasketRequired:["organizationId","siteId"],mergeBasket:["organizationId","createDestinationBasket","productItemMergeMode","siteId","locale"],mergeBasketRequired:["organizationId","siteId"],deleteBasket:["organizationId","basketId","siteId"],deleteBasketRequired:["organizationId","basketId","siteId"],getBasket:["organizationId","basketId","siteId","locale"],getBasketRequired:["organizationId","basketId","siteId"],updateBasket:["organizationId","basketId","siteId","locale"],updateBasketRequired:["organizationId","basketId","siteId"],updateAsAgentBasket:["organizationId","basketId","siteId","locale"],updateAsAgentBasketRequired:["organizationId","basketId","siteId"],updateBillingAddressForBasket:["organizationId","basketId","useAsShipping","removeExternalTax","siteId","locale"],updateBillingAddressForBasketRequired:["organizationId","basketId","siteId"],addCouponToBasket:["organizationId","basketId","siteId","locale"],addCouponToBasketRequired:["organizationId","basketId","siteId"],removeCouponFromBasket:["organizationId","basketId","couponItemId","siteId","locale"],removeCouponFromBasketRequired:["organizationId","basketId","couponItemId","siteId"],updateCustomerForBasket:["organizationId","basketId","siteId","locale"],updateCustomerForBasketRequired:["organizationId","basketId","siteId"],addGiftCertificateItemToBasket:["organizationId","basketId","siteId","locale"],addGiftCertificateItemToBasketRequired:["organizationId","basketId","siteId"],removeGiftCertificateItemFromBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],removeGiftCertificateItemFromBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],updateGiftCertificateItemInBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],updateGiftCertificateItemInBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],removeItemFromBasket:["organizationId","basketId","itemId","siteId","locale"],removeItemFromBasketRequired:["organizationId","basketId","itemId","siteId"],updateItemInBasket:["organizationId","basketId","itemId","removeExternalTax","siteId","locale"],updateItemInBasketRequired:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItem:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItemRequired:["organizationId","basketId","itemId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["organizationId","basketId","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],updatePaymentInstrumentInBasket:["organizationId","basketId","paymentInstrumentId","removeExternalTax","siteId","locale"],updatePaymentInstrumentInBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["organizationId","basketId","priceAdjustmentId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasket:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],removeShipmentFromBasket:["organizationId","basketId","shipmentId","siteId","locale"],removeShipmentFromBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShipmentForBasket:["organizationId","basketId","shipmentId","siteId","locale"],updateShipmentForBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingAddressForShipment:["organizationId","basketId","shipmentId","useAsBilling","removeExternalTax","siteId","locale"],updateShippingAddressForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingMethodForShipment:["organizationId","basketId","shipmentId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],getShippingMethodsForShipment:["organizationId","basketId","shipmentId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateAsStorefrontBasket:["organizationId","basketId","exchange","siteId","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"]});var Iu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return fi(e,[{key:"getShopperContext",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 29:if(c=e.sent,!r){e.next=32;break}return e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function vu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}"),pi(Iu,"paramKeys",{getShopperContext:["organizationId","usid","siteId"],getShopperContextRequired:["organizationId","usid"],createShopperContext:["organizationId","usid","siteId"],createShopperContextRequired:["organizationId","usid"],deleteShopperContext:["organizationId","usid","siteId"],deleteShopperContextRequired:["organizationId","usid"],updateShopperContext:["organizationId","usid","siteId"],updateShopperContextRequired:["organizationId","usid"]});var bu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v,m,b,k,y,x,w,z,C,P,O,E,q;return fi(e,[{key:"registerCustomer",value:(q=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:if(c=e.sent,!r){e.next=31;break}return e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(P=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getExternalProfile",value:(C=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getCustomer",value:(z=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(w=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(b=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerBaskets",value:(m=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=43,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductLists",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 55:if(c=e.sent,!r){e.next=58;break}return e.abrupt("return",c);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}"),pi(bu,"paramKeys",{registerCustomer:["organizationId","siteId"],registerCustomerRequired:["organizationId","siteId"],resetPassword:["organizationId","siteId"],resetPasswordRequired:["organizationId","siteId"],getResetPasswordToken:["organizationId","siteId"],getResetPasswordTokenRequired:["organizationId","siteId"],registerExternalProfile:["organizationId","siteId"],registerExternalProfileRequired:["organizationId","siteId"],getExternalProfile:["organizationId","externalId","authenticationProviderId","siteId"],getExternalProfileRequired:["organizationId","externalId","authenticationProviderId","siteId"],getCustomer:["organizationId","customerId","siteId"],getCustomerRequired:["organizationId","customerId","siteId"],updateCustomer:["organizationId","customerId","siteId"],updateCustomerRequired:["organizationId","customerId","siteId"],createCustomerAddress:["organizationId","customerId","siteId"],createCustomerAddressRequired:["organizationId","customerId","siteId"],getCustomerAddress:["organizationId","customerId","addressName","siteId"],getCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],removeCustomerAddress:["organizationId","customerId","addressName","siteId"],removeCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],updateCustomerAddress:["organizationId","customerId","addressName","siteId"],updateCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],getCustomerBaskets:["organizationId","customerId","siteId"],getCustomerBasketsRequired:["organizationId","customerId","siteId"],getCustomerOrders:["organizationId","customerId","crossSites","from","until","status","siteId","offset","limit"],getCustomerOrdersRequired:["organizationId","customerId","siteId"],updateCustomerPassword:["organizationId","customerId","siteId"],updateCustomerPasswordRequired:["organizationId","customerId","siteId"],createCustomerPaymentInstrument:["organizationId","customerId","siteId"],createCustomerPaymentInstrumentRequired:["organizationId","customerId","siteId"],deleteCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],deleteCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerProductLists:["organizationId","customerId","siteId"],getCustomerProductListsRequired:["organizationId","customerId","siteId"],createCustomerProductList:["organizationId","customerId","siteId"],createCustomerProductListRequired:["organizationId","customerId","siteId"],deleteCustomerProductList:["organizationId","customerId","listId","siteId"],deleteCustomerProductListRequired:["organizationId","customerId","listId","siteId"],getCustomerProductList:["organizationId","customerId","listId","siteId"],getCustomerProductListRequired:["organizationId","customerId","listId","siteId"],updateCustomerProductList:["organizationId","customerId","listId","siteId"],updateCustomerProductListRequired:["organizationId","customerId","listId","siteId"],createCustomerProductListItem:["organizationId","customerId","listId","siteId"],createCustomerProductListItemRequired:["organizationId","customerId","listId","siteId"],deleteCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],deleteCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getPublicProductListsBySearchTerm:["organizationId","email","firstName","lastName","siteId"],getPublicProductListsBySearchTermRequired:["organizationId","siteId"],getPublicProductList:["organizationId","listId","siteId"],getPublicProductListRequired:["organizationId","listId","siteId"],getProductListItem:["organizationId","listId","itemId","siteId"],getProductListItemRequired:["organizationId","listId","itemId","siteId"]});var xu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"retrieveResults",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new cu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new cu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function wu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}"),pi(xu,"paramKeys",{retrieveResults:["organizationId","channelId","locale","offset","limit"],retrieveResultsRequired:["organizationId","channelId","locale"],getSuggestions:["organizationId","channelId","suggestionTypes","searchText","locale"],getSuggestionsRequired:["organizationId","channelId","suggestionTypes","locale"]});var Cu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"getPages",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new cu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=42,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new cu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}"),pi(Cu,"paramKeys",{getPages:["organizationId","categoryId","productId","aspectTypeId","aspectAttributes","parameters","siteId","locale"],getPagesRequired:["organizationId","aspectTypeId","siteId"],getPage:["organizationId","pageId","aspectAttributes","parameters","siteId","locale"],getPageRequired:["organizationId","pageId","siteId"]});var Eu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fi(e,[{key:"getGiftCertificate",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new cu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ou(Ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ju(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}"),pi(Eu,"paramKeys",{getGiftCertificate:["organizationId","siteId"],getGiftCertificateRequired:["organizationId","siteId"]});var Su=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=ju({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v;return fi(e,[{key:"authenticateCustomer",value:(v=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(I=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"logoutCustomer",value:(g=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(p=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=61,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 61:if(c=e.sent,!r){e.next=64;break}return e.abrupt("return",c);case 64:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(f=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(l=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=82,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 82:if(c=e.sent,!r){e.next=85;break}return e.abrupt("return",c);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(c=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getPasswordResetToken",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"resetPassword",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=20,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 20:return c=e.sent,e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}"),pi(Su,"paramKeys",{authenticateCustomer:["organizationId"],authenticateCustomerRequired:["organizationId"],authorizePasswordlessCustomer:["organizationId"],authorizePasswordlessCustomerRequired:["organizationId"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id","code_challenge"],getAccessToken:["organizationId"],getAccessTokenRequired:["organizationId"],getSessionBridgeAccessToken:["organizationId"],getSessionBridgeAccessTokenRequired:["organizationId"],getTrustedSystemAccessToken:["organizationId"],getTrustedSystemAccessTokenRequired:["organizationId"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAccessToken:["organizationId"],getTrustedAgentAccessTokenRequired:["organizationId"],getPasswordResetToken:["organizationId"],getPasswordResetTokenRequired:["organizationId"],resetPassword:["organizationId"],resetPasswordRequired:["organizationId"],getPasswordLessAccessToken:["organizationId"],getPasswordLessAccessTokenRequired:["organizationId"],revokeToken:["organizationId"],revokeTokenRequired:["organizationId"],introspectToken:["organizationId"],introspectTokenRequired:["organizationId"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"]});var _u=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,d;return fi(e,[{key:"createOrder",value:(d=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getOrder",value:(s=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,Os(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Au(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(_u,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}"),pi(_u,"paramKeys",{createOrder:["organizationId","siteId","locale"],createOrderRequired:["organizationId","siteId"],getOrder:["organizationId","orderNo","siteId","locale"],getOrderRequired:["organizationId","orderNo","siteId"],guestOrderLookup:["organizationId","orderNo","siteId","locale"],guestOrderLookupRequired:["organizationId","orderNo","siteId"],createPaymentInstrumentForOrder:["organizationId","orderNo","siteId","locale"],createPaymentInstrumentForOrderRequired:["organizationId","orderNo","siteId"],removePaymentInstrumentFromOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],updatePaymentInstrumentForOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],updatePaymentInstrumentForOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],getPaymentMethodsForOrder:["organizationId","orderNo","siteId","locale"],getPaymentMethodsForOrderRequired:["organizationId","orderNo","siteId"],getTaxesFromOrder:["organizationId","orderNo","siteId"],getTaxesFromOrderRequired:["organizationId","orderNo","siteId"]});var Uu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return fi(e,[{key:"getProducts",value:(i=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new cu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new cu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new cu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new cu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}"),pi(Uu,"paramKeys",{getProducts:["organizationId","select","ids","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductsRequired:["organizationId","ids","siteId"],getProduct:["organizationId","id","select","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductRequired:["organizationId","id","siteId"],getCategories:["organizationId","ids","levels","locale","siteId"],getCategoriesRequired:["organizationId","ids","siteId"],getCategory:["organizationId","id","levels","locale","siteId"],getCategoryRequired:["organizationId","id","siteId"]});var Nu=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=Lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"getPromotions",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new cu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new cu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(Nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}"),pi(Nu,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["organizationId","campaignId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["organizationId","campaignId","siteId"]});var Fu=TypeError,Du=function(e,t){if(!delete e[t])throw Fu("Cannot delete property "+Y(t)+" of "+Y(e))},Wu=U.match(/firefox\/(\d+)/i),Gu=!!Wu&&+Wu[1],Hu=/MSIE|Trident/.test(U),Vu=U.match(/AppleWebKit\/(\d+)\./),$u=!!Vu&&+Vu[1],Yu=[],Ku=x(Yu.sort),Ju=x(Yu.push),Qu=c((function(){Yu.sort(void 0)})),Xu=c((function(){Yu.sort(null)})),Zu=Ln("sort"),eh=!c((function(){if(D)return D<70;if(!(Gu&&Gu>3)){if(Hu)return!0;if($u)return $u<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Yu.push({k:t+n,v:r})}for(Yu.sort((function(e,t){return t.v-e.v})),n=0;n<Yu.length;n++)t=Yu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function th(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?th(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):th(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}At({target:"Array",proto:!0,forced:Qu||!Xu||!Zu||!eh},{sort:function(e){void 0!==e&&J(e);var t=ie(this);if(eh)return void 0===e?Ku(t):Ku(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Ju(i,t[n]);for(Ka(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Vt(t)>Vt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Du(t,n++);return t}});var nh=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=rh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"productSearch",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=rh(rh({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new cu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=rh(rh({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ah(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ih(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(nh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),pi(nh,"paramKeys",{productSearch:["organizationId","select","siteId","q","refine","sort","currency","locale","expand","allImages","perPricebook","allVariationProperties","offset","limit"],productSearchRequired:["organizationId","siteId"],getSearchSuggestions:["organizationId","siteId","q","limit","currency","locale"],getSearchSuggestionsRequired:["organizationId","siteId","q"]});var oh=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=ah({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fi(e,[{key:"getUrlMapping",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new cu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ah(ah({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sh(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(oh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}"),pi(oh,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});var ch=function(){function e(t){hi(this,e),pi(this,"clientConfig",void 0);var r=dh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"searchStores",value:(r=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new cu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dh(dh({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=ui(Ni.mark((function e(t,r){var n,i,a,o,s,d,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new cu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dh(dh({},this.clientConfig.headers),null==t?void 0:t.headers),Do||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,Os(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(ch,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}"),pi(ch,"paramKeys",{searchStores:["organizationId","countryCode","distanceUnit","latitude","longitude","maxDistance","postalCode","siteId","locale","offset","limit"],searchStoresRequired:["organizationId","siteId"],getStores:["organizationId","siteId","ids","locale"],getStoresRequired:["organizationId","siteId","ids"]});var uh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Js("search",(function(e,t,r){return[function(t){var r=j(this),n=null==t?void 0:Q(t,e);return n?f(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=qe(this),i=Vt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;uh(o,0)||(n.lastIndex=0);var s=sd(n,i);return uh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var hh=Sr.map,lh=qn("map");At({target:"Array",proto:!0,forced:!lh},{map:function(e){return hh(this,e,arguments.length>1?arguments[1]:void 0)}});var fh=ge("iterator"),ph=!1;try{var gh=0,Ih={next:function(){return{done:!!gh++}},return:function(){ph=!0}};Ih[fh]=function(){return this},Array.from(Ih,(function(){throw 2}))}catch(e){}var vh,mh,bh,kh=function(e,t){if(!t&&!ph)return!1;var r=!1;try{var n={};n[fh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},yh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xh=Me.f,wh=rt.enforce,zh=rt.get,Ch=d.Int8Array,Ph=Ch&&Ch.prototype,Oh=d.Uint8ClampedArray,Eh=Oh&&Oh.prototype,qh=Ch&&Zi(Ch),jh=Ph&&Zi(Ph),Sh=Object.prototype,Th=d.TypeError,Mh=ge("toStringTag"),_h=ue("TYPED_ARRAY_TAG"),Ah=yh&&!!da&&"Opera"!==Gt(d.opera),Rh=!1,Uh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Bh={BigInt64Array:8,BigUint64Array:8},Lh=function(e){var t=Zi(e);if(M(t)){var r=zh(t);return r&&oe(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Lh(t)}},Nh=function(e){if(!M(e))return!1;var t=Gt(e);return oe(Uh,t)||oe(Bh,t)};for(vh in Uh)(bh=(mh=d[vh])&&mh.prototype)?wh(bh).TypedArrayConstructor=mh:Ah=!1;for(vh in Bh)(bh=(mh=d[vh])&&mh.prototype)&&(wh(bh).TypedArrayConstructor=mh);if((!Ah||!T(qh)||qh===Function.prototype)&&(qh=function(){throw Th("Incorrect invocation")},Ah))for(vh in Uh)d[vh]&&da(d[vh],qh);if((!Ah||!jh||jh===Sh)&&(jh=qh.prototype,Ah))for(vh in Uh)d[vh]&&da(d[vh].prototype,jh);if(Ah&&Zi(Eh)!==jh&&da(Eh,jh),u&&!oe(jh,Mh))for(vh in Rh=!0,xh(jh,Mh,{get:function(){return M(this)?this[_h]:void 0}}),Uh)d[vh]&&_e(d[vh],_h,vh);var Fh={NATIVE_ARRAY_BUFFER_VIEWS:Ah,TYPED_ARRAY_TAG:Rh&&_h,aTypedArray:function(e){if(Nh(e))return e;throw Th("Target is not a typed array")},aTypedArrayConstructor:function(e){if(T(e)&&(!da||R(qh,e)))return e;throw Th(Y(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Uh){var a=d[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}jh[e]&&!r||it(jh,e,r?t:Ah&&Ph[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(da){if(r)for(n in Uh)if((i=d[n])&&oe(i,e))try{delete i[e]}catch(e){}if(qh[e]&&!r)return;try{return it(qh,e,r?t:Ah&&qh[e]||t)}catch(e){}}for(n in Uh)!(i=d[n])||i[e]&&!r||it(i,e,t)}},getTypedArrayConstructor:Lh,isView:function(e){if(!M(e))return!1;var t=Gt(e);return"DataView"===t||oe(Uh,t)||oe(Bh,t)},isTypedArray:Nh,TypedArray:qh,TypedArrayPrototype:jh},Dh=Fh.NATIVE_ARRAY_BUFFER_VIEWS,Wh=d.ArrayBuffer,Gh=d.Int8Array,Hh=!Dh||!c((function(){Gh(1)}))||!c((function(){new Gh(-1)}))||!kh((function(e){new Gh,new Gh(null),new Gh(1.5),new Gh(e)}),!0)||c((function(){return 1!==new Gh(new Wh(2),1,void 0).length})),Vh=RangeError,$h=function(e){if(void 0===e)return 0;var t=dt(e),r=ft(t);if(t!==r)throw Vh("Wrong length or index");return r},Yh=Array,Kh=Math.abs,Jh=Math.pow,Qh=Math.floor,Xh=Math.log,Zh=Math.LN2,el=function(e,t,r){var n,i,a,o=Yh(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Jh(2,-24)-Jh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,l=0;for((e=Kh(e))!=e||e===1/0?(i=e!=e?1:0,n=d):(n=Qh(Xh(e)/Zh),e*(a=Jh(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?u/a:u*Jh(2,1-c))*a>=2&&(n++,a/=2),n+c>=d?(i=0,n=d):n+c>=1?(i=(e*a-1)*Jh(2,t),n+=c):(i=e*Jh(2,c-1)*Jh(2,t),n=0));t>=8;)o[l++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[l++]=255&n,n/=256,s-=8;return o[--l]|=128*h,o},tl=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,d=n-1,c=e[d--],u=127&c;for(c>>=7;s>0;)u=256*u+e[d--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[d--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:c?-1/0:1/0;r+=Jh(2,t),u-=o}return(c?-1:1)*r*Jh(2,u-t)},rl=function(e){for(var t=ie(this),r=pt(t),n=arguments.length,i=ht(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ht(a,r);o>i;)t[i++]=e;return t},nl=xt.f,il=Me.f,al=Be.PROPER,ol=Be.CONFIGURABLE,sl=rt.get,dl=rt.set,cl=d.ArrayBuffer,ul=cl,hl=ul&&ul.prototype,ll=d.DataView,fl=ll&&ll.prototype,pl=Object.prototype,gl=d.Array,Il=d.RangeError,vl=x(rl),ml=x([].reverse),bl=el,kl=tl,yl=function(e){return[255&e]},xl=function(e){return[255&e,e>>8&255]},wl=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},zl=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Cl=function(e){return bl(e,23,4)},Pl=function(e){return bl(e,52,8)},Ol=function(e,t){il(e.prototype,t,{get:function(){return sl(this)[t]}})},El=function(e,t,r,n){var i=$h(r),a=sl(e);if(i+t>a.byteLength)throw Il("Wrong index");var o=sl(a.buffer).bytes,s=i+a.byteOffset,d=ir(o,s,s+t);return n?d:ml(d)},ql=function(e,t,r,n,i,a){var o=$h(r),s=sl(e);if(o+t>s.byteLength)throw Il("Wrong index");for(var d=sl(s.buffer).bytes,c=o+s.byteOffset,u=n(+i),h=0;h<t;h++)d[c+h]=u[a?h:t-h-1]};if(yh){var jl=al&&"ArrayBuffer"!==cl.name;if(c((function(){cl(1)}))&&c((function(){new cl(-1)}))&&!c((function(){return new cl,new cl(1.5),new cl(NaN),jl&&!ol})))jl&&ol&&_e(cl,"name","ArrayBuffer");else{(ul=function(e){return Ba(this,hl),new cl($h(e))}).prototype=hl;for(var Sl,Tl=nl(cl),Ml=0;Tl.length>Ml;)(Sl=Tl[Ml++])in ul||_e(ul,Sl,cl[Sl]);hl.constructor=ul}da&&Zi(fl)!==pl&&da(fl,pl);var _l=new ll(new ul(2)),Al=x(fl.setInt8);_l.setInt8(0,2147483648),_l.setInt8(1,2147483649),!_l.getInt8(0)&&_l.getInt8(1)||Ra(fl,{setInt8:function(e,t){Al(this,e,t<<24>>24)},setUint8:function(e,t){Al(this,e,t<<24>>24)}},{unsafe:!0})}else hl=(ul=function(e){Ba(this,hl);var t=$h(e);dl(this,{bytes:vl(gl(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,fl=(ll=function(e,t,r){Ba(this,fl),Ba(e,hl);var n=sl(e).byteLength,i=dt(t);if(i<0||i>n)throw Il("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw Il("Wrong length");dl(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Ol(ul,"byteLength"),Ol(ll,"buffer"),Ol(ll,"byteLength"),Ol(ll,"byteOffset")),Ra(fl,{getInt8:function(e){return El(this,1,e)[0]<<24>>24},getUint8:function(e){return El(this,1,e)[0]},getInt16:function(e){var t=El(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=El(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return zl(El(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return zl(El(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return kl(El(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return kl(El(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){ql(this,1,e,yl,t)},setUint8:function(e,t){ql(this,1,e,yl,t)},setInt16:function(e,t){ql(this,2,e,xl,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){ql(this,2,e,xl,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){ql(this,4,e,wl,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){ql(this,4,e,wl,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){ql(this,4,e,Cl,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){ql(this,8,e,Pl,t,arguments.length>2?arguments[2]:void 0)}});fr(ul,"ArrayBuffer"),fr(ll,"DataView");var Rl={ArrayBuffer:ul,DataView:ll},Ul=Math.floor,Bl=Number.isInteger||function(e){return!M(e)&&isFinite(e)&&Ul(e)===e},Ll=RangeError,Nl=RangeError,Fl=function(e,t){var r=function(e){var t=dt(e);if(t<0)throw Ll("The argument can't be less than 0");return t}(e);if(r%t)throw Nl("Wrong offset");return r},Dl=Fh.aTypedArrayConstructor,Wl=function(e){var t,r,n,i,a,o,s=es(this),d=ie(e),c=arguments.length,u=c>1?arguments[1]:void 0,h=void 0!==u,l=Na(d);if(l&&!Od(l))for(o=(a=Da(d,l)).next,d=[];!(i=f(o,a)).done;)d.push(i.value);for(h&&c>2&&(u=gr(u,arguments[2])),r=pt(d),n=new(Dl(s))(r),t=0;r>t;t++)n[t]=h?u(d[t],t):d[t];return n},Gl=ge("species"),Hl=function(e){var t=A(e),r=Me.f;u&&t&&!t[Gl]&&r(t,Gl,{configurable:!0,get:function(){return this}})};i((function(e){var t=xt.f,r=Sr.forEach,n=rt.get,i=rt.set,a=rt.enforce,o=Me.f,s=Ce.f,c=Math.round,h=d.RangeError,l=Rl.ArrayBuffer,p=l.prototype,g=Rl.DataView,I=Fh.NATIVE_ARRAY_BUFFER_VIEWS,m=Fh.TYPED_ARRAY_TAG,b=Fh.TypedArray,k=Fh.TypedArrayPrototype,y=Fh.aTypedArrayConstructor,x=Fh.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},z=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},C=function(e){var t;return R(p,e)||"ArrayBuffer"==(t=Gt(e))||"SharedArrayBuffer"==t},P=function(e,t){return x(e)&&!V(t)&&t in e&&Bl(+t)&&t>=0},O=function(e,t){return t=be(t),P(e,t)?v(2,e[t]):s(e,t)},E=function(e,t,r){return t=be(t),!(P(e,t)&&M(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};u?(I||(Ce.f=O,Me.f=E,z(k,"buffer"),z(k,"byteOffset"),z(k,"byteLength"),z(k,"length")),At({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,u){var p=e.match(/\d+$/)[0]/8,v=e+(u?"Clamped":"")+"Array",y="get"+e,z="set"+e,P=d[v],O=P,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=c(r))<0?0:r>255?255:255&r),i.view[z](t*p+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};I?Hh&&(O=s((function(e,t,r,n){return Ba(e,E),function(e,t,r){var n,i;return da&&T(n=t.constructor)&&n!==r&&M(i=n.prototype)&&i!==r.prototype&&da(e,i),e}(M(t)?C(t)?void 0!==n?new P(t,Fl(r,p),n):void 0!==r?new P(t,Fl(r,p)):new P(t):x(t)?w(O,t):f(Wl,O,t):new P($h(t)),e,O)})),da&&da(O,b),r(t(P),(function(e){e in O||_e(O,e,P[e])})),O.prototype=E):(O=s((function(e,t,r,n){Ba(e,E);var a,o,s,d=0,c=0;if(M(t)){if(!C(t))return x(t)?w(O,t):f(Wl,O,t);a=t,c=Fl(r,p);var u=t.byteLength;if(void 0===n){if(u%p)throw h("Wrong length");if((o=u-c)<0)throw h("Wrong length")}else if((o=ft(n)*p)+c>u)throw h("Wrong length");s=o/p}else s=$h(t),a=new l(o=s*p);for(i(e,{buffer:a,byteOffset:c,byteLength:o,length:s,view:new g(a)});d<s;)j(e,d++)})),da&&da(O,b),E=O.prototype=er(k)),E.constructor!==O&&_e(E,"constructor",O),a(E).TypedArrayConstructor=O,m&&_e(E,m,v);var S=O!=P;q[v]=O,At({global:!0,constructor:!0,forced:S,sham:!I},q),"BYTES_PER_ELEMENT"in O||_e(O,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in E||_e(E,"BYTES_PER_ELEMENT",p),Hl(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Vl=Math.min,$l=x([].copyWithin||function(e,t){var r=ie(this),n=pt(r),i=ht(e,n),a=ht(t,n),o=arguments.length>2?arguments[2]:void 0,s=Vl((void 0===o?n:ht(o,n))-a,n-i),d=1;for(a<i&&i<a+s&&(d=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Du(r,i),i+=d,a+=d;return r}),Yl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("copyWithin",(function(e,t){return $l(Yl(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Kl=Sr.every,Jl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("every",(function(e){return Kl(Jl(this),e,arguments.length>1?arguments[1]:void 0)}));var Ql=TypeError,Xl=function(e){var t=me(e,"number");if("number"==typeof t)throw Ql("Can't convert number to bigint");return BigInt(t)},Zl=Fh.aTypedArray,ef=Fh.exportTypedArrayMethod,tf=x("".slice);ef("fill",(function(e){var t=arguments.length;Zl(this);var r="Big"===tf(Gt(this),0,3)?Xl(e):+e;return f(rl,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var rf=ge("species"),nf=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[rf])?t:es(r)},af=Fh.aTypedArrayConstructor,of=Fh.getTypedArrayConstructor,sf=function(e){return af(nf(e,of(e)))},df=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(sf(e),t)},cf=Sr.filter,uf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("filter",(function(e){var t=cf(uf(this),e,arguments.length>1?arguments[1]:void 0);return df(this,t)}));var hf=Sr.find,lf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("find",(function(e){return hf(lf(this),e,arguments.length>1?arguments[1]:void 0)}));var ff=Sr.findIndex,pf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("findIndex",(function(e){return ff(pf(this),e,arguments.length>1?arguments[1]:void 0)}));var gf=Sr.forEach,If=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("forEach",(function(e){gf(If(this),e,arguments.length>1?arguments[1]:void 0)}));var vf=It.includes,mf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("includes",(function(e){return vf(mf(this),e,arguments.length>1?arguments[1]:void 0)}));var bf=It.indexOf,kf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("indexOf",(function(e){return bf(kf(this),e,arguments.length>1?arguments[1]:void 0)}));var yf=ge("iterator"),xf=d.Uint8Array,wf=x(ba.values),zf=x(ba.keys),Cf=x(ba.entries),Pf=Fh.aTypedArray,Of=Fh.exportTypedArrayMethod,Ef=xf&&xf.prototype,qf=!c((function(){Ef[yf].call([1])})),jf=!!Ef&&Ef.values&&Ef[yf]===Ef.values&&"values"===Ef.values.name,Sf=function(){return wf(Pf(this))};Of("entries",(function(){return Cf(Pf(this))}),qf),Of("keys",(function(){return zf(Pf(this))}),qf),Of("values",Sf,qf||!jf,{name:"values"}),Of(yf,Sf,qf||!jf,{name:"values"});var Tf=Fh.aTypedArray,Mf=Fh.exportTypedArrayMethod,_f=x([].join);Mf("join",(function(e){return _f(Tf(this),e)}));var Af=Math.min,Rf=[].lastIndexOf,Uf=!!Rf&&1/[1].lastIndexOf(1,-0)<0,Bf=Ln("lastIndexOf"),Lf=Uf||!Bf?function(e){if(Uf)return ln(Rf,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=Af(n,dt(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Rf,Nf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return ln(Lf,Nf(this),t>1?[e,arguments[1]]:[e])}));var Ff=Sr.map,Df=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("map",(function(e){return Ff(Df(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(sf(e))(t)}))}));var Wf=TypeError,Gf=function(e){return function(t,r,n,i){J(r);var a=ie(t),o=E(a),s=pt(a),d=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(d in o){i=o[d],d+=c;break}if(d+=c,e?d<0:s<=d)throw Wf("Reduce of empty array with no initial value")}for(;e?d>=0:s>d;d+=c)d in o&&(i=r(i,o[d],d,a));return i}},Hf={left:Gf(!1),right:Gf(!0)},Vf=Hf.left,$f=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Vf($f(this),e,t,t>1?arguments[1]:void 0)}));var Yf=Hf.right,Kf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Yf(Kf(this),e,t,t>1?arguments[1]:void 0)}));var Jf=Fh.aTypedArray,Qf=Fh.exportTypedArrayMethod,Xf=Math.floor;Qf("reverse",(function(){for(var e,t=Jf(this).length,r=Xf(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Zf=d.RangeError,ep=d.Int8Array,tp=ep&&ep.prototype,rp=tp&&tp.set,np=Fh.aTypedArray,ip=Fh.exportTypedArrayMethod,ap=!c((function(){var e=new Uint8ClampedArray(2);return f(rp,e,{length:1,0:3},1),3!==e[1]})),op=ap&&Fh.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new ep(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));ip("set",(function(e){np(this);var t=Fl(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(ap)return f(rp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Zf("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!ap||op);var sp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(sp(this),e,t),n=sf(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var dp=Sr.some,cp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("some",(function(e){return dp(cp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=Fh.aTypedArray,hp=Fh.exportTypedArrayMethod,lp=d.Uint16Array,fp=lp&&x(lp.prototype.sort),pp=!(!fp||c((function(){fp(new lp(2),null)}))&&c((function(){fp(new lp(2),{})}))),gp=!!fp&&!c((function(){if(D)return D<74;if(Gu)return Gu<67;if(Hu)return!0;if($u)return $u<602;var e,t,r=new lp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(fp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));hp("sort",(function(e){return void 0!==e&&J(e),gp?fp(this,e):Ka(up(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!gp||pp);var Ip=d.Int8Array,vp=Fh.aTypedArray,mp=Fh.exportTypedArrayMethod,bp=[].toLocaleString,kp=!!Ip&&c((function(){bp.call(new Ip(1))}));mp("toLocaleString",(function(){return ln(bp,kp?fn(vp(this)):vp(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new Ip([1,2]).toLocaleString()}))||!c((function(){Ip.prototype.toLocaleString.call([1,2])})));var yp=Fh.exportTypedArrayMethod,xp=d.Uint8Array,wp=xp&&xp.prototype||{},zp=[].toString,Cp=x([].join);c((function(){zp.call({})}))&&(zp=function(){return Cp(this)});var Pp=wp.toString!=zp;yp("toString",zp,Pp);var Op,Ep,qp,jp,Sp="process"==C(d.process),Tp=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),Mp=d.setImmediate,_p=d.clearImmediate,Ap=d.process,Rp=d.Dispatch,Up=d.Function,Bp=d.MessageChannel,Lp=d.String,Np=0,Fp={};try{Op=d.location}catch(e){}var Dp=function(e){if(oe(Fp,e)){var t=Fp[e];delete Fp[e],t()}},Wp=function(e){return function(){Dp(e)}},Gp=function(e){Dp(e.data)},Hp=function(e){d.postMessage(Lp(e),Op.protocol+"//"+Op.host)};Mp&&_p||(Mp=function(e){Ga(arguments.length,1);var t=T(e)?e:Up(e),r=fn(arguments,1);return Fp[++Np]=function(){ln(t,void 0,r)},Ep(Np),Np},_p=function(e){delete Fp[e]},Sp?Ep=function(e){Ap.nextTick(Wp(e))}:Rp&&Rp.now?Ep=function(e){Rp.now(Wp(e))}:Bp&&!Tp?(jp=(qp=new Bp).port2,qp.port1.onmessage=Gp,Ep=gr(jp.postMessage,jp)):d.addEventListener&&T(d.postMessage)&&!d.importScripts&&Op&&"file:"!==Op.protocol&&!c(Hp)?(Ep=Hp,d.addEventListener("message",Gp,!1)):Ep="onreadystatechange"in xe("script")?function(e){Yt.appendChild(xe("script")).onreadystatechange=function(){Yt.removeChild(this),Dp(e)}}:function(e){setTimeout(Wp(e),0)});var Vp,$p,Yp,Kp,Jp,Qp,Xp,Zp,eg={set:Mp,clear:_p},tg=/ipad|iphone|ipod/i.test(U)&&void 0!==d.Pebble,rg=/web0s(?!.*chrome)/i.test(U),ng=Ce.f,ig=eg.set,ag=d.MutationObserver||d.WebKitMutationObserver,og=d.document,sg=d.process,dg=d.Promise,cg=ng(d,"queueMicrotask"),ug=cg&&cg.value;ug||(Vp=function(){var e,t;for(Sp&&(e=sg.domain)&&e.exit();$p;){t=$p.fn,$p=$p.next;try{t()}catch(e){throw $p?Kp():Yp=void 0,e}}Yp=void 0,e&&e.enter()},Tp||Sp||rg||!ag||!og?!tg&&dg&&dg.resolve?((Xp=dg.resolve(void 0)).constructor=dg,Zp=gr(Xp.then,Xp),Kp=function(){Zp(Vp)}):Sp?Kp=function(){sg.nextTick(Vp)}:(ig=gr(ig,d),Kp=function(){ig(Vp)}):(Jp=!0,Qp=og.createTextNode(""),new ag(Vp).observe(Qp,{characterData:!0}),Kp=function(){Qp.data=Jp=!Jp}));var hg=ug||function(e){var t={fn:e,next:void 0};Yp&&(Yp.next=t),$p||($p=t,Kp()),Yp=t},lg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},fg=function(){this.head=null,this.tail=null};fg.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var pg=fg,gg=d.Promise,Ig="object"==typeof window&&"object"!=typeof Deno;gg&&gg.prototype;var vg,mg,bg,kg=ge("species"),yg=!1,xg=T(d.PromiseRejectionEvent),wg={CONSTRUCTOR:Mt("Promise",(function(){var e=We(gg),t=e!==String(gg);if(!t&&66===D)return!0;if(D>=51&&/native code/.test(e))return!1;var r=new gg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[kg]=n,!(yg=r.then((function(){}))instanceof n)||!t&&Ig&&!xg})),REJECTION_EVENT:xg,SUBCLASSING:yg},zg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=J(t),this.reject=J(r)},Cg={f:function(e){return new zg(e)}},Pg=eg.set,Og=wg.CONSTRUCTOR,Eg=wg.REJECTION_EVENT,qg=wg.SUBCLASSING,jg=rt.getterFor("Promise"),Sg=rt.set,Tg=gg&&gg.prototype,Mg=gg,_g=Tg,Ag=d.TypeError,Rg=d.document,Ug=d.process,Bg=Cg.f,Lg=Bg,Ng=!!(Rg&&Rg.createEvent&&d.dispatchEvent),Fg=function(e){var t;return!(!M(e)||!T(t=e.then))&&t},Dg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&$g(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?c(Ag("Promise-chain cycle")):(n=Fg(r))?f(n,r,d,c):d(r)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Wg=function(e,t){e.notified||(e.notified=!0,hg((function(){for(var r,n=e.reactions;r=n.get();)Dg(r,e);e.notified=!1,t&&!e.rejection&&Hg(e)})))},Gg=function(e,t,r){var n,i;Ng?((n=Rg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:r},!Eg&&(i=d["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=d.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Hg=function(e){f(Pg,d,(function(){var t,r=e.facade,n=e.value;if(Vg(e)&&(t=lg((function(){Sp?Ug.emit("unhandledRejection",n,r):Gg("unhandledrejection",r,n)})),e.rejection=Sp||Vg(e)?2:1,t.error))throw t.value}))},Vg=function(e){return 1!==e.rejection&&!e.parent},$g=function(e){f(Pg,d,(function(){var t=e.facade;Sp?Ug.emit("rejectionHandled",t):Gg("rejectionhandled",t,e.value)}))},Yg=function(e,t,r){return function(n){e(t,n,r)}},Kg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Wg(e,!0))},Jg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ag("Promise can't be resolved itself");var n=Fg(t);n?hg((function(){var r={done:!1};try{f(n,t,Yg(Jg,r,e),Yg(Kg,r,e))}catch(t){Kg(r,t,e)}})):(e.value=t,e.state=1,Wg(e,!1))}catch(t){Kg({done:!1},t,e)}}};if(Og&&(_g=(Mg=function(e){Ba(this,_g),J(e),f(vg,this);var t=jg(this);try{e(Yg(Jg,t),Yg(Kg,t))}catch(e){Kg(t,e)}}).prototype,(vg=function(e){Sg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new pg,rejection:!1,state:0,value:void 0})}).prototype=it(_g,"then",(function(e,t){var r=jg(this),n=Bg(nf(this,Mg));return r.parent=!0,n.ok=!T(e)||e,n.fail=T(t)&&t,n.domain=Sp?Ug.domain:void 0,0==r.state?r.reactions.add(n):hg((function(){Dg(n,r)})),n.promise})),mg=function(){var e=new vg,t=jg(e);this.promise=e,this.resolve=Yg(Jg,t),this.reject=Yg(Kg,t)},Cg.f=Bg=function(e){return e===Mg||void 0===e?new mg(e):Lg(e)},T(gg)&&Tg!==Object.prototype)){bg=Tg.then,qg||it(Tg,"then",(function(e,t){var r=this;return new Mg((function(e,t){f(bg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Tg.constructor}catch(e){}da&&da(Tg,_g)}At({global:!0,constructor:!0,wrap:!0,forced:Og},{Promise:Mg}),fr(Mg,"Promise",!1),Hl("Promise");var Qg=TypeError,Xg=function(e,t){this.stopped=e,this.result=t},Zg=Xg.prototype,eI=function(e,t,r){var n,i,a,o,s,d,c,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),l=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),I=gr(t,u),v=function(e){return n&&wd(n,"normal",e),new Xg(!0,e)},m=function(e){return h?(qe(e),g?I(e[0],e[1],v):I(e[0],e[1])):g?I(e,v):I(e)};if(l)n=e.iterator;else if(p)n=e;else{if(!(i=Na(e)))throw Qg(Y(e)+" is not iterable");if(Od(i)){for(a=0,o=pt(e);o>a;a++)if((s=m(e[a]))&&R(Zg,s))return s;return new Xg(!1)}n=Da(e,i)}for(d=l?e.next:n.next;!(c=f(d,n)).done;){try{s=m(c.value)}catch(e){wd(n,"throw",e)}if("object"==typeof s&&s&&R(Zg,s))return s}return new Xg(!1)},tI=wg.CONSTRUCTOR||!kh((function(e){gg.all(e).then(void 0,(function(){}))}));At({target:"Promise",stat:!0,forced:tI},{all:function(e){var t=this,r=Cg.f(t),n=r.resolve,i=r.reject,a=lg((function(){var r=J(t.resolve),a=[],o=0,s=1;eI(e,(function(e){var d=o++,c=!1;s++,f(r,t,e).then((function(e){c||(c=!0,a[d]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var rI=wg.CONSTRUCTOR,nI=gg&&gg.prototype;if(At({target:"Promise",proto:!0,forced:rI,real:!0},{catch:function(e){return this.then(void 0,e)}}),T(gg)){var iI=A("Promise").prototype.catch;nI.catch!==iI&&it(nI,"catch",iI,{unsafe:!0})}At({target:"Promise",stat:!0,forced:tI},{race:function(e){var t=this,r=Cg.f(t),n=r.reject,i=lg((function(){var i=J(t.resolve);eI(e,(function(e){f(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),At({target:"Promise",stat:!0,forced:wg.CONSTRUCTOR},{reject:function(e){var t=Cg.f(this);return f(t.reject,void 0,e),t.promise}});var aI=wg.CONSTRUCTOR;function oI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sI(e){return function(e){if(Array.isArray(e))return oI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dI(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}A("Promise"),At({target:"Promise",stat:!0,forced:aI},{resolve:function(e){return function(e,t){if(qe(e),M(t)&&t.constructor===e)return t;var r=Cg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),At({target:"Object",stat:!0},{fromEntries:function(e){var t={};return eI(e,(function(e,r){tr(t,e,r)}),{AS_ENTRIES:!0}),t}});var uI=Do?btoa:function(e){return Buffer.from(e).toString("base64")},hI=function(e){var t,r,n=new URL(e),i=new URLSearchParams(n.search),a=null!==(t=i.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=i.get("code"))&&void 0!==r?r:"",usid:a}},lI=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},fI=function(){var e=ui(Ni.mark((function e(t){var r,n,i,a,o,s,d;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Do||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,sI(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:d=e.sent,n=r(d.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function pI(e,t,r){return gI.apply(this,arguments)}function gI(){return(gI=ui(Ni.mark((function e(t,r,n){var i,a,o,s,d,c,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fI(r);case 2:return a=e.sent,(o=new Su(t.clientConfig)).clientConfig.fetchOptions=cI(cI({},t.clientConfig.fetchOptions),{},{redirect:Do?"follow":"manual"}),s={parameters:cI(cI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(d=e.sent,c=(null===(i=d.headers)||void 0===i?void 0:i.get("location"))||d.url,u=new URL(c),h=Object.fromEntries(u.searchParams.entries()),!(d.status>=400||h.error)){e.next=14;break}throw new xs(d);case 14:return e.abrupt("return",cI({url:c},hI(c)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function II(){return(II=ui(Ni.mark((function e(t,r,n){var i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(uI("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:cI({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vI(){return(vI=ui(Ni.mark((function e(t,r){var n,i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=lI(),e.next=3,pI(t,n,cI({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mI(){return(mI=ui(Ni.mark((function e(t,r,n){var i,a,o,s,d,c,u,h,l,f,p,g,I,v;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=lI(),e.next=3,fI(a);case 3:return o=e.sent,(s=new Su(t.clientConfig)).clientConfig.fetchOptions=cI(cI({},t.clientConfig.fetchOptions),{},{redirect:Do?"follow":"manual"}),d="Basic ".concat(uI("".concat(r.username,":").concat(r.password))),c={headers:{Authorization:d},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:cI({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(c,!0);case 10:if(u=e.sent,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,l=new URL(h),f=Object.fromEntries(l.searchParams.entries()),!(u.status>=400||f.error)){e.next=16;break}throw new xs(u);case 16:if(p=hI(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:p.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:p.usid},!r.clientSecret){e.next=22;break}return I="Basic ".concat(uI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:I},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var bI=Sr.find,kI=!0;"find"in[]&&Array(1).find((function(){kI=!1})),At({target:"Array",proto:!0,forced:kI},{find:function(e){return bI(this,e,arguments.length>1?arguments[1]:void 0)}}),$i("find");function yI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yI(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},zI=function(){var e=ui(Ni.mark((function e(t){var r,n,i,a,o,s,d,c,u,h,l,f;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],d=xI(xI({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!d[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),d.apiVersion||(d.apiVersion="v1"),c=a,a.baseUri||(c=xI(xI({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),h=wI(i.headers)||wI(c.headers),l=i,h&&!u||(l=xI(xI({},i),{},{headers:xI(xI({},i.headers),!h&&{"Content-Type":"application/json"}),parameters:xI(xI({},i.parameters),u&&{siteId:a.parameters.siteId})})),f=new cu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:l.parameters,origin:c.proxy}),e.abrupt("return",Os(f.toString(),l,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),CI=Object.freeze({__proto__:null,isBrowser:Do,isNode:Wo,globalObject:Go,hasFetchAvailable:Ho,fetch:Vo,stringToBase64:uI,getCodeAndUsidFromUrl:hI,createCodeVerifier:lI,generateCodeChallenge:fI,authorize:pI,loginGuestUserPrivate:function(e,t,r){return II.apply(this,arguments)},loginGuestUser:function(e,t){return vI.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return mI.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(uI("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:zI,doFetch:Os});export{No as ClientConfig,fu as ShopperBaskets,Iu as ShopperContexts,bu as ShopperCustomers,xu as ShopperDiscoverySearch,Cu as ShopperExperience,Eu as ShopperGiftCertificates,Su as ShopperLogin,_u as ShopperOrders,Uu as ShopperProducts,Nu as ShopperPromotions,nh as ShopperSearch,oh as ShopperSeo,ch as ShopperStores,cu as TemplateURL,CI as helpers};