commerce-sdk-isomorphic 1.10.1 → 1.10.2
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/CHANGELOG.md +6 -1
- package/lib/index.cjs.d.ts +378 -53
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +378 -53
- package/lib/index.esm.js +1 -1
- package/package.json +2 -2
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nanoid as e}from"nanoid";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(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 n,i,a=function(e){return e&&e.Math==Math&&e},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,f=d?u.bind(u):function(){return u.apply(u,arguments)},h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,l={f:p&&!h.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:h},g=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=Function.prototype,v=b.bind,I=b.call,k=d&&v.bind(I,I),x=d?function(e){return e&&k(e)}:function(e){return e&&function(){return I.apply(e,arguments)}},m=x({}.toString),w=x("".slice),y=function(e){return w(m(e),8,-1)},C=Object,z=x("".split),O=s((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==y(e)?z(e,""):C(e)}:C,E=TypeError,q=function(e){if(null==e)throw E("Can't call method on "+e);return e},P=function(e){return O(q(e))},S=function(e){return"function"==typeof e},j=function(e){return"object"==typeof e?null!==e:S(e)},M=function(e){return S(e)?e:void 0},T=function(e,t){return arguments.length<2?M(o[e]):o[e]&&o[e][t]},R=x({}.isPrototypeOf),A=T("navigator","userAgent")||"",U=o.process,B=o.Deno,N=U&&U.versions||B&&B.version,_=N&&N.v8;_&&(i=(n=_.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&A&&(!(n=A.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=A.match(/Chrome\/(\d+)/))&&(i=+n[1]);var L=i,D=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),J=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=Object,G=J?function(e){return"symbol"==typeof e}:function(e){var t=T("Symbol");return S(t)&&R(t.prototype,F(e))},H=String,V=function(e){try{return H(e)}catch(e){return"Object"}},W=TypeError,$=function(e){if(S(e))return e;throw W(V(e)+" is not a function")},Y=function(e,t){var r=e[t];return null==r?void 0:$(r)},K=TypeError,Q=Object.defineProperty,X=function(e,t){try{Q(o,e,{value:t,configurable:!0,writable:!0})}catch(r){o[e]=t}return t},Z=o["__core-js_shared__"]||X("__core-js_shared__",{}),ee=r((function(e){(e.exports=function(e,t){return Z[e]||(Z[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"})})),te=Object,re=function(e){return te(q(e))},ne=x({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ne(re(e),t)},ae=0,oe=Math.random(),se=x(1..toString),ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+se(++ae+oe,36)},de=ee("wks"),ue=o.Symbol,fe=ue&&ue.for,he=J?ue:ue&&ue.withoutSetter||ce,pe=function(e){if(!ie(de,e)||!D&&"string"!=typeof de[e]){var t="Symbol."+e;D&&ie(ue,e)?de[e]=ue[e]:de[e]=J&&fe?fe(t):he(t)}return de[e]},le=TypeError,ge=pe("toPrimitive"),be=function(e,t){if(!j(e)||G(e))return e;var r,n=Y(e,ge);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!j(r)||G(r))return r;throw le("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&S(r=e.toString)&&!j(n=f(r,e)))return n;if(S(r=e.valueOf)&&!j(n=f(r,e)))return n;if("string"!==t&&S(r=e.toString)&&!j(n=f(r,e)))return n;throw K("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=be(e,"string");return G(t)?t:t+""},Ie=o.document,ke=j(Ie)&&j(Ie.createElement),xe=function(e){return ke?Ie.createElement(e):{}},me=!c&&!s((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,ye={f:c?we:function(e,t){if(e=P(e),t=ve(t),me)try{return we(e,t)}catch(e){}if(ie(e,t))return g(!f(l.f,e,t),e[t])}},Ce=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=String,Oe=TypeError,Ee=function(e){if(j(e))return e;throw Oe(ze(e)+" is not an object")},qe=TypeError,Pe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,je={f:c?Ce?function(e,t,r){if(Ee(e),t=ve(t),Ee(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Se(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 Pe(e,t,r)}:Pe:function(e,t,r){if(Ee(e),t=ve(t),Ee(r),me)try{return Pe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw qe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=c?function(e,t,r){return je.f(e,t,g(1,r))}:function(e,t,r){return e[t]=r,e},Te=Function.prototype,Re=c&&Object.getOwnPropertyDescriptor,Ae=ie(Te,"name"),Ue={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!c||c&&Re(Te,"name").configurable)},Be=x(Function.toString);S(Z.inspectSource)||(Z.inspectSource=function(e){return Be(e)});var Ne,_e,Le,De=Z.inspectSource,Je=o.WeakMap,Fe=S(Je)&&/native code/.test(De(Je)),Ge=ee("keys"),He=function(e){return Ge[e]||(Ge[e]=ce(e))},Ve={},We=o.TypeError,$e=o.WeakMap;if(Fe||Z.state){var Ye=Z.state||(Z.state=new $e),Ke=x(Ye.get),Qe=x(Ye.has),Xe=x(Ye.set);Ne=function(e,t){if(Qe(Ye,e))throw new We("Object already initialized");return t.facade=e,Xe(Ye,e,t),t},_e=function(e){return Ke(Ye,e)||{}},Le=function(e){return Qe(Ye,e)}}else{var Ze=He("state");Ve[Ze]=!0,Ne=function(e,t){if(ie(e,Ze))throw new We("Object already initialized");return t.facade=e,Me(e,Ze,t),t},_e=function(e){return ie(e,Ze)?e[Ze]:{}},Le=function(e){return ie(e,Ze)}}var et={set:Ne,get:_e,has:Le,enforce:function(e){return Le(e)?_e(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!j(t)||(r=_e(t)).type!==e)throw We("Incompatible receiver, "+e+" required");return r}}},tt=r((function(e){var t=Ue.CONFIGURABLE,r=et.enforce,n=et.get,i=Object.defineProperty,a=c&&!s((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),d=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),(!ie(e,"name")||t&&e.name!==n)&&(c?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ie(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?c&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return ie(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=d((function(){return S(this)&&n(this).source||De(this)}),"toString")})),rt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(S(r)&&tt(r,a,n),n.global)i?e[t]=r:X(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:je.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},nt=Math.ceil,it=Math.floor,at=Math.trunc||function(e){var t=+e;return(t>0?it:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:at(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},ht=function(e){return ft(e.length)},pt=function(e){return function(t,r,n){var i,a=P(t),o=ht(a),s=dt(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}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=x([].push),vt=function(e,t){var r,n=P(e),i=0,a=[];for(r in n)!ie(Ve,r)&&ie(n,r)&&bt(a,r);for(;t.length>i;)ie(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=It.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return vt(e,kt)}},mt={f:Object.getOwnPropertySymbols},wt=x([].concat),yt=T("Reflect","ownKeys")||function(e){var t=xt.f(Ee(e)),r=mt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=je.f,a=ye.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Ot=function(e,t){var r=qt[Et(e)];return r==St||r!=Pt&&(S(t)?s(t):!!t)},Et=Ot.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Ot.data={},Pt=Ot.NATIVE="N",St=Ot.POLYFILL="P",jt=Ot,Mt=ye.f,Tt=function(e,t){var r,n,i,a,s,c=e.target,d=e.global,u=e.stat;if(r=d?o:u?o[c]||X(c,{}):(o[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(s=Mt(r,n))&&s.value:r[n],!jt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),rt(r,n,a,e)}},Rt=Object.keys||function(e){return vt(e,It)},At=s((function(){Rt(1)}));Tt({target:"Object",stat:!0,forced:At},{keys:function(e){return Rt(re(e))}});var Ut={};Ut[pe("toStringTag")]="z";var Bt,Nt="[object z]"===String(Ut),_t=pe("toStringTag"),Lt=Object,Dt="Arguments"==y(function(){return arguments}()),Jt=Nt?y: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=Lt(e),_t))?r:Dt?y(t):"Object"==(n=y(t))&&S(t.callee)?"Arguments":n},Ft=String,Gt=function(e){if("Symbol"===Jt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ft(e)},Ht={f:c&&!Ce?Object.defineProperties:function(e,t){Ee(e);for(var r,n=P(t),i=Rt(t),a=i.length,o=0;a>o;)je.f(e,r=i[o++],n[r]);return e}},Vt=T("document","documentElement"),Wt=He("IE_PROTO"),$t=function(){},Yt=function(e){return"<script>"+e+"<\/script>"},Kt=function(e){e.write(Yt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Qt=function(){try{Bt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Qt="undefined"!=typeof document?document.domain&&Bt?Kt(Bt):((t=xe("iframe")).style.display="none",Vt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Yt("document.F=Object")),e.close(),e.F):Kt(Bt);for(var r=It.length;r--;)delete Qt.prototype[It[r]];return Qt()};Ve[Wt]=!0;var Xt=Object.create||function(e,t){var r;return null!==e?($t.prototype=Ee(e),r=new $t,$t.prototype=null,r[Wt]=e):r=Qt(),void 0===t?r:Ht.f(r,t)},Zt=function(e,t,r){var n=ve(t);n in e?je.f(e,n,g(0,r)):e[n]=r},er=Array,tr=Math.max,rr=function(e,t,r){for(var n=ht(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=er(tr(a-i,0)),s=0;i<a;i++,s++)Zt(o,s,e[i]);return o.length=s,o},nr=xt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ar={f:function(e){return ir&&"Window"==y(e)?function(e){try{return nr(e)}catch(e){return rr(ir)}}(e):nr(P(e))}},or={f:pe},sr=o,cr=je.f,dr=je.f,ur=pe("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ie(e,ur)&&dr(e,ur,{configurable:!0,value:t})},hr=x(x.bind),pr=function(e,t){return $(e),void 0===t?e:d?hr(e,t):function(){return e.apply(t,arguments)}},lr=Array.isArray||function(e){return"Array"==y(e)},gr=function(){},br=[],vr=T("Reflect","construct"),Ir=/^\s*(?:class|function)\b/,kr=x(Ir.exec),xr=!Ir.exec(gr),mr=function(e){if(!S(e))return!1;try{return vr(gr,br,e),!0}catch(e){return!1}},wr=function(e){if(!S(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!kr(Ir,De(e))}catch(e){return!0}};wr.sham=!0;var yr=!vr||s((function(){var e;return mr(mr.call)||!mr(Object)||!mr((function(){e=!0}))||e}))?wr:mr,Cr=pe("species"),zr=Array,Or=function(e,t){return new(function(e){var t;return lr(e)&&(t=e.constructor,(yr(t)&&(t===zr||lr(t.prototype))||j(t)&&null===(t=t[Cr]))&&(t=void 0)),void 0===t?zr:t}(e))(0===t?0:t)},Er=x([].push),qr=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,f){for(var h,p,l=re(c),g=O(l),b=pr(d,u),v=ht(g),I=0,k=f||Or,x=t?k(c,v):r||o?k(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:Er(x,h)}else switch(e){case 4:return!1;case 7:Er(x,h)}return a?-1:n||i?i:x}},Pr={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},Sr=Pr.forEach,jr=He("hidden"),Mr=et.set,Tr=et.getterFor("Symbol"),Rr=Object.prototype,Ar=o.Symbol,Ur=Ar&&Ar.prototype,Br=o.TypeError,Nr=o.QObject,_r=ye.f,Lr=je.f,Dr=ar.f,Jr=l.f,Fr=x([].push),Gr=ee("symbols"),Hr=ee("op-symbols"),Vr=ee("wks"),Wr=!Nr||!Nr.prototype||!Nr.prototype.findChild,$r=c&&s((function(){return 7!=Xt(Lr({},"a",{get:function(){return Lr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=_r(Rr,t);n&&delete Rr[t],Lr(e,t,r),n&&e!==Rr&&Lr(Rr,t,n)}:Lr,Yr=function(e,t){var r=Gr[e]=Xt(Ur);return Mr(r,{type:"Symbol",tag:e,description:t}),c||(r.description=t),r},Kr=function(e,t,r){e===Rr&&Kr(Hr,t,r),Ee(e);var n=ve(t);return Ee(r),ie(Gr,n)?(r.enumerable?(ie(e,jr)&&e[jr][n]&&(e[jr][n]=!1),r=Xt(r,{enumerable:g(0,!1)})):(ie(e,jr)||Lr(e,jr,g(1,{})),e[jr][n]=!0),$r(e,n,r)):Lr(e,n,r)},Qr=function(e,t){Ee(e);var r=P(t),n=Rt(r).concat(tn(r));return Sr(n,(function(t){c&&!f(Xr,r,t)||Kr(e,t,r[t])})),e},Xr=function(e){var t=ve(e),r=f(Jr,this,t);return!(this===Rr&&ie(Gr,t)&&!ie(Hr,t))&&(!(r||!ie(this,t)||!ie(Gr,t)||ie(this,jr)&&this[jr][t])||r)},Zr=function(e,t){var r=P(e),n=ve(t);if(r!==Rr||!ie(Gr,n)||ie(Hr,n)){var i=_r(r,n);return!i||!ie(Gr,n)||ie(r,jr)&&r[jr][n]||(i.enumerable=!0),i}},en=function(e){var t=Dr(P(e)),r=[];return Sr(t,(function(e){ie(Gr,e)||ie(Ve,e)||Fr(r,e)})),r},tn=function(e){var t=e===Rr,r=Dr(t?Hr:P(e)),n=[];return Sr(r,(function(e){!ie(Gr,e)||t&&!ie(Rr,e)||Fr(n,Gr[e])})),n};D||(Ur=(Ar=function(){if(R(Ur,this))throw Br("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gt(arguments[0]):void 0,t=ce(e),r=function(e){this===Rr&&f(r,Hr,e),ie(this,jr)&&ie(this[jr],t)&&(this[jr][t]=!1),$r(this,t,g(1,e))};return c&&Wr&&$r(Rr,t,{configurable:!0,set:r}),Yr(t,e)}).prototype,rt(Ur,"toString",(function(){return Tr(this).tag})),rt(Ar,"withoutSetter",(function(e){return Yr(ce(e),e)})),l.f=Xr,je.f=Kr,Ht.f=Qr,ye.f=Zr,xt.f=ar.f=en,mt.f=tn,or.f=function(e){return Yr(pe(e),e)},c&&(Lr(Ur,"description",{configurable:!0,get:function(){return Tr(this).description}}),rt(Rr,"propertyIsEnumerable",Xr,{unsafe:!0}))),Tt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ar}),Sr(Rt(Vr),(function(e){!function(e){var t=sr.Symbol||(sr.Symbol={});ie(t,e)||cr(t,e,{value:or.f(e)})}(e)})),Tt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){Wr=!0},useSimple:function(){Wr=!1}}),Tt({target:"Object",stat:!0,forced:!D,sham:!c},{create:function(e,t){return void 0===t?Xt(e):Qr(Xt(e),t)},defineProperty:Kr,defineProperties:Qr,getOwnPropertyDescriptor:Zr}),Tt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:en}),function(){var e=T("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=pe("toPrimitive");t&&!t[n]&&rt(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ar,"Symbol"),Ve[jr]=!0;var rn=D&&!!Symbol.for&&!!Symbol.keyFor,nn=ee("string-to-symbol-registry"),an=ee("symbol-to-string-registry");Tt({target:"Symbol",stat:!0,forced:!rn},{for:function(e){var t=Gt(e);if(ie(nn,t))return nn[t];var r=T("Symbol")(t);return nn[t]=r,an[r]=t,r}});var on=ee("symbol-to-string-registry");Tt({target:"Symbol",stat:!0,forced:!rn},{keyFor:function(e){if(!G(e))throw TypeError(V(e)+" is not a symbol");if(ie(on,e))return on[e]}});var sn=Function.prototype,cn=sn.apply,dn=sn.call,un="object"==typeof Reflect&&Reflect.apply||(d?dn.bind(cn):function(){return dn.apply(cn,arguments)}),fn=x([].slice),hn=T("JSON","stringify"),pn=x(/./.exec),ln=x("".charAt),gn=x("".charCodeAt),bn=x("".replace),vn=x(1..toString),In=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,mn=!D||s((function(){var e=T("Symbol")();return"[null]"!=hn([e])||"{}"!=hn({a:e})||"{}"!=hn(Object(e))})),wn=s((function(){return'"\\udf06\\ud834"'!==hn("\udf06\ud834")||'"\\udead"'!==hn("\udead")})),yn=function(e,t){var r=fn(arguments),n=t;if((j(t)||void 0!==e)&&!G(e))return lr(t)||(t=function(e,t){if(S(n)&&(t=f(n,this,e,t)),!G(t))return t}),r[1]=t,un(hn,null,r)},Cn=function(e,t,r){var n=ln(r,t-1),i=ln(r,t+1);return pn(kn,e)&&!pn(xn,i)||pn(xn,e)&&!pn(kn,n)?"\\u"+vn(gn(e,0),16):e};hn&&Tt({target:"JSON",stat:!0,arity:3,forced:mn||wn},{stringify:function(e,t,r){var n=fn(arguments),i=un(mn?yn:hn,null,n);return wn&&"string"==typeof i?bn(i,In,Cn):i}});var zn=!D||s((function(){mt.f(1)}));Tt({target:"Object",stat:!0,forced:zn},{getOwnPropertySymbols:function(e){var t=mt.f;return t?t(re(e)):[]}});var On=pe("species"),En=function(e){return L>=51||!s((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qn=Pr.filter,Pn=En("filter");Tt({target:"Array",proto:!0,forced:!Pn},{filter:function(e){return qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Sn=Nt?{}.toString:function(){return"[object "+Jt(this)+"]"};Nt||rt(Object.prototype,"toString",Sn,{unsafe:!0});var jn=ye.f,Mn=s((function(){jn(1)}));Tt({target:"Object",stat:!0,forced:!c||Mn,sham:!c},{getOwnPropertyDescriptor:function(e,t){return jn(P(e),t)}});var Tn={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,An=Rn&&Rn.constructor&&Rn.constructor.prototype,Un=An===Object.prototype?void 0:An,Bn=function(e,t){var r=[][e];return!!r&&s((function(){r.call(null,t||function(){return 1},1)}))},Nn=Pr.forEach,_n=Bn("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Ln=function(e){if(e&&e.forEach!==_n)try{Me(e,"forEach",_n)}catch(t){e.forEach=_n}};for(var Dn in Tn)Tn[Dn]&&Ln(o[Dn]&&o[Dn].prototype);Ln(Un),Tt({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(e){for(var t,r,n=P(e),i=ye.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&Zt(o,t,r);return o}});var Jn=Ht.f;Tt({target:"Object",stat:!0,forced:Object.defineProperties!==Jn,sham:!c},{defineProperties:Jn});var Fn=je.f;Tt({target:"Object",stat:!0,forced:Object.defineProperty!==Fn,sham:!c},{defineProperty:Fn});var Gn=function(){var e=Ee(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},Hn=RegExp.prototype,Vn=Ue.PROPER,Wn=RegExp.prototype.toString,$n=s((function(){return"/a/b"!=Wn.call({source:"a",flags:"b"})})),Yn=Vn&&"toString"!=Wn.name;function Kn(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 Qn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Kn(a,n,i,o,s,"next",e)}function s(e){Kn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Xn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(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 ei(e,t,r){return t&&Zn(e.prototype,t),r&&Zn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ti(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}($n||Yn)&&rt(RegExp.prototype,"toString",(function(){var e=Ee(this);return"/"+Gt(e.source)+"/"+Gt(function(e){var t=e.flags;return void 0!==t||"flags"in Hn||ie(e,"flags")||!R(Hn,e)?t:f(Gn,e)}(e))}),{unsafe:!0});var ri=Object.prototype,ni=ri.hasOwnProperty,ii="function"==typeof Symbol?Symbol:{},ai=ii.iterator||"@@iterator",oi=ii.asyncIterator||"@@asyncIterator",si=ii.toStringTag||"@@toStringTag";function ci(e,t,r,n){var i=t&&t.prototype instanceof fi?t:fi,a=Object.create(i.prototype),o=new Ci(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 Oi()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=mi(o,r);if(s){if(s===ui)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=di(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ui)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 di(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ui={};function fi(){}function hi(){}function pi(){}var li={};li[ai]=function(){return this};var gi=Object.getPrototypeOf,bi=gi&&gi(gi(zi([])));bi&&bi!==ri&&ni.call(bi,ai)&&(li=bi);var vi=pi.prototype=fi.prototype=Object.create(li);function Ii(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ki(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===hi||"GeneratorFunction"===(t.displayName||t.name))}function xi(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=di(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ni.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 mi(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,mi(e,t),"throw"===t.method))return ui;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ui}var n=di(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ui;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,ui):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ui)}function wi(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 yi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ci(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(wi,this),this.reset(!0)}function zi(e){if(e){var t=e[ai];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(ni.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:Oi}}function Oi(){return{value:void 0,done:!0}}hi.prototype=vi.constructor=pi,pi.constructor=hi,pi[si]=hi.displayName="GeneratorFunction",Ii(xi.prototype),xi.prototype[oi]=function(){return this},Ii(vi),vi[si]="Generator",vi[ai]=function(){return this},vi.toString=function(){return"[object Generator]"},Ci.prototype={constructor:Ci,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(yi),!e)for(var t in this)"t"===t.charAt(0)&&ni.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=ni.call(i,"catchLoc"),s=ni.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&&ni.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,ui):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),ui},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),yi(r),ui}},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;yi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:zi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ui}};var Ei={wrap:ci,isGeneratorFunction:ki,AsyncIterator:xi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,pi):(e.__proto__=pi,si in e||(e[si]="GeneratorFunction")),e.prototype=Object.create(vi),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new xi(ci(e,t,r,n),i);return ki(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:zi},qi=je.f,Pi=pe("unscopables"),Si=Array.prototype;null==Si[Pi]&&qi(Si,Pi,{configurable:!0,value:Xt(null)});var ji,Mi,Ti,Ri=function(e){Si[Pi][e]=!0},Ai={},Ui=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Bi=He("IE_PROTO"),Ni=Object,_i=Ni.prototype,Li=Ui?Ni.getPrototypeOf:function(e){var t=re(e);if(ie(t,Bi))return t[Bi];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ni?_i:null},Di=pe("iterator"),Ji=!1;[].keys&&("next"in(Ti=[].keys())?(Mi=Li(Li(Ti)))!==Object.prototype&&(ji=Mi):Ji=!0),(null==ji||s((function(){var e={};return ji[Di].call(e)!==e})))&&(ji={}),S(ji[Di])||rt(ji,Di,(function(){return this}));var Fi={IteratorPrototype:ji,BUGGY_SAFARI_ITERATORS:Ji},Gi=Fi.IteratorPrototype,Hi=function(){return this},Vi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Xt(Gi,{next:g(+!n,r)}),fr(e,i,!1),Ai[i]=Hi,e},Wi=String,$i=TypeError,Yi=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 Ee(r),function(e){if("object"==typeof e||S(e))return e;throw $i("Can't set "+Wi(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Ki=Ue.PROPER,Qi=Ue.CONFIGURABLE,Xi=Fi.IteratorPrototype,Zi=Fi.BUGGY_SAFARI_ITERATORS,ea=pe("iterator"),ta=function(){return this},ra=function(e,t,r,n,i,a,o){Vi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!Zi&&e in l)return l[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",p=!1,l=e.prototype,g=l[ea]||l["@@iterator"]||i&&l[i],b=!Zi&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Li(v.call(new e)))!==Object.prototype&&s.next&&(Li(s)!==Xi&&(Yi?Yi(s,Xi):S(s[ea])||rt(s,ea,ta)),fr(s,h,!0)),Ki&&"values"==i&&g&&"values"!==g.name&&(Qi?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(Zi||p||!(d in l))&&rt(l,d,c[d]);else Tt({target:t,proto:!0,forced:Zi||p},c);return l[ea]!==b&&rt(l,ea,b,{name:i}),Ai[t]=b,c},na=je.f,ia=et.set,aa=et.getterFor("Array Iterator"),oa=ra(Array,"Array",(function(e,t){ia(this,{type:"Array Iterator",target:P(e),index:0,kind:t})}),(function(){var e=aa(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"),sa=Ai.Arguments=Ai.Array;if(Ri("keys"),Ri("values"),Ri("entries"),c&&"values"!==sa.name)try{na(sa,"name",{value:"values"})}catch(e){}var ca=x("".charAt),da=x("".charCodeAt),ua=x("".slice),fa=function(e){return function(t,r){var n,i,a=Gt(q(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=da(a,o))<55296||n>56319||o+1===s||(i=da(a,o+1))<56320||i>57343?e?ca(a,o):n:e?ua(a,o,o+2):i-56320+(n-55296<<10)+65536}},ha={codeAt:fa(!1),charAt:fa(!0)},pa=ha.charAt,la=et.set,ga=et.getterFor("String Iterator");ra(String,"String",(function(e){la(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=ga(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 ba=pe("iterator"),va=pe("toStringTag"),Ia=oa.values,ka=function(e,t){if(e){if(e[ba]!==Ia)try{Me(e,ba,Ia)}catch(t){e[ba]=Ia}if(e[va]||Me(e,va,t),Tn[t])for(var r in oa)if(e[r]!==oa[r])try{Me(e,r,oa[r])}catch(t){e[r]=oa[r]}}};for(var xa in Tn)ka(o[xa]&&o[xa].prototype,xa);ka(Un,"DOMTokenList");var ma=pe("iterator"),wa=!s((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[ma]||"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})),ya=function(e,t,r){for(var n in t)rt(e,n,t[n],r);return e},Ca=TypeError,za=function(e,t){if(R(t,e))return e;throw Ca("Incorrect invocation")},Oa=pe("iterator"),Ea=function(e){if(null!=e)return Y(e,Oa)||Y(e,"@@iterator")||Ai[Jt(e)]},qa=TypeError,Pa=function(e,t){var r=arguments.length<2?Ea(e):t;if($(r))return Ee(f(r,e));throw qa(V(e)+" is not iterable")},Sa=TypeError,ja=function(e,t){if(e<t)throw Sa("Not enough arguments");return e},Ma=Math.floor,Ta=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Ra(e,t):Aa(e,Ta(rr(e,0,n),t),Ta(rr(e,n),t),t)},Ra=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},Aa=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},Ua=Ta,Ba=pe("iterator"),Na=et.set,_a=et.getterFor("URLSearchParams"),La=et.getterFor("URLSearchParamsIterator"),Da=Object.getOwnPropertyDescriptor,Ja=function(e){if(!c)return o[e];var t=Da(o,e);return t&&t.value},Fa=Ja("fetch"),Ga=Ja("Request"),Ha=Ja("Headers"),Va=Ga&&Ga.prototype,Wa=Ha&&Ha.prototype,$a=o.RegExp,Ya=o.TypeError,Ka=o.decodeURIComponent,Qa=o.encodeURIComponent,Xa=x("".charAt),Za=x([].join),eo=x([].push),to=x("".replace),ro=x([].shift),no=x([].splice),io=x("".split),ao=x("".slice),oo=/\+/g,so=Array(4),co=function(e){return so[e-1]||(so[e-1]=$a("((?:%[\\da-f]{2}){"+e+"})","gi"))},uo=function(e){try{return Ka(e)}catch(t){return e}},fo=function(e){var t=to(e,oo," "),r=4;try{return Ka(t)}catch(e){for(;r;)t=to(t,co(r--),uo);return t}},ho=/[!'()~]|%20/g,po={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lo=function(e){return po[e]},go=function(e){return to(Qa(e),ho,lo)},bo=Vi((function(e,t){Na(this,{type:"URLSearchParamsIterator",iterator:Pa(_a(e).entries),kind:t})}),"Iterator",(function(){var e=La(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),vo=function(e){this.entries=[],this.url=null,void 0!==e&&(j(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Xa(e,0)?ao(e,1):e:Gt(e)))};vo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ea(e);if(c)for(r=(t=Pa(e,c)).next;!(n=f(r,t)).done;){if(a=(i=Pa(Ee(n.value))).next,(o=f(a,i)).done||(s=f(a,i)).done||!f(a,i).done)throw Ya("Expected sequence with length 2");eo(this.entries,{key:Gt(o.value),value:Gt(s.value)})}else for(var d in e)ie(e,d)&&eo(this.entries,{key:d,value:Gt(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,"="),eo(this.entries,{key:fo(ro(r)),value:fo(Za(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],eo(r,go(e.key)+"="+go(e.value));return Za(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Io=function(){za(this,ko);var e=arguments.length>0?arguments[0]:void 0;Na(this,new vo(e))},ko=Io.prototype;if(ya(ko,{append:function(e,t){ja(arguments.length,2);var r=_a(this);eo(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){ja(arguments.length,1);for(var t=_a(this),r=t.entries,n=Gt(e),i=0;i<r.length;)r[i].key===n?no(r,i,1):i++;t.updateURL()},get:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&eo(n,t[i].value);return n},has:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){ja(arguments.length,1);for(var r,n=_a(this),i=n.entries,a=!1,o=Gt(e),s=Gt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?no(i,c--,1):(a=!0,r.value=s));a||eo(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=_a(this);Ua(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=_a(this).entries,n=pr(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 bo(this,"keys")},values:function(){return new bo(this,"values")},entries:function(){return new bo(this,"entries")}},{enumerable:!0}),rt(ko,Ba,ko.entries,{name:"entries"}),rt(ko,"toString",(function(){return _a(this).serialize()}),{enumerable:!0}),fr(Io,"URLSearchParams"),Tt({global:!0,constructor:!0,forced:!wa},{URLSearchParams:Io}),!wa&&S(Ha)){var xo=x(Wa.has),mo=x(Wa.set),wo=function(e){if(j(e)){var t,r=e.body;if("URLSearchParams"===Jt(r))return t=e.headers?new Ha(e.headers):new Ha,xo(t,"content-type")||mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xt(e,{body:g(0,Gt(r)),headers:g(0,t)})}return e};if(S(Fa)&&Tt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Fa(e,arguments.length>1?wo(arguments[1]):{})}}),S(Ga)){var yo=function(e){return za(this,Va),new Ga(e,arguments.length>1?wo(arguments[1]):{})};Va.constructor=yo,yo.prototype=Va,Tt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yo})}}var Co={URLSearchParams:Io,getState:_a};function zo(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 Oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Eo=ei((function e(t){if(Xn(this,e),ti(this,"baseUri",void 0),ti(this,"proxy",void 0),ti(this,"headers",void 0),ti(this,"parameters",void 0),ti(this,"fetchOptions",void 0),ti(this,"transformRequest",void 0),ti(this,"throwOnBadResponse",void 0),this.headers=Oo({},t.headers),this.parameters=Oo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Oo({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 qo(e){return(qo="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)}ti(Eo,"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}}}),Tt({global:!0},{globalThis:o});var Po="object"===("undefined"==typeof window?"undefined":qo(window))&&"object"===qo(window.document),So="object"===("undefined"==typeof process?"undefined":qo(process))&&"object"===qo(process.versions)&&"string"==typeof process.versions.node,jo=Po?window:globalThis,Mo="function"==typeof jo.fetch,To=function(){if(So)return require("node-fetch").default;if(!Mo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return jo.fetch}(),Ro=Function,Ao=x([].concat),Uo=x([].join),Bo={},No=function(e,t,r){if(!ie(Bo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Bo[t]=Ro("C,a","return new C("+Uo(n,",")+")")}return Bo[t](e,r)},_o=d?Ro.bind:function(e){var t=$(this),r=t.prototype,n=fn(arguments,1),i=function(){var r=Ao(n,fn(arguments));return this instanceof i?No(t,r.length,r):t.apply(e,r)};return j(r)&&(i.prototype=r),i},Lo=TypeError,Do=function(e){if(yr(e))return e;throw Lo(V(e)+" is not a constructor")},Jo=T("Reflect","construct"),Fo=Object.prototype,Go=[].push,Ho=s((function(){function e(){}return!(Jo((function(){}),[],e)instanceof e)})),Vo=!s((function(){Jo((function(){}))})),Wo=Ho||Vo;Tt({target:"Reflect",stat:!0,forced:Wo,sham:Wo},{construct:function(e,t){Do(e),Ee(t);var r=arguments.length<3?e:Do(arguments[2]);if(Vo&&!Ho)return Jo(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 un(Go,n,t),new(un(_o,e,n))}var i=r.prototype,a=Xt(j(i)?i:Fo),o=un(e,a,t);return j(o)?o:a}});var $o=TypeError,Yo=function(e){if(e>9007199254740991)throw $o("Maximum allowed index exceeded");return e},Ko=pe("isConcatSpreadable"),Qo=L>=51||!s((function(){var e=[];return e[Ko]=!1,e.concat()[0]!==e})),Xo=En("concat"),Zo=function(e){if(!j(e))return!1;var t=e[Ko];return void 0!==t?!!t:lr(e)};function es(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ts(e,t){return(ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rs(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&&ts(e,t)}function ns(e,t){if(t&&("object"===qo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return es(e)}function is(e){return(is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function as(){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 os(e,t,r){return(os=as()?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&&ts(i,r.prototype),i}).apply(null,arguments)}function ss(e){var t="function"==typeof Map?new Map:void 0;return(ss=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 os(e,arguments,is(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ts(n,e)})(e)}function cs(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=is(e);if(t){var i=is(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ns(this,r)}}Tt({target:"Array",proto:!0,arity:1,forced:!Qo||!Xo},{concat:function(e){var t,r,n,i,a,o=re(this),s=Or(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(Zo(a=-1===t?o:arguments[t]))for(i=ht(a),Yo(c+i),r=0;r<i;r++,c++)r in a&&Zt(s,c,a[r]);else Yo(c+1),Zt(s,c++,a);return s.length=c,s}});var ds,us,fs=function(e){rs(r,ss(Error));var t=cs(r);function r(e){var n;return Xn(this,r),ti(es(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ei(r)}(),hs=o.RegExp,ps=s((function(){var e=hs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ls=ps||s((function(){return!hs("a","y").sticky})),gs={BROKEN_CARET:ps||s((function(){var e=hs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ls,UNSUPPORTED_Y:ps},bs=o.RegExp,vs=s((function(){var e=bs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Is=o.RegExp,ks=s((function(){var e=Is("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),xs=et.get,ms=ee("native-string-replace",String.prototype.replace),ws=RegExp.prototype.exec,ys=ws,Cs=x("".charAt),zs=x("".indexOf),Os=x("".replace),Es=x("".slice),qs=(us=/b*/g,f(ws,ds=/a/,"a"),f(ws,us,"a"),0!==ds.lastIndex||0!==us.lastIndex),Ps=gs.BROKEN_CARET,Ss=void 0!==/()??/.exec("")[1];(qs||Ss||Ps||vs||ks)&&(ys=function(e){var t,r,n,i,a,o,s,c=this,d=xs(c),u=Gt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=f(ys,h,u),c.lastIndex=h.lastIndex,t;var p=d.groups,l=Ps&&c.sticky,g=f(Gn,c),b=c.source,v=0,I=u;if(l&&(g=Os(g,"y",""),-1===zs(g,"g")&&(g+="g"),I=Es(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Cs(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ss&&(r=new RegExp("^"+b+"$(?!\\s)",g)),qs&&(n=c.lastIndex),i=f(ws,l?r:c,I),l?i?(i.input=Es(i.input,v),i[0]=Es(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:qs&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ss&&i&&i.length>1&&f(ms,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=Xt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var js=ys;Tt({target:"RegExp",proto:!0,forced:/./.exec!==js},{exec:js});var Ms=pe("species"),Ts=RegExp.prototype,Rs=function(e,t,r,n){var i=pe(e),a=!s((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ms]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var c=x(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=x(e),s=t.exec;return s===js||s===Ts.exec?a&&!i?{done:!0,value:c(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));rt(String.prototype,e,d[0]),rt(Ts,i,d[1])}n&&Me(Ts[i],"sham",!0)},As=ha.charAt,Us=function(e,t,r){return t+(r?As(e,t).length:1)},Bs=Math.floor,Ns=x("".charAt),_s=x("".replace),Ls=x("".slice),Ds=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Js=/\$([$&'`]|\d{1,2})/g,Fs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Js;return void 0!==i&&(i=re(i),c=Ds),_s(a,c,(function(a,c){var d;switch(Ns(c,0)){case"$":return"$";case"&":return e;case"`":return Ls(t,0,r);case"'":return Ls(t,o);case"<":d=i[Ls(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=Bs(u/10);return 0===f?a:f<=s?void 0===n[f-1]?Ns(c,1):n[f-1]+Ns(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Gs=TypeError,Hs=function(e,t){var r=e.exec;if(S(r)){var n=f(r,e,t);return null!==n&&Ee(n),n}if("RegExp"===y(e))return f(js,e,t);throw Gs("RegExp#exec called on incompatible receiver")},Vs=pe("replace"),Ws=Math.max,$s=Math.min,Ys=x([].concat),Ks=x([].push),Qs=x("".indexOf),Xs=x("".slice),Zs="$0"==="a".replace(/./,"$0"),ec=!!/./[Vs]&&""===/./[Vs]("a","$0");Rs("replace",(function(e,t,r){var n=ec?"$":"$0";return[function(e,r){var n=q(this),i=null==e?void 0:Y(e,Vs);return i?f(i,e,n,r):f(t,Gt(n),e,r)},function(e,i){var a=Ee(this),o=Gt(e);if("string"==typeof i&&-1===Qs(i,n)&&-1===Qs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=S(i);c||(i=Gt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Hs(a,o);if(null===h)break;if(Ks(f,h),!d)break;""===Gt(h[0])&&(a.lastIndex=Us(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Gt((h=f[b])[0]),I=Ws($s(ot(h.index),o.length),0),k=[],x=1;x<h.length;x++)Ks(k,void 0===(p=h[x])?p:String(p));var m=h.groups;if(c){var w=Ys([v],k,I,o);void 0!==m&&Ks(w,m);var y=Gt(un(i,void 0,w))}else y=Fs(v,o,I,k,m,i);I>=g&&(l+=Xs(o,g,I)+y,g=I+v.length)}return l+Xs(o,g)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Zs||ec);var tc,rc=function(e,t,r){return r.get&&tt(r.get,t,{getter:!0}),r.set&&tt(r.set,t,{setter:!0}),je.f(e,t,r)},nc=Object.assign,ic=Object.defineProperty,ac=x([].concat),oc=!nc||s((function(){if(c&&1!==nc({b:1},nc(ic({},"a",{enumerable:!0,get:function(){ic(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!=nc({},e)[r]||"abcdefghijklmnopqrst"!=Rt(nc({},t)).join("")}))?function(e,t){for(var r=re(e),n=arguments.length,i=1,a=mt.f,o=l.f;n>i;)for(var s,d=O(arguments[i++]),u=a?ac(Rt(d),a(d)):Rt(d),h=u.length,p=0;h>p;)s=u[p++],c&&!f(o,d,s)||(r[s]=d[s]);return r}:nc,sc=function(e,t,r){var n,i;Ee(e);try{if(!(n=Y(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 Ee(n),r},cc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){sc(e,"throw",t)}},dc=pe("iterator"),uc=Array.prototype,fc=function(e){return void 0!==e&&(Ai.Array===e||uc[dc]===e)},hc=Array,pc=function(e){var t=re(e),r=yr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=pr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Ea(t),l=0;if(!p||this===hc&&fc(p))for(o=ht(t),s=r?new this(o):hc(o);o>l;l++)h=a?i(t[l],l):t[l],Zt(s,l,h);else for(u=(d=Pa(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=a?cc(d,i,[c.value,l],!0):c.value,Zt(s,l,h);return s.length=l,s},lc=/[^\0-\u007E]/,gc=/[.\u3002\uFF0E\uFF61]/g,bc="Overflow: input needs wider integers to process",vc=RangeError,Ic=x(gc.exec),kc=Math.floor,xc=String.fromCharCode,mc=x("".charCodeAt),wc=x([].join),yc=x([].push),Cc=x("".replace),zc=x("".split),Oc=x("".toLowerCase),Ec=function(e){return e+22+75*(e<26)},qc=function(e,t,r){var n=0;for(e=r?kc(e/700):e>>1,e+=kc(e/t);e>455;)e=kc(e/35),n+=36;return kc(n+36*e/(e+38))},Pc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=mc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=mc(e,r++);56320==(64512&a)?yc(t,((1023&i)<<10)+(1023&a)+65536):(yc(t,i),r--)}else yc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&yc(n,xc(r));var c=n.length,d=c;for(c&&yc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>kc((2147483647-o)/f))throw vc(bc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw vc(bc);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;yc(n,xc(Ec(l+g%b))),h=kc(g/b),p+=36}yc(n,xc(Ec(h))),s=qc(o,f,d==c),o=0,d++}}o++,a++}return wc(n,"")},Sc=ha.codeAt,jc=et.set,Mc=et.getterFor("URL"),Tc=Co.URLSearchParams,Rc=Co.getState,Ac=o.URL,Uc=o.TypeError,Bc=o.parseInt,Nc=Math.floor,_c=Math.pow,Lc=x("".charAt),Dc=x(/./.exec),Jc=x([].join),Fc=x(1..toString),Gc=x([].pop),Hc=x([].push),Vc=x("".replace),Wc=x([].shift),$c=x("".split),Yc=x("".slice),Kc=x("".toLowerCase),Qc=x([].unshift),Xc=/[a-z]/i,Zc=/[\d+-.a-z]/i,ed=/\d/,td=/^0x/i,rd=/^[0-7]+$/,nd=/^\d+$/,id=/^[\da-f]+$/i,ad=/[\0\t\n\r #%/:<>?@[\\\]^|]/,od=/[\0\t\n\r #/:<>?@[\\\]^|]/,sd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,cd=/[\t\n\r]/g,dd=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Qc(t,e%256),e=Nc(e/256);return Jc(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+=Fc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ud={},fd=oc({},ud,{" ":1,'"':1,"<":1,">":1,"`":1}),hd=oc({},fd,{"#":1,"?":1,"{":1,"}":1}),pd=oc({},hd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ld=function(e,t){var r=Sc(e,0);return r>32&&r<127&&!ie(t,e)?e:encodeURIComponent(e)},gd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},bd=function(e,t){var r;return 2==e.length&&Dc(Xc,Lc(e,0))&&(":"==(r=Lc(e,1))||!t&&"|"==r)},vd=function(e){var t;return e.length>1&&bd(Yc(e,0,2))&&(2==e.length||"/"===(t=Lc(e,2))||"\\"===t||"?"===t||"#"===t)},Id=function(e){return"."===e||"%2e"===Kc(e)},kd={},xd={},md={},wd={},yd={},Cd={},zd={},Od={},Ed={},qd={},Pd={},Sd={},jd={},Md={},Td={},Rd={},Ad={},Ud={},Bd={},Nd={},_d={},Ld=function(e,t,r){var n,i,a,o=Gt(e);if(t){if(i=this.parse(o))throw Uc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Ld(r,!0)),i=this.parse(o,null,n))throw Uc(i);(a=Rc(new Tc)).bindURL(this),this.searchParams=a}};Ld.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||kd,u=0,f="",h=!1,p=!1,l=!1;for(e=Gt(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=Vc(e,sd,"")),e=Vc(e,cd,""),n=pc(e);u<=n.length;){switch(i=n[u],d){case kd:if(!i||!Dc(Xc,i)){if(t)return"Invalid scheme";d=md;continue}f+=Kc(i),d=xd;break;case xd:if(i&&(Dc(Zc,i)||"+"==i||"-"==i||"."==i))f+=Kc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=md,u=0;continue}if(t&&(c.isSpecial()!=ie(gd,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&gd[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Md:c.isSpecial()&&r&&r.scheme==c.scheme?d=wd:c.isSpecial()?d=Od:"/"==n[u+1]?(d=yd,u++):(c.cannotBeABaseURL=!0,Hc(c.path,""),d=Bd)}break;case md:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=rr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=_d;break}d="file"==r.scheme?Md:Cd;continue;case wd:if("/"!=i||"/"!=n[u+1]){d=Cd;continue}d=Ed,u++;break;case yd:if("/"==i){d=qd;break}d=Ud;continue;case Cd:if(c.scheme=r.scheme,i==tc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=zd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query="",d=Nd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.path.length--,d=Ud;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query,c.fragment="",d=_d}break;case zd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Ud;continue}d=qd}else d=Ed;break;case Od:if(d=Ed,"/"!=i||"/"!=Lc(f,u+1))continue;u++;break;case Ed:if("/"!=i&&"\\"!=i){d=qd;continue}break;case qd:if("@"==i){h&&(f="%40"+f),h=!0,a=pc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=ld(b,pd);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=pc(f).length+1,f="",d=Pd}else f+=i;break;case Pd:case Sd:if(t&&"file"==c.scheme){d=Rd;continue}if(":"!=i||p){if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=Ad,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=jd,t==Sd)return}break;case jd:if(!Dc(ed,i)){if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Bc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===gd[c.scheme]?null:I,f=""}if(t)return;d=Ad;continue}return"Invalid port"}f+=i;break;case Md:if(c.scheme="file","/"==i||"\\"==i)d=Td;else{if(!r||"file"!=r.scheme){d=Ud;continue}if(i==tc)c.host=r.host,c.path=rr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=rr(r.path),c.query="",d=Nd;else{if("#"!=i){vd(Jc(rr(n,u),""))||(c.host=r.host,c.path=rr(r.path),c.shortenPath()),d=Ud;continue}c.host=r.host,c.path=rr(r.path),c.query=r.query,c.fragment="",d=_d}}break;case Td:if("/"==i||"\\"==i){d=Rd;break}r&&"file"==r.scheme&&!vd(Jc(rr(n,u),""))&&(bd(r.path[0],!0)?Hc(c.path,r.path[0]):c.host=r.host),d=Ud;continue;case Rd:if(i==tc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&bd(f))d=Ud;else if(""==f){if(c.host="",t)return;d=Ad}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Ad}continue}f+=i;break;case Ad:if(c.isSpecial()){if(d=Ud,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=tc&&(d=Ud,"/"!=i))continue}else c.fragment="",d=_d;else c.query="",d=Nd;break;case Ud:if(i==tc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Kc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Hc(c.path,"")):Id(f)?"/"==i||"\\"==i&&c.isSpecial()||Hc(c.path,""):("file"==c.scheme&&!c.path.length&&bd(f)&&(c.host&&(c.host=""),f=Lc(f,0)+":"),Hc(c.path,f)),f="","file"==c.scheme&&(i==tc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)Wc(c.path);"?"==i?(c.query="",d=Nd):"#"==i&&(c.fragment="",d=_d)}else f+=ld(i,hd);break;case Bd:"?"==i?(c.query="",d=Nd):"#"==i?(c.fragment="",d=_d):i!=tc&&(c.path[0]+=ld(i,ud));break;case Nd:t||"#"!=i?i!=tc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":ld(i,ud)):(c.fragment="",d=_d);break;case _d:i!=tc&&(c.fragment+=ld(i,fd))}u++}},parseHost:function(e){var t,r,n;if("["==Lc(e,0)){if("]"!=Lc(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,f=0,h=function(){return Lc(e,f)};if(":"==h()){if(":"!=Lc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Dc(id,h());)t=16*t+Bc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Dc(ed,h()))return;for(;Dc(ed,h());){if(a=Bc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,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}(Yc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=zc(Cc(Oc(e),gc,"."),".");for(t=0;t<i.length;t++)r=i[t],yc(n,Ic(lc,r)?"xn--"+Pc(r):r);return wc(n,".")}(e),Dc(ad,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=$c(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"==Lc(i,0)&&(a=Dc(td,i)?16:8,i=Yc(i,8==a?1:2)),""===i)o=0;else{if(!Dc(10==a?nd:8==a?rd:id,i))return e;o=Bc(i,a)}Hc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=_c(256,5-t))return null}else if(o>255)return null;for(s=Gc(r),n=0;n<r.length;n++)s+=r[n]*_c(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Dc(od,e))return"Invalid host";for(t="",r=pc(e),n=0;n<r.length;n++)t+=ld(r[n],ud);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ie(gd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&bd(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+=dd(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Jc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Uc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Dd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+dd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Gt(e)+":",kd)},getUsername:function(){return this.username},setUsername:function(e){var t=pc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=ld(t[r],pd)}},getPassword:function(){return this.password},setPassword:function(e){var t=pc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=ld(t[r],pd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?dd(e):dd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Pd)},getHostname:function(){var e=this.host;return null===e?"":dd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Sd)},getPort:function(){var e=this.port;return null===e?"":Gt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Gt(e))?this.port=null:this.parse(e,jd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Jc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ad))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Gt(e))?this.query=null:("?"==Lc(e,0)&&(e=Yc(e,1)),this.query="",this.parse(e,Nd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Gt(e))?("#"==Lc(e,0)&&(e=Yc(e,1)),this.fragment="",this.parse(e,_d)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Dd=function(e){var t=za(this,Jd),r=ja(arguments.length,1)>1?arguments[1]:void 0,n=jc(t,new Ld(e,!1,r));c||(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())},Jd=Dd.prototype,Fd=function(e,t){return{get:function(){return Mc(this)[e]()},set:t&&function(e){return Mc(this)[t](e)},configurable:!0,enumerable:!0}};if(c&&(rc(Jd,"href",Fd("serialize","setHref")),rc(Jd,"origin",Fd("getOrigin")),rc(Jd,"protocol",Fd("getProtocol","setProtocol")),rc(Jd,"username",Fd("getUsername","setUsername")),rc(Jd,"password",Fd("getPassword","setPassword")),rc(Jd,"host",Fd("getHost","setHost")),rc(Jd,"hostname",Fd("getHostname","setHostname")),rc(Jd,"port",Fd("getPort","setPort")),rc(Jd,"pathname",Fd("getPathname","setPathname")),rc(Jd,"search",Fd("getSearch","setSearch")),rc(Jd,"searchParams",Fd("getSearchParams")),rc(Jd,"hash",Fd("getHash","setHash"))),rt(Jd,"toJSON",(function(){return Mc(this).serialize()}),{enumerable:!0}),rt(Jd,"toString",(function(){return Mc(this).serialize()}),{enumerable:!0}),Ac){var Gd=Ac.createObjectURL,Hd=Ac.revokeObjectURL;Gd&&rt(Dd,"createObjectURL",pr(Gd,Ac)),Hd&&rt(Dd,"revokeObjectURL",pr(Hd,Ac))}function Vd(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=is(e);if(t){var i=is(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ns(this,r)}}fr(Dd,"URL"),Tt({global:!0,constructor:!0,forced:!wa,sham:!c},{URL:Dd});var Wd=function(e){rs(r,ss(URL));var t=Vd(r);function r(e,n,i){var a;return Xn(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 ei(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))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));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}(),$d="commerce-sdk-isomorphic@1.10.1";function Yd(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 Kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qd=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Kd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,M,T,R,A,U;return ei(e,[{key:"createBasket",value:(U=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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),s=new Wd("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,To(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new fs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(R=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=30,To(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new fs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(T=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"getBasket",value:(M=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"updateBasket",value:(j=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(P=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(z=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(x=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,To(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new fs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,To(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new fs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=49,To(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new fs(u);case 58:return e.next=60,u.text();case 60:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Xd(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 Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(Qd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var eu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Zd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i;return ei(e,[{key:"getShopperContext",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new fs(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42: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 ru(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){ti(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}ti(eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var nu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,M;return ei(e,[{key:"registerCustomer",value:(M=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new fs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(S=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===i.clientId){e.next=21;break}o.clientId=i.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");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 s=new Wd("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(P=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"resetPassword",value:(q=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new fs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(z=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getCustomer",value:(C=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(m=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeCustomerAddress",value:(x=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=62;break}throw new fs(u);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new fs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new fs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=31,To(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new fs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function iu(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 au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var ou=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"retrieveResults",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=au(au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=au(au({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=au(au({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=au(au({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function su(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?su(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var du=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"getPages",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=42,To(s.toString(),d);case 42:if(u=e.sent,!r){e.next=47;break}return e.abrupt("return",u);case 47:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=51;break}throw new fs(u);case 51:return e.next=53,u.text();case 53:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function uu(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?uu(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var hu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=fu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t;return ei(e,[{key:"getGiftCertificate",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/gift-certificate",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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=fu(fu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41: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 lu(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){ti(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}ti(hu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var gu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I;return ei(e,[{key:"retrieveCredQualityUserInfo",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.username){e.next=17;break}o.username=n.username,e.next=22;break;case 17:if(void 0===i.username){e.next=21;break}o.username=i.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return s=new Wd("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authenticateCustomer",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=60,To(s.toString(),d);case 60:if(u=e.sent,!r){e.next=65;break}return e.abrupt("return",u);case 65:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=67;break}throw new fs(u);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=82,To(s.toString(),d);case 82:if(u=e.sent,!r){e.next=87;break}return e.abrupt("return",u);case 87:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=89;break}throw new fs(u);case 89:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,To(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new fs(u);case 29:return e.next=31,u.text();case 31:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32: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 vu(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){ti(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}ti(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Iu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s;return ei(e,[{key:"createOrder",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50: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 xu(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){ti(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}ti(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var mu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i;return ei(e,[{key:"getProducts",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new Wd("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new Wd("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52: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 yu(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){ti(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}ti(mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Cu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"getPromotions",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=yu(yu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=yu(yu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ti(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var zu=TypeError,Ou=function(e,t){if(!delete e[t])throw zu("Cannot delete property "+V(t)+" of "+V(e))},Eu=A.match(/firefox\/(\d+)/i),qu=!!Eu&&+Eu[1],Pu=/MSIE|Trident/.test(A),Su=A.match(/AppleWebKit\/(\d+)\./),ju=!!Su&&+Su[1],Mu=[],Tu=x(Mu.sort),Ru=x(Mu.push),Au=s((function(){Mu.sort(void 0)})),Uu=s((function(){Mu.sort(null)})),Bu=Bn("sort"),Nu=!s((function(){if(L)return L<70;if(!(qu&&qu>3)){if(Pu)return!0;if(ju)return ju<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++)Mu.push({k:t+n,v:r})}for(Mu.sort((function(e,t){return t.v-e.v})),n=0;n<Mu.length;n++)t=Mu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function _u(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?_u(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Tt({target:"Array",proto:!0,forced:Au||!Uu||!Bu||!Nu},{sort:function(e){void 0!==e&&$(e);var t=re(this);if(Nu)return void 0===e?Tu(t):Tu(t,e);var r,n,i=[],a=ht(t);for(n=0;n<a;n++)n in t&&Ru(i,t[n]);for(Ua(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Gt(t)>Gt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Ou(t,n++);return t}});var Du=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"productSearch",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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.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),s=new Wd("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Lu(Lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=36,To(s.toString(),d);case 36:if(u=e.sent,!r){e.next=41;break}return e.abrupt("return",u);case 41:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new fs(u);case 45:return e.next=47,u.text();case 47:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Lu(Lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ti(Du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Ju=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Rs("search",(function(e,t,r){return[function(t){var r=q(this),n=null==t?void 0:Y(t,e);return n?f(n,t,r):new RegExp(t)[e](Gt(r))},function(e){var n=Ee(this),i=Gt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Ju(o,0)||(n.lastIndex=0);var s=Hs(n,i);return Ju(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Fu=pe("iterator"),Gu=!1;try{var Hu=0,Vu={next:function(){return{done:!!Hu++}},return:function(){Gu=!0}};Vu[Fu]=function(){return this},Array.from(Vu,(function(){throw 2}))}catch(e){}var Wu,$u,Yu,Ku=function(e,t){if(!t&&!Gu)return!1;var r=!1;try{var n={};n[Fu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Qu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Xu=je.f,Zu=et.enforce,ef=et.get,tf=o.Int8Array,rf=tf&&tf.prototype,nf=o.Uint8ClampedArray,af=nf&&nf.prototype,of=tf&&Li(tf),sf=rf&&Li(rf),cf=Object.prototype,df=o.TypeError,uf=pe("toStringTag"),ff=ce("TYPED_ARRAY_TAG"),hf=Qu&&!!Yi&&"Opera"!==Jt(o.opera),pf=!1,lf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},gf={BigInt64Array:8,BigUint64Array:8},bf=function(e){var t=Li(e);if(j(t)){var r=ef(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:bf(t)}},vf=function(e){if(!j(e))return!1;var t=Jt(e);return ie(lf,t)||ie(gf,t)};for(Wu in lf)(Yu=($u=o[Wu])&&$u.prototype)?Zu(Yu).TypedArrayConstructor=$u:hf=!1;for(Wu in gf)(Yu=($u=o[Wu])&&$u.prototype)&&(Zu(Yu).TypedArrayConstructor=$u);if((!hf||!S(of)||of===Function.prototype)&&(of=function(){throw df("Incorrect invocation")},hf))for(Wu in lf)o[Wu]&&Yi(o[Wu],of);if((!hf||!sf||sf===cf)&&(sf=of.prototype,hf))for(Wu in lf)o[Wu]&&Yi(o[Wu].prototype,sf);if(hf&&Li(af)!==sf&&Yi(af,sf),c&&!ie(sf,uf))for(Wu in pf=!0,Xu(sf,uf,{get:function(){return j(this)?this[ff]:void 0}}),lf)o[Wu]&&Me(o[Wu],ff,Wu);var If={NATIVE_ARRAY_BUFFER_VIEWS:hf,TYPED_ARRAY_TAG:pf&&ff,aTypedArray:function(e){if(vf(e))return e;throw df("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!Yi||R(of,e)))return e;throw df(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(c){if(r)for(var i in lf){var a=o[i];if(a&&ie(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}sf[e]&&!r||rt(sf,e,r?t:hf&&rf[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(c){if(Yi){if(r)for(n in lf)if((i=o[n])&&ie(i,e))try{delete i[e]}catch(e){}if(of[e]&&!r)return;try{return rt(of,e,r?t:hf&&of[e]||t)}catch(e){}}for(n in lf)!(i=o[n])||i[e]&&!r||rt(i,e,t)}},getTypedArrayConstructor:bf,isView:function(e){if(!j(e))return!1;var t=Jt(e);return"DataView"===t||ie(lf,t)||ie(gf,t)},isTypedArray:vf,TypedArray:of,TypedArrayPrototype:sf},kf=If.NATIVE_ARRAY_BUFFER_VIEWS,xf=o.ArrayBuffer,mf=o.Int8Array,wf=!kf||!s((function(){mf(1)}))||!s((function(){new mf(-1)}))||!Ku((function(e){new mf,new mf(null),new mf(1.5),new mf(e)}),!0)||s((function(){return 1!==new mf(new xf(2),1,void 0).length})),yf=RangeError,Cf=function(e){if(void 0===e)return 0;var t=ot(e),r=ft(t);if(t!==r)throw yf("Wrong length or index");return r},zf=Array,Of=Math.abs,Ef=Math.pow,qf=Math.floor,Pf=Math.log,Sf=Math.LN2,jf=function(e,t,r){var n,i,a,o=zf(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Ef(2,-24)-Ef(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Of(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=qf(Pf(e)/Sf),e*(a=Ef(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Ef(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Ef(2,t),n+=d):(i=e*Ef(2,d-1)*Ef(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},Mf=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+=Ef(2,t),u-=o}return(d?-1:1)*r*Ef(2,u-t)},Tf=function(e){for(var t=re(this),r=ht(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},Rf=xt.f,Af=je.f,Uf=Ue.PROPER,Bf=Ue.CONFIGURABLE,Nf=et.get,_f=et.set,Lf=o.ArrayBuffer,Df=Lf,Jf=Df&&Df.prototype,Ff=o.DataView,Gf=Ff&&Ff.prototype,Hf=Object.prototype,Vf=o.Array,Wf=o.RangeError,$f=x(Tf),Yf=x([].reverse),Kf=jf,Qf=Mf,Xf=function(e){return[255&e]},Zf=function(e){return[255&e,e>>8&255]},eh=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},th=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},rh=function(e){return Kf(e,23,4)},nh=function(e){return Kf(e,52,8)},ih=function(e,t){Af(e.prototype,t,{get:function(){return Nf(this)[t]}})},ah=function(e,t,r,n){var i=Cf(r),a=Nf(e);if(i+t>a.byteLength)throw Wf("Wrong index");var o=Nf(a.buffer).bytes,s=i+a.byteOffset,c=rr(o,s,s+t);return n?c:Yf(c)},oh=function(e,t,r,n,i,a){var o=Cf(r),s=Nf(e);if(o+t>s.byteLength)throw Wf("Wrong index");for(var c=Nf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Qu){var sh=Uf&&"ArrayBuffer"!==Lf.name;if(s((function(){Lf(1)}))&&s((function(){new Lf(-1)}))&&!s((function(){return new Lf,new Lf(1.5),new Lf(NaN),sh&&!Bf})))sh&&Bf&&Me(Lf,"name","ArrayBuffer");else{(Df=function(e){return za(this,Jf),new Lf(Cf(e))}).prototype=Jf;for(var ch,dh=Rf(Lf),uh=0;dh.length>uh;)(ch=dh[uh++])in Df||Me(Df,ch,Lf[ch]);Jf.constructor=Df}Yi&&Li(Gf)!==Hf&&Yi(Gf,Hf);var fh=new Ff(new Df(2)),hh=x(Gf.setInt8);fh.setInt8(0,2147483648),fh.setInt8(1,2147483649),!fh.getInt8(0)&&fh.getInt8(1)||ya(Gf,{setInt8:function(e,t){hh(this,e,t<<24>>24)},setUint8:function(e,t){hh(this,e,t<<24>>24)}},{unsafe:!0})}else Jf=(Df=function(e){za(this,Jf);var t=Cf(e);_f(this,{bytes:$f(Vf(t),0),byteLength:t}),c||(this.byteLength=t)}).prototype,Gf=(Ff=function(e,t,r){za(this,Gf),za(e,Jf);var n=Nf(e).byteLength,i=ot(t);if(i<0||i>n)throw Wf("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw Wf("Wrong length");_f(this,{buffer:e,byteLength:r,byteOffset:i}),c||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,c&&(ih(Df,"byteLength"),ih(Ff,"buffer"),ih(Ff,"byteLength"),ih(Ff,"byteOffset")),ya(Gf,{getInt8:function(e){return ah(this,1,e)[0]<<24>>24},getUint8:function(e){return ah(this,1,e)[0]},getInt16:function(e){var t=ah(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ah(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return th(ah(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return th(ah(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Qf(ah(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Qf(ah(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){oh(this,1,e,Xf,t)},setUint8:function(e,t){oh(this,1,e,Xf,t)},setInt16:function(e,t){oh(this,2,e,Zf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){oh(this,2,e,Zf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){oh(this,4,e,eh,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){oh(this,4,e,eh,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){oh(this,4,e,rh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){oh(this,8,e,nh,t,arguments.length>2?arguments[2]:void 0)}});fr(Df,"ArrayBuffer"),fr(Ff,"DataView");var ph={ArrayBuffer:Df,DataView:Ff},lh=Math.floor,gh=Number.isInteger||function(e){return!j(e)&&isFinite(e)&&lh(e)===e},bh=RangeError,vh=RangeError,Ih=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw bh("The argument can't be less than 0");return t}(e);if(r%t)throw vh("Wrong offset");return r},kh=If.aTypedArrayConstructor,xh=function(e){var t,r,n,i,a,o,s=Do(this),c=re(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Ea(c);if(p&&!fc(p))for(o=(a=Pa(c,p)).next,c=[];!(i=f(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=pr(u,arguments[2])),r=ht(c),n=new(kh(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},mh=pe("species"),wh=function(e){var t=T(e),r=je.f;c&&t&&!t[mh]&&r(t,mh,{configurable:!0,get:function(){return this}})};r((function(e){var t=xt.f,r=Pr.forEach,n=et.get,i=et.set,a=et.enforce,s=je.f,d=ye.f,u=Math.round,h=o.RangeError,p=ph.ArrayBuffer,l=p.prototype,b=ph.DataView,v=If.NATIVE_ARRAY_BUFFER_VIEWS,I=If.TYPED_ARRAY_TAG,k=If.TypedArray,x=If.TypedArrayPrototype,m=If.aTypedArrayConstructor,w=If.isTypedArray,y=function(e,t){m(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){s(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return R(l,e)||"ArrayBuffer"==(t=Jt(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!G(t)&&t in e&&gh(+t)&&t>=0},E=function(e,t){return t=ve(t),O(e,t)?g(2,e[t]):d(e,t)},q=function(e,t,r){return t=ve(t),!(O(e,t)&&j(r)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?s(e,t,r):(e[t]=r.value,e)};c?(v||(ye.f=E,je.f=q,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Tt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,g=e+(d?"Clamped":"")+"Array",m="get"+e,C="set"+e,O=o[g],E=O,q=E&&E.prototype,P={},M=function(e,t){s(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[m](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?wf&&(E=c((function(e,t,r,n){return za(e,q),function(e,t,r){var n,i;return Yi&&S(n=t.constructor)&&n!==r&&j(i=n.prototype)&&i!==r.prototype&&Yi(e,i),e}(j(t)?z(t)?void 0!==n?new O(t,Ih(r,l),n):void 0!==r?new O(t,Ih(r,l)):new O(t):w(t)?y(E,t):f(xh,E,t):new O(Cf(t)),e,E)})),Yi&&Yi(E,k),r(t(O),(function(e){e in E||Me(E,e,O[e])})),E.prototype=q):(E=c((function(e,t,r,n){za(e,q);var a,o,s,c=0,d=0;if(j(t)){if(!z(t))return w(t)?y(E,t):f(xh,E,t);a=t,d=Ih(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw h("Wrong length");if((o=u-d)<0)throw h("Wrong length")}else if((o=ft(n)*l)+d>u)throw h("Wrong length");s=o/l}else s=Cf(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new b(a)});c<s;)M(e,c++)})),Yi&&Yi(E,k),q=E.prototype=Xt(x)),q.constructor!==E&&Me(q,"constructor",E),a(q).TypedArrayConstructor=E,I&&Me(q,I,g);var T=E!=O;P[g]=E,Tt({global:!0,constructor:!0,forced:T,sham:!v},P),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),wh(g)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var yh=Math.min,Ch=x([].copyWithin||function(e,t){var r=re(this),n=ht(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=yh((void 0===o?n:dt(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]:Ou(r,i),i+=c,a+=c;return r}),zh=If.aTypedArray;(0,If.exportTypedArrayMethod)("copyWithin",(function(e,t){return Ch(zh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Oh=Pr.every,Eh=If.aTypedArray;(0,If.exportTypedArrayMethod)("every",(function(e){return Oh(Eh(this),e,arguments.length>1?arguments[1]:void 0)}));var qh=TypeError,Ph=function(e){var t=be(e,"number");if("number"==typeof t)throw qh("Can't convert number to bigint");return BigInt(t)},Sh=If.aTypedArray,jh=If.exportTypedArrayMethod,Mh=x("".slice);jh("fill",(function(e){var t=arguments.length;Sh(this);var r="Big"===Mh(Jt(this),0,3)?Ph(e):+e;return f(Tf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),s((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Th=pe("species"),Rh=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[Th])?t:Do(r)},Ah=If.aTypedArrayConstructor,Uh=If.getTypedArrayConstructor,Bh=function(e){return Ah(Rh(e,Uh(e)))},Nh=function(e,t){return function(e,t){for(var r=0,n=ht(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Bh(e),t)},_h=Pr.filter,Lh=If.aTypedArray;(0,If.exportTypedArrayMethod)("filter",(function(e){var t=_h(Lh(this),e,arguments.length>1?arguments[1]:void 0);return Nh(this,t)}));var Dh=Pr.find,Jh=If.aTypedArray;(0,If.exportTypedArrayMethod)("find",(function(e){return Dh(Jh(this),e,arguments.length>1?arguments[1]:void 0)}));var Fh=Pr.findIndex,Gh=If.aTypedArray;(0,If.exportTypedArrayMethod)("findIndex",(function(e){return Fh(Gh(this),e,arguments.length>1?arguments[1]:void 0)}));var Hh=Pr.forEach,Vh=If.aTypedArray;(0,If.exportTypedArrayMethod)("forEach",(function(e){Hh(Vh(this),e,arguments.length>1?arguments[1]:void 0)}));var Wh=lt.includes,$h=If.aTypedArray;(0,If.exportTypedArrayMethod)("includes",(function(e){return Wh($h(this),e,arguments.length>1?arguments[1]:void 0)}));var Yh=lt.indexOf,Kh=If.aTypedArray;(0,If.exportTypedArrayMethod)("indexOf",(function(e){return Yh(Kh(this),e,arguments.length>1?arguments[1]:void 0)}));var Qh=pe("iterator"),Xh=o.Uint8Array,Zh=x(oa.values),ep=x(oa.keys),tp=x(oa.entries),rp=If.aTypedArray,np=If.exportTypedArrayMethod,ip=Xh&&Xh.prototype,ap=!s((function(){ip[Qh].call([1])})),op=!!ip&&ip.values&&ip[Qh]===ip.values&&"values"===ip.values.name,sp=function(){return Zh(rp(this))};np("entries",(function(){return tp(rp(this))}),ap),np("keys",(function(){return ep(rp(this))}),ap),np("values",sp,ap||!op,{name:"values"}),np(Qh,sp,ap||!op,{name:"values"});var cp=If.aTypedArray,dp=If.exportTypedArrayMethod,up=x([].join);dp("join",(function(e){return up(cp(this),e)}));var fp=Math.min,hp=[].lastIndexOf,pp=!!hp&&1/[1].lastIndexOf(1,-0)<0,lp=Bn("lastIndexOf"),gp=pp||!lp?function(e){if(pp)return un(hp,this,arguments)||0;var t=P(this),r=ht(t),n=r-1;for(arguments.length>1&&(n=fp(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:hp,bp=If.aTypedArray;(0,If.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return un(gp,bp(this),t>1?[e,arguments[1]]:[e])}));var vp=Pr.map,Ip=If.aTypedArray;(0,If.exportTypedArrayMethod)("map",(function(e){return vp(Ip(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Bh(e))(t)}))}));var kp=TypeError,xp=function(e){return function(t,r,n,i){$(r);var a=re(t),o=O(a),s=ht(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 kp("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}},mp={left:xp(!1),right:xp(!0)},wp=mp.left,yp=If.aTypedArray;(0,If.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return wp(yp(this),e,t,t>1?arguments[1]:void 0)}));var Cp=mp.right,zp=If.aTypedArray;(0,If.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Cp(zp(this),e,t,t>1?arguments[1]:void 0)}));var Op=If.aTypedArray,Ep=If.exportTypedArrayMethod,qp=Math.floor;Ep("reverse",(function(){for(var e,t=Op(this).length,r=qp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Pp=o.RangeError,Sp=o.Int8Array,jp=Sp&&Sp.prototype,Mp=jp&&jp.set,Tp=If.aTypedArray,Rp=If.exportTypedArrayMethod,Ap=!s((function(){var e=new Uint8ClampedArray(2);return f(Mp,e,{length:1,0:3},1),3!==e[1]})),Up=Ap&&If.NATIVE_ARRAY_BUFFER_VIEWS&&s((function(){var e=new Sp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Rp("set",(function(e){Tp(this);var t=Ih(arguments.length>1?arguments[1]:void 0,1),r=re(e);if(Ap)return f(Mp,this,r,t);var n=this.length,i=ht(r),a=0;if(i+t>n)throw Pp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Ap||Up);var Bp=If.aTypedArray;(0,If.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Bp(this),e,t),n=Bh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),s((function(){new Int8Array(1).slice()})));var Np=Pr.some,_p=If.aTypedArray;(0,If.exportTypedArrayMethod)("some",(function(e){return Np(_p(this),e,arguments.length>1?arguments[1]:void 0)}));var Lp=If.aTypedArray,Dp=If.exportTypedArrayMethod,Jp=o.Uint16Array,Fp=Jp&&x(Jp.prototype.sort),Gp=!(!Fp||s((function(){Fp(new Jp(2),null)}))&&s((function(){Fp(new Jp(2),{})}))),Hp=!!Fp&&!s((function(){if(L)return L<74;if(qu)return qu<67;if(Pu)return!0;if(ju)return ju<602;var e,t,r=new Jp(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}));Dp("sort",(function(e){return void 0!==e&&$(e),Hp?Fp(this,e):Ua(Lp(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))}),!Hp||Gp);var Vp=o.Int8Array,Wp=If.aTypedArray,$p=If.exportTypedArrayMethod,Yp=[].toLocaleString,Kp=!!Vp&&s((function(){Yp.call(new Vp(1))}));$p("toLocaleString",(function(){return un(Yp,Kp?fn(Wp(this)):Wp(this),fn(arguments))}),s((function(){return[1,2].toLocaleString()!=new Vp([1,2]).toLocaleString()}))||!s((function(){Vp.prototype.toLocaleString.call([1,2])})));var Qp=If.exportTypedArrayMethod,Xp=o.Uint8Array,Zp=Xp&&Xp.prototype||{},el=[].toString,tl=x([].join);s((function(){el.call({})}))&&(el=function(){return tl(this)});var rl=Zp.toString!=el;Qp("toString",el,rl);var nl,il,al,ol,sl="process"==y(o.process),cl=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),dl=o.setImmediate,ul=o.clearImmediate,fl=o.process,hl=o.Dispatch,pl=o.Function,ll=o.MessageChannel,gl=o.String,bl=0,vl={};try{nl=o.location}catch(e){}var Il=function(e){if(ie(vl,e)){var t=vl[e];delete vl[e],t()}},kl=function(e){return function(){Il(e)}},xl=function(e){Il(e.data)},ml=function(e){o.postMessage(gl(e),nl.protocol+"//"+nl.host)};dl&&ul||(dl=function(e){ja(arguments.length,1);var t=S(e)?e:pl(e),r=fn(arguments,1);return vl[++bl]=function(){un(t,void 0,r)},il(bl),bl},ul=function(e){delete vl[e]},sl?il=function(e){fl.nextTick(kl(e))}:hl&&hl.now?il=function(e){hl.now(kl(e))}:ll&&!cl?(ol=(al=new ll).port2,al.port1.onmessage=xl,il=pr(ol.postMessage,ol)):o.addEventListener&&S(o.postMessage)&&!o.importScripts&&nl&&"file:"!==nl.protocol&&!s(ml)?(il=ml,o.addEventListener("message",xl,!1)):il="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),Il(e)}}:function(e){setTimeout(kl(e),0)});var wl,yl,Cl,zl,Ol,El,ql,Pl,Sl={set:dl,clear:ul},jl=/ipad|iphone|ipod/i.test(A)&&void 0!==o.Pebble,Ml=/web0s(?!.*chrome)/i.test(A),Tl=ye.f,Rl=Sl.set,Al=o.MutationObserver||o.WebKitMutationObserver,Ul=o.document,Bl=o.process,Nl=o.Promise,_l=Tl(o,"queueMicrotask"),Ll=_l&&_l.value;Ll||(wl=function(){var e,t;for(sl&&(e=Bl.domain)&&e.exit();yl;){t=yl.fn,yl=yl.next;try{t()}catch(e){throw yl?zl():Cl=void 0,e}}Cl=void 0,e&&e.enter()},cl||sl||Ml||!Al||!Ul?!jl&&Nl&&Nl.resolve?((ql=Nl.resolve(void 0)).constructor=Nl,Pl=pr(ql.then,ql),zl=function(){Pl(wl)}):sl?zl=function(){Bl.nextTick(wl)}:(Rl=pr(Rl,o),zl=function(){Rl(wl)}):(Ol=!0,El=Ul.createTextNode(""),new Al(wl).observe(El,{characterData:!0}),zl=function(){El.data=Ol=!Ol}));var Dl=Ll||function(e){var t={fn:e,next:void 0};Cl&&(Cl.next=t),yl||(yl=t,zl()),Cl=t},Jl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Fl=function(){this.head=null,this.tail=null};Fl.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 Gl=Fl,Hl=o.Promise,Vl="object"==typeof window&&"object"!=typeof Deno;Hl&&Hl.prototype;var Wl,$l,Yl,Kl=pe("species"),Ql=!1,Xl=S(o.PromiseRejectionEvent),Zl={CONSTRUCTOR:jt("Promise",(function(){var e=De(Hl),t=e!==String(Hl);if(!t&&66===L)return!0;if(L>=51&&/native code/.test(e))return!1;var r=new Hl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Kl]=n,!(Ql=r.then((function(){}))instanceof n)||!t&&Vl&&!Xl})),REJECTION_EVENT:Xl,SUBCLASSING:Ql},eg=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=$(t),this.reject=$(r)},tg={f:function(e){return new eg(e)}},rg=Sl.set,ng=Zl.CONSTRUCTOR,ig=Zl.REJECTION_EVENT,ag=Zl.SUBCLASSING,og=et.getterFor("Promise"),sg=et.set,cg=Hl&&Hl.prototype,dg=Hl,ug=cg,fg=o.TypeError,hg=o.document,pg=o.process,lg=tg.f,gg=lg,bg=!!(hg&&hg.createEvent&&o.dispatchEvent),vg=function(e){var t;return!(!j(e)||!S(t=e.then))&&t},Ig=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&&yg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(fg("Promise-chain cycle")):(n=vg(r))?f(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},kg=function(e,t){e.notified||(e.notified=!0,Dl((function(){for(var r,n=e.reactions;r=n.get();)Ig(r,e);e.notified=!1,t&&!e.rejection&&mg(e)})))},xg=function(e,t,r){var n,i;bg?((n=hg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),o.dispatchEvent(n)):n={promise:t,reason:r},!ig&&(i=o["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=o.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},mg=function(e){f(rg,o,(function(){var t,r=e.facade,n=e.value;if(wg(e)&&(t=Jl((function(){sl?pg.emit("unhandledRejection",n,r):xg("unhandledrejection",r,n)})),e.rejection=sl||wg(e)?2:1,t.error))throw t.value}))},wg=function(e){return 1!==e.rejection&&!e.parent},yg=function(e){f(rg,o,(function(){var t=e.facade;sl?pg.emit("rejectionHandled",t):xg("rejectionhandled",t,e.value)}))},Cg=function(e,t,r){return function(n){e(t,n,r)}},zg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,kg(e,!0))},Og=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw fg("Promise can't be resolved itself");var n=vg(t);n?Dl((function(){var r={done:!1};try{f(n,t,Cg(Og,r,e),Cg(zg,r,e))}catch(t){zg(r,t,e)}})):(e.value=t,e.state=1,kg(e,!1))}catch(t){zg({done:!1},t,e)}}};if(ng&&(ug=(dg=function(e){za(this,ug),$(e),f(Wl,this);var t=og(this);try{e(Cg(Og,t),Cg(zg,t))}catch(e){zg(t,e)}}).prototype,(Wl=function(e){sg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Gl,rejection:!1,state:0,value:void 0})}).prototype=rt(ug,"then",(function(e,t){var r=og(this),n=lg(Rh(this,dg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=sl?pg.domain:void 0,0==r.state?r.reactions.add(n):Dl((function(){Ig(n,r)})),n.promise})),$l=function(){var e=new Wl,t=og(e);this.promise=e,this.resolve=Cg(Og,t),this.reject=Cg(zg,t)},tg.f=lg=function(e){return e===dg||void 0===e?new $l(e):gg(e)},S(Hl)&&cg!==Object.prototype)){Yl=cg.then,ag||rt(cg,"then",(function(e,t){var r=this;return new dg((function(e,t){f(Yl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete cg.constructor}catch(e){}Yi&&Yi(cg,ug)}Tt({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:dg}),fr(dg,"Promise",!1),wh("Promise");var Eg=TypeError,qg=function(e,t){this.stopped=e,this.result=t},Pg=qg.prototype,Sg=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=pr(t,u),v=function(e){return n&&sc(n,"normal",e),new qg(!0,e)},I=function(e){return h?(Ee(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(i=Ea(e)))throw Eg(V(e)+" is not iterable");if(fc(i)){for(a=0,o=ht(e);o>a;a++)if((s=I(e[a]))&&R(Pg,s))return s;return new qg(!1)}n=Pa(e,i)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){sc(n,"throw",e)}if("object"==typeof s&&s&&R(Pg,s))return s}return new qg(!1)},jg=Zl.CONSTRUCTOR||!Ku((function(e){Hl.all(e).then(void 0,(function(){}))}));Tt({target:"Promise",stat:!0,forced:jg},{all:function(e){var t=this,r=tg.f(t),n=r.resolve,i=r.reject,a=Jl((function(){var r=$(t.resolve),a=[],o=0,s=1;Sg(e,(function(e){var c=o++,d=!1;s++,f(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 Mg=Zl.CONSTRUCTOR,Tg=Hl&&Hl.prototype;if(Tt({target:"Promise",proto:!0,forced:Mg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(Hl)){var Rg=T("Promise").prototype.catch;Tg.catch!==Rg&&rt(Tg,"catch",Rg,{unsafe:!0})}Tt({target:"Promise",stat:!0,forced:jg},{race:function(e){var t=this,r=tg.f(t),n=r.reject,i=Jl((function(){var i=$(t.resolve);Sg(e,(function(e){f(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Tt({target:"Promise",stat:!0,forced:Zl.CONSTRUCTOR},{reject:function(e){var t=tg.f(this);return f(t.reject,void 0,e),t.promise}});var Ag=Zl.CONSTRUCTOR;function Ug(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 Bg(e){return function(e){if(Array.isArray(e))return Ug(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 Ug(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)?Ug(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 Ng(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 _g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ng(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}T("Promise"),Tt({target:"Promise",stat:!0,forced:Ag},{resolve:function(e){return function(e,t){if(Ee(e),j(t)&&t.constructor===e)return t;var r=tg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Tt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Sg(e,(function(e,r){Zt(t,e,r)}),{AS_ENTRIES:!0}),t}});var Lg=Po?btoa:function(e){return Buffer.from(e).toString("base64")},Dg=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}},Jg=function(){return e(128)},Fg=function(){var e=Qn(Ei.mark((function e(t){var r,n,i,a,o,s,c;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Po||!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,Bg(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 Gg(e,t,r){return Hg.apply(this,arguments)}function Hg(){return(Hg=Qn(Ei.mark((function e(t,r,n){var i,a,o,s,c,d,u,f;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fg(r);case 2:return a=e.sent,(o=new gu(t.clientConfig)).clientConfig.fetchOptions=_g(_g({},t.clientConfig.fetchOptions),{},{redirect:Po?"follow":"manual"}),s={parameters:_g(_g({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),f=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||f.error)){e.next=14;break}throw new fs(c);case 14:return e.abrupt("return",_g({url:d},Dg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vg(){return(Vg=Qn(Ei.mark((function e(t,r){var n,i,a;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Jg(),e.next=3,Gg(t,n,_g({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 Wg(){return(Wg=Qn(Ei.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p,l,g;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Jg(),e.next=3,Fg(a);case 3:return o=e.sent,(s=new gu(t.clientConfig)).clientConfig.fetchOptions=_g(_g({},t.clientConfig.fetchOptions),{},{redirect:Po?"follow":"manual"}),c="Basic ".concat(Lg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:_g({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,f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(f),p=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new fs(u);case 16:return l=Dg(f),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},e.abrupt("return",t.getAccessToken({body:g}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $g=Object.freeze({__proto__:null,isBrowser:Po,isNode:So,globalObject:jo,hasFetchAvailable:Mo,fetch:To,stringToBase64:Lg,getCodeAndUsidFromUrl:Dg,createCodeVerifier:Jg,generateCodeChallenge:Fg,authorize:Gg,loginGuestUser:function(e,t){return Vg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return Wg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};return e.getAccessToken({body:r})},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}})}});export{Eo as ClientConfig,Qd as ShopperBaskets,eu as ShopperContexts,nu as ShopperCustomers,ou as ShopperDiscoverySearch,du as ShopperExperience,hu as ShopperGiftCertificates,gu as ShopperLogin,Iu as ShopperOrders,mu as ShopperProducts,Cu as ShopperPromotions,Du as ShopperSearch,Wd as TemplateURL,$g as helpers};
|
|
1
|
+
import{nanoid as e}from"nanoid";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(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 n,i,a=function(e){return e&&e.Math==Math&&e},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,f=d?u.bind(u):function(){return u.apply(u,arguments)},h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,l={f:p&&!h.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:h},g=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=Function.prototype,v=b.bind,I=b.call,k=d&&v.bind(I,I),x=d?function(e){return e&&k(e)}:function(e){return e&&function(){return I.apply(e,arguments)}},m=x({}.toString),w=x("".slice),y=function(e){return w(m(e),8,-1)},C=Object,z=x("".split),O=s((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==y(e)?z(e,""):C(e)}:C,E=TypeError,q=function(e){if(null==e)throw E("Can't call method on "+e);return e},P=function(e){return O(q(e))},S=function(e){return"function"==typeof e},j=function(e){return"object"==typeof e?null!==e:S(e)},M=function(e){return S(e)?e:void 0},T=function(e,t){return arguments.length<2?M(o[e]):o[e]&&o[e][t]},R=x({}.isPrototypeOf),A=T("navigator","userAgent")||"",U=o.process,B=o.Deno,N=U&&U.versions||B&&B.version,_=N&&N.v8;_&&(i=(n=_.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&A&&(!(n=A.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=A.match(/Chrome\/(\d+)/))&&(i=+n[1]);var L=i,D=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),J=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=Object,G=J?function(e){return"symbol"==typeof e}:function(e){var t=T("Symbol");return S(t)&&R(t.prototype,F(e))},H=String,V=function(e){try{return H(e)}catch(e){return"Object"}},W=TypeError,$=function(e){if(S(e))return e;throw W(V(e)+" is not a function")},Y=function(e,t){var r=e[t];return null==r?void 0:$(r)},K=TypeError,Q=Object.defineProperty,X=function(e,t){try{Q(o,e,{value:t,configurable:!0,writable:!0})}catch(r){o[e]=t}return t},Z=o["__core-js_shared__"]||X("__core-js_shared__",{}),ee=r((function(e){(e.exports=function(e,t){return Z[e]||(Z[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"})})),te=Object,re=function(e){return te(q(e))},ne=x({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ne(re(e),t)},ae=0,oe=Math.random(),se=x(1..toString),ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+se(++ae+oe,36)},de=ee("wks"),ue=o.Symbol,fe=ue&&ue.for,he=J?ue:ue&&ue.withoutSetter||ce,pe=function(e){if(!ie(de,e)||!D&&"string"!=typeof de[e]){var t="Symbol."+e;D&&ie(ue,e)?de[e]=ue[e]:de[e]=J&&fe?fe(t):he(t)}return de[e]},le=TypeError,ge=pe("toPrimitive"),be=function(e,t){if(!j(e)||G(e))return e;var r,n=Y(e,ge);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!j(r)||G(r))return r;throw le("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&S(r=e.toString)&&!j(n=f(r,e)))return n;if(S(r=e.valueOf)&&!j(n=f(r,e)))return n;if("string"!==t&&S(r=e.toString)&&!j(n=f(r,e)))return n;throw K("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=be(e,"string");return G(t)?t:t+""},Ie=o.document,ke=j(Ie)&&j(Ie.createElement),xe=function(e){return ke?Ie.createElement(e):{}},me=!c&&!s((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,ye={f:c?we:function(e,t){if(e=P(e),t=ve(t),me)try{return we(e,t)}catch(e){}if(ie(e,t))return g(!f(l.f,e,t),e[t])}},Ce=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=String,Oe=TypeError,Ee=function(e){if(j(e))return e;throw Oe(ze(e)+" is not an object")},qe=TypeError,Pe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,je={f:c?Ce?function(e,t,r){if(Ee(e),t=ve(t),Ee(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Se(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 Pe(e,t,r)}:Pe:function(e,t,r){if(Ee(e),t=ve(t),Ee(r),me)try{return Pe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw qe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=c?function(e,t,r){return je.f(e,t,g(1,r))}:function(e,t,r){return e[t]=r,e},Te=Function.prototype,Re=c&&Object.getOwnPropertyDescriptor,Ae=ie(Te,"name"),Ue={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!c||c&&Re(Te,"name").configurable)},Be=x(Function.toString);S(Z.inspectSource)||(Z.inspectSource=function(e){return Be(e)});var Ne,_e,Le,De=Z.inspectSource,Je=o.WeakMap,Fe=S(Je)&&/native code/.test(De(Je)),Ge=ee("keys"),He=function(e){return Ge[e]||(Ge[e]=ce(e))},Ve={},We=o.TypeError,$e=o.WeakMap;if(Fe||Z.state){var Ye=Z.state||(Z.state=new $e),Ke=x(Ye.get),Qe=x(Ye.has),Xe=x(Ye.set);Ne=function(e,t){if(Qe(Ye,e))throw new We("Object already initialized");return t.facade=e,Xe(Ye,e,t),t},_e=function(e){return Ke(Ye,e)||{}},Le=function(e){return Qe(Ye,e)}}else{var Ze=He("state");Ve[Ze]=!0,Ne=function(e,t){if(ie(e,Ze))throw new We("Object already initialized");return t.facade=e,Me(e,Ze,t),t},_e=function(e){return ie(e,Ze)?e[Ze]:{}},Le=function(e){return ie(e,Ze)}}var et={set:Ne,get:_e,has:Le,enforce:function(e){return Le(e)?_e(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!j(t)||(r=_e(t)).type!==e)throw We("Incompatible receiver, "+e+" required");return r}}},tt=r((function(e){var t=Ue.CONFIGURABLE,r=et.enforce,n=et.get,i=Object.defineProperty,a=c&&!s((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),d=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),(!ie(e,"name")||t&&e.name!==n)&&(c?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ie(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?c&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return ie(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=d((function(){return S(this)&&n(this).source||De(this)}),"toString")})),rt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(S(r)&&tt(r,a,n),n.global)i?e[t]=r:X(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:je.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},nt=Math.ceil,it=Math.floor,at=Math.trunc||function(e){var t=+e;return(t>0?it:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:at(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},ht=function(e){return ft(e.length)},pt=function(e){return function(t,r,n){var i,a=P(t),o=ht(a),s=dt(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}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=x([].push),vt=function(e,t){var r,n=P(e),i=0,a=[];for(r in n)!ie(Ve,r)&&ie(n,r)&&bt(a,r);for(;t.length>i;)ie(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=It.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return vt(e,kt)}},mt={f:Object.getOwnPropertySymbols},wt=x([].concat),yt=T("Reflect","ownKeys")||function(e){var t=xt.f(Ee(e)),r=mt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=je.f,a=ye.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Ot=function(e,t){var r=qt[Et(e)];return r==St||r!=Pt&&(S(t)?s(t):!!t)},Et=Ot.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Ot.data={},Pt=Ot.NATIVE="N",St=Ot.POLYFILL="P",jt=Ot,Mt=ye.f,Tt=function(e,t){var r,n,i,a,s,c=e.target,d=e.global,u=e.stat;if(r=d?o:u?o[c]||X(c,{}):(o[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(s=Mt(r,n))&&s.value:r[n],!jt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),rt(r,n,a,e)}},Rt=Object.keys||function(e){return vt(e,It)},At=s((function(){Rt(1)}));Tt({target:"Object",stat:!0,forced:At},{keys:function(e){return Rt(re(e))}});var Ut={};Ut[pe("toStringTag")]="z";var Bt,Nt="[object z]"===String(Ut),_t=pe("toStringTag"),Lt=Object,Dt="Arguments"==y(function(){return arguments}()),Jt=Nt?y: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=Lt(e),_t))?r:Dt?y(t):"Object"==(n=y(t))&&S(t.callee)?"Arguments":n},Ft=String,Gt=function(e){if("Symbol"===Jt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ft(e)},Ht={f:c&&!Ce?Object.defineProperties:function(e,t){Ee(e);for(var r,n=P(t),i=Rt(t),a=i.length,o=0;a>o;)je.f(e,r=i[o++],n[r]);return e}},Vt=T("document","documentElement"),Wt=He("IE_PROTO"),$t=function(){},Yt=function(e){return"<script>"+e+"<\/script>"},Kt=function(e){e.write(Yt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Qt=function(){try{Bt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Qt="undefined"!=typeof document?document.domain&&Bt?Kt(Bt):((t=xe("iframe")).style.display="none",Vt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Yt("document.F=Object")),e.close(),e.F):Kt(Bt);for(var r=It.length;r--;)delete Qt.prototype[It[r]];return Qt()};Ve[Wt]=!0;var Xt=Object.create||function(e,t){var r;return null!==e?($t.prototype=Ee(e),r=new $t,$t.prototype=null,r[Wt]=e):r=Qt(),void 0===t?r:Ht.f(r,t)},Zt=function(e,t,r){var n=ve(t);n in e?je.f(e,n,g(0,r)):e[n]=r},er=Array,tr=Math.max,rr=function(e,t,r){for(var n=ht(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=er(tr(a-i,0)),s=0;i<a;i++,s++)Zt(o,s,e[i]);return o.length=s,o},nr=xt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ar={f:function(e){return ir&&"Window"==y(e)?function(e){try{return nr(e)}catch(e){return rr(ir)}}(e):nr(P(e))}},or={f:pe},sr=o,cr=je.f,dr=je.f,ur=pe("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ie(e,ur)&&dr(e,ur,{configurable:!0,value:t})},hr=x(x.bind),pr=function(e,t){return $(e),void 0===t?e:d?hr(e,t):function(){return e.apply(t,arguments)}},lr=Array.isArray||function(e){return"Array"==y(e)},gr=function(){},br=[],vr=T("Reflect","construct"),Ir=/^\s*(?:class|function)\b/,kr=x(Ir.exec),xr=!Ir.exec(gr),mr=function(e){if(!S(e))return!1;try{return vr(gr,br,e),!0}catch(e){return!1}},wr=function(e){if(!S(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!kr(Ir,De(e))}catch(e){return!0}};wr.sham=!0;var yr=!vr||s((function(){var e;return mr(mr.call)||!mr(Object)||!mr((function(){e=!0}))||e}))?wr:mr,Cr=pe("species"),zr=Array,Or=function(e,t){return new(function(e){var t;return lr(e)&&(t=e.constructor,(yr(t)&&(t===zr||lr(t.prototype))||j(t)&&null===(t=t[Cr]))&&(t=void 0)),void 0===t?zr:t}(e))(0===t?0:t)},Er=x([].push),qr=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,f){for(var h,p,l=re(c),g=O(l),b=pr(d,u),v=ht(g),I=0,k=f||Or,x=t?k(c,v):r||o?k(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:Er(x,h)}else switch(e){case 4:return!1;case 7:Er(x,h)}return a?-1:n||i?i:x}},Pr={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},Sr=Pr.forEach,jr=He("hidden"),Mr=et.set,Tr=et.getterFor("Symbol"),Rr=Object.prototype,Ar=o.Symbol,Ur=Ar&&Ar.prototype,Br=o.TypeError,Nr=o.QObject,_r=ye.f,Lr=je.f,Dr=ar.f,Jr=l.f,Fr=x([].push),Gr=ee("symbols"),Hr=ee("op-symbols"),Vr=ee("wks"),Wr=!Nr||!Nr.prototype||!Nr.prototype.findChild,$r=c&&s((function(){return 7!=Xt(Lr({},"a",{get:function(){return Lr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=_r(Rr,t);n&&delete Rr[t],Lr(e,t,r),n&&e!==Rr&&Lr(Rr,t,n)}:Lr,Yr=function(e,t){var r=Gr[e]=Xt(Ur);return Mr(r,{type:"Symbol",tag:e,description:t}),c||(r.description=t),r},Kr=function(e,t,r){e===Rr&&Kr(Hr,t,r),Ee(e);var n=ve(t);return Ee(r),ie(Gr,n)?(r.enumerable?(ie(e,jr)&&e[jr][n]&&(e[jr][n]=!1),r=Xt(r,{enumerable:g(0,!1)})):(ie(e,jr)||Lr(e,jr,g(1,{})),e[jr][n]=!0),$r(e,n,r)):Lr(e,n,r)},Qr=function(e,t){Ee(e);var r=P(t),n=Rt(r).concat(tn(r));return Sr(n,(function(t){c&&!f(Xr,r,t)||Kr(e,t,r[t])})),e},Xr=function(e){var t=ve(e),r=f(Jr,this,t);return!(this===Rr&&ie(Gr,t)&&!ie(Hr,t))&&(!(r||!ie(this,t)||!ie(Gr,t)||ie(this,jr)&&this[jr][t])||r)},Zr=function(e,t){var r=P(e),n=ve(t);if(r!==Rr||!ie(Gr,n)||ie(Hr,n)){var i=_r(r,n);return!i||!ie(Gr,n)||ie(r,jr)&&r[jr][n]||(i.enumerable=!0),i}},en=function(e){var t=Dr(P(e)),r=[];return Sr(t,(function(e){ie(Gr,e)||ie(Ve,e)||Fr(r,e)})),r},tn=function(e){var t=e===Rr,r=Dr(t?Hr:P(e)),n=[];return Sr(r,(function(e){!ie(Gr,e)||t&&!ie(Rr,e)||Fr(n,Gr[e])})),n};D||(Ur=(Ar=function(){if(R(Ur,this))throw Br("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gt(arguments[0]):void 0,t=ce(e),r=function(e){this===Rr&&f(r,Hr,e),ie(this,jr)&&ie(this[jr],t)&&(this[jr][t]=!1),$r(this,t,g(1,e))};return c&&Wr&&$r(Rr,t,{configurable:!0,set:r}),Yr(t,e)}).prototype,rt(Ur,"toString",(function(){return Tr(this).tag})),rt(Ar,"withoutSetter",(function(e){return Yr(ce(e),e)})),l.f=Xr,je.f=Kr,Ht.f=Qr,ye.f=Zr,xt.f=ar.f=en,mt.f=tn,or.f=function(e){return Yr(pe(e),e)},c&&(Lr(Ur,"description",{configurable:!0,get:function(){return Tr(this).description}}),rt(Rr,"propertyIsEnumerable",Xr,{unsafe:!0}))),Tt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ar}),Sr(Rt(Vr),(function(e){!function(e){var t=sr.Symbol||(sr.Symbol={});ie(t,e)||cr(t,e,{value:or.f(e)})}(e)})),Tt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){Wr=!0},useSimple:function(){Wr=!1}}),Tt({target:"Object",stat:!0,forced:!D,sham:!c},{create:function(e,t){return void 0===t?Xt(e):Qr(Xt(e),t)},defineProperty:Kr,defineProperties:Qr,getOwnPropertyDescriptor:Zr}),Tt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:en}),function(){var e=T("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=pe("toPrimitive");t&&!t[n]&&rt(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ar,"Symbol"),Ve[jr]=!0;var rn=D&&!!Symbol.for&&!!Symbol.keyFor,nn=ee("string-to-symbol-registry"),an=ee("symbol-to-string-registry");Tt({target:"Symbol",stat:!0,forced:!rn},{for:function(e){var t=Gt(e);if(ie(nn,t))return nn[t];var r=T("Symbol")(t);return nn[t]=r,an[r]=t,r}});var on=ee("symbol-to-string-registry");Tt({target:"Symbol",stat:!0,forced:!rn},{keyFor:function(e){if(!G(e))throw TypeError(V(e)+" is not a symbol");if(ie(on,e))return on[e]}});var sn=Function.prototype,cn=sn.apply,dn=sn.call,un="object"==typeof Reflect&&Reflect.apply||(d?dn.bind(cn):function(){return dn.apply(cn,arguments)}),fn=x([].slice),hn=T("JSON","stringify"),pn=x(/./.exec),ln=x("".charAt),gn=x("".charCodeAt),bn=x("".replace),vn=x(1..toString),In=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,mn=!D||s((function(){var e=T("Symbol")();return"[null]"!=hn([e])||"{}"!=hn({a:e})||"{}"!=hn(Object(e))})),wn=s((function(){return'"\\udf06\\ud834"'!==hn("\udf06\ud834")||'"\\udead"'!==hn("\udead")})),yn=function(e,t){var r=fn(arguments),n=t;if((j(t)||void 0!==e)&&!G(e))return lr(t)||(t=function(e,t){if(S(n)&&(t=f(n,this,e,t)),!G(t))return t}),r[1]=t,un(hn,null,r)},Cn=function(e,t,r){var n=ln(r,t-1),i=ln(r,t+1);return pn(kn,e)&&!pn(xn,i)||pn(xn,e)&&!pn(kn,n)?"\\u"+vn(gn(e,0),16):e};hn&&Tt({target:"JSON",stat:!0,arity:3,forced:mn||wn},{stringify:function(e,t,r){var n=fn(arguments),i=un(mn?yn:hn,null,n);return wn&&"string"==typeof i?bn(i,In,Cn):i}});var zn=!D||s((function(){mt.f(1)}));Tt({target:"Object",stat:!0,forced:zn},{getOwnPropertySymbols:function(e){var t=mt.f;return t?t(re(e)):[]}});var On=pe("species"),En=function(e){return L>=51||!s((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qn=Pr.filter,Pn=En("filter");Tt({target:"Array",proto:!0,forced:!Pn},{filter:function(e){return qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Sn=Nt?{}.toString:function(){return"[object "+Jt(this)+"]"};Nt||rt(Object.prototype,"toString",Sn,{unsafe:!0});var jn=ye.f,Mn=s((function(){jn(1)}));Tt({target:"Object",stat:!0,forced:!c||Mn,sham:!c},{getOwnPropertyDescriptor:function(e,t){return jn(P(e),t)}});var Tn={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,An=Rn&&Rn.constructor&&Rn.constructor.prototype,Un=An===Object.prototype?void 0:An,Bn=function(e,t){var r=[][e];return!!r&&s((function(){r.call(null,t||function(){return 1},1)}))},Nn=Pr.forEach,_n=Bn("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Ln=function(e){if(e&&e.forEach!==_n)try{Me(e,"forEach",_n)}catch(t){e.forEach=_n}};for(var Dn in Tn)Tn[Dn]&&Ln(o[Dn]&&o[Dn].prototype);Ln(Un),Tt({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(e){for(var t,r,n=P(e),i=ye.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&Zt(o,t,r);return o}});var Jn=Ht.f;Tt({target:"Object",stat:!0,forced:Object.defineProperties!==Jn,sham:!c},{defineProperties:Jn});var Fn=je.f;Tt({target:"Object",stat:!0,forced:Object.defineProperty!==Fn,sham:!c},{defineProperty:Fn});var Gn=function(){var e=Ee(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},Hn=RegExp.prototype,Vn=Ue.PROPER,Wn=RegExp.prototype.toString,$n=s((function(){return"/a/b"!=Wn.call({source:"a",flags:"b"})})),Yn=Vn&&"toString"!=Wn.name;function Kn(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 Qn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Kn(a,n,i,o,s,"next",e)}function s(e){Kn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Xn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(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 ei(e,t,r){return t&&Zn(e.prototype,t),r&&Zn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ti(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}($n||Yn)&&rt(RegExp.prototype,"toString",(function(){var e=Ee(this);return"/"+Gt(e.source)+"/"+Gt(function(e){var t=e.flags;return void 0!==t||"flags"in Hn||ie(e,"flags")||!R(Hn,e)?t:f(Gn,e)}(e))}),{unsafe:!0});var ri=Object.prototype,ni=ri.hasOwnProperty,ii="function"==typeof Symbol?Symbol:{},ai=ii.iterator||"@@iterator",oi=ii.asyncIterator||"@@asyncIterator",si=ii.toStringTag||"@@toStringTag";function ci(e,t,r,n){var i=t&&t.prototype instanceof fi?t:fi,a=Object.create(i.prototype),o=new Ci(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 Oi()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=mi(o,r);if(s){if(s===ui)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=di(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ui)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 di(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ui={};function fi(){}function hi(){}function pi(){}var li={};li[ai]=function(){return this};var gi=Object.getPrototypeOf,bi=gi&&gi(gi(zi([])));bi&&bi!==ri&&ni.call(bi,ai)&&(li=bi);var vi=pi.prototype=fi.prototype=Object.create(li);function Ii(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ki(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===hi||"GeneratorFunction"===(t.displayName||t.name))}function xi(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=di(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ni.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 mi(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,mi(e,t),"throw"===t.method))return ui;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ui}var n=di(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ui;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,ui):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ui)}function wi(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 yi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ci(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(wi,this),this.reset(!0)}function zi(e){if(e){var t=e[ai];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(ni.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:Oi}}function Oi(){return{value:void 0,done:!0}}hi.prototype=vi.constructor=pi,pi.constructor=hi,pi[si]=hi.displayName="GeneratorFunction",Ii(xi.prototype),xi.prototype[oi]=function(){return this},Ii(vi),vi[si]="Generator",vi[ai]=function(){return this},vi.toString=function(){return"[object Generator]"},Ci.prototype={constructor:Ci,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(yi),!e)for(var t in this)"t"===t.charAt(0)&&ni.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=ni.call(i,"catchLoc"),s=ni.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&&ni.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,ui):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),ui},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),yi(r),ui}},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;yi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:zi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ui}};var Ei={wrap:ci,isGeneratorFunction:ki,AsyncIterator:xi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,pi):(e.__proto__=pi,si in e||(e[si]="GeneratorFunction")),e.prototype=Object.create(vi),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new xi(ci(e,t,r,n),i);return ki(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:zi},qi=je.f,Pi=pe("unscopables"),Si=Array.prototype;null==Si[Pi]&&qi(Si,Pi,{configurable:!0,value:Xt(null)});var ji,Mi,Ti,Ri=function(e){Si[Pi][e]=!0},Ai={},Ui=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Bi=He("IE_PROTO"),Ni=Object,_i=Ni.prototype,Li=Ui?Ni.getPrototypeOf:function(e){var t=re(e);if(ie(t,Bi))return t[Bi];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ni?_i:null},Di=pe("iterator"),Ji=!1;[].keys&&("next"in(Ti=[].keys())?(Mi=Li(Li(Ti)))!==Object.prototype&&(ji=Mi):Ji=!0),(null==ji||s((function(){var e={};return ji[Di].call(e)!==e})))&&(ji={}),S(ji[Di])||rt(ji,Di,(function(){return this}));var Fi={IteratorPrototype:ji,BUGGY_SAFARI_ITERATORS:Ji},Gi=Fi.IteratorPrototype,Hi=function(){return this},Vi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Xt(Gi,{next:g(+!n,r)}),fr(e,i,!1),Ai[i]=Hi,e},Wi=String,$i=TypeError,Yi=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 Ee(r),function(e){if("object"==typeof e||S(e))return e;throw $i("Can't set "+Wi(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Ki=Ue.PROPER,Qi=Ue.CONFIGURABLE,Xi=Fi.IteratorPrototype,Zi=Fi.BUGGY_SAFARI_ITERATORS,ea=pe("iterator"),ta=function(){return this},ra=function(e,t,r,n,i,a,o){Vi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!Zi&&e in l)return l[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",p=!1,l=e.prototype,g=l[ea]||l["@@iterator"]||i&&l[i],b=!Zi&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Li(v.call(new e)))!==Object.prototype&&s.next&&(Li(s)!==Xi&&(Yi?Yi(s,Xi):S(s[ea])||rt(s,ea,ta)),fr(s,h,!0)),Ki&&"values"==i&&g&&"values"!==g.name&&(Qi?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(Zi||p||!(d in l))&&rt(l,d,c[d]);else Tt({target:t,proto:!0,forced:Zi||p},c);return l[ea]!==b&&rt(l,ea,b,{name:i}),Ai[t]=b,c},na=je.f,ia=et.set,aa=et.getterFor("Array Iterator"),oa=ra(Array,"Array",(function(e,t){ia(this,{type:"Array Iterator",target:P(e),index:0,kind:t})}),(function(){var e=aa(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"),sa=Ai.Arguments=Ai.Array;if(Ri("keys"),Ri("values"),Ri("entries"),c&&"values"!==sa.name)try{na(sa,"name",{value:"values"})}catch(e){}var ca=x("".charAt),da=x("".charCodeAt),ua=x("".slice),fa=function(e){return function(t,r){var n,i,a=Gt(q(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=da(a,o))<55296||n>56319||o+1===s||(i=da(a,o+1))<56320||i>57343?e?ca(a,o):n:e?ua(a,o,o+2):i-56320+(n-55296<<10)+65536}},ha={codeAt:fa(!1),charAt:fa(!0)},pa=ha.charAt,la=et.set,ga=et.getterFor("String Iterator");ra(String,"String",(function(e){la(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=ga(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 ba=pe("iterator"),va=pe("toStringTag"),Ia=oa.values,ka=function(e,t){if(e){if(e[ba]!==Ia)try{Me(e,ba,Ia)}catch(t){e[ba]=Ia}if(e[va]||Me(e,va,t),Tn[t])for(var r in oa)if(e[r]!==oa[r])try{Me(e,r,oa[r])}catch(t){e[r]=oa[r]}}};for(var xa in Tn)ka(o[xa]&&o[xa].prototype,xa);ka(Un,"DOMTokenList");var ma=pe("iterator"),wa=!s((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[ma]||"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})),ya=function(e,t,r){for(var n in t)rt(e,n,t[n],r);return e},Ca=TypeError,za=function(e,t){if(R(t,e))return e;throw Ca("Incorrect invocation")},Oa=pe("iterator"),Ea=function(e){if(null!=e)return Y(e,Oa)||Y(e,"@@iterator")||Ai[Jt(e)]},qa=TypeError,Pa=function(e,t){var r=arguments.length<2?Ea(e):t;if($(r))return Ee(f(r,e));throw qa(V(e)+" is not iterable")},Sa=TypeError,ja=function(e,t){if(e<t)throw Sa("Not enough arguments");return e},Ma=Math.floor,Ta=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Ra(e,t):Aa(e,Ta(rr(e,0,n),t),Ta(rr(e,n),t),t)},Ra=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},Aa=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},Ua=Ta,Ba=pe("iterator"),Na=et.set,_a=et.getterFor("URLSearchParams"),La=et.getterFor("URLSearchParamsIterator"),Da=Object.getOwnPropertyDescriptor,Ja=function(e){if(!c)return o[e];var t=Da(o,e);return t&&t.value},Fa=Ja("fetch"),Ga=Ja("Request"),Ha=Ja("Headers"),Va=Ga&&Ga.prototype,Wa=Ha&&Ha.prototype,$a=o.RegExp,Ya=o.TypeError,Ka=o.decodeURIComponent,Qa=o.encodeURIComponent,Xa=x("".charAt),Za=x([].join),eo=x([].push),to=x("".replace),ro=x([].shift),no=x([].splice),io=x("".split),ao=x("".slice),oo=/\+/g,so=Array(4),co=function(e){return so[e-1]||(so[e-1]=$a("((?:%[\\da-f]{2}){"+e+"})","gi"))},uo=function(e){try{return Ka(e)}catch(t){return e}},fo=function(e){var t=to(e,oo," "),r=4;try{return Ka(t)}catch(e){for(;r;)t=to(t,co(r--),uo);return t}},ho=/[!'()~]|%20/g,po={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lo=function(e){return po[e]},go=function(e){return to(Qa(e),ho,lo)},bo=Vi((function(e,t){Na(this,{type:"URLSearchParamsIterator",iterator:Pa(_a(e).entries),kind:t})}),"Iterator",(function(){var e=La(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),vo=function(e){this.entries=[],this.url=null,void 0!==e&&(j(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Xa(e,0)?ao(e,1):e:Gt(e)))};vo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ea(e);if(c)for(r=(t=Pa(e,c)).next;!(n=f(r,t)).done;){if(a=(i=Pa(Ee(n.value))).next,(o=f(a,i)).done||(s=f(a,i)).done||!f(a,i).done)throw Ya("Expected sequence with length 2");eo(this.entries,{key:Gt(o.value),value:Gt(s.value)})}else for(var d in e)ie(e,d)&&eo(this.entries,{key:d,value:Gt(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,"="),eo(this.entries,{key:fo(ro(r)),value:fo(Za(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],eo(r,go(e.key)+"="+go(e.value));return Za(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Io=function(){za(this,ko);var e=arguments.length>0?arguments[0]:void 0;Na(this,new vo(e))},ko=Io.prototype;if(ya(ko,{append:function(e,t){ja(arguments.length,2);var r=_a(this);eo(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){ja(arguments.length,1);for(var t=_a(this),r=t.entries,n=Gt(e),i=0;i<r.length;)r[i].key===n?no(r,i,1):i++;t.updateURL()},get:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&eo(n,t[i].value);return n},has:function(e){ja(arguments.length,1);for(var t=_a(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){ja(arguments.length,1);for(var r,n=_a(this),i=n.entries,a=!1,o=Gt(e),s=Gt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?no(i,c--,1):(a=!0,r.value=s));a||eo(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=_a(this);Ua(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=_a(this).entries,n=pr(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 bo(this,"keys")},values:function(){return new bo(this,"values")},entries:function(){return new bo(this,"entries")}},{enumerable:!0}),rt(ko,Ba,ko.entries,{name:"entries"}),rt(ko,"toString",(function(){return _a(this).serialize()}),{enumerable:!0}),fr(Io,"URLSearchParams"),Tt({global:!0,constructor:!0,forced:!wa},{URLSearchParams:Io}),!wa&&S(Ha)){var xo=x(Wa.has),mo=x(Wa.set),wo=function(e){if(j(e)){var t,r=e.body;if("URLSearchParams"===Jt(r))return t=e.headers?new Ha(e.headers):new Ha,xo(t,"content-type")||mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xt(e,{body:g(0,Gt(r)),headers:g(0,t)})}return e};if(S(Fa)&&Tt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Fa(e,arguments.length>1?wo(arguments[1]):{})}}),S(Ga)){var yo=function(e){return za(this,Va),new Ga(e,arguments.length>1?wo(arguments[1]):{})};Va.constructor=yo,yo.prototype=Va,Tt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yo})}}var Co={URLSearchParams:Io,getState:_a};function zo(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 Oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Eo=ei((function e(t){if(Xn(this,e),ti(this,"baseUri",void 0),ti(this,"proxy",void 0),ti(this,"headers",void 0),ti(this,"parameters",void 0),ti(this,"fetchOptions",void 0),ti(this,"transformRequest",void 0),ti(this,"throwOnBadResponse",void 0),this.headers=Oo({},t.headers),this.parameters=Oo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Oo({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 qo(e){return(qo="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)}ti(Eo,"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}}}),Tt({global:!0},{globalThis:o});var Po="object"===("undefined"==typeof window?"undefined":qo(window))&&"object"===qo(window.document),So="object"===("undefined"==typeof process?"undefined":qo(process))&&"object"===qo(process.versions)&&"string"==typeof process.versions.node,jo=Po?window:globalThis,Mo="function"==typeof jo.fetch,To=function(){if(So)return require("node-fetch").default;if(!Mo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return jo.fetch}(),Ro=Function,Ao=x([].concat),Uo=x([].join),Bo={},No=function(e,t,r){if(!ie(Bo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Bo[t]=Ro("C,a","return new C("+Uo(n,",")+")")}return Bo[t](e,r)},_o=d?Ro.bind:function(e){var t=$(this),r=t.prototype,n=fn(arguments,1),i=function(){var r=Ao(n,fn(arguments));return this instanceof i?No(t,r.length,r):t.apply(e,r)};return j(r)&&(i.prototype=r),i},Lo=TypeError,Do=function(e){if(yr(e))return e;throw Lo(V(e)+" is not a constructor")},Jo=T("Reflect","construct"),Fo=Object.prototype,Go=[].push,Ho=s((function(){function e(){}return!(Jo((function(){}),[],e)instanceof e)})),Vo=!s((function(){Jo((function(){}))})),Wo=Ho||Vo;Tt({target:"Reflect",stat:!0,forced:Wo,sham:Wo},{construct:function(e,t){Do(e),Ee(t);var r=arguments.length<3?e:Do(arguments[2]);if(Vo&&!Ho)return Jo(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 un(Go,n,t),new(un(_o,e,n))}var i=r.prototype,a=Xt(j(i)?i:Fo),o=un(e,a,t);return j(o)?o:a}});var $o=TypeError,Yo=function(e){if(e>9007199254740991)throw $o("Maximum allowed index exceeded");return e},Ko=pe("isConcatSpreadable"),Qo=L>=51||!s((function(){var e=[];return e[Ko]=!1,e.concat()[0]!==e})),Xo=En("concat"),Zo=function(e){if(!j(e))return!1;var t=e[Ko];return void 0!==t?!!t:lr(e)};function es(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ts(e,t){return(ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rs(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&&ts(e,t)}function ns(e,t){if(t&&("object"===qo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return es(e)}function is(e){return(is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function as(){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 os(e,t,r){return(os=as()?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&&ts(i,r.prototype),i}).apply(null,arguments)}function ss(e){var t="function"==typeof Map?new Map:void 0;return(ss=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 os(e,arguments,is(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ts(n,e)})(e)}function cs(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=is(e);if(t){var i=is(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ns(this,r)}}Tt({target:"Array",proto:!0,arity:1,forced:!Qo||!Xo},{concat:function(e){var t,r,n,i,a,o=re(this),s=Or(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(Zo(a=-1===t?o:arguments[t]))for(i=ht(a),Yo(c+i),r=0;r<i;r++,c++)r in a&&Zt(s,c,a[r]);else Yo(c+1),Zt(s,c++,a);return s.length=c,s}});var ds,us,fs=function(e){rs(r,ss(Error));var t=cs(r);function r(e){var n;return Xn(this,r),ti(es(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ei(r)}(),hs=o.RegExp,ps=s((function(){var e=hs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ls=ps||s((function(){return!hs("a","y").sticky})),gs={BROKEN_CARET:ps||s((function(){var e=hs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ls,UNSUPPORTED_Y:ps},bs=o.RegExp,vs=s((function(){var e=bs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Is=o.RegExp,ks=s((function(){var e=Is("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),xs=et.get,ms=ee("native-string-replace",String.prototype.replace),ws=RegExp.prototype.exec,ys=ws,Cs=x("".charAt),zs=x("".indexOf),Os=x("".replace),Es=x("".slice),qs=(us=/b*/g,f(ws,ds=/a/,"a"),f(ws,us,"a"),0!==ds.lastIndex||0!==us.lastIndex),Ps=gs.BROKEN_CARET,Ss=void 0!==/()??/.exec("")[1];(qs||Ss||Ps||vs||ks)&&(ys=function(e){var t,r,n,i,a,o,s,c=this,d=xs(c),u=Gt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=f(ys,h,u),c.lastIndex=h.lastIndex,t;var p=d.groups,l=Ps&&c.sticky,g=f(Gn,c),b=c.source,v=0,I=u;if(l&&(g=Os(g,"y",""),-1===zs(g,"g")&&(g+="g"),I=Es(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Cs(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ss&&(r=new RegExp("^"+b+"$(?!\\s)",g)),qs&&(n=c.lastIndex),i=f(ws,l?r:c,I),l?i?(i.input=Es(i.input,v),i[0]=Es(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:qs&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ss&&i&&i.length>1&&f(ms,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=Xt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var js=ys;Tt({target:"RegExp",proto:!0,forced:/./.exec!==js},{exec:js});var Ms=pe("species"),Ts=RegExp.prototype,Rs=function(e,t,r,n){var i=pe(e),a=!s((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ms]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var c=x(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=x(e),s=t.exec;return s===js||s===Ts.exec?a&&!i?{done:!0,value:c(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));rt(String.prototype,e,d[0]),rt(Ts,i,d[1])}n&&Me(Ts[i],"sham",!0)},As=ha.charAt,Us=function(e,t,r){return t+(r?As(e,t).length:1)},Bs=Math.floor,Ns=x("".charAt),_s=x("".replace),Ls=x("".slice),Ds=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Js=/\$([$&'`]|\d{1,2})/g,Fs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Js;return void 0!==i&&(i=re(i),c=Ds),_s(a,c,(function(a,c){var d;switch(Ns(c,0)){case"$":return"$";case"&":return e;case"`":return Ls(t,0,r);case"'":return Ls(t,o);case"<":d=i[Ls(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=Bs(u/10);return 0===f?a:f<=s?void 0===n[f-1]?Ns(c,1):n[f-1]+Ns(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Gs=TypeError,Hs=function(e,t){var r=e.exec;if(S(r)){var n=f(r,e,t);return null!==n&&Ee(n),n}if("RegExp"===y(e))return f(js,e,t);throw Gs("RegExp#exec called on incompatible receiver")},Vs=pe("replace"),Ws=Math.max,$s=Math.min,Ys=x([].concat),Ks=x([].push),Qs=x("".indexOf),Xs=x("".slice),Zs="$0"==="a".replace(/./,"$0"),ec=!!/./[Vs]&&""===/./[Vs]("a","$0");Rs("replace",(function(e,t,r){var n=ec?"$":"$0";return[function(e,r){var n=q(this),i=null==e?void 0:Y(e,Vs);return i?f(i,e,n,r):f(t,Gt(n),e,r)},function(e,i){var a=Ee(this),o=Gt(e);if("string"==typeof i&&-1===Qs(i,n)&&-1===Qs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=S(i);c||(i=Gt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Hs(a,o);if(null===h)break;if(Ks(f,h),!d)break;""===Gt(h[0])&&(a.lastIndex=Us(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Gt((h=f[b])[0]),I=Ws($s(ot(h.index),o.length),0),k=[],x=1;x<h.length;x++)Ks(k,void 0===(p=h[x])?p:String(p));var m=h.groups;if(c){var w=Ys([v],k,I,o);void 0!==m&&Ks(w,m);var y=Gt(un(i,void 0,w))}else y=Fs(v,o,I,k,m,i);I>=g&&(l+=Xs(o,g,I)+y,g=I+v.length)}return l+Xs(o,g)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Zs||ec);var tc,rc=function(e,t,r){return r.get&&tt(r.get,t,{getter:!0}),r.set&&tt(r.set,t,{setter:!0}),je.f(e,t,r)},nc=Object.assign,ic=Object.defineProperty,ac=x([].concat),oc=!nc||s((function(){if(c&&1!==nc({b:1},nc(ic({},"a",{enumerable:!0,get:function(){ic(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!=nc({},e)[r]||"abcdefghijklmnopqrst"!=Rt(nc({},t)).join("")}))?function(e,t){for(var r=re(e),n=arguments.length,i=1,a=mt.f,o=l.f;n>i;)for(var s,d=O(arguments[i++]),u=a?ac(Rt(d),a(d)):Rt(d),h=u.length,p=0;h>p;)s=u[p++],c&&!f(o,d,s)||(r[s]=d[s]);return r}:nc,sc=function(e,t,r){var n,i;Ee(e);try{if(!(n=Y(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 Ee(n),r},cc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){sc(e,"throw",t)}},dc=pe("iterator"),uc=Array.prototype,fc=function(e){return void 0!==e&&(Ai.Array===e||uc[dc]===e)},hc=Array,pc=function(e){var t=re(e),r=yr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=pr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Ea(t),l=0;if(!p||this===hc&&fc(p))for(o=ht(t),s=r?new this(o):hc(o);o>l;l++)h=a?i(t[l],l):t[l],Zt(s,l,h);else for(u=(d=Pa(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=a?cc(d,i,[c.value,l],!0):c.value,Zt(s,l,h);return s.length=l,s},lc=/[^\0-\u007E]/,gc=/[.\u3002\uFF0E\uFF61]/g,bc="Overflow: input needs wider integers to process",vc=RangeError,Ic=x(gc.exec),kc=Math.floor,xc=String.fromCharCode,mc=x("".charCodeAt),wc=x([].join),yc=x([].push),Cc=x("".replace),zc=x("".split),Oc=x("".toLowerCase),Ec=function(e){return e+22+75*(e<26)},qc=function(e,t,r){var n=0;for(e=r?kc(e/700):e>>1,e+=kc(e/t);e>455;)e=kc(e/35),n+=36;return kc(n+36*e/(e+38))},Pc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=mc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=mc(e,r++);56320==(64512&a)?yc(t,((1023&i)<<10)+(1023&a)+65536):(yc(t,i),r--)}else yc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&yc(n,xc(r));var c=n.length,d=c;for(c&&yc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>kc((2147483647-o)/f))throw vc(bc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw vc(bc);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;yc(n,xc(Ec(l+g%b))),h=kc(g/b),p+=36}yc(n,xc(Ec(h))),s=qc(o,f,d==c),o=0,d++}}o++,a++}return wc(n,"")},Sc=ha.codeAt,jc=et.set,Mc=et.getterFor("URL"),Tc=Co.URLSearchParams,Rc=Co.getState,Ac=o.URL,Uc=o.TypeError,Bc=o.parseInt,Nc=Math.floor,_c=Math.pow,Lc=x("".charAt),Dc=x(/./.exec),Jc=x([].join),Fc=x(1..toString),Gc=x([].pop),Hc=x([].push),Vc=x("".replace),Wc=x([].shift),$c=x("".split),Yc=x("".slice),Kc=x("".toLowerCase),Qc=x([].unshift),Xc=/[a-z]/i,Zc=/[\d+-.a-z]/i,ed=/\d/,td=/^0x/i,rd=/^[0-7]+$/,nd=/^\d+$/,id=/^[\da-f]+$/i,ad=/[\0\t\n\r #%/:<>?@[\\\]^|]/,od=/[\0\t\n\r #/:<>?@[\\\]^|]/,sd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,cd=/[\t\n\r]/g,dd=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Qc(t,e%256),e=Nc(e/256);return Jc(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+=Fc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ud={},fd=oc({},ud,{" ":1,'"':1,"<":1,">":1,"`":1}),hd=oc({},fd,{"#":1,"?":1,"{":1,"}":1}),pd=oc({},hd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ld=function(e,t){var r=Sc(e,0);return r>32&&r<127&&!ie(t,e)?e:encodeURIComponent(e)},gd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},bd=function(e,t){var r;return 2==e.length&&Dc(Xc,Lc(e,0))&&(":"==(r=Lc(e,1))||!t&&"|"==r)},vd=function(e){var t;return e.length>1&&bd(Yc(e,0,2))&&(2==e.length||"/"===(t=Lc(e,2))||"\\"===t||"?"===t||"#"===t)},Id=function(e){return"."===e||"%2e"===Kc(e)},kd={},xd={},md={},wd={},yd={},Cd={},zd={},Od={},Ed={},qd={},Pd={},Sd={},jd={},Md={},Td={},Rd={},Ad={},Ud={},Bd={},Nd={},_d={},Ld=function(e,t,r){var n,i,a,o=Gt(e);if(t){if(i=this.parse(o))throw Uc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Ld(r,!0)),i=this.parse(o,null,n))throw Uc(i);(a=Rc(new Tc)).bindURL(this),this.searchParams=a}};Ld.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||kd,u=0,f="",h=!1,p=!1,l=!1;for(e=Gt(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=Vc(e,sd,"")),e=Vc(e,cd,""),n=pc(e);u<=n.length;){switch(i=n[u],d){case kd:if(!i||!Dc(Xc,i)){if(t)return"Invalid scheme";d=md;continue}f+=Kc(i),d=xd;break;case xd:if(i&&(Dc(Zc,i)||"+"==i||"-"==i||"."==i))f+=Kc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=md,u=0;continue}if(t&&(c.isSpecial()!=ie(gd,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&gd[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Md:c.isSpecial()&&r&&r.scheme==c.scheme?d=wd:c.isSpecial()?d=Od:"/"==n[u+1]?(d=yd,u++):(c.cannotBeABaseURL=!0,Hc(c.path,""),d=Bd)}break;case md:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=rr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=_d;break}d="file"==r.scheme?Md:Cd;continue;case wd:if("/"!=i||"/"!=n[u+1]){d=Cd;continue}d=Ed,u++;break;case yd:if("/"==i){d=qd;break}d=Ud;continue;case Cd:if(c.scheme=r.scheme,i==tc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=zd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query="",d=Nd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.path.length--,d=Ud;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query,c.fragment="",d=_d}break;case zd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Ud;continue}d=qd}else d=Ed;break;case Od:if(d=Ed,"/"!=i||"/"!=Lc(f,u+1))continue;u++;break;case Ed:if("/"!=i&&"\\"!=i){d=qd;continue}break;case qd:if("@"==i){h&&(f="%40"+f),h=!0,a=pc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=ld(b,pd);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=pc(f).length+1,f="",d=Pd}else f+=i;break;case Pd:case Sd:if(t&&"file"==c.scheme){d=Rd;continue}if(":"!=i||p){if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=Ad,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=jd,t==Sd)return}break;case jd:if(!Dc(ed,i)){if(i==tc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Bc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===gd[c.scheme]?null:I,f=""}if(t)return;d=Ad;continue}return"Invalid port"}f+=i;break;case Md:if(c.scheme="file","/"==i||"\\"==i)d=Td;else{if(!r||"file"!=r.scheme){d=Ud;continue}if(i==tc)c.host=r.host,c.path=rr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=rr(r.path),c.query="",d=Nd;else{if("#"!=i){vd(Jc(rr(n,u),""))||(c.host=r.host,c.path=rr(r.path),c.shortenPath()),d=Ud;continue}c.host=r.host,c.path=rr(r.path),c.query=r.query,c.fragment="",d=_d}}break;case Td:if("/"==i||"\\"==i){d=Rd;break}r&&"file"==r.scheme&&!vd(Jc(rr(n,u),""))&&(bd(r.path[0],!0)?Hc(c.path,r.path[0]):c.host=r.host),d=Ud;continue;case Rd:if(i==tc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&bd(f))d=Ud;else if(""==f){if(c.host="",t)return;d=Ad}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Ad}continue}f+=i;break;case Ad:if(c.isSpecial()){if(d=Ud,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=tc&&(d=Ud,"/"!=i))continue}else c.fragment="",d=_d;else c.query="",d=Nd;break;case Ud:if(i==tc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Kc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Hc(c.path,"")):Id(f)?"/"==i||"\\"==i&&c.isSpecial()||Hc(c.path,""):("file"==c.scheme&&!c.path.length&&bd(f)&&(c.host&&(c.host=""),f=Lc(f,0)+":"),Hc(c.path,f)),f="","file"==c.scheme&&(i==tc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)Wc(c.path);"?"==i?(c.query="",d=Nd):"#"==i&&(c.fragment="",d=_d)}else f+=ld(i,hd);break;case Bd:"?"==i?(c.query="",d=Nd):"#"==i?(c.fragment="",d=_d):i!=tc&&(c.path[0]+=ld(i,ud));break;case Nd:t||"#"!=i?i!=tc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":ld(i,ud)):(c.fragment="",d=_d);break;case _d:i!=tc&&(c.fragment+=ld(i,fd))}u++}},parseHost:function(e){var t,r,n;if("["==Lc(e,0)){if("]"!=Lc(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,f=0,h=function(){return Lc(e,f)};if(":"==h()){if(":"!=Lc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Dc(id,h());)t=16*t+Bc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Dc(ed,h()))return;for(;Dc(ed,h());){if(a=Bc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,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}(Yc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=zc(Cc(Oc(e),gc,"."),".");for(t=0;t<i.length;t++)r=i[t],yc(n,Ic(lc,r)?"xn--"+Pc(r):r);return wc(n,".")}(e),Dc(ad,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=$c(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"==Lc(i,0)&&(a=Dc(td,i)?16:8,i=Yc(i,8==a?1:2)),""===i)o=0;else{if(!Dc(10==a?nd:8==a?rd:id,i))return e;o=Bc(i,a)}Hc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=_c(256,5-t))return null}else if(o>255)return null;for(s=Gc(r),n=0;n<r.length;n++)s+=r[n]*_c(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Dc(od,e))return"Invalid host";for(t="",r=pc(e),n=0;n<r.length;n++)t+=ld(r[n],ud);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ie(gd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&bd(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+=dd(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Jc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Uc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Dd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+dd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Gt(e)+":",kd)},getUsername:function(){return this.username},setUsername:function(e){var t=pc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=ld(t[r],pd)}},getPassword:function(){return this.password},setPassword:function(e){var t=pc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=ld(t[r],pd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?dd(e):dd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Pd)},getHostname:function(){var e=this.host;return null===e?"":dd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Sd)},getPort:function(){var e=this.port;return null===e?"":Gt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Gt(e))?this.port=null:this.parse(e,jd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Jc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ad))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Gt(e))?this.query=null:("?"==Lc(e,0)&&(e=Yc(e,1)),this.query="",this.parse(e,Nd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Gt(e))?("#"==Lc(e,0)&&(e=Yc(e,1)),this.fragment="",this.parse(e,_d)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Dd=function(e){var t=za(this,Jd),r=ja(arguments.length,1)>1?arguments[1]:void 0,n=jc(t,new Ld(e,!1,r));c||(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())},Jd=Dd.prototype,Fd=function(e,t){return{get:function(){return Mc(this)[e]()},set:t&&function(e){return Mc(this)[t](e)},configurable:!0,enumerable:!0}};if(c&&(rc(Jd,"href",Fd("serialize","setHref")),rc(Jd,"origin",Fd("getOrigin")),rc(Jd,"protocol",Fd("getProtocol","setProtocol")),rc(Jd,"username",Fd("getUsername","setUsername")),rc(Jd,"password",Fd("getPassword","setPassword")),rc(Jd,"host",Fd("getHost","setHost")),rc(Jd,"hostname",Fd("getHostname","setHostname")),rc(Jd,"port",Fd("getPort","setPort")),rc(Jd,"pathname",Fd("getPathname","setPathname")),rc(Jd,"search",Fd("getSearch","setSearch")),rc(Jd,"searchParams",Fd("getSearchParams")),rc(Jd,"hash",Fd("getHash","setHash"))),rt(Jd,"toJSON",(function(){return Mc(this).serialize()}),{enumerable:!0}),rt(Jd,"toString",(function(){return Mc(this).serialize()}),{enumerable:!0}),Ac){var Gd=Ac.createObjectURL,Hd=Ac.revokeObjectURL;Gd&&rt(Dd,"createObjectURL",pr(Gd,Ac)),Hd&&rt(Dd,"revokeObjectURL",pr(Hd,Ac))}function Vd(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=is(e);if(t){var i=is(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ns(this,r)}}fr(Dd,"URL"),Tt({global:!0,constructor:!0,forced:!wa,sham:!c},{URL:Dd});var Wd=function(e){rs(r,ss(URL));var t=Vd(r);function r(e,n,i){var a;return Xn(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 ei(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))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));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}(),$d="commerce-sdk-isomorphic@1.10.2";function Yd(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 Kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qd=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Kd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,M,T,R,A,U;return ei(e,[{key:"createBasket",value:(U=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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),s=new Wd("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,To(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new fs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=30,To(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new fs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(R=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,To(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new fs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(T=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"getBasket",value:(M=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"updateBasket",value:(j=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(P=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(z=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(x=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,To(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new fs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,To(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new fs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=49,To(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new fs(u);case 58:return e.next=60,u.text();case 60:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Kd(Kd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Xd(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 Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(Qd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var eu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Zd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i;return ei(e,[{key:"getShopperContext",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new fs(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42: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 ru(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){ti(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}ti(eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var nu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,M;return ei(e,[{key:"registerCustomer",value:(M=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new fs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(S=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===i.clientId){e.next=21;break}o.clientId=i.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");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 s=new Wd("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(P=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"resetPassword",value:(q=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new fs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(z=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getCustomer",value:(C=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(m=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeCustomerAddress",value:(x=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new fs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new fs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=62;break}throw new fs(u);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new fs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=55,To(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new fs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=31,To(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new fs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ru(ru({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=ru(ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,To(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new fs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function iu(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 au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var ou=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"retrieveResults",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=au(au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=au(au({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=au(au({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=au(au({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function su(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?su(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var du=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"getPages",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=42,To(s.toString(),d);case 42:if(u=e.sent,!r){e.next=47;break}return e.abrupt("return",u);case 47:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=51;break}throw new fs(u);case 51:return e.next=53,u.text();case 53:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function uu(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?uu(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ti(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var hu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=fu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t;return ei(e,[{key:"getGiftCertificate",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/gift-certificate",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),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=fu(fu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41: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 lu(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){ti(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}ti(hu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var gu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I;return ei(e,[{key:"retrieveCredQualityUserInfo",value:(I=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.username){e.next=17;break}o.username=n.username,e.next=22;break;case 17:if(void 0===i.username){e.next=21;break}o.username=i.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return s=new Wd("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=28,To(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new fs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authenticateCustomer",value:(v=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=60,To(s.toString(),d);case 60:if(u=e.sent,!r){e.next=65;break}return e.abrupt("return",u);case 65:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=67;break}throw new fs(u);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(h=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(f=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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 s=new Wd("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=82,To(s.toString(),d);case 82:if(u=e.sent,!r){e.next=87;break}return e.abrupt("return",u);case 87:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=89;break}throw new fs(u);case 89:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new fs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,To(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new fs(u);case 29:return e.next=31,u.text();case 31:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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={},s=new Wd("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,To(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new fs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32: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 vu(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){ti(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}ti(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Iu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i,a,o,s;return ei(e,[{key:"createOrder",value:(s=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,To(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new fs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,To(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new fs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,To(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new fs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50: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 xu(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){ti(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}ti(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var mu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r,n,i;return ei(e,[{key:"getProducts",value:(i=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new Wd("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new Wd("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,To(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new fs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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 s=new Wd("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=xu(xu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=xu(xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,To(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new fs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52: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 yu(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){ti(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}ti(mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Cu=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"getPromotions",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=yu(yu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,To(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new fs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=yu(yu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ti(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var zu=TypeError,Ou=function(e,t){if(!delete e[t])throw zu("Cannot delete property "+V(t)+" of "+V(e))},Eu=A.match(/firefox\/(\d+)/i),qu=!!Eu&&+Eu[1],Pu=/MSIE|Trident/.test(A),Su=A.match(/AppleWebKit\/(\d+)\./),ju=!!Su&&+Su[1],Mu=[],Tu=x(Mu.sort),Ru=x(Mu.push),Au=s((function(){Mu.sort(void 0)})),Uu=s((function(){Mu.sort(null)})),Bu=Bn("sort"),Nu=!s((function(){if(L)return L<70;if(!(qu&&qu>3)){if(Pu)return!0;if(ju)return ju<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++)Mu.push({k:t+n,v:r})}for(Mu.sort((function(e,t){return t.v-e.v})),n=0;n<Mu.length;n++)t=Mu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function _u(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?_u(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Tt({target:"Array",proto:!0,forced:Au||!Uu||!Bu||!Nu},{sort:function(e){void 0!==e&&$(e);var t=re(this);if(Nu)return void 0===e?Tu(t):Tu(t,e);var r,n,i=[],a=ht(t);for(n=0;n<a;n++)n in t&&Ru(i,t[n]);for(Ua(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Gt(t)>Gt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Ou(t,n++);return t}});var Du=function(){function e(t){Xn(this,e),ti(this,"clientConfig",void 0);var r=Lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Eo(r)}var t,r;return ei(e,[{key:"productSearch",value:(r=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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.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.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),s=new Wd("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Lu(Lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=36,To(s.toString(),d);case 36:if(u=e.sent,!r){e.next=41;break}return e.abrupt("return",u);case 41:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new fs(u);case 45:return e.next=47,u.text();case 47:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=Qn(Ei.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return Ei.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),s=new Wd("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Lu(Lu({},this.clientConfig.headers),null==t?void 0:t.headers),Po||(c["user-agent"]=[c["user-agent"],$d].join(" ")),d=Lu(Lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,To(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new fs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ti(Du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Ju=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Rs("search",(function(e,t,r){return[function(t){var r=q(this),n=null==t?void 0:Y(t,e);return n?f(n,t,r):new RegExp(t)[e](Gt(r))},function(e){var n=Ee(this),i=Gt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Ju(o,0)||(n.lastIndex=0);var s=Hs(n,i);return Ju(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Fu=pe("iterator"),Gu=!1;try{var Hu=0,Vu={next:function(){return{done:!!Hu++}},return:function(){Gu=!0}};Vu[Fu]=function(){return this},Array.from(Vu,(function(){throw 2}))}catch(e){}var Wu,$u,Yu,Ku=function(e,t){if(!t&&!Gu)return!1;var r=!1;try{var n={};n[Fu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Qu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Xu=je.f,Zu=et.enforce,ef=et.get,tf=o.Int8Array,rf=tf&&tf.prototype,nf=o.Uint8ClampedArray,af=nf&&nf.prototype,of=tf&&Li(tf),sf=rf&&Li(rf),cf=Object.prototype,df=o.TypeError,uf=pe("toStringTag"),ff=ce("TYPED_ARRAY_TAG"),hf=Qu&&!!Yi&&"Opera"!==Jt(o.opera),pf=!1,lf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},gf={BigInt64Array:8,BigUint64Array:8},bf=function(e){var t=Li(e);if(j(t)){var r=ef(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:bf(t)}},vf=function(e){if(!j(e))return!1;var t=Jt(e);return ie(lf,t)||ie(gf,t)};for(Wu in lf)(Yu=($u=o[Wu])&&$u.prototype)?Zu(Yu).TypedArrayConstructor=$u:hf=!1;for(Wu in gf)(Yu=($u=o[Wu])&&$u.prototype)&&(Zu(Yu).TypedArrayConstructor=$u);if((!hf||!S(of)||of===Function.prototype)&&(of=function(){throw df("Incorrect invocation")},hf))for(Wu in lf)o[Wu]&&Yi(o[Wu],of);if((!hf||!sf||sf===cf)&&(sf=of.prototype,hf))for(Wu in lf)o[Wu]&&Yi(o[Wu].prototype,sf);if(hf&&Li(af)!==sf&&Yi(af,sf),c&&!ie(sf,uf))for(Wu in pf=!0,Xu(sf,uf,{get:function(){return j(this)?this[ff]:void 0}}),lf)o[Wu]&&Me(o[Wu],ff,Wu);var If={NATIVE_ARRAY_BUFFER_VIEWS:hf,TYPED_ARRAY_TAG:pf&&ff,aTypedArray:function(e){if(vf(e))return e;throw df("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!Yi||R(of,e)))return e;throw df(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(c){if(r)for(var i in lf){var a=o[i];if(a&&ie(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}sf[e]&&!r||rt(sf,e,r?t:hf&&rf[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(c){if(Yi){if(r)for(n in lf)if((i=o[n])&&ie(i,e))try{delete i[e]}catch(e){}if(of[e]&&!r)return;try{return rt(of,e,r?t:hf&&of[e]||t)}catch(e){}}for(n in lf)!(i=o[n])||i[e]&&!r||rt(i,e,t)}},getTypedArrayConstructor:bf,isView:function(e){if(!j(e))return!1;var t=Jt(e);return"DataView"===t||ie(lf,t)||ie(gf,t)},isTypedArray:vf,TypedArray:of,TypedArrayPrototype:sf},kf=If.NATIVE_ARRAY_BUFFER_VIEWS,xf=o.ArrayBuffer,mf=o.Int8Array,wf=!kf||!s((function(){mf(1)}))||!s((function(){new mf(-1)}))||!Ku((function(e){new mf,new mf(null),new mf(1.5),new mf(e)}),!0)||s((function(){return 1!==new mf(new xf(2),1,void 0).length})),yf=RangeError,Cf=function(e){if(void 0===e)return 0;var t=ot(e),r=ft(t);if(t!==r)throw yf("Wrong length or index");return r},zf=Array,Of=Math.abs,Ef=Math.pow,qf=Math.floor,Pf=Math.log,Sf=Math.LN2,jf=function(e,t,r){var n,i,a,o=zf(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Ef(2,-24)-Ef(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Of(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=qf(Pf(e)/Sf),e*(a=Ef(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Ef(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Ef(2,t),n+=d):(i=e*Ef(2,d-1)*Ef(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},Mf=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+=Ef(2,t),u-=o}return(d?-1:1)*r*Ef(2,u-t)},Tf=function(e){for(var t=re(this),r=ht(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},Rf=xt.f,Af=je.f,Uf=Ue.PROPER,Bf=Ue.CONFIGURABLE,Nf=et.get,_f=et.set,Lf=o.ArrayBuffer,Df=Lf,Jf=Df&&Df.prototype,Ff=o.DataView,Gf=Ff&&Ff.prototype,Hf=Object.prototype,Vf=o.Array,Wf=o.RangeError,$f=x(Tf),Yf=x([].reverse),Kf=jf,Qf=Mf,Xf=function(e){return[255&e]},Zf=function(e){return[255&e,e>>8&255]},eh=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},th=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},rh=function(e){return Kf(e,23,4)},nh=function(e){return Kf(e,52,8)},ih=function(e,t){Af(e.prototype,t,{get:function(){return Nf(this)[t]}})},ah=function(e,t,r,n){var i=Cf(r),a=Nf(e);if(i+t>a.byteLength)throw Wf("Wrong index");var o=Nf(a.buffer).bytes,s=i+a.byteOffset,c=rr(o,s,s+t);return n?c:Yf(c)},oh=function(e,t,r,n,i,a){var o=Cf(r),s=Nf(e);if(o+t>s.byteLength)throw Wf("Wrong index");for(var c=Nf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Qu){var sh=Uf&&"ArrayBuffer"!==Lf.name;if(s((function(){Lf(1)}))&&s((function(){new Lf(-1)}))&&!s((function(){return new Lf,new Lf(1.5),new Lf(NaN),sh&&!Bf})))sh&&Bf&&Me(Lf,"name","ArrayBuffer");else{(Df=function(e){return za(this,Jf),new Lf(Cf(e))}).prototype=Jf;for(var ch,dh=Rf(Lf),uh=0;dh.length>uh;)(ch=dh[uh++])in Df||Me(Df,ch,Lf[ch]);Jf.constructor=Df}Yi&&Li(Gf)!==Hf&&Yi(Gf,Hf);var fh=new Ff(new Df(2)),hh=x(Gf.setInt8);fh.setInt8(0,2147483648),fh.setInt8(1,2147483649),!fh.getInt8(0)&&fh.getInt8(1)||ya(Gf,{setInt8:function(e,t){hh(this,e,t<<24>>24)},setUint8:function(e,t){hh(this,e,t<<24>>24)}},{unsafe:!0})}else Jf=(Df=function(e){za(this,Jf);var t=Cf(e);_f(this,{bytes:$f(Vf(t),0),byteLength:t}),c||(this.byteLength=t)}).prototype,Gf=(Ff=function(e,t,r){za(this,Gf),za(e,Jf);var n=Nf(e).byteLength,i=ot(t);if(i<0||i>n)throw Wf("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw Wf("Wrong length");_f(this,{buffer:e,byteLength:r,byteOffset:i}),c||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,c&&(ih(Df,"byteLength"),ih(Ff,"buffer"),ih(Ff,"byteLength"),ih(Ff,"byteOffset")),ya(Gf,{getInt8:function(e){return ah(this,1,e)[0]<<24>>24},getUint8:function(e){return ah(this,1,e)[0]},getInt16:function(e){var t=ah(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ah(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return th(ah(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return th(ah(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Qf(ah(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Qf(ah(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){oh(this,1,e,Xf,t)},setUint8:function(e,t){oh(this,1,e,Xf,t)},setInt16:function(e,t){oh(this,2,e,Zf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){oh(this,2,e,Zf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){oh(this,4,e,eh,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){oh(this,4,e,eh,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){oh(this,4,e,rh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){oh(this,8,e,nh,t,arguments.length>2?arguments[2]:void 0)}});fr(Df,"ArrayBuffer"),fr(Ff,"DataView");var ph={ArrayBuffer:Df,DataView:Ff},lh=Math.floor,gh=Number.isInteger||function(e){return!j(e)&&isFinite(e)&&lh(e)===e},bh=RangeError,vh=RangeError,Ih=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw bh("The argument can't be less than 0");return t}(e);if(r%t)throw vh("Wrong offset");return r},kh=If.aTypedArrayConstructor,xh=function(e){var t,r,n,i,a,o,s=Do(this),c=re(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Ea(c);if(p&&!fc(p))for(o=(a=Pa(c,p)).next,c=[];!(i=f(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=pr(u,arguments[2])),r=ht(c),n=new(kh(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},mh=pe("species"),wh=function(e){var t=T(e),r=je.f;c&&t&&!t[mh]&&r(t,mh,{configurable:!0,get:function(){return this}})};r((function(e){var t=xt.f,r=Pr.forEach,n=et.get,i=et.set,a=et.enforce,s=je.f,d=ye.f,u=Math.round,h=o.RangeError,p=ph.ArrayBuffer,l=p.prototype,b=ph.DataView,v=If.NATIVE_ARRAY_BUFFER_VIEWS,I=If.TYPED_ARRAY_TAG,k=If.TypedArray,x=If.TypedArrayPrototype,m=If.aTypedArrayConstructor,w=If.isTypedArray,y=function(e,t){m(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){s(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return R(l,e)||"ArrayBuffer"==(t=Jt(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!G(t)&&t in e&&gh(+t)&&t>=0},E=function(e,t){return t=ve(t),O(e,t)?g(2,e[t]):d(e,t)},q=function(e,t,r){return t=ve(t),!(O(e,t)&&j(r)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?s(e,t,r):(e[t]=r.value,e)};c?(v||(ye.f=E,je.f=q,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Tt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,g=e+(d?"Clamped":"")+"Array",m="get"+e,C="set"+e,O=o[g],E=O,q=E&&E.prototype,P={},M=function(e,t){s(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[m](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?wf&&(E=c((function(e,t,r,n){return za(e,q),function(e,t,r){var n,i;return Yi&&S(n=t.constructor)&&n!==r&&j(i=n.prototype)&&i!==r.prototype&&Yi(e,i),e}(j(t)?z(t)?void 0!==n?new O(t,Ih(r,l),n):void 0!==r?new O(t,Ih(r,l)):new O(t):w(t)?y(E,t):f(xh,E,t):new O(Cf(t)),e,E)})),Yi&&Yi(E,k),r(t(O),(function(e){e in E||Me(E,e,O[e])})),E.prototype=q):(E=c((function(e,t,r,n){za(e,q);var a,o,s,c=0,d=0;if(j(t)){if(!z(t))return w(t)?y(E,t):f(xh,E,t);a=t,d=Ih(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw h("Wrong length");if((o=u-d)<0)throw h("Wrong length")}else if((o=ft(n)*l)+d>u)throw h("Wrong length");s=o/l}else s=Cf(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new b(a)});c<s;)M(e,c++)})),Yi&&Yi(E,k),q=E.prototype=Xt(x)),q.constructor!==E&&Me(q,"constructor",E),a(q).TypedArrayConstructor=E,I&&Me(q,I,g);var T=E!=O;P[g]=E,Tt({global:!0,constructor:!0,forced:T,sham:!v},P),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),wh(g)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var yh=Math.min,Ch=x([].copyWithin||function(e,t){var r=re(this),n=ht(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=yh((void 0===o?n:dt(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]:Ou(r,i),i+=c,a+=c;return r}),zh=If.aTypedArray;(0,If.exportTypedArrayMethod)("copyWithin",(function(e,t){return Ch(zh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Oh=Pr.every,Eh=If.aTypedArray;(0,If.exportTypedArrayMethod)("every",(function(e){return Oh(Eh(this),e,arguments.length>1?arguments[1]:void 0)}));var qh=TypeError,Ph=function(e){var t=be(e,"number");if("number"==typeof t)throw qh("Can't convert number to bigint");return BigInt(t)},Sh=If.aTypedArray,jh=If.exportTypedArrayMethod,Mh=x("".slice);jh("fill",(function(e){var t=arguments.length;Sh(this);var r="Big"===Mh(Jt(this),0,3)?Ph(e):+e;return f(Tf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),s((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Th=pe("species"),Rh=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[Th])?t:Do(r)},Ah=If.aTypedArrayConstructor,Uh=If.getTypedArrayConstructor,Bh=function(e){return Ah(Rh(e,Uh(e)))},Nh=function(e,t){return function(e,t){for(var r=0,n=ht(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Bh(e),t)},_h=Pr.filter,Lh=If.aTypedArray;(0,If.exportTypedArrayMethod)("filter",(function(e){var t=_h(Lh(this),e,arguments.length>1?arguments[1]:void 0);return Nh(this,t)}));var Dh=Pr.find,Jh=If.aTypedArray;(0,If.exportTypedArrayMethod)("find",(function(e){return Dh(Jh(this),e,arguments.length>1?arguments[1]:void 0)}));var Fh=Pr.findIndex,Gh=If.aTypedArray;(0,If.exportTypedArrayMethod)("findIndex",(function(e){return Fh(Gh(this),e,arguments.length>1?arguments[1]:void 0)}));var Hh=Pr.forEach,Vh=If.aTypedArray;(0,If.exportTypedArrayMethod)("forEach",(function(e){Hh(Vh(this),e,arguments.length>1?arguments[1]:void 0)}));var Wh=lt.includes,$h=If.aTypedArray;(0,If.exportTypedArrayMethod)("includes",(function(e){return Wh($h(this),e,arguments.length>1?arguments[1]:void 0)}));var Yh=lt.indexOf,Kh=If.aTypedArray;(0,If.exportTypedArrayMethod)("indexOf",(function(e){return Yh(Kh(this),e,arguments.length>1?arguments[1]:void 0)}));var Qh=pe("iterator"),Xh=o.Uint8Array,Zh=x(oa.values),ep=x(oa.keys),tp=x(oa.entries),rp=If.aTypedArray,np=If.exportTypedArrayMethod,ip=Xh&&Xh.prototype,ap=!s((function(){ip[Qh].call([1])})),op=!!ip&&ip.values&&ip[Qh]===ip.values&&"values"===ip.values.name,sp=function(){return Zh(rp(this))};np("entries",(function(){return tp(rp(this))}),ap),np("keys",(function(){return ep(rp(this))}),ap),np("values",sp,ap||!op,{name:"values"}),np(Qh,sp,ap||!op,{name:"values"});var cp=If.aTypedArray,dp=If.exportTypedArrayMethod,up=x([].join);dp("join",(function(e){return up(cp(this),e)}));var fp=Math.min,hp=[].lastIndexOf,pp=!!hp&&1/[1].lastIndexOf(1,-0)<0,lp=Bn("lastIndexOf"),gp=pp||!lp?function(e){if(pp)return un(hp,this,arguments)||0;var t=P(this),r=ht(t),n=r-1;for(arguments.length>1&&(n=fp(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:hp,bp=If.aTypedArray;(0,If.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return un(gp,bp(this),t>1?[e,arguments[1]]:[e])}));var vp=Pr.map,Ip=If.aTypedArray;(0,If.exportTypedArrayMethod)("map",(function(e){return vp(Ip(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Bh(e))(t)}))}));var kp=TypeError,xp=function(e){return function(t,r,n,i){$(r);var a=re(t),o=O(a),s=ht(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 kp("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}},mp={left:xp(!1),right:xp(!0)},wp=mp.left,yp=If.aTypedArray;(0,If.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return wp(yp(this),e,t,t>1?arguments[1]:void 0)}));var Cp=mp.right,zp=If.aTypedArray;(0,If.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Cp(zp(this),e,t,t>1?arguments[1]:void 0)}));var Op=If.aTypedArray,Ep=If.exportTypedArrayMethod,qp=Math.floor;Ep("reverse",(function(){for(var e,t=Op(this).length,r=qp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Pp=o.RangeError,Sp=o.Int8Array,jp=Sp&&Sp.prototype,Mp=jp&&jp.set,Tp=If.aTypedArray,Rp=If.exportTypedArrayMethod,Ap=!s((function(){var e=new Uint8ClampedArray(2);return f(Mp,e,{length:1,0:3},1),3!==e[1]})),Up=Ap&&If.NATIVE_ARRAY_BUFFER_VIEWS&&s((function(){var e=new Sp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Rp("set",(function(e){Tp(this);var t=Ih(arguments.length>1?arguments[1]:void 0,1),r=re(e);if(Ap)return f(Mp,this,r,t);var n=this.length,i=ht(r),a=0;if(i+t>n)throw Pp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Ap||Up);var Bp=If.aTypedArray;(0,If.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Bp(this),e,t),n=Bh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),s((function(){new Int8Array(1).slice()})));var Np=Pr.some,_p=If.aTypedArray;(0,If.exportTypedArrayMethod)("some",(function(e){return Np(_p(this),e,arguments.length>1?arguments[1]:void 0)}));var Lp=If.aTypedArray,Dp=If.exportTypedArrayMethod,Jp=o.Uint16Array,Fp=Jp&&x(Jp.prototype.sort),Gp=!(!Fp||s((function(){Fp(new Jp(2),null)}))&&s((function(){Fp(new Jp(2),{})}))),Hp=!!Fp&&!s((function(){if(L)return L<74;if(qu)return qu<67;if(Pu)return!0;if(ju)return ju<602;var e,t,r=new Jp(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}));Dp("sort",(function(e){return void 0!==e&&$(e),Hp?Fp(this,e):Ua(Lp(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))}),!Hp||Gp);var Vp=o.Int8Array,Wp=If.aTypedArray,$p=If.exportTypedArrayMethod,Yp=[].toLocaleString,Kp=!!Vp&&s((function(){Yp.call(new Vp(1))}));$p("toLocaleString",(function(){return un(Yp,Kp?fn(Wp(this)):Wp(this),fn(arguments))}),s((function(){return[1,2].toLocaleString()!=new Vp([1,2]).toLocaleString()}))||!s((function(){Vp.prototype.toLocaleString.call([1,2])})));var Qp=If.exportTypedArrayMethod,Xp=o.Uint8Array,Zp=Xp&&Xp.prototype||{},el=[].toString,tl=x([].join);s((function(){el.call({})}))&&(el=function(){return tl(this)});var rl=Zp.toString!=el;Qp("toString",el,rl);var nl,il,al,ol,sl="process"==y(o.process),cl=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),dl=o.setImmediate,ul=o.clearImmediate,fl=o.process,hl=o.Dispatch,pl=o.Function,ll=o.MessageChannel,gl=o.String,bl=0,vl={};try{nl=o.location}catch(e){}var Il=function(e){if(ie(vl,e)){var t=vl[e];delete vl[e],t()}},kl=function(e){return function(){Il(e)}},xl=function(e){Il(e.data)},ml=function(e){o.postMessage(gl(e),nl.protocol+"//"+nl.host)};dl&&ul||(dl=function(e){ja(arguments.length,1);var t=S(e)?e:pl(e),r=fn(arguments,1);return vl[++bl]=function(){un(t,void 0,r)},il(bl),bl},ul=function(e){delete vl[e]},sl?il=function(e){fl.nextTick(kl(e))}:hl&&hl.now?il=function(e){hl.now(kl(e))}:ll&&!cl?(ol=(al=new ll).port2,al.port1.onmessage=xl,il=pr(ol.postMessage,ol)):o.addEventListener&&S(o.postMessage)&&!o.importScripts&&nl&&"file:"!==nl.protocol&&!s(ml)?(il=ml,o.addEventListener("message",xl,!1)):il="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),Il(e)}}:function(e){setTimeout(kl(e),0)});var wl,yl,Cl,zl,Ol,El,ql,Pl,Sl={set:dl,clear:ul},jl=/ipad|iphone|ipod/i.test(A)&&void 0!==o.Pebble,Ml=/web0s(?!.*chrome)/i.test(A),Tl=ye.f,Rl=Sl.set,Al=o.MutationObserver||o.WebKitMutationObserver,Ul=o.document,Bl=o.process,Nl=o.Promise,_l=Tl(o,"queueMicrotask"),Ll=_l&&_l.value;Ll||(wl=function(){var e,t;for(sl&&(e=Bl.domain)&&e.exit();yl;){t=yl.fn,yl=yl.next;try{t()}catch(e){throw yl?zl():Cl=void 0,e}}Cl=void 0,e&&e.enter()},cl||sl||Ml||!Al||!Ul?!jl&&Nl&&Nl.resolve?((ql=Nl.resolve(void 0)).constructor=Nl,Pl=pr(ql.then,ql),zl=function(){Pl(wl)}):sl?zl=function(){Bl.nextTick(wl)}:(Rl=pr(Rl,o),zl=function(){Rl(wl)}):(Ol=!0,El=Ul.createTextNode(""),new Al(wl).observe(El,{characterData:!0}),zl=function(){El.data=Ol=!Ol}));var Dl=Ll||function(e){var t={fn:e,next:void 0};Cl&&(Cl.next=t),yl||(yl=t,zl()),Cl=t},Jl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Fl=function(){this.head=null,this.tail=null};Fl.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 Gl=Fl,Hl=o.Promise,Vl="object"==typeof window&&"object"!=typeof Deno;Hl&&Hl.prototype;var Wl,$l,Yl,Kl=pe("species"),Ql=!1,Xl=S(o.PromiseRejectionEvent),Zl={CONSTRUCTOR:jt("Promise",(function(){var e=De(Hl),t=e!==String(Hl);if(!t&&66===L)return!0;if(L>=51&&/native code/.test(e))return!1;var r=new Hl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Kl]=n,!(Ql=r.then((function(){}))instanceof n)||!t&&Vl&&!Xl})),REJECTION_EVENT:Xl,SUBCLASSING:Ql},eg=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=$(t),this.reject=$(r)},tg={f:function(e){return new eg(e)}},rg=Sl.set,ng=Zl.CONSTRUCTOR,ig=Zl.REJECTION_EVENT,ag=Zl.SUBCLASSING,og=et.getterFor("Promise"),sg=et.set,cg=Hl&&Hl.prototype,dg=Hl,ug=cg,fg=o.TypeError,hg=o.document,pg=o.process,lg=tg.f,gg=lg,bg=!!(hg&&hg.createEvent&&o.dispatchEvent),vg=function(e){var t;return!(!j(e)||!S(t=e.then))&&t},Ig=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&&yg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(fg("Promise-chain cycle")):(n=vg(r))?f(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},kg=function(e,t){e.notified||(e.notified=!0,Dl((function(){for(var r,n=e.reactions;r=n.get();)Ig(r,e);e.notified=!1,t&&!e.rejection&&mg(e)})))},xg=function(e,t,r){var n,i;bg?((n=hg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),o.dispatchEvent(n)):n={promise:t,reason:r},!ig&&(i=o["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=o.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},mg=function(e){f(rg,o,(function(){var t,r=e.facade,n=e.value;if(wg(e)&&(t=Jl((function(){sl?pg.emit("unhandledRejection",n,r):xg("unhandledrejection",r,n)})),e.rejection=sl||wg(e)?2:1,t.error))throw t.value}))},wg=function(e){return 1!==e.rejection&&!e.parent},yg=function(e){f(rg,o,(function(){var t=e.facade;sl?pg.emit("rejectionHandled",t):xg("rejectionhandled",t,e.value)}))},Cg=function(e,t,r){return function(n){e(t,n,r)}},zg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,kg(e,!0))},Og=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw fg("Promise can't be resolved itself");var n=vg(t);n?Dl((function(){var r={done:!1};try{f(n,t,Cg(Og,r,e),Cg(zg,r,e))}catch(t){zg(r,t,e)}})):(e.value=t,e.state=1,kg(e,!1))}catch(t){zg({done:!1},t,e)}}};if(ng&&(ug=(dg=function(e){za(this,ug),$(e),f(Wl,this);var t=og(this);try{e(Cg(Og,t),Cg(zg,t))}catch(e){zg(t,e)}}).prototype,(Wl=function(e){sg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Gl,rejection:!1,state:0,value:void 0})}).prototype=rt(ug,"then",(function(e,t){var r=og(this),n=lg(Rh(this,dg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=sl?pg.domain:void 0,0==r.state?r.reactions.add(n):Dl((function(){Ig(n,r)})),n.promise})),$l=function(){var e=new Wl,t=og(e);this.promise=e,this.resolve=Cg(Og,t),this.reject=Cg(zg,t)},tg.f=lg=function(e){return e===dg||void 0===e?new $l(e):gg(e)},S(Hl)&&cg!==Object.prototype)){Yl=cg.then,ag||rt(cg,"then",(function(e,t){var r=this;return new dg((function(e,t){f(Yl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete cg.constructor}catch(e){}Yi&&Yi(cg,ug)}Tt({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:dg}),fr(dg,"Promise",!1),wh("Promise");var Eg=TypeError,qg=function(e,t){this.stopped=e,this.result=t},Pg=qg.prototype,Sg=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=pr(t,u),v=function(e){return n&&sc(n,"normal",e),new qg(!0,e)},I=function(e){return h?(Ee(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(i=Ea(e)))throw Eg(V(e)+" is not iterable");if(fc(i)){for(a=0,o=ht(e);o>a;a++)if((s=I(e[a]))&&R(Pg,s))return s;return new qg(!1)}n=Pa(e,i)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){sc(n,"throw",e)}if("object"==typeof s&&s&&R(Pg,s))return s}return new qg(!1)},jg=Zl.CONSTRUCTOR||!Ku((function(e){Hl.all(e).then(void 0,(function(){}))}));Tt({target:"Promise",stat:!0,forced:jg},{all:function(e){var t=this,r=tg.f(t),n=r.resolve,i=r.reject,a=Jl((function(){var r=$(t.resolve),a=[],o=0,s=1;Sg(e,(function(e){var c=o++,d=!1;s++,f(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 Mg=Zl.CONSTRUCTOR,Tg=Hl&&Hl.prototype;if(Tt({target:"Promise",proto:!0,forced:Mg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(Hl)){var Rg=T("Promise").prototype.catch;Tg.catch!==Rg&&rt(Tg,"catch",Rg,{unsafe:!0})}Tt({target:"Promise",stat:!0,forced:jg},{race:function(e){var t=this,r=tg.f(t),n=r.reject,i=Jl((function(){var i=$(t.resolve);Sg(e,(function(e){f(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Tt({target:"Promise",stat:!0,forced:Zl.CONSTRUCTOR},{reject:function(e){var t=tg.f(this);return f(t.reject,void 0,e),t.promise}});var Ag=Zl.CONSTRUCTOR;function Ug(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 Bg(e){return function(e){if(Array.isArray(e))return Ug(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 Ug(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)?Ug(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 Ng(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 _g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ng(Object(r),!0).forEach((function(t){ti(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}T("Promise"),Tt({target:"Promise",stat:!0,forced:Ag},{resolve:function(e){return function(e,t){if(Ee(e),j(t)&&t.constructor===e)return t;var r=tg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Tt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Sg(e,(function(e,r){Zt(t,e,r)}),{AS_ENTRIES:!0}),t}});var Lg=Po?btoa:function(e){return Buffer.from(e).toString("base64")},Dg=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}},Jg=function(){return e(128)},Fg=function(){var e=Qn(Ei.mark((function e(t){var r,n,i,a,o,s,c;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Po||!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,Bg(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 Gg(e,t,r){return Hg.apply(this,arguments)}function Hg(){return(Hg=Qn(Ei.mark((function e(t,r,n){var i,a,o,s,c,d,u,f;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fg(r);case 2:return a=e.sent,(o=new gu(t.clientConfig)).clientConfig.fetchOptions=_g(_g({},t.clientConfig.fetchOptions),{},{redirect:Po?"follow":"manual"}),s={parameters:_g(_g({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),f=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||f.error)){e.next=14;break}throw new fs(c);case 14:return e.abrupt("return",_g({url:d},Dg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vg(){return(Vg=Qn(Ei.mark((function e(t,r){var n,i,a;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Jg(),e.next=3,Gg(t,n,_g({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 Wg(){return(Wg=Qn(Ei.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p,l,g;return Ei.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Jg(),e.next=3,Fg(a);case 3:return o=e.sent,(s=new gu(t.clientConfig)).clientConfig.fetchOptions=_g(_g({},t.clientConfig.fetchOptions),{},{redirect:Po?"follow":"manual"}),c="Basic ".concat(Lg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:_g({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,f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(f),p=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new fs(u);case 16:return l=Dg(f),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},e.abrupt("return",t.getAccessToken({body:g}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $g=Object.freeze({__proto__:null,isBrowser:Po,isNode:So,globalObject:jo,hasFetchAvailable:Mo,fetch:To,stringToBase64:Lg,getCodeAndUsidFromUrl:Dg,createCodeVerifier:Jg,generateCodeChallenge:Fg,authorize:Gg,loginGuestUser:function(e,t){return Vg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return Wg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};return e.getAccessToken({body:r})},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}})}});export{Eo as ClientConfig,Qd as ShopperBaskets,eu as ShopperContexts,nu as ShopperCustomers,ou as ShopperDiscoverySearch,du as ShopperExperience,hu as ShopperGiftCertificates,gu as ShopperLogin,Iu as ShopperOrders,mu as ShopperProducts,Cu as ShopperPromotions,Du as ShopperSearch,Wd as TemplateURL,$g as helpers};
|