commerce-sdk-isomorphic 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,i,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,f=u?h.bind(h):function(){return h.apply(h,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,m=v.call,k=u&&I.bind(m,m),x=u?function(e){return e&&k(e)}:function(e){return e&&function(){return m.apply(e,arguments)}},y=x({}.toString),w=x("".slice),C=function(e){return w(y(e),8,-1)},O=Object,z=x("".split),P=c((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?z(e,""):O(e)}:O,E=TypeError,q=function(e){if(null==e)throw E("Can't call method on "+e);return e},j=function(e){return P(q(e))},S=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:S(e)},M=function(e){return S(e)?e:void 0},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},_=x({}.isPrototypeOf),A=R("navigator","userAgent")||"",B=s.process,U=s.Deno,N=B&&B.versions||U&&U.version,L=N&&N.v8;L&&(i=(a=L.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!i&&A&&(!(a=A.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=A.match(/Chrome\/(\d+)/))&&(i=+a[1]);var W=i,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),F=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,G=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return S(t)&&_(t.prototype,J(e))},H=String,V=function(e){try{return H(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(S(e))return e;throw $(V(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(q(e))},ae=x({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ae(ne(e),t)},oe=0,se=Math.random(),ce=x(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),he=s.Symbol,fe=he&&he.for,pe=F?he:he&&he.withoutSetter||de,le=function(e){if(!ie(ue,e)||!D&&"string"!=typeof ue[e]){var t="Symbol."+e;D&&ie(he,e)?ue[e]=he[e]:ue[e]=F&&fe?fe(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||G(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!T(r)||G(r))return r;throw ge("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)&&!T(n=f(r,e)))return n;if(S(r=e.valueOf)&&!T(n=f(r,e)))return n;if("string"!==t&&S(r=e.toString)&&!T(n=f(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return G(t)?t:t+""},me=s.document,ke=T(me)&&T(me.createElement),xe=function(e){return ke?me.createElement(e):{}},ye=!d&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,Ce={f:d?we:function(e,t){if(e=j(e),t=Ie(t),ye)try{return we(e,t)}catch(e){}if(ie(e,t))return b(!f(g.f,e,t),e[t])}},Oe=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=String,Pe=TypeError,Ee=function(e){if(T(e))return e;throw Pe(ze(e)+" is not an object")},qe=TypeError,je=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Te={f:d?Oe?function(e,t,r){if(Ee(e),t=Ie(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 je(e,t,r)}:je:function(e,t,r){if(Ee(e),t=Ie(t),Ee(r),ye)try{return je(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=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,_e=d&&Object.getOwnPropertyDescriptor,Ae=ie(Re,"name"),Be={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!d||d&&_e(Re,"name").configurable)},Ue=x(Function.toString);S(ee.inspectSource)||(ee.inspectSource=function(e){return Ue(e)});var Ne,Le,We,De=ee.inspectSource,Fe=s.WeakMap,Je=S(Fe)&&/native code/.test(De(Fe)),Ge=te("keys"),He=function(e){return Ge[e]||(Ge[e]=de(e))},Ve={},$e=s.TypeError,Ye=s.WeakMap;if(Je||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=x(Ke.get),Xe=x(Ke.has),Ze=x(Ke.set);Ne=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},We=function(e){return Xe(Ke,e)}}else{var et=He("state");Ve[et]=!0,Ne=function(e,t){if(ie(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ie(e,et)?e[et]:{}},We=function(e){return ie(e,et)}}var tt={set:Ne,get:Le,has:We,enforce:function(e){return We(e)?Le(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,a=Object.defineProperty,i=d&&!c((function(){return 8!==a((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ie(e,"name")||t&&e.name!==n)&&(d?a(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ie(s,"arity")&&e.length!==s.arity&&a(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?d&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ie(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return S(this)&&n(this).source||De(this)}),"toString")})),nt=function(e,t,r,n){n||(n={});var a=n.enumerable,i=void 0!==n.name?n.name:t;if(S(r)&&rt(r,i,n),n.global)a?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=r:Te.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,it=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?it:at)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ht=Math.min,ft=function(e){return e>0?ht(st(e),9007199254740991):0},pt=function(e){return ft(e.length)},lt=function(e){return function(t,r,n){var a,i=j(t),o=pt(i),s=ut(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=x([].push),It=function(e,t){var r,n=j(e),a=0,i=[];for(r in n)!ie(Ve,r)&&ie(n,r)&&vt(i,r);for(;t.length>a;)ie(n,r=t[a++])&&(~bt(i,r)||vt(i,r));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=mt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return It(e,kt)}},yt={f:Object.getOwnPropertySymbols},wt=x([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=xt.f(Ee(e)),r=yt.f;return r?wt(t,r(e)):t},Ot=function(e,t,r){for(var n=Ct(t),a=Te.f,i=Ce.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||a(e,s,i(t,s))}},zt=/#|\.prototype\./,Pt=function(e,t){var r=qt[Et(e)];return r==St||r!=jt&&(S(t)?c(t):!!t)},Et=Pt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Pt.data={},jt=Pt.NATIVE="N",St=Pt.POLYFILL="P",Tt=Pt,Mt=Ce.f,Rt=function(e,t){var r,n,a,i,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(i=t[n],a=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ot(i,a)}(e.sham||a&&a.sham)&&Me(i,"sham",!0),nt(r,n,i,e)}},_t=Object.keys||function(e){return It(e,mt)},At=c((function(){_t(1)}));Rt({target:"Object",stat:!0,forced:At},{keys:function(e){return _t(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Ut,Nt="[object z]"===String(Bt),Lt=le("toStringTag"),Wt=Object,Dt="Arguments"==C(function(){return arguments}()),Ft=Nt?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wt(e),Lt))?r:Dt?C(t):"Object"==(n=C(t))&&S(t.callee)?"Arguments":n},Jt=String,Gt=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Jt(e)},Ht={f:d&&!Oe?Object.defineProperties:function(e,t){Ee(e);for(var r,n=j(t),a=_t(t),i=a.length,o=0;i>o;)Te.f(e,r=a[o++],n[r]);return e}},Vt=R("document","documentElement"),$t=He("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Ut=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Ut?Qt(Ut):((t=xe("iframe")).style.display="none",Vt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Ut);for(var r=mt.length;r--;)delete Xt.prototype[mt[r]];return Xt()};Ve[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=Ee(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Ht.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),a=ut(t,n),i=ut(void 0===r?n:r,n),o=tr(rr(i-a,0)),s=0;a<i;a++,s++)er(o,s,e[a]);return o.length=s,o},ar=xt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ir&&"Window"==C(e)?function(e){try{return ar(e)}catch(e){return nr(ir)}}(e):ar(j(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,hr=le("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ie(e,hr)&&ur(e,hr,{configurable:!0,value:t})},pr=x(x.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),mr=/^\s*(?:class|function)\b/,kr=x(mr.exec),xr=!mr.exec(br),yr=function(e){if(!S(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},wr=function(e){if(!S(e))return!1;switch(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!kr(mr,De(e))}catch(e){return!0}};wr.sham=!0;var Cr=!Ir||c((function(){var e;return yr(yr.call)||!yr(Object)||!yr((function(){e=!0}))||e}))?wr:yr,Or=le("species"),zr=Array,Pr=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===zr||gr(t.prototype))||T(t)&&null===(t=t[Or]))&&(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,a=4==e,i=6==e,o=7==e,s=5==e||i;return function(c,d,u,h){for(var f,p,l=ne(c),g=P(l),b=lr(d,u),v=pt(g),I=0,m=h||Pr,k=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)k[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Er(k,f)}else switch(e){case 4:return!1;case 7:Er(k,f)}return i?-1:n||a?a:k}},jr={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=jr.forEach,Tr=He("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),_r=Object.prototype,Ar=s.Symbol,Br=Ar&&Ar.prototype,Ur=s.TypeError,Nr=s.QObject,Lr=Ce.f,Wr=Te.f,Dr=or.f,Fr=g.f,Jr=x([].push),Gr=te("symbols"),Hr=te("op-symbols"),Vr=te("wks"),$r=!Nr||!Nr.prototype||!Nr.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Wr({},"a",{get:function(){return Wr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(_r,t);n&&delete _r[t],Wr(e,t,r),n&&e!==_r&&Wr(_r,t,n)}:Wr,Kr=function(e,t){var r=Gr[e]=Zt(Br);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===_r&&Qr(Hr,t,r),Ee(e);var n=Ie(t);return Ee(r),ie(Gr,n)?(r.enumerable?(ie(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ie(e,Tr)||Wr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Wr(e,n,r)},Xr=function(e,t){Ee(e);var r=j(t),n=_t(r).concat(rn(r));return Sr(n,(function(t){d&&!f(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=f(Fr,this,t);return!(this===_r&&ie(Gr,t)&&!ie(Hr,t))&&(!(r||!ie(this,t)||!ie(Gr,t)||ie(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=j(e),n=Ie(t);if(r!==_r||!ie(Gr,n)||ie(Hr,n)){var a=Lr(r,n);return!a||!ie(Gr,n)||ie(r,Tr)&&r[Tr][n]||(a.enumerable=!0),a}},tn=function(e){var t=Dr(j(e)),r=[];return Sr(t,(function(e){ie(Gr,e)||ie(Ve,e)||Jr(r,e)})),r},rn=function(e){var t=e===_r,r=Dr(t?Hr:j(e)),n=[];return Sr(r,(function(e){!ie(Gr,e)||t&&!ie(_r,e)||Jr(n,Gr[e])})),n};D||(Br=(Ar=function(){if(_(Br,this))throw Ur("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gt(arguments[0]):void 0,t=de(e),r=function(e){this===_r&&f(r,Hr,e),ie(this,Tr)&&ie(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(_r,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Br,"toString",(function(){return Rr(this).tag})),nt(Ar,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Ht.f=Xr,Ce.f=en,xt.f=or.f=tn,yt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Wr(Br,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(_r,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ar}),Sr(_t(Vr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ie(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!D,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ar,"Symbol"),Ve[Tr]=!0;var nn=D&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Gt(e);if(ie(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!G(e))throw TypeError(V(e)+" is not a symbol");if(ie(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,hn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),fn=x([].slice),pn=R("JSON","stringify"),ln=x(/./.exec),gn=x("".charAt),bn=x("".charCodeAt),vn=x("".replace),In=x(1..toString),mn=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,yn=!D||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),wn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=fn(arguments),n=t;if((T(t)||void 0!==e)&&!G(e))return gr(t)||(t=function(e,t){if(S(n)&&(t=f(n,this,e,t)),!G(t))return t}),r[1]=t,hn(pn,null,r)},On=function(e,t,r){var n=gn(r,t-1),a=gn(r,t+1);return ln(kn,e)&&!ln(xn,a)||ln(xn,e)&&!ln(kn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:yn||wn},{stringify:function(e,t,r){var n=fn(arguments),a=hn(yn?Cn:pn,null,n);return wn&&"string"==typeof a?vn(a,mn,On):a}});var zn=!D||c((function(){yt.f(1)}));Rt({target:"Object",stat:!0,forced:zn},{getOwnPropertySymbols:function(e){var t=yt.f;return t?t(ne(e)):[]}});var Pn=le("species"),En=function(e){return W>=51||!c((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qn=jr.filter,jn=En("filter");Rt({target:"Array",proto:!0,forced:!jn},{filter:function(e){return qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Sn=Nt?{}.toString:function(){return"[object "+Ft(this)+"]"};Nt||nt(Object.prototype,"toString",Sn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(j(e),t)}});var Rn={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},_n=xe("span").classList,An=_n&&_n.constructor&&_n.constructor.prototype,Bn=An===Object.prototype?void 0:An,Un=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Nn=jr.forEach,Ln=Un("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Wn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Dn in Rn)Rn[Dn]&&Wn(s[Dn]&&s[Dn].prototype);Wn(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=j(e),a=Ce.f,i=Ct(n),o={},s=0;i.length>s;)void 0!==(r=a(n,t=i[s++]))&&er(o,t,r);return o}});var Fn=Ht.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Jn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Jn,sham:!d},{defineProperty:Jn});var Gn,Hn=le("match"),Vn=TypeError,$n=function(e){if(function(e){var t;return T(e)&&(void 0!==(t=e[Hn])?!!t:"RegExp"==C(e))}(e))throw Vn("The method doesn't accept regular expressions");return e},Yn=le("match"),Kn=Ce.f,Qn=x("".startsWith),Xn=x("".slice),Zn=Math.min,ea=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Yn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ta=!(ea||(Gn=Kn(String.prototype,"startsWith"),!Gn||Gn.writable));Rt({target:"String",proto:!0,forced:!ta&&!ea},{startsWith:function(e){var t=Gt(q(this));$n(e);var r=ft(Zn(arguments.length>1?arguments[1]:void 0,t.length)),n=Gt(e);return Qn?Qn(t,n,r):Xn(t,r,r+n.length)===n}});var ra=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},na=RegExp.prototype,aa=Be.PROPER,ia=RegExp.prototype.toString,oa=c((function(){return"/a/b"!=ia.call({source:"a",flags:"b"})})),sa=aa&&"toString"!=ia.name;function ca(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function da(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){ca(i,n,a,o,s,"next",e)}function s(e){ca(i,n,a,o,s,"throw",e)}o(void 0)}))}}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ha(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 fa(e,t,r){return t&&ha(e.prototype,t),r&&ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(oa||sa)&&nt(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 na||ie(e,"flags")||!_(na,e)?t:f(ra,e)}(e))}),{unsafe:!0});var la=Object.prototype,ga=la.hasOwnProperty,ba="function"==typeof Symbol?Symbol:{},va=ba.iterator||"@@iterator",Ia=ba.asyncIterator||"@@asyncIterator",ma=ba.toStringTag||"@@toStringTag";function ka(e,t,r,n){var a=t&&t.prototype instanceof wa?t:wa,i=Object.create(a.prototype),o=new Aa(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return Ua()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=Ma(o,r);if(s){if(s===ya)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=xa(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ya)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function xa(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ya={};function wa(){}function Ca(){}function Oa(){}var za={};za[va]=function(){return this};var Pa=Object.getPrototypeOf,Ea=Pa&&Pa(Pa(Ba([])));Ea&&Ea!==la&&ga.call(Ea,va)&&(za=Ea);var qa=Oa.prototype=wa.prototype=Object.create(za);function ja(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Sa(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ca||"GeneratorFunction"===(t.displayName||t.name))}function Ta(e,t){var r;this._invoke=function(n,a){function i(){return new t((function(r,i){!function r(n,a,i,o){var s=xa(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ga.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(s.arg)}(n,a,r,i)}))}return r=r?r.then(i,i):i()}}function Ma(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,Ma(e,t),"throw"===t.method))return ya;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ya}var n=xa(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ya;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,ya):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ya)}function Ra(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 _a(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Aa(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ra,this),this.reset(!0)}function Ba(e){if(e){var t=e[va];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(ga.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:Ua}}function Ua(){return{value:void 0,done:!0}}Ca.prototype=qa.constructor=Oa,Oa.constructor=Ca,Oa[ma]=Ca.displayName="GeneratorFunction",ja(Ta.prototype),Ta.prototype[Ia]=function(){return this},ja(qa),qa[ma]="Generator",qa[va]=function(){return this},qa.toString=function(){return"[object Generator]"},Aa.prototype={constructor:Aa,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(_a),!e)for(var t in this)"t"===t.charAt(0)&&ga.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 i.type="throw",i.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 a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=ga.call(a,"catchLoc"),s=ga.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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&&ga.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,ya):this.complete(i)},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),ya},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),_a(r),ya}},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 a=n.arg;_a(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ba(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ya}};var Na={wrap:ka,isGeneratorFunction:Sa,AsyncIterator:Ta,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Oa):(e.__proto__=Oa,ma in e||(e[ma]="GeneratorFunction")),e.prototype=Object.create(qa),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new Ta(ka(e,t,r,n),a);return Sa(t)?i:i.next().then((function(e){return e.done?e.value:i.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:Ba},La=Te.f,Wa=le("unscopables"),Da=Array.prototype;null==Da[Wa]&&La(Da,Wa,{configurable:!0,value:Zt(null)});var Fa,Ja,Ga,Ha=function(e){Da[Wa][e]=!0},Va={},$a=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ya=He("IE_PROTO"),Ka=Object,Qa=Ka.prototype,Xa=$a?Ka.getPrototypeOf:function(e){var t=ne(e);if(ie(t,Ya))return t[Ya];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ka?Qa:null},Za=le("iterator"),ei=!1;[].keys&&("next"in(Ga=[].keys())?(Ja=Xa(Xa(Ga)))!==Object.prototype&&(Fa=Ja):ei=!0),(null==Fa||c((function(){var e={};return Fa[Za].call(e)!==e})))&&(Fa={}),S(Fa[Za])||nt(Fa,Za,(function(){return this}));var ti={IteratorPrototype:Fa,BUGGY_SAFARI_ITERATORS:ei},ri=ti.IteratorPrototype,ni=function(){return this},ai=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Zt(ri,{next:b(+!n,r)}),fr(e,a,!1),Va[a]=ni,e},ii=String,oi=TypeError,si=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 oi("Can't set "+ii(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ci=Be.PROPER,di=Be.CONFIGURABLE,ui=ti.IteratorPrototype,hi=ti.BUGGY_SAFARI_ITERATORS,fi=le("iterator"),pi=function(){return this},li=function(e,t,r,n,a,i,o){ai(r,t,n);var s,c,d,u=function(e){if(e===a&&b)return b;if(!hi&&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[fi]||l["@@iterator"]||a&&l[a],b=!hi&&g||u(a),v="Array"==t&&l.entries||g;if(v&&(s=Xa(v.call(new e)))!==Object.prototype&&s.next&&(Xa(s)!==ui&&(si?si(s,ui):S(s[fi])||nt(s,fi,pi)),fr(s,h,!0)),ci&&"values"==a&&g&&"values"!==g.name&&(di?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),a)if(c={values:u("values"),keys:i?b:u("keys"),entries:u("entries")},o)for(d in c)(hi||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:hi||p},c);return l[fi]!==b&&nt(l,fi,b,{name:a}),Va[t]=b,c},gi=Te.f,bi=tt.set,vi=tt.getterFor("Array Iterator"),Ii=li(Array,"Array",(function(e,t){bi(this,{type:"Array Iterator",target:j(e),index:0,kind:t})}),(function(){var e=vi(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"),mi=Va.Arguments=Va.Array;if(Ha("keys"),Ha("values"),Ha("entries"),d&&"values"!==mi.name)try{gi(mi,"name",{value:"values"})}catch(e){}var ki=x("".charAt),xi=x("".charCodeAt),yi=x("".slice),wi=function(e){return function(t,r){var n,a,i=Gt(q(t)),o=st(r),s=i.length;return o<0||o>=s?e?"":void 0:(n=xi(i,o))<55296||n>56319||o+1===s||(a=xi(i,o+1))<56320||a>57343?e?ki(i,o):n:e?yi(i,o,o+2):a-56320+(n-55296<<10)+65536}},Ci={codeAt:wi(!1),charAt:wi(!0)},Oi=Ci.charAt,zi=tt.set,Pi=tt.getterFor("String Iterator");li(String,"String",(function(e){zi(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=Pi(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Oi(r,n),t.index+=e.length,{value:e,done:!1})}));var Ei=le("iterator"),qi=le("toStringTag"),ji=Ii.values,Si=function(e,t){if(e){if(e[Ei]!==ji)try{Me(e,Ei,ji)}catch(t){e[Ei]=ji}if(e[qi]||Me(e,qi,t),Rn[t])for(var r in Ii)if(e[r]!==Ii[r])try{Me(e,r,Ii[r])}catch(t){e[r]=Ii[r]}}};for(var Ti in Rn)Si(s[Ti]&&s[Ti].prototype,Ti);Si(Bn,"DOMTokenList");var Mi=le("iterator"),Ri=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Mi]||"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})),_i=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},Ai=TypeError,Bi=function(e,t){if(_(t,e))return e;throw Ai("Incorrect invocation")},Ui=le("iterator"),Ni=function(e){if(null!=e)return K(e,Ui)||K(e,"@@iterator")||Va[Ft(e)]},Li=TypeError,Wi=function(e,t){var r=arguments.length<2?Ni(e):t;if(Y(r))return Ee(f(r,e));throw Li(V(e)+" is not iterable")},Di=TypeError,Fi=function(e,t){if(e<t)throw Di("Not enough arguments");return e},Ji=Math.floor,Gi=function(e,t){var r=e.length,n=Ji(r/2);return r<8?Hi(e,t):Vi(e,Gi(nr(e,0,n),t),Gi(nr(e,n),t),t)},Hi=function(e,t){for(var r,n,a=e.length,i=1;i<a;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Vi=function(e,t,r,n){for(var a=t.length,i=r.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?n(t[o],r[s])<=0?t[o++]:r[s++]:o<a?t[o++]:r[s++];return e},$i=Gi,Yi=le("iterator"),Ki=tt.set,Qi=tt.getterFor("URLSearchParams"),Xi=tt.getterFor("URLSearchParamsIterator"),Zi=Object.getOwnPropertyDescriptor,eo=function(e){if(!d)return s[e];var t=Zi(s,e);return t&&t.value},to=eo("fetch"),ro=eo("Request"),no=eo("Headers"),ao=ro&&ro.prototype,io=no&&no.prototype,oo=s.RegExp,so=s.TypeError,co=s.decodeURIComponent,uo=s.encodeURIComponent,ho=x("".charAt),fo=x([].join),po=x([].push),lo=x("".replace),go=x([].shift),bo=x([].splice),vo=x("".split),Io=x("".slice),mo=/\+/g,ko=Array(4),xo=function(e){return ko[e-1]||(ko[e-1]=oo("((?:%[\\da-f]{2}){"+e+"})","gi"))},yo=function(e){try{return co(e)}catch(t){return e}},wo=function(e){var t=lo(e,mo," "),r=4;try{return co(t)}catch(e){for(;r;)t=lo(t,xo(r--),yo);return t}},Co=/[!'()~]|%20/g,Oo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},zo=function(e){return Oo[e]},Po=function(e){return lo(uo(e),Co,zo)},Eo=ai((function(e,t){Ki(this,{type:"URLSearchParamsIterator",iterator:Wi(Qi(e).entries),kind:t})}),"Iterator",(function(){var e=Xi(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),qo=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ho(e,0)?Io(e,1):e:Gt(e)))};qo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,a,i,o,s,c=Ni(e);if(c)for(r=(t=Wi(e,c)).next;!(n=f(r,t)).done;){if(i=(a=Wi(Ee(n.value))).next,(o=f(i,a)).done||(s=f(i,a)).done||!f(i,a).done)throw so("Expected sequence with length 2");po(this.entries,{key:Gt(o.value),value:Gt(s.value)})}else for(var d in e)ie(e,d)&&po(this.entries,{key:d,value:Gt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=vo(e,"&"),a=0;a<n.length;)(t=n[a++]).length&&(r=vo(t,"="),po(this.entries,{key:wo(go(r)),value:wo(fo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Po(e.key)+"="+Po(e.value));return fo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var jo=function(){Bi(this,So);var e=arguments.length>0?arguments[0]:void 0;Ki(this,new qo(e))},So=jo.prototype;if(_i(So,{append:function(e,t){Fi(arguments.length,2);var r=Qi(this);po(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){Fi(arguments.length,1);for(var t=Qi(this),r=t.entries,n=Gt(e),a=0;a<r.length;)r[a].key===n?bo(r,a,1):a++;t.updateURL()},get:function(e){Fi(arguments.length,1);for(var t=Qi(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){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=[],a=0;a<t.length;a++)t[a].key===r&&po(n,t[a].value);return n},has:function(e){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Fi(arguments.length,1);for(var r,n=Qi(this),a=n.entries,i=!1,o=Gt(e),s=Gt(t),c=0;c<a.length;c++)(r=a[c]).key===o&&(i?bo(a,c--,1):(i=!0,r.value=s));i||po(a,{key:o,value:s}),n.updateURL()},sort:function(){var e=Qi(this);$i(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Qi(this).entries,n=lr(e,arguments.length>1?arguments[1]:void 0),a=0;a<r.length;)n((t=r[a++]).value,t.key,this)},keys:function(){return new Eo(this,"keys")},values:function(){return new Eo(this,"values")},entries:function(){return new Eo(this,"entries")}},{enumerable:!0}),nt(So,Yi,So.entries,{name:"entries"}),nt(So,"toString",(function(){return Qi(this).serialize()}),{enumerable:!0}),fr(jo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!Ri},{URLSearchParams:jo}),!Ri&&S(no)){var To=x(io.has),Mo=x(io.set),Ro=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(r))return t=e.headers?new no(e.headers):new no,To(t,"content-type")||Mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Gt(r)),headers:b(0,t)})}return e};if(S(to)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return to(e,arguments.length>1?Ro(arguments[1]):{})}}),S(ro)){var _o=function(e){return Bi(this,ao),new ro(e,arguments.length>1?Ro(arguments[1]):{})};ao.constructor=_o,_o.prototype=ao,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_o})}}var Ao={URLSearchParams:jo,getState:Qi};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=fa((function e(t){if(ua(this,e),pa(this,"baseUri",void 0),pa(this,"proxy",void 0),pa(this,"headers",void 0),pa(this,"parameters",void 0),pa(this,"fetchOptions",void 0),pa(this,"transformRequest",void 0),pa(this,"throwOnBadResponse",void 0),this.headers=Uo({},t.headers),this.parameters=Uo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Uo({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 Lo(e){return(Lo="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)}pa(No,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Rt({global:!0},{globalThis:s});var Wo="object"===("undefined"==typeof window?"undefined":Lo(window))&&"object"===Lo(window.document),Do="object"===("undefined"==typeof process?"undefined":Lo(process))&&"object"===Lo(process.versions)&&"string"==typeof process.versions.node,Fo=Wo?window:globalThis,Jo="function"==typeof Fo.fetch,Go=function(){if(Do)return require("node-fetch").default;if(!Jo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Fo.fetch}(),Ho=Function,Vo=x([].concat),$o=x([].join),Yo={},Ko=function(e,t,r){if(!ie(Yo,t)){for(var n=[],a=0;a<t;a++)n[a]="a["+a+"]";Yo[t]=Ho("C,a","return new C("+$o(n,",")+")")}return Yo[t](e,r)},Qo=u?Ho.bind:function(e){var t=Y(this),r=t.prototype,n=fn(arguments,1),a=function(){var r=Vo(n,fn(arguments));return this instanceof a?Ko(t,r.length,r):t.apply(e,r)};return T(r)&&(a.prototype=r),a},Xo=TypeError,Zo=function(e){if(Cr(e))return e;throw Xo(V(e)+" is not a constructor")},es=R("Reflect","construct"),ts=Object.prototype,rs=[].push,ns=c((function(){function e(){}return!(es((function(){}),[],e)instanceof e)})),as=!c((function(){es((function(){}))})),is=ns||as;Rt({target:"Reflect",stat:!0,forced:is,sham:is},{construct:function(e,t){Zo(e),Ee(t);var r=arguments.length<3?e:Zo(arguments[2]);if(as&&!ns)return es(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 hn(rs,n,t),new(hn(Qo,e,n))}var a=r.prototype,i=Zt(T(a)?a:ts),o=hn(e,i,t);return T(o)?o:i}});var os=TypeError,ss=function(e){if(e>9007199254740991)throw os("Maximum allowed index exceeded");return e},cs=le("isConcatSpreadable"),ds=W>=51||!c((function(){var e=[];return e[cs]=!1,e.concat()[0]!==e})),us=En("concat"),hs=function(e){if(!T(e))return!1;var t=e[cs];return void 0!==t?!!t:gr(e)};function fs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ps(e,t){return(ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ls(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ps(e,t)}function gs(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fs(e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vs(){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 Is(e,t,r){return(Is=vs()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&ps(a,r.prototype),a}).apply(null,arguments)}function ms(e){var t="function"==typeof Map?new Map:void 0;return(ms=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 Is(e,arguments,bs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ps(n,e)})(e)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return gs(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!ds||!us},{concat:function(e){var t,r,n,a,i,o=ne(this),s=Pr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(hs(i=-1===t?o:arguments[t]))for(a=pt(i),ss(c+a),r=0;r<a;r++,c++)r in i&&er(s,c,i[r]);else ss(c+1),er(s,c++,i);return s.length=c,s}});var xs,ys,ws=function(e){ls(r,e);var t=ks(r);function r(e){var n;return ua(this,r),pa(fs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fa(r)}(ms(Error)),Cs=s.RegExp,Os=c((function(){var e=Cs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),zs=Os||c((function(){return!Cs("a","y").sticky})),Ps={BROKEN_CARET:Os||c((function(){var e=Cs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:zs,UNSUPPORTED_Y:Os},Es=s.RegExp,qs=c((function(){var e=Es(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),js=s.RegExp,Ss=c((function(){var e=js("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ts=tt.get,Ms=te("native-string-replace",String.prototype.replace),Rs=RegExp.prototype.exec,_s=Rs,As=x("".charAt),Bs=x("".indexOf),Us=x("".replace),Ns=x("".slice),Ls=(ys=/b*/g,f(Rs,xs=/a/,"a"),f(Rs,ys,"a"),0!==xs.lastIndex||0!==ys.lastIndex),Ws=Ps.BROKEN_CARET,Ds=void 0!==/()??/.exec("")[1];(Ls||Ds||Ws||qs||Ss)&&(_s=function(e){var t,r,n,a,i,o,s,c=this,d=Ts(c),u=Gt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=f(_s,h,u),c.lastIndex=h.lastIndex,t;var p=d.groups,l=Ws&&c.sticky,g=f(ra,c),b=c.source,v=0,I=u;if(l&&(g=Us(g,"y",""),-1===Bs(g,"g")&&(g+="g"),I=Ns(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==As(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ds&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ls&&(n=c.lastIndex),a=f(Rs,l?r:c,I),l?a?(a.input=Ns(a.input,v),a[0]=Ns(a[0],v),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Ls&&a&&(c.lastIndex=c.global?a.index+a[0].length:n),Ds&&a&&a.length>1&&f(Ms,a[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&p)for(a.groups=o=Zt(null),i=0;i<p.length;i++)o[(s=p[i])[0]]=a[s[1]];return a});var Fs=_s;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Fs},{exec:Fs});var Js=le("species"),Gs=RegExp.prototype,Hs=function(e,t,r,n){var a=le(e),i=!c((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Js]=function(){return r},r.flags="",r[a]=/./[a]),r.exec=function(){return t=!0,null},r[a](""),!t}));if(!i||!o||r){var s=x(/./[a]),d=t(a,""[e],(function(e,t,r,n,a){var o=x(e),c=t.exec;return c===Fs||c===Gs.exec?i&&!a?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Gs,a,d[1])}n&&Me(Gs[a],"sham",!0)},Vs=Ci.charAt,$s=function(e,t,r){return t+(r?Vs(e,t).length:1)},Ys=Math.floor,Ks=x("".charAt),Qs=x("".replace),Xs=x("".slice),Zs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ec=/\$([$&'`]|\d{1,2})/g,tc=function(e,t,r,n,a,i){var o=r+e.length,s=n.length,c=ec;return void 0!==a&&(a=ne(a),c=Zs),Qs(i,c,(function(i,c){var d;switch(Ks(c,0)){case"$":return"$";case"&":return e;case"`":return Xs(t,0,r);case"'":return Xs(t,o);case"<":d=a[Xs(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var h=Ys(u/10);return 0===h?i:h<=s?void 0===n[h-1]?Ks(c,1):n[h-1]+Ks(c,1):i}d=n[u-1]}return void 0===d?"":d}))},rc=TypeError,nc=function(e,t){var r=e.exec;if(S(r)){var n=f(r,e,t);return null!==n&&Ee(n),n}if("RegExp"===C(e))return f(Fs,e,t);throw rc("RegExp#exec called on incompatible receiver")},ac=le("replace"),ic=Math.max,oc=Math.min,sc=x([].concat),cc=x([].push),dc=x("".indexOf),uc=x("".slice),hc="$0"==="a".replace(/./,"$0"),fc=!!/./[ac]&&""===/./[ac]("a","$0");Hs("replace",(function(e,t,r){var n=fc?"$":"$0";return[function(e,r){var n=q(this),a=null==e?void 0:K(e,ac);return a?f(a,e,n,r):f(t,Gt(n),e,r)},function(e,a){var i=Ee(this),o=Gt(e);if("string"==typeof a&&-1===dc(a,n)&&-1===dc(a,"$<")){var s=r(t,i,o,a);if(s.done)return s.value}var c=S(a);c||(a=Gt(a));var d=i.global;if(d){var u=i.unicode;i.lastIndex=0}for(var h=[];;){var f=nc(i,o);if(null===f)break;if(cc(h,f),!d)break;""===Gt(f[0])&&(i.lastIndex=$s(o,ft(i.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Gt((f=h[b])[0]),I=ic(oc(st(f.index),o.length),0),m=[],k=1;k<f.length;k++)cc(m,void 0===(p=f[k])?p:String(p));var x=f.groups;if(c){var y=sc([v],m,I,o);void 0!==x&&cc(y,x);var w=Gt(hn(a,void 0,y))}else w=tc(v,o,I,m,x,a);I>=g&&(l+=uc(o,g,I)+w,g=I+v.length)}return l+uc(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!hc||fc);var pc,lc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},gc=Object.assign,bc=Object.defineProperty,vc=x([].concat),Ic=!gc||c((function(){if(d&&1!==gc({b:1},gc(bc({},"a",{enumerable:!0,get:function(){bc(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!=gc({},e)[r]||"abcdefghijklmnopqrst"!=_t(gc({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,a=1,i=yt.f,o=g.f;n>a;)for(var s,c=P(arguments[a++]),u=i?vc(_t(c),i(c)):_t(c),h=u.length,p=0;h>p;)s=u[p++],d&&!f(o,c,s)||(r[s]=c[s]);return r}:gc,mc=function(e,t,r){var n,a;Ee(e);try{if(!(n=K(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw r;if(a)throw n;return Ee(n),r},kc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){mc(e,"throw",t)}},xc=le("iterator"),yc=Array.prototype,wc=function(e){return void 0!==e&&(Va.Array===e||yc[xc]===e)},Cc=Array,Oc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,a=n>1?arguments[1]:void 0,i=void 0!==a;i&&(a=lr(a,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Ni(t),l=0;if(!p||this===Cc&&wc(p))for(o=pt(t),s=r?new this(o):Cc(o);o>l;l++)h=i?a(t[l],l):t[l],er(s,l,h);else for(u=(d=Wi(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=i?kc(d,a,[c.value,l],!0):c.value,er(s,l,h);return s.length=l,s},zc=/[^\0-\u007E]/,Pc=/[.\u3002\uFF0E\uFF61]/g,Ec="Overflow: input needs wider integers to process",qc=RangeError,jc=x(Pc.exec),Sc=Math.floor,Tc=String.fromCharCode,Mc=x("".charCodeAt),Rc=x([].join),_c=x([].push),Ac=x("".replace),Bc=x("".split),Uc=x("".toLowerCase),Nc=function(e){return e+22+75*(e<26)},Lc=function(e,t,r){var n=0;for(e=r?Sc(e/700):e>>1,e+=Sc(e/t);e>455;)e=Sc(e/35),n+=36;return Sc(n+36*e/(e+38))},Wc=function(e){var t,r,n=[],a=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Mc(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Mc(e,r++);56320==(64512&i)?_c(t,((1023&a)<<10)+(1023&i)+65536):(_c(t,a),r--)}else _c(t,a)}return t}(e)).length,i=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&_c(n,Tc(r));var c=n.length,d=c;for(c&&_c(n,"-");d<a;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var h=d+1;if(u-i>Sc((2147483647-o)/h))throw qc(Ec);for(o+=(u-i)*h,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++o>2147483647)throw qc(Ec);if(r==i){for(var f=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(f<l)break;var g=f-l,b=36-l;_c(n,Tc(Nc(l+g%b))),f=Sc(g/b),p+=36}_c(n,Tc(Nc(f))),s=Lc(o,h,d==c),o=0,d++}}o++,i++}return Rc(n,"")},Dc=Ci.codeAt,Fc=tt.set,Jc=tt.getterFor("URL"),Gc=Ao.URLSearchParams,Hc=Ao.getState,Vc=s.URL,$c=s.TypeError,Yc=s.parseInt,Kc=Math.floor,Qc=Math.pow,Xc=x("".charAt),Zc=x(/./.exec),ed=x([].join),td=x(1..toString),rd=x([].pop),nd=x([].push),ad=x("".replace),id=x([].shift),od=x("".split),sd=x("".slice),cd=x("".toLowerCase),dd=x([].unshift),ud=/[a-z]/i,hd=/[\d+-.a-z]/i,fd=/\d/,pd=/^0x/i,ld=/^[0-7]+$/,gd=/^\d+$/,bd=/^[\da-f]+$/i,vd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Id=/[\0\t\n\r #/:<>?@[\\\]^|]/,md=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kd=/[\t\n\r]/g,xd=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)dd(t,e%256),e=Kc(e/256);return ed(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=td(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yd={},wd=Ic({},yd,{" ":1,'"':1,"<":1,">":1,"`":1}),Cd=Ic({},wd,{"#":1,"?":1,"{":1,"}":1}),Od=Ic({},Cd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),zd=function(e,t){var r=Dc(e,0);return r>32&&r<127&&!ie(t,e)?e:encodeURIComponent(e)},Pd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ed=function(e,t){var r;return 2==e.length&&Zc(ud,Xc(e,0))&&(":"==(r=Xc(e,1))||!t&&"|"==r)},qd=function(e){var t;return e.length>1&&Ed(sd(e,0,2))&&(2==e.length||"/"===(t=Xc(e,2))||"\\"===t||"?"===t||"#"===t)},jd=function(e){return"."===e||"%2e"===cd(e)},Sd={},Td={},Md={},Rd={},_d={},Ad={},Bd={},Ud={},Nd={},Ld={},Wd={},Dd={},Fd={},Jd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd={},Xd=function(e,t,r){var n,a,i,o=Gt(e);if(t){if(a=this.parse(o))throw $c(a);this.searchParams=null}else{if(void 0!==r&&(n=new Xd(r,!0)),a=this.parse(o,null,n))throw $c(a);(i=Hc(new Gc)).bindURL(this),this.searchParams=i}};Xd.prototype={type:"URL",parse:function(e,t,r){var n,a,i,o,s,c=this,d=t||Sd,u=0,h="",f=!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=ad(e,md,"")),e=ad(e,kd,""),n=Oc(e);u<=n.length;){switch(a=n[u],d){case Sd:if(!a||!Zc(ud,a)){if(t)return"Invalid scheme";d=Md;continue}h+=cd(a),d=Td;break;case Td:if(a&&(Zc(hd,a)||"+"==a||"-"==a||"."==a))h+=cd(a);else{if(":"!=a){if(t)return"Invalid scheme";h="",d=Md,u=0;continue}if(t&&(c.isSpecial()!=ie(Pd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Pd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Jd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Rd:c.isSpecial()?d=Ud:"/"==n[u+1]?(d=_d,u++):(c.cannotBeABaseURL=!0,nd(c.path,""),d=Yd)}break;case Md:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Qd;break}d="file"==r.scheme?Jd:Ad;continue;case Rd:if("/"!=a||"/"!=n[u+1]){d=Ad;continue}d=Nd,u++;break;case _d:if("/"==a){d=Ld;break}d=$d;continue;case Ad:if(c.scheme=r.scheme,a==pc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query;else if("/"==a||"\\"==a&&c.isSpecial())d=Bd;else if("?"==a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=$d;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}break;case Bd:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=$d;continue}d=Ld}else d=Nd;break;case Ud:if(d=Nd,"/"!=a||"/"!=Xc(h,u+1))continue;u++;break;case Nd:if("/"!=a&&"\\"!=a){d=Ld;continue}break;case Ld:if("@"==a){f&&(h="%40"+h),f=!0,i=Oc(h);for(var g=0;g<i.length;g++){var b=i[g];if(":"!=b||l){var v=zd(b,Od);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Oc(h).length+1,h="",d=Wd}else h+=a;break;case Wd:case Dd:if(t&&"file"==c.scheme){d=Hd;continue}if(":"!=a||p){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Vd,t)return;continue}"["==a?p=!0:"]"==a&&(p=!1),h+=a}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Fd,t==Dd)return}break;case Fd:if(!Zc(fd,a)){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()||t){if(""!=h){var I=Yc(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Pd[c.scheme]?null:I,h=""}if(t)return;d=Vd;continue}return"Invalid port"}h+=a;break;case Jd:if(c.scheme="file","/"==a||"\\"==a)d=Gd;else{if(!r||"file"!=r.scheme){d=$d;continue}if(a==pc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==a)c.host=r.host,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=a){qd(ed(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=$d;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}}break;case Gd:if("/"==a||"\\"==a){d=Hd;break}r&&"file"==r.scheme&&!qd(ed(nr(n,u),""))&&(Ed(r.path[0],!0)?nd(c.path,r.path[0]):c.host=r.host),d=$d;continue;case Hd:if(a==pc||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Ed(h))d=$d;else if(""==h){if(c.host="",t)return;d=Vd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Vd}continue}h+=a;break;case Vd:if(c.isSpecial()){if(d=$d,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=pc&&(d=$d,"/"!=a))continue}else c.fragment="",d=Qd;else c.query="",d=Kd;break;case $d:if(a==pc||"/"==a||"\\"==a&&c.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=cd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||nd(c.path,"")):jd(h)?"/"==a||"\\"==a&&c.isSpecial()||nd(c.path,""):("file"==c.scheme&&!c.path.length&&Ed(h)&&(c.host&&(c.host=""),h=Xc(h,0)+":"),nd(c.path,h)),h="","file"==c.scheme&&(a==pc||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)id(c.path);"?"==a?(c.query="",d=Kd):"#"==a&&(c.fragment="",d=Qd)}else h+=zd(a,Cd);break;case Yd:"?"==a?(c.query="",d=Kd):"#"==a?(c.fragment="",d=Qd):a!=pc&&(c.path[0]+=zd(a,yd));break;case Kd:t||"#"!=a?a!=pc&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":zd(a,yd)):(c.fragment="",d=Qd);break;case Qd:a!=pc&&(c.fragment+=zd(a,wd))}u++}},parseHost:function(e){var t,r,n;if("["==Xc(e,0)){if("]"!=Xc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,a,i,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return Xc(e,h)};if(":"==f()){if(":"!=Xc(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&Zc(bd,f());)t=16*t+Yc(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Zc(fd,f()))return;for(;Zc(fd,f());){if(i=Yc(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[d]=256*c[d]+a,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(sd(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],a=Bc(Ac(Uc(e),Pc,"."),".");for(t=0;t<a.length;t++)r=a[t],_c(n,jc(zc,r)?"xn--"+Wc(r):r);return Rc(n,".")}(e),Zc(vd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,a,i,o,s,c=od(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(a=c[n]))return e;if(i=10,a.length>1&&"0"==Xc(a,0)&&(i=Zc(pd,a)?16:8,a=sd(a,8==i?1:2)),""===a)o=0;else{if(!Zc(10==i?gd:8==i?ld:bd,a))return e;o=Yc(a,i)}nd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Qc(256,5-t))return null}else if(o>255)return null;for(s=rd(r),n=0;n<r.length;n++)s+=r[n]*Qc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Zc(Id,e))return"Invalid host";for(t="",r=Oc(e),n=0;n<r.length;n++)t+=zd(r[n],yd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ie(Pd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ed(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=xd(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+ed(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw $c(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Zd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Gt(e)+":",Sd)},getUsername:function(){return this.username},setUsername:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=zd(t[r],Od)}},getPassword:function(){return this.password},setPassword:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=zd(t[r],Od)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xd(e):xd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wd)},getHostname:function(){var e=this.host;return null===e?"":xd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Dd)},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,Fd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ed(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Vd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Gt(e))?this.query=null:("?"==Xc(e,0)&&(e=sd(e,1)),this.query="",this.parse(e,Kd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Gt(e))?("#"==Xc(e,0)&&(e=sd(e,1)),this.fragment="",this.parse(e,Qd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Zd=function(e){var t=Bi(this,eu),r=Fi(arguments.length,1)>1?arguments[1]:void 0,n=Fc(t,new Xd(e,!1,r));d||(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())},eu=Zd.prototype,tu=function(e,t){return{get:function(){return Jc(this)[e]()},set:t&&function(e){return Jc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(lc(eu,"href",tu("serialize","setHref")),lc(eu,"origin",tu("getOrigin")),lc(eu,"protocol",tu("getProtocol","setProtocol")),lc(eu,"username",tu("getUsername","setUsername")),lc(eu,"password",tu("getPassword","setPassword")),lc(eu,"host",tu("getHost","setHost")),lc(eu,"hostname",tu("getHostname","setHostname")),lc(eu,"port",tu("getPort","setPort")),lc(eu,"pathname",tu("getPathname","setPathname")),lc(eu,"search",tu("getSearch","setSearch")),lc(eu,"searchParams",tu("getSearchParams")),lc(eu,"hash",tu("getHash","setHash"))),nt(eu,"toJSON",(function(){return Jc(this).serialize()}),{enumerable:!0}),nt(eu,"toString",(function(){return Jc(this).serialize()}),{enumerable:!0}),Vc){var ru=Vc.createObjectURL,nu=Vc.revokeObjectURL;ru&&nt(Zd,"createObjectURL",lr(ru,Vc)),nu&&nt(Zd,"revokeObjectURL",lr(nu,Vc))}function au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return gs(this,r)}}fr(Zd,"URL"),Rt({global:!0,constructor:!0,forced:!Ri,sham:!d},{URL:Zd});var iu=function(e){ls(r,e);var t=au(r);function r(e,n,a){var i;return ua(this,r),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==a?void 0:a.pathParams))).addQueryParams(null==a?void 0:a.queryParams),null!=a&&a.origin&&i.replaceOrigin(null==a?void 0:a.origin),i}return fa(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var a=0;a<n.length;a+=1)t.searchParams.append(r,String(n[a]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(ms(URL)),ou="commerce-sdk-isomorphic@1.12.0";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){pa(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}var du=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T,M,R,_,A;return fa(e,[{key:"createBasket",value:(A=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==a.temporary&&(o.temporary=a.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"transferBasket",value:(_=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Go(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 ws(u);case 40:return e.next=42,u.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"mergeBasket",value:(R=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(P=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(O=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(y=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeItemFromBasket",value:(x=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(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 ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(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 ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=50,Go(s.toString(),d);case 50:if(u=e.sent,!r){e.next=55;break}return e.abrupt("return",u);case 55:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=59;break}throw new ws(u);case 59:return e.next=61,u.text();case 61:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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!==a.exchange&&(o.exchange=a.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===a.siteId){e.next=31;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45: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 hu(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){pa(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}pa(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var fu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a;return fa(e,[{key:"getShopperContext",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=30,Go(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=37;break}throw new ws(u);case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43: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){pa(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}pa(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var gu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T;return fa(e,[{key:"registerCustomer",value:(T=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(S=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for invalidateCustomerAuth: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Go(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 ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeCustomer",value:(j=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.clientId){e.next=21;break}o.clientId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(q=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeTrustedSystem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(O=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.externalId){e.next=21;break}o.externalId=a.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===a.authenticationProviderId){e.next=30;break}o.authenticationProviderId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(C=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(x=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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!==a.crossSites&&(o.crossSites=a.crossSites),void 0!==n.from?o.from=n.from:void 0!==a.from&&(o.from=a.from),void 0!==n.until?o.until=n.until:void 0!==a.until&&(o.until=a.until),void 0!==n.status?o.status=n.status:void 0!==a.status&&(o.status=a.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.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!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Go(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new ws(u);case 53:return e.next=55,u.text();case 55:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=63;break}throw new ws(u);case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.email&&(o.email=a.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==a.firstName&&(o.firstName=a.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==a.lastName&&(o.lastName=a.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}o.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60: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){pa(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}pa(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Iu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"retrieveResults",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.locale){e.next=30;break}o.locale=a.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!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.suggestionTypes){e.next=30;break}o.suggestionTypes=a.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!==a.searchText&&(o.searchText=a.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}o.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function mu(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 ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var xu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPages",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.categoryId&&(o.categoryId=a.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==a.productId&&(o.productId=a.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===a.aspectTypeId){e.next=23;break}o.aspectTypeId=a.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!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Go(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 ws(u);case 52:return e.next=54,u.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.pageId=n.pageId,e.next=21;break;case 16:if(void 0===a.pageId){e.next=20;break}i.pageId=a.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!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var Cu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fa(e,[{key:"getGiftCertificate",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new iu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=wu(wu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Pu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v;return fa(e,[{key:"authenticateCustomer",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.client_id){e.next=21;break}o.client_id=a.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===a.refresh_token){e.next=30;break}o.refresh_token=a.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!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.redirect_uri){e.next=21;break}o.redirect_uri=a.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===a.response_type){e.next=30;break}o.response_type=a.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===a.client_id){e.next=39;break}o.client_id=a.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!==a.scope&&(o.scope=a.scope),void 0!==n.state?o.state=n.state:void 0!==a.state&&(o.state=a.state),void 0!==n.usid?o.usid=n.usid:void 0!==a.usid&&(o.usid=a.usid),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.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===a.code_challenge){e.next=53;break}o.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==a.ui_locales&&(o.ui_locales=a.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=62,Go(s.toString(),d);case 62:if(u=e.sent,!r){e.next=67;break}return e.abrupt("return",u);case 67:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=69;break}throw new ws(u);case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.client_id){e.next=21;break}o.client_id=a.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===a.channel_id){e.next=30;break}o.channel_id=a.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===a.code_challenge){e.next=39;break}o.code_challenge=a.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===a.login_id){e.next=48;break}o.login_id=a.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===a.idp_origin){e.next=57;break}o.idp_origin=a.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===a.redirect_uri){e.next=66;break}o.redirect_uri=a.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===a.response_type){e.next=75;break}o.response_type=a.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=83,Go(s.toString(),d);case 83:if(u=e.sent,!r){e.next=88;break}return e.abrupt("return",u);case 88:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=90;break}throw new ws(u);case 90:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.channel_id&&(o.channel_id=a.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=21,Go(s.toString(),d);case 21:if(u=e.sent,!r){e.next=26;break}return e.abrupt("return",u);case 26:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=30;break}throw new ws(u);case 30:return e.next=32,u.text();case 32:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Eu(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 qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Eu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ju=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s;return fa(e,[{key:"createOrder",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51: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 Tu(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){pa(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}pa(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Mu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a;return fa(e,[{key:"getProducts",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===a.ids){e.next=22;break}o.ids=a.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new iu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new iu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.ids){e.next=21;break}o.ids=a.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!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.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!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Ru(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 _u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ru(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Au=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPromotions",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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===a.ids){e.next=30;break}o.ids=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}i.campaignId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.startDate&&(o.startDate=a.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==a.endDate&&(o.endDate=a.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Bu=TypeError,Uu=function(e,t){if(!delete e[t])throw Bu("Cannot delete property "+V(t)+" of "+V(e))},Nu=A.match(/firefox\/(\d+)/i),Lu=!!Nu&&+Nu[1],Wu=/MSIE|Trident/.test(A),Du=A.match(/AppleWebKit\/(\d+)\./),Fu=!!Du&&+Du[1],Ju=[],Gu=x(Ju.sort),Hu=x(Ju.push),Vu=c((function(){Ju.sort(void 0)})),$u=c((function(){Ju.sort(null)})),Yu=Un("sort"),Ku=!c((function(){if(W)return W<70;if(!(Lu&&Lu>3)){if(Wu)return!0;if(Fu)return Fu<603;var e,t,r,n,a="";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++)Ju.push({k:t+n,v:r})}for(Ju.sort((function(e,t){return t.v-e.v})),n=0;n<Ju.length;n++)t=Ju[n].k.charAt(0),a.charAt(a.length-1)!==t&&(a+=t);return"DGBEFHACIJK"!==a}}));function Qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Vu||!$u||!Yu||!Ku},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(Ku)return void 0===e?Gu(t):Gu(t,e);var r,n,a=[],i=pt(t);for(n=0;n<i;n++)n in t&&Hu(a,t[n]);for($i(a,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=a.length,n=0;n<r;)t[n]=a[n++];for(;n<i;)Uu(t,n++);return t}});var Zu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=Xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"productSearch",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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!==a.q&&(o.q=a.q),void 0!==n.refine?o.refine=n.refine:void 0!==a.refine&&(o.refine=a.refine),void 0!==n.sort?o.sort=n.sort:void 0!==a.sort&&(o.sort=a.sort),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Go(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 ws(u);case 46:return e.next=48,u.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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===a.q){e.next=30;break}o.q=a.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!==a.limit&&(o.limit=a.limit),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function eh(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 th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var rh=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=th({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fa(e,[{key:"getUrlMapping",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===a.urlSegment){e.next=21;break}o.urlSegment=a.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new iu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=th(th({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=th(th({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(rh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var nh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Hs("search",(function(e,t,r){return[function(t){var r=q(this),n=null==t?void 0:K(t,e);return n?f(n,t,r):new RegExp(t)[e](Gt(r))},function(e){var n=Ee(this),a=Gt(e),i=r(t,n,a);if(i.done)return i.value;var o=n.lastIndex;nh(o,0)||(n.lastIndex=0);var s=nc(n,a);return nh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var ah=le("iterator"),ih=!1;try{var oh=0,sh={next:function(){return{done:!!oh++}},return:function(){ih=!0}};sh[ah]=function(){return this},Array.from(sh,(function(){throw 2}))}catch(e){}var ch,dh,uh,hh=function(e,t){if(!t&&!ih)return!1;var r=!1;try{var n={};n[ah]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},fh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ph=Te.f,lh=tt.enforce,gh=tt.get,bh=s.Int8Array,vh=bh&&bh.prototype,Ih=s.Uint8ClampedArray,mh=Ih&&Ih.prototype,kh=bh&&Xa(bh),xh=vh&&Xa(vh),yh=Object.prototype,wh=s.TypeError,Ch=le("toStringTag"),Oh=de("TYPED_ARRAY_TAG"),zh=fh&&!!si&&"Opera"!==Ft(s.opera),Ph=!1,Eh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},qh={BigInt64Array:8,BigUint64Array:8},jh=function(e){var t=Xa(e);if(T(t)){var r=gh(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:jh(t)}},Sh=function(e){if(!T(e))return!1;var t=Ft(e);return ie(Eh,t)||ie(qh,t)};for(ch in Eh)(uh=(dh=s[ch])&&dh.prototype)?lh(uh).TypedArrayConstructor=dh:zh=!1;for(ch in qh)(uh=(dh=s[ch])&&dh.prototype)&&(lh(uh).TypedArrayConstructor=dh);if((!zh||!S(kh)||kh===Function.prototype)&&(kh=function(){throw wh("Incorrect invocation")},zh))for(ch in Eh)s[ch]&&si(s[ch],kh);if((!zh||!xh||xh===yh)&&(xh=kh.prototype,zh))for(ch in Eh)s[ch]&&si(s[ch].prototype,xh);if(zh&&Xa(mh)!==xh&&si(mh,xh),d&&!ie(xh,Ch))for(ch in Ph=!0,ph(xh,Ch,{get:function(){return T(this)?this[Oh]:void 0}}),Eh)s[ch]&&Me(s[ch],Oh,ch);var Th={NATIVE_ARRAY_BUFFER_VIEWS:zh,TYPED_ARRAY_TAG:Ph&&Oh,aTypedArray:function(e){if(Sh(e))return e;throw wh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!si||_(kh,e)))return e;throw wh(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var a in Eh){var i=s[a];if(i&&ie(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}xh[e]&&!r||nt(xh,e,r?t:zh&&vh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(d){if(si){if(r)for(n in Eh)if((a=s[n])&&ie(a,e))try{delete a[e]}catch(e){}if(kh[e]&&!r)return;try{return nt(kh,e,r?t:zh&&kh[e]||t)}catch(e){}}for(n in Eh)!(a=s[n])||a[e]&&!r||nt(a,e,t)}},getTypedArrayConstructor:jh,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ie(Eh,t)||ie(qh,t)},isTypedArray:Sh,TypedArray:kh,TypedArrayPrototype:xh},Mh=Th.NATIVE_ARRAY_BUFFER_VIEWS,Rh=s.ArrayBuffer,_h=s.Int8Array,Ah=!Mh||!c((function(){_h(1)}))||!c((function(){new _h(-1)}))||!hh((function(e){new _h,new _h(null),new _h(1.5),new _h(e)}),!0)||c((function(){return 1!==new _h(new Rh(2),1,void 0).length})),Bh=RangeError,Uh=function(e){if(void 0===e)return 0;var t=st(e),r=ft(t);if(t!==r)throw Bh("Wrong length or index");return r},Nh=Array,Lh=Math.abs,Wh=Math.pow,Dh=Math.floor,Fh=Math.log,Jh=Math.LN2,Gh=function(e,t,r){var n,a,i,o=Nh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Wh(2,-24)-Wh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Lh(e))!=e||e===1/0?(a=e!=e?1:0,n=c):(n=Dh(Fh(e)/Jh),e*(i=Wh(2,-n))<1&&(n--,i*=2),(e+=n+d>=1?u/i:u*Wh(2,1-d))*i>=2&&(n++,i/=2),n+d>=c?(a=0,n=c):n+d>=1?(a=(e*i-1)*Wh(2,t),n+=d):(a=e*Wh(2,d-1)*Wh(2,t),n=0));t>=8;)o[f++]=255&a,a/=256,t-=8;for(n=n<<t|a,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Hh=function(e,t){var r,n=e.length,a=8*n-t-1,i=(1<<a)-1,o=i>>1,s=a-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===i)return r?NaN:d?-1/0:1/0;r+=Wh(2,t),u-=o}return(d?-1:1)*r*Wh(2,u-t)},Vh=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,a=ut(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,o=void 0===i?r:ut(i,r);o>a;)t[a++]=e;return t},$h=xt.f,Yh=Te.f,Kh=Be.PROPER,Qh=Be.CONFIGURABLE,Xh=tt.get,Zh=tt.set,ef=s.ArrayBuffer,tf=ef,rf=tf&&tf.prototype,nf=s.DataView,af=nf&&nf.prototype,of=Object.prototype,sf=s.Array,cf=s.RangeError,df=x(Vh),uf=x([].reverse),hf=Gh,ff=Hh,pf=function(e){return[255&e]},lf=function(e){return[255&e,e>>8&255]},gf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},bf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},vf=function(e){return hf(e,23,4)},If=function(e){return hf(e,52,8)},mf=function(e,t){Yh(e.prototype,t,{get:function(){return Xh(this)[t]}})},kf=function(e,t,r,n){var a=Uh(r),i=Xh(e);if(a+t>i.byteLength)throw cf("Wrong index");var o=Xh(i.buffer).bytes,s=a+i.byteOffset,c=nr(o,s,s+t);return n?c:uf(c)},xf=function(e,t,r,n,a,i){var o=Uh(r),s=Xh(e);if(o+t>s.byteLength)throw cf("Wrong index");for(var c=Xh(s.buffer).bytes,d=o+s.byteOffset,u=n(+a),h=0;h<t;h++)c[d+h]=u[i?h:t-h-1]};if(fh){var yf=Kh&&"ArrayBuffer"!==ef.name;if(c((function(){ef(1)}))&&c((function(){new ef(-1)}))&&!c((function(){return new ef,new ef(1.5),new ef(NaN),yf&&!Qh})))yf&&Qh&&Me(ef,"name","ArrayBuffer");else{(tf=function(e){return Bi(this,rf),new ef(Uh(e))}).prototype=rf;for(var wf,Cf=$h(ef),Of=0;Cf.length>Of;)(wf=Cf[Of++])in tf||Me(tf,wf,ef[wf]);rf.constructor=tf}si&&Xa(af)!==of&&si(af,of);var zf=new nf(new tf(2)),Pf=x(af.setInt8);zf.setInt8(0,2147483648),zf.setInt8(1,2147483649),!zf.getInt8(0)&&zf.getInt8(1)||_i(af,{setInt8:function(e,t){Pf(this,e,t<<24>>24)},setUint8:function(e,t){Pf(this,e,t<<24>>24)}},{unsafe:!0})}else rf=(tf=function(e){Bi(this,rf);var t=Uh(e);Zh(this,{bytes:df(sf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,af=(nf=function(e,t,r){Bi(this,af),Bi(e,rf);var n=Xh(e).byteLength,a=st(t);if(a<0||a>n)throw cf("Wrong offset");if(a+(r=void 0===r?n-a:ft(r))>n)throw cf("Wrong length");Zh(this,{buffer:e,byteLength:r,byteOffset:a}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,d&&(mf(tf,"byteLength"),mf(nf,"buffer"),mf(nf,"byteLength"),mf(nf,"byteOffset")),_i(af,{getInt8:function(e){return kf(this,1,e)[0]<<24>>24},getUint8:function(e){return kf(this,1,e)[0]},getInt16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return ff(kf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return ff(kf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){xf(this,1,e,pf,t)},setUint8:function(e,t){xf(this,1,e,pf,t)},setInt16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){xf(this,4,e,vf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){xf(this,8,e,If,t,arguments.length>2?arguments[2]:void 0)}});fr(tf,"ArrayBuffer"),fr(nf,"DataView");var Ef={ArrayBuffer:tf,DataView:nf},qf=Math.floor,jf=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&qf(e)===e},Sf=RangeError,Tf=RangeError,Mf=function(e,t){var r=function(e){var t=st(e);if(t<0)throw Sf("The argument can't be less than 0");return t}(e);if(r%t)throw Tf("Wrong offset");return r},Rf=Th.aTypedArrayConstructor,_f=function(e){var t,r,n,a,i,o,s=Zo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Ni(c);if(p&&!wc(p))for(o=(i=Wi(c,p)).next,c=[];!(a=f(o,i)).done;)c.push(a.value);for(h&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(Rf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},Af=le("species"),Bf=function(e){var t=R(e),r=Te.f;d&&t&&!t[Af]&&r(t,Af,{configurable:!0,get:function(){return this}})};n((function(e){var t=xt.f,r=jr.forEach,n=tt.get,a=tt.set,i=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,h=s.RangeError,p=Ef.ArrayBuffer,l=p.prototype,g=Ef.DataView,v=Th.NATIVE_ARRAY_BUFFER_VIEWS,I=Th.TYPED_ARRAY_TAG,m=Th.TypedArray,k=Th.TypedArrayPrototype,x=Th.aTypedArrayConstructor,y=Th.isTypedArray,w=function(e,t){x(e);for(var r=0,n=t.length,a=new e(n);n>r;)a[r]=t[r++];return a},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return _(l,e)||"ArrayBuffer"==(t=Ft(e))||"SharedArrayBuffer"==t},z=function(e,t){return y(e)&&!G(t)&&t in e&&jf(+t)&&t>=0},P=function(e,t){return t=Ie(t),z(e,t)?b(2,e[t]):c(e,t)},E=function(e,t,r){return t=Ie(t),!(z(e,t)&&T(r)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=P,Te.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:P,defineProperty:E}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",x="get"+e,C="set"+e,z=s[b],P=z,E=P&&P.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),a.view[C](t*l+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Ah&&(P=c((function(e,t,r,n){return Bi(e,E),function(e,t,r){var n,a;return si&&S(n=t.constructor)&&n!==r&&T(a=n.prototype)&&a!==r.prototype&&si(e,a),e}(T(t)?O(t)?void 0!==n?new z(t,Mf(r,l),n):void 0!==r?new z(t,Mf(r,l)):new z(t):y(t)?w(P,t):f(_f,P,t):new z(Uh(t)),e,P)})),si&&si(P,m),r(t(z),(function(e){e in P||Me(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Bi(e,E);var i,o,s,c=0,d=0;if(T(t)){if(!O(t))return y(t)?w(P,t):f(_f,P,t);i=t,d=Mf(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=Uh(t),i=new p(o=s*l);for(a(e,{buffer:i,byteOffset:d,byteLength:o,length:s,view:new g(i)});c<s;)j(e,c++)})),si&&si(P,m),E=P.prototype=Zt(k)),E.constructor!==P&&Me(E,"constructor",P),i(E).TypedArrayConstructor=P,I&&Me(E,I,b);var M=P!=z;q[b]=P,Rt({global:!0,constructor:!0,forced:M,sham:!v},q),"BYTES_PER_ELEMENT"in P||Me(P,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),Bf(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Uf=Math.min,Nf=x([].copyWithin||function(e,t){var r=ne(this),n=pt(r),a=ut(e,n),i=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Uf((void 0===o?n:ut(o,n))-i,n-a),c=1;for(i<a&&a<i+s&&(c=-1,i+=s-1,a+=s-1);s-- >0;)i in r?r[a]=r[i]:Uu(r,a),a+=c,i+=c;return r}),Lf=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("copyWithin",(function(e,t){return Nf(Lf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Wf=jr.every,Df=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("every",(function(e){return Wf(Df(this),e,arguments.length>1?arguments[1]:void 0)}));var Ff=TypeError,Jf=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ff("Can't convert number to bigint");return BigInt(t)},Gf=Th.aTypedArray,Hf=Th.exportTypedArrayMethod,Vf=x("".slice);Hf("fill",(function(e){var t=arguments.length;Gf(this);var r="Big"===Vf(Ft(this),0,3)?Jf(e):+e;return f(Vh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var $f=le("species"),Yf=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[$f])?t:Zo(r)},Kf=Th.aTypedArrayConstructor,Qf=Th.getTypedArrayConstructor,Xf=function(e){return Kf(Yf(e,Qf(e)))},Zf=function(e,t){return function(e,t){for(var r=0,n=pt(t),a=new e(n);n>r;)a[r]=t[r++];return a}(Xf(e),t)},ep=jr.filter,tp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("filter",(function(e){var t=ep(tp(this),e,arguments.length>1?arguments[1]:void 0);return Zf(this,t)}));var rp=jr.find,np=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("find",(function(e){return rp(np(this),e,arguments.length>1?arguments[1]:void 0)}));var ap=jr.findIndex,ip=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("findIndex",(function(e){return ap(ip(this),e,arguments.length>1?arguments[1]:void 0)}));var op=jr.forEach,sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("forEach",(function(e){op(sp(this),e,arguments.length>1?arguments[1]:void 0)}));var cp=gt.includes,dp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("includes",(function(e){return cp(dp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=gt.indexOf,hp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("indexOf",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var fp=le("iterator"),pp=s.Uint8Array,lp=x(Ii.values),gp=x(Ii.keys),bp=x(Ii.entries),vp=Th.aTypedArray,Ip=Th.exportTypedArrayMethod,mp=pp&&pp.prototype,kp=!c((function(){mp[fp].call([1])})),xp=!!mp&&mp.values&&mp[fp]===mp.values&&"values"===mp.values.name,yp=function(){return lp(vp(this))};Ip("entries",(function(){return bp(vp(this))}),kp),Ip("keys",(function(){return gp(vp(this))}),kp),Ip("values",yp,kp||!xp,{name:"values"}),Ip(fp,yp,kp||!xp,{name:"values"});var wp=Th.aTypedArray,Cp=Th.exportTypedArrayMethod,Op=x([].join);Cp("join",(function(e){return Op(wp(this),e)}));var zp=Math.min,Pp=[].lastIndexOf,Ep=!!Pp&&1/[1].lastIndexOf(1,-0)<0,qp=Un("lastIndexOf"),jp=Ep||!qp?function(e){if(Ep)return hn(Pp,this,arguments)||0;var t=j(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=zp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pp,Sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(jp,Sp(this),t>1?[e,arguments[1]]:[e])}));var Tp=jr.map,Mp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("map",(function(e){return Tp(Mp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Xf(e))(t)}))}));var Rp=TypeError,_p=function(e){return function(t,r,n,a){Y(r);var i=ne(t),o=P(i),s=pt(i),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){a=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Rp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(a=r(a,o[c],c,i));return a}},Ap={left:_p(!1),right:_p(!0)},Bp=Ap.left,Up=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Bp(Up(this),e,t,t>1?arguments[1]:void 0)}));var Np=Ap.right,Lp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Np(Lp(this),e,t,t>1?arguments[1]:void 0)}));var Wp=Th.aTypedArray,Dp=Th.exportTypedArrayMethod,Fp=Math.floor;Dp("reverse",(function(){for(var e,t=Wp(this).length,r=Fp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Jp=s.RangeError,Gp=s.Int8Array,Hp=Gp&&Gp.prototype,Vp=Hp&&Hp.set,$p=Th.aTypedArray,Yp=Th.exportTypedArrayMethod,Kp=!c((function(){var e=new Uint8ClampedArray(2);return f(Vp,e,{length:1,0:3},1),3!==e[1]})),Qp=Kp&&Th.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new Gp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Yp("set",(function(e){$p(this);var t=Mf(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Kp)return f(Vp,this,r,t);var n=this.length,a=pt(r),i=0;if(a+t>n)throw Jp("Wrong length");for(;i<a;)this[t+i]=r[i++]}),!Kp||Qp);var Xp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Xp(this),e,t),n=Xf(this),a=0,i=r.length,o=new n(i);i>a;)o[a]=r[a++];return o}),c((function(){new Int8Array(1).slice()})));var Zp=jr.some,el=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("some",(function(e){return Zp(el(this),e,arguments.length>1?arguments[1]:void 0)}));var tl=Th.aTypedArray,rl=Th.exportTypedArrayMethod,nl=s.Uint16Array,al=nl&&x(nl.prototype.sort),il=!(!al||c((function(){al(new nl(2),null)}))&&c((function(){al(new nl(2),{})}))),ol=!!al&&!c((function(){if(W)return W<74;if(Lu)return Lu<67;if(Wu)return!0;if(Fu)return Fu<602;var e,t,r=new nl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(al(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));rl("sort",(function(e){return void 0!==e&&Y(e),ol?al(this,e):$i(tl(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))}),!ol||il);var sl=s.Int8Array,cl=Th.aTypedArray,dl=Th.exportTypedArrayMethod,ul=[].toLocaleString,hl=!!sl&&c((function(){ul.call(new sl(1))}));dl("toLocaleString",(function(){return hn(ul,hl?fn(cl(this)):cl(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new sl([1,2]).toLocaleString()}))||!c((function(){sl.prototype.toLocaleString.call([1,2])})));var fl=Th.exportTypedArrayMethod,pl=s.Uint8Array,ll=pl&&pl.prototype||{},gl=[].toString,bl=x([].join);c((function(){gl.call({})}))&&(gl=function(){return bl(this)});var vl=ll.toString!=gl;fl("toString",gl,vl);var Il,ml,kl,xl,yl="process"==C(s.process),wl=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),Cl=s.setImmediate,Ol=s.clearImmediate,zl=s.process,Pl=s.Dispatch,El=s.Function,ql=s.MessageChannel,jl=s.String,Sl=0,Tl={};try{Il=s.location}catch(e){}var Ml=function(e){if(ie(Tl,e)){var t=Tl[e];delete Tl[e],t()}},Rl=function(e){return function(){Ml(e)}},_l=function(e){Ml(e.data)},Al=function(e){s.postMessage(jl(e),Il.protocol+"//"+Il.host)};Cl&&Ol||(Cl=function(e){Fi(arguments.length,1);var t=S(e)?e:El(e),r=fn(arguments,1);return Tl[++Sl]=function(){hn(t,void 0,r)},ml(Sl),Sl},Ol=function(e){delete Tl[e]},yl?ml=function(e){zl.nextTick(Rl(e))}:Pl&&Pl.now?ml=function(e){Pl.now(Rl(e))}:ql&&!wl?(xl=(kl=new ql).port2,kl.port1.onmessage=_l,ml=lr(xl.postMessage,xl)):s.addEventListener&&S(s.postMessage)&&!s.importScripts&&Il&&"file:"!==Il.protocol&&!c(Al)?(ml=Al,s.addEventListener("message",_l,!1)):ml="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),Ml(e)}}:function(e){setTimeout(Rl(e),0)});var Bl,Ul,Nl,Ll,Wl,Dl,Fl,Jl,Gl={set:Cl,clear:Ol},Hl=/ipad|iphone|ipod/i.test(A)&&void 0!==s.Pebble,Vl=/web0s(?!.*chrome)/i.test(A),$l=Ce.f,Yl=Gl.set,Kl=s.MutationObserver||s.WebKitMutationObserver,Ql=s.document,Xl=s.process,Zl=s.Promise,eg=$l(s,"queueMicrotask"),tg=eg&&eg.value;tg||(Bl=function(){var e,t;for(yl&&(e=Xl.domain)&&e.exit();Ul;){t=Ul.fn,Ul=Ul.next;try{t()}catch(e){throw Ul?Ll():Nl=void 0,e}}Nl=void 0,e&&e.enter()},wl||yl||Vl||!Kl||!Ql?!Hl&&Zl&&Zl.resolve?((Fl=Zl.resolve(void 0)).constructor=Zl,Jl=lr(Fl.then,Fl),Ll=function(){Jl(Bl)}):yl?Ll=function(){Xl.nextTick(Bl)}:(Yl=lr(Yl,s),Ll=function(){Yl(Bl)}):(Wl=!0,Dl=Ql.createTextNode(""),new Kl(Bl).observe(Dl,{characterData:!0}),Ll=function(){Dl.data=Wl=!Wl}));var rg=tg||function(e){var t={fn:e,next:void 0};Nl&&(Nl.next=t),Ul||(Ul=t,Ll()),Nl=t},ng=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ag=function(){this.head=null,this.tail=null};ag.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 ig=ag,og=s.Promise,sg="object"==typeof window&&"object"!=typeof Deno;og&&og.prototype;var cg,dg,ug,hg=le("species"),fg=!1,pg=S(s.PromiseRejectionEvent),lg={CONSTRUCTOR:Tt("Promise",(function(){var e=De(og),t=e!==String(og);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new og((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[hg]=n,!(fg=r.then((function(){}))instanceof n)||!t&&sg&&!pg})),REJECTION_EVENT:pg,SUBCLASSING:fg},gg=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=Y(t),this.reject=Y(r)},bg={f:function(e){return new gg(e)}},vg=Gl.set,Ig=lg.CONSTRUCTOR,mg=lg.REJECTION_EVENT,kg=lg.SUBCLASSING,xg=tt.getterFor("Promise"),yg=tt.set,wg=og&&og.prototype,Cg=og,Og=wg,zg=s.TypeError,Pg=s.document,Eg=s.process,qg=bg.f,jg=qg,Sg=!!(Pg&&Pg.createEvent&&s.dispatchEvent),Tg=function(e){var t;return!(!T(e)||!S(t=e.then))&&t},Mg=function(e,t){var r,n,a,i=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&&Ug(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),a=!0)),r===e.promise?d(zg("Promise-chain cycle")):(n=Tg(r))?f(n,r,c,d):c(r)):d(i)}catch(e){u&&!a&&u.exit(),d(e)}},Rg=function(e,t){e.notified||(e.notified=!0,rg((function(){for(var r,n=e.reactions;r=n.get();)Mg(r,e);e.notified=!1,t&&!e.rejection&&Ag(e)})))},_g=function(e,t,r){var n,a;Sg?((n=Pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!mg&&(a=s["on"+e])?a(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Ag=function(e){f(vg,s,(function(){var t,r=e.facade,n=e.value;if(Bg(e)&&(t=ng((function(){yl?Eg.emit("unhandledRejection",n,r):_g("unhandledrejection",r,n)})),e.rejection=yl||Bg(e)?2:1,t.error))throw t.value}))},Bg=function(e){return 1!==e.rejection&&!e.parent},Ug=function(e){f(vg,s,(function(){var t=e.facade;yl?Eg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Ng=function(e,t,r){return function(n){e(t,n,r)}},Lg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Rg(e,!0))},Wg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw zg("Promise can't be resolved itself");var n=Tg(t);n?rg((function(){var r={done:!1};try{f(n,t,Ng(Wg,r,e),Ng(Lg,r,e))}catch(t){Lg(r,t,e)}})):(e.value=t,e.state=1,Rg(e,!1))}catch(t){Lg({done:!1},t,e)}}};if(Ig&&(Og=(Cg=function(e){Bi(this,Og),Y(e),f(cg,this);var t=xg(this);try{e(Ng(Wg,t),Ng(Lg,t))}catch(e){Lg(t,e)}}).prototype,(cg=function(e){yg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ig,rejection:!1,state:0,value:void 0})}).prototype=nt(Og,"then",(function(e,t){var r=xg(this),n=qg(Yf(this,Cg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=yl?Eg.domain:void 0,0==r.state?r.reactions.add(n):rg((function(){Mg(n,r)})),n.promise})),dg=function(){var e=new cg,t=xg(e);this.promise=e,this.resolve=Ng(Wg,t),this.reject=Ng(Lg,t)},bg.f=qg=function(e){return e===Cg||void 0===e?new dg(e):jg(e)},S(og)&&wg!==Object.prototype)){ug=wg.then,kg||nt(wg,"then",(function(e,t){var r=this;return new Cg((function(e,t){f(ug,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete wg.constructor}catch(e){}si&&si(wg,Og)}Rt({global:!0,constructor:!0,wrap:!0,forced:Ig},{Promise:Cg}),fr(Cg,"Promise",!1),Bf("Promise");var Dg=TypeError,Fg=function(e,t){this.stopped=e,this.result=t},Jg=Fg.prototype,Gg=function(e,t,r){var n,a,i,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=lr(t,u),v=function(e){return n&&mc(n,"normal",e),new Fg(!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(!(a=Ni(e)))throw Dg(V(e)+" is not iterable");if(wc(a)){for(i=0,o=pt(e);o>i;i++)if((s=I(e[i]))&&_(Jg,s))return s;return new Fg(!1)}n=Wi(e,a)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){mc(n,"throw",e)}if("object"==typeof s&&s&&_(Jg,s))return s}return new Fg(!1)},Hg=lg.CONSTRUCTOR||!hh((function(e){og.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Hg},{all:function(e){var t=this,r=bg.f(t),n=r.resolve,a=r.reject,i=ng((function(){var r=Y(t.resolve),i=[],o=0,s=1;Gg(e,(function(e){var c=o++,d=!1;s++,f(r,t,e).then((function(e){d||(d=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise}});var Vg=lg.CONSTRUCTOR,$g=og&&og.prototype;if(Rt({target:"Promise",proto:!0,forced:Vg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(og)){var Yg=R("Promise").prototype.catch;$g.catch!==Yg&&nt($g,"catch",Yg,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Hg},{race:function(e){var t=this,r=bg.f(t),n=r.reject,a=ng((function(){var a=Y(t.resolve);Gg(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:lg.CONSTRUCTOR},{reject:function(e){var t=bg.f(this);return f(t.reject,void 0,e),t.promise}});var Kg=lg.CONSTRUCTOR;function Qg(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 Xg(e){return function(e){if(Array.isArray(e))return Qg(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 Qg(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)?Qg(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 Zg(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 eb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zg(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Kg},{resolve:function(e){return function(e,t){if(Ee(e),T(t)&&t.constructor===e)return t;var r=bg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Gg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var tb=Wo?btoa:function(e){return Buffer.from(e).toString("base64")},rb=function(e){var t,r,n=new URL(e),a=new URLSearchParams(n.search),i=null!==(t=a.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=a.get("code"))&&void 0!==r?r:"",usid:i}},nb=function(){return t.nanoid(128)},ab=function(){var e=da(Na.mark((function e(t){var r,n,a,i,o,s,c;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Wo||!window.crypto){e.next=12;break}return a=new TextEncoder,i=a.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,Xg(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 ib(e,t,r){return ob.apply(this,arguments)}function ob(){return(ob=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ab(r);case 2:return i=e.sent,(o=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),s={parameters:eb(eb({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:i},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===(a=c.headers)||void 0===a?void 0:a.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new ws(c);case 14:return e.abrupt("return",eb({url:d},rb(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sb(){return(sb=da(Na.mark((function e(t,r,n){var a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Basic ".concat(tb("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),i={headers:{Authorization:a},body:eb({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(i));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cb(){return(cb=da(Na.mark((function e(t,r){var n,a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nb(),e.next=3,ib(t,n,eb({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return a=e.sent,i={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:a.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:a.usid},e.abrupt("return",t.getAccessToken({body:i}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function db(){return(db=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h,f,p,l,g,b,v;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=nb(),e.next=3,ab(i);case 3:return o=e.sent,(s=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),c="Basic ".concat(tb("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:eb({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(a=u.headers)||void 0===a?void 0:a.get("location"))||u.url,f=new URL(h),p=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new ws(u);case 16:if(l=rb(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:i,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},!r.clientSecret){e.next=22;break}return b="Basic ".concat(tb("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:b},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ub=Object.freeze({__proto__:null,isBrowser:Wo,isNode:Do,globalObject:Fo,hasFetchAvailable:Jo,fetch:Go,stringToBase64:tb,getCodeAndUsidFromUrl:rb,createCodeVerifier:nb,generateCodeChallenge:ab,authorize:ib,loginGuestUserPrivate:function(e,t,r){return sb.apply(this,arguments)},loginGuestUser:function(e,t){return cb.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return db.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var a={headers:{Authorization:"Basic ".concat(tb("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(a)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=No,e.ShopperBaskets=du,e.ShopperContexts=fu,e.ShopperCustomers=gu,e.ShopperDiscoverySearch=Iu,e.ShopperExperience=xu,e.ShopperGiftCertificates=Cu,e.ShopperLogin=Pu,e.ShopperOrders=ju,e.ShopperProducts=Mu,e.ShopperPromotions=Au,e.ShopperSearch=Zu,e.ShopperSeo=rh,e.TemplateURL=iu,e.helpers=ub,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,i,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,f=u?h.bind(h):function(){return h.apply(h,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,m=v.call,k=u&&I.bind(m,m),x=u?function(e){return e&&k(e)}:function(e){return e&&function(){return m.apply(e,arguments)}},y=x({}.toString),w=x("".slice),C=function(e){return w(y(e),8,-1)},O=Object,z=x("".split),P=c((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?z(e,""):O(e)}:O,E=TypeError,q=function(e){if(null==e)throw E("Can't call method on "+e);return e},j=function(e){return P(q(e))},S=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:S(e)},M=function(e){return S(e)?e:void 0},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},_=x({}.isPrototypeOf),A=R("navigator","userAgent")||"",B=s.process,U=s.Deno,N=B&&B.versions||U&&U.version,L=N&&N.v8;L&&(i=(a=L.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!i&&A&&(!(a=A.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=A.match(/Chrome\/(\d+)/))&&(i=+a[1]);var W=i,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),F=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,G=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return S(t)&&_(t.prototype,J(e))},H=String,V=function(e){try{return H(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(S(e))return e;throw $(V(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(q(e))},ae=x({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ae(ne(e),t)},oe=0,se=Math.random(),ce=x(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),he=s.Symbol,fe=he&&he.for,pe=F?he:he&&he.withoutSetter||de,le=function(e){if(!ie(ue,e)||!D&&"string"!=typeof ue[e]){var t="Symbol."+e;D&&ie(he,e)?ue[e]=he[e]:ue[e]=F&&fe?fe(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||G(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!T(r)||G(r))return r;throw ge("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)&&!T(n=f(r,e)))return n;if(S(r=e.valueOf)&&!T(n=f(r,e)))return n;if("string"!==t&&S(r=e.toString)&&!T(n=f(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return G(t)?t:t+""},me=s.document,ke=T(me)&&T(me.createElement),xe=function(e){return ke?me.createElement(e):{}},ye=!d&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,Ce={f:d?we:function(e,t){if(e=j(e),t=Ie(t),ye)try{return we(e,t)}catch(e){}if(ie(e,t))return b(!f(g.f,e,t),e[t])}},Oe=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=String,Pe=TypeError,Ee=function(e){if(T(e))return e;throw Pe(ze(e)+" is not an object")},qe=TypeError,je=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Te={f:d?Oe?function(e,t,r){if(Ee(e),t=Ie(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 je(e,t,r)}:je:function(e,t,r){if(Ee(e),t=Ie(t),Ee(r),ye)try{return je(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=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,_e=d&&Object.getOwnPropertyDescriptor,Ae=ie(Re,"name"),Be={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!d||d&&_e(Re,"name").configurable)},Ue=x(Function.toString);S(ee.inspectSource)||(ee.inspectSource=function(e){return Ue(e)});var Ne,Le,We,De=ee.inspectSource,Fe=s.WeakMap,Je=S(Fe)&&/native code/.test(De(Fe)),Ge=te("keys"),He=function(e){return Ge[e]||(Ge[e]=de(e))},Ve={},$e=s.TypeError,Ye=s.WeakMap;if(Je||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=x(Ke.get),Xe=x(Ke.has),Ze=x(Ke.set);Ne=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},We=function(e){return Xe(Ke,e)}}else{var et=He("state");Ve[et]=!0,Ne=function(e,t){if(ie(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ie(e,et)?e[et]:{}},We=function(e){return ie(e,et)}}var tt={set:Ne,get:Le,has:We,enforce:function(e){return We(e)?Le(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,a=Object.defineProperty,i=d&&!c((function(){return 8!==a((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ie(e,"name")||t&&e.name!==n)&&(d?a(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ie(s,"arity")&&e.length!==s.arity&&a(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?d&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ie(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return S(this)&&n(this).source||De(this)}),"toString")})),nt=function(e,t,r,n){n||(n={});var a=n.enumerable,i=void 0!==n.name?n.name:t;if(S(r)&&rt(r,i,n),n.global)a?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=r:Te.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,it=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?it:at)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ht=Math.min,ft=function(e){return e>0?ht(st(e),9007199254740991):0},pt=function(e){return ft(e.length)},lt=function(e){return function(t,r,n){var a,i=j(t),o=pt(i),s=ut(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=x([].push),It=function(e,t){var r,n=j(e),a=0,i=[];for(r in n)!ie(Ve,r)&&ie(n,r)&&vt(i,r);for(;t.length>a;)ie(n,r=t[a++])&&(~bt(i,r)||vt(i,r));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=mt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return It(e,kt)}},yt={f:Object.getOwnPropertySymbols},wt=x([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=xt.f(Ee(e)),r=yt.f;return r?wt(t,r(e)):t},Ot=function(e,t,r){for(var n=Ct(t),a=Te.f,i=Ce.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||a(e,s,i(t,s))}},zt=/#|\.prototype\./,Pt=function(e,t){var r=qt[Et(e)];return r==St||r!=jt&&(S(t)?c(t):!!t)},Et=Pt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Pt.data={},jt=Pt.NATIVE="N",St=Pt.POLYFILL="P",Tt=Pt,Mt=Ce.f,Rt=function(e,t){var r,n,a,i,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(i=t[n],a=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ot(i,a)}(e.sham||a&&a.sham)&&Me(i,"sham",!0),nt(r,n,i,e)}},_t=Object.keys||function(e){return It(e,mt)},At=c((function(){_t(1)}));Rt({target:"Object",stat:!0,forced:At},{keys:function(e){return _t(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Ut,Nt="[object z]"===String(Bt),Lt=le("toStringTag"),Wt=Object,Dt="Arguments"==C(function(){return arguments}()),Ft=Nt?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wt(e),Lt))?r:Dt?C(t):"Object"==(n=C(t))&&S(t.callee)?"Arguments":n},Jt=String,Gt=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Jt(e)},Ht={f:d&&!Oe?Object.defineProperties:function(e,t){Ee(e);for(var r,n=j(t),a=_t(t),i=a.length,o=0;i>o;)Te.f(e,r=a[o++],n[r]);return e}},Vt=R("document","documentElement"),$t=He("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Ut=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Ut?Qt(Ut):((t=xe("iframe")).style.display="none",Vt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Ut);for(var r=mt.length;r--;)delete Xt.prototype[mt[r]];return Xt()};Ve[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=Ee(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Ht.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),a=ut(t,n),i=ut(void 0===r?n:r,n),o=tr(rr(i-a,0)),s=0;a<i;a++,s++)er(o,s,e[a]);return o.length=s,o},ar=xt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ir&&"Window"==C(e)?function(e){try{return ar(e)}catch(e){return nr(ir)}}(e):ar(j(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,hr=le("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ie(e,hr)&&ur(e,hr,{configurable:!0,value:t})},pr=x(x.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),mr=/^\s*(?:class|function)\b/,kr=x(mr.exec),xr=!mr.exec(br),yr=function(e){if(!S(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},wr=function(e){if(!S(e))return!1;switch(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!kr(mr,De(e))}catch(e){return!0}};wr.sham=!0;var Cr=!Ir||c((function(){var e;return yr(yr.call)||!yr(Object)||!yr((function(){e=!0}))||e}))?wr:yr,Or=le("species"),zr=Array,Pr=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===zr||gr(t.prototype))||T(t)&&null===(t=t[Or]))&&(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,a=4==e,i=6==e,o=7==e,s=5==e||i;return function(c,d,u,h){for(var f,p,l=ne(c),g=P(l),b=lr(d,u),v=pt(g),I=0,m=h||Pr,k=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)k[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Er(k,f)}else switch(e){case 4:return!1;case 7:Er(k,f)}return i?-1:n||a?a:k}},jr={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=jr.forEach,Tr=He("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),_r=Object.prototype,Ar=s.Symbol,Br=Ar&&Ar.prototype,Ur=s.TypeError,Nr=s.QObject,Lr=Ce.f,Wr=Te.f,Dr=or.f,Fr=g.f,Jr=x([].push),Gr=te("symbols"),Hr=te("op-symbols"),Vr=te("wks"),$r=!Nr||!Nr.prototype||!Nr.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Wr({},"a",{get:function(){return Wr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(_r,t);n&&delete _r[t],Wr(e,t,r),n&&e!==_r&&Wr(_r,t,n)}:Wr,Kr=function(e,t){var r=Gr[e]=Zt(Br);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===_r&&Qr(Hr,t,r),Ee(e);var n=Ie(t);return Ee(r),ie(Gr,n)?(r.enumerable?(ie(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ie(e,Tr)||Wr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Wr(e,n,r)},Xr=function(e,t){Ee(e);var r=j(t),n=_t(r).concat(rn(r));return Sr(n,(function(t){d&&!f(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=f(Fr,this,t);return!(this===_r&&ie(Gr,t)&&!ie(Hr,t))&&(!(r||!ie(this,t)||!ie(Gr,t)||ie(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=j(e),n=Ie(t);if(r!==_r||!ie(Gr,n)||ie(Hr,n)){var a=Lr(r,n);return!a||!ie(Gr,n)||ie(r,Tr)&&r[Tr][n]||(a.enumerable=!0),a}},tn=function(e){var t=Dr(j(e)),r=[];return Sr(t,(function(e){ie(Gr,e)||ie(Ve,e)||Jr(r,e)})),r},rn=function(e){var t=e===_r,r=Dr(t?Hr:j(e)),n=[];return Sr(r,(function(e){!ie(Gr,e)||t&&!ie(_r,e)||Jr(n,Gr[e])})),n};D||(Br=(Ar=function(){if(_(Br,this))throw Ur("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gt(arguments[0]):void 0,t=de(e),r=function(e){this===_r&&f(r,Hr,e),ie(this,Tr)&&ie(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(_r,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Br,"toString",(function(){return Rr(this).tag})),nt(Ar,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Ht.f=Xr,Ce.f=en,xt.f=or.f=tn,yt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Wr(Br,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(_r,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ar}),Sr(_t(Vr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ie(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!D,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ar,"Symbol"),Ve[Tr]=!0;var nn=D&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Gt(e);if(ie(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!G(e))throw TypeError(V(e)+" is not a symbol");if(ie(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,hn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),fn=x([].slice),pn=R("JSON","stringify"),ln=x(/./.exec),gn=x("".charAt),bn=x("".charCodeAt),vn=x("".replace),In=x(1..toString),mn=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,yn=!D||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),wn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=fn(arguments),n=t;if((T(t)||void 0!==e)&&!G(e))return gr(t)||(t=function(e,t){if(S(n)&&(t=f(n,this,e,t)),!G(t))return t}),r[1]=t,hn(pn,null,r)},On=function(e,t,r){var n=gn(r,t-1),a=gn(r,t+1);return ln(kn,e)&&!ln(xn,a)||ln(xn,e)&&!ln(kn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:yn||wn},{stringify:function(e,t,r){var n=fn(arguments),a=hn(yn?Cn:pn,null,n);return wn&&"string"==typeof a?vn(a,mn,On):a}});var zn=!D||c((function(){yt.f(1)}));Rt({target:"Object",stat:!0,forced:zn},{getOwnPropertySymbols:function(e){var t=yt.f;return t?t(ne(e)):[]}});var Pn=le("species"),En=function(e){return W>=51||!c((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qn=jr.filter,jn=En("filter");Rt({target:"Array",proto:!0,forced:!jn},{filter:function(e){return qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Sn=Nt?{}.toString:function(){return"[object "+Ft(this)+"]"};Nt||nt(Object.prototype,"toString",Sn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(j(e),t)}});var Rn={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},_n=xe("span").classList,An=_n&&_n.constructor&&_n.constructor.prototype,Bn=An===Object.prototype?void 0:An,Un=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Nn=jr.forEach,Ln=Un("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Wn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Dn in Rn)Rn[Dn]&&Wn(s[Dn]&&s[Dn].prototype);Wn(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=j(e),a=Ce.f,i=Ct(n),o={},s=0;i.length>s;)void 0!==(r=a(n,t=i[s++]))&&er(o,t,r);return o}});var Fn=Ht.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Jn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Jn,sham:!d},{defineProperty:Jn});var Gn,Hn=le("match"),Vn=TypeError,$n=function(e){if(function(e){var t;return T(e)&&(void 0!==(t=e[Hn])?!!t:"RegExp"==C(e))}(e))throw Vn("The method doesn't accept regular expressions");return e},Yn=le("match"),Kn=Ce.f,Qn=x("".startsWith),Xn=x("".slice),Zn=Math.min,ea=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Yn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ta=!(ea||(Gn=Kn(String.prototype,"startsWith"),!Gn||Gn.writable));Rt({target:"String",proto:!0,forced:!ta&&!ea},{startsWith:function(e){var t=Gt(q(this));$n(e);var r=ft(Zn(arguments.length>1?arguments[1]:void 0,t.length)),n=Gt(e);return Qn?Qn(t,n,r):Xn(t,r,r+n.length)===n}});var ra=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},na=RegExp.prototype,aa=Be.PROPER,ia=RegExp.prototype.toString,oa=c((function(){return"/a/b"!=ia.call({source:"a",flags:"b"})})),sa=aa&&"toString"!=ia.name;function ca(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function da(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){ca(i,n,a,o,s,"next",e)}function s(e){ca(i,n,a,o,s,"throw",e)}o(void 0)}))}}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ha(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 fa(e,t,r){return t&&ha(e.prototype,t),r&&ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(oa||sa)&&nt(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 na||ie(e,"flags")||!_(na,e)?t:f(ra,e)}(e))}),{unsafe:!0});var la=Object.prototype,ga=la.hasOwnProperty,ba="function"==typeof Symbol?Symbol:{},va=ba.iterator||"@@iterator",Ia=ba.asyncIterator||"@@asyncIterator",ma=ba.toStringTag||"@@toStringTag";function ka(e,t,r,n){var a=t&&t.prototype instanceof wa?t:wa,i=Object.create(a.prototype),o=new Aa(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return Ua()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=Ma(o,r);if(s){if(s===ya)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=xa(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ya)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function xa(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ya={};function wa(){}function Ca(){}function Oa(){}var za={};za[va]=function(){return this};var Pa=Object.getPrototypeOf,Ea=Pa&&Pa(Pa(Ba([])));Ea&&Ea!==la&&ga.call(Ea,va)&&(za=Ea);var qa=Oa.prototype=wa.prototype=Object.create(za);function ja(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Sa(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ca||"GeneratorFunction"===(t.displayName||t.name))}function Ta(e,t){var r;this._invoke=function(n,a){function i(){return new t((function(r,i){!function r(n,a,i,o){var s=xa(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ga.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(s.arg)}(n,a,r,i)}))}return r=r?r.then(i,i):i()}}function Ma(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,Ma(e,t),"throw"===t.method))return ya;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ya}var n=xa(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ya;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,ya):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ya)}function Ra(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 _a(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Aa(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ra,this),this.reset(!0)}function Ba(e){if(e){var t=e[va];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(ga.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:Ua}}function Ua(){return{value:void 0,done:!0}}Ca.prototype=qa.constructor=Oa,Oa.constructor=Ca,Oa[ma]=Ca.displayName="GeneratorFunction",ja(Ta.prototype),Ta.prototype[Ia]=function(){return this},ja(qa),qa[ma]="Generator",qa[va]=function(){return this},qa.toString=function(){return"[object Generator]"},Aa.prototype={constructor:Aa,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(_a),!e)for(var t in this)"t"===t.charAt(0)&&ga.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 i.type="throw",i.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 a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=ga.call(a,"catchLoc"),s=ga.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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&&ga.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,ya):this.complete(i)},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),ya},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),_a(r),ya}},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 a=n.arg;_a(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ba(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ya}};var Na={wrap:ka,isGeneratorFunction:Sa,AsyncIterator:Ta,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Oa):(e.__proto__=Oa,ma in e||(e[ma]="GeneratorFunction")),e.prototype=Object.create(qa),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new Ta(ka(e,t,r,n),a);return Sa(t)?i:i.next().then((function(e){return e.done?e.value:i.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:Ba},La=Te.f,Wa=le("unscopables"),Da=Array.prototype;null==Da[Wa]&&La(Da,Wa,{configurable:!0,value:Zt(null)});var Fa,Ja,Ga,Ha=function(e){Da[Wa][e]=!0},Va={},$a=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ya=He("IE_PROTO"),Ka=Object,Qa=Ka.prototype,Xa=$a?Ka.getPrototypeOf:function(e){var t=ne(e);if(ie(t,Ya))return t[Ya];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ka?Qa:null},Za=le("iterator"),ei=!1;[].keys&&("next"in(Ga=[].keys())?(Ja=Xa(Xa(Ga)))!==Object.prototype&&(Fa=Ja):ei=!0),(null==Fa||c((function(){var e={};return Fa[Za].call(e)!==e})))&&(Fa={}),S(Fa[Za])||nt(Fa,Za,(function(){return this}));var ti={IteratorPrototype:Fa,BUGGY_SAFARI_ITERATORS:ei},ri=ti.IteratorPrototype,ni=function(){return this},ai=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Zt(ri,{next:b(+!n,r)}),fr(e,a,!1),Va[a]=ni,e},ii=String,oi=TypeError,si=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 oi("Can't set "+ii(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ci=Be.PROPER,di=Be.CONFIGURABLE,ui=ti.IteratorPrototype,hi=ti.BUGGY_SAFARI_ITERATORS,fi=le("iterator"),pi=function(){return this},li=function(e,t,r,n,a,i,o){ai(r,t,n);var s,c,d,u=function(e){if(e===a&&b)return b;if(!hi&&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[fi]||l["@@iterator"]||a&&l[a],b=!hi&&g||u(a),v="Array"==t&&l.entries||g;if(v&&(s=Xa(v.call(new e)))!==Object.prototype&&s.next&&(Xa(s)!==ui&&(si?si(s,ui):S(s[fi])||nt(s,fi,pi)),fr(s,h,!0)),ci&&"values"==a&&g&&"values"!==g.name&&(di?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),a)if(c={values:u("values"),keys:i?b:u("keys"),entries:u("entries")},o)for(d in c)(hi||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:hi||p},c);return l[fi]!==b&&nt(l,fi,b,{name:a}),Va[t]=b,c},gi=Te.f,bi=tt.set,vi=tt.getterFor("Array Iterator"),Ii=li(Array,"Array",(function(e,t){bi(this,{type:"Array Iterator",target:j(e),index:0,kind:t})}),(function(){var e=vi(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"),mi=Va.Arguments=Va.Array;if(Ha("keys"),Ha("values"),Ha("entries"),d&&"values"!==mi.name)try{gi(mi,"name",{value:"values"})}catch(e){}var ki=x("".charAt),xi=x("".charCodeAt),yi=x("".slice),wi=function(e){return function(t,r){var n,a,i=Gt(q(t)),o=st(r),s=i.length;return o<0||o>=s?e?"":void 0:(n=xi(i,o))<55296||n>56319||o+1===s||(a=xi(i,o+1))<56320||a>57343?e?ki(i,o):n:e?yi(i,o,o+2):a-56320+(n-55296<<10)+65536}},Ci={codeAt:wi(!1),charAt:wi(!0)},Oi=Ci.charAt,zi=tt.set,Pi=tt.getterFor("String Iterator");li(String,"String",(function(e){zi(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=Pi(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Oi(r,n),t.index+=e.length,{value:e,done:!1})}));var Ei=le("iterator"),qi=le("toStringTag"),ji=Ii.values,Si=function(e,t){if(e){if(e[Ei]!==ji)try{Me(e,Ei,ji)}catch(t){e[Ei]=ji}if(e[qi]||Me(e,qi,t),Rn[t])for(var r in Ii)if(e[r]!==Ii[r])try{Me(e,r,Ii[r])}catch(t){e[r]=Ii[r]}}};for(var Ti in Rn)Si(s[Ti]&&s[Ti].prototype,Ti);Si(Bn,"DOMTokenList");var Mi=le("iterator"),Ri=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Mi]||"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})),_i=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},Ai=TypeError,Bi=function(e,t){if(_(t,e))return e;throw Ai("Incorrect invocation")},Ui=le("iterator"),Ni=function(e){if(null!=e)return K(e,Ui)||K(e,"@@iterator")||Va[Ft(e)]},Li=TypeError,Wi=function(e,t){var r=arguments.length<2?Ni(e):t;if(Y(r))return Ee(f(r,e));throw Li(V(e)+" is not iterable")},Di=TypeError,Fi=function(e,t){if(e<t)throw Di("Not enough arguments");return e},Ji=Math.floor,Gi=function(e,t){var r=e.length,n=Ji(r/2);return r<8?Hi(e,t):Vi(e,Gi(nr(e,0,n),t),Gi(nr(e,n),t),t)},Hi=function(e,t){for(var r,n,a=e.length,i=1;i<a;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Vi=function(e,t,r,n){for(var a=t.length,i=r.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?n(t[o],r[s])<=0?t[o++]:r[s++]:o<a?t[o++]:r[s++];return e},$i=Gi,Yi=le("iterator"),Ki=tt.set,Qi=tt.getterFor("URLSearchParams"),Xi=tt.getterFor("URLSearchParamsIterator"),Zi=Object.getOwnPropertyDescriptor,eo=function(e){if(!d)return s[e];var t=Zi(s,e);return t&&t.value},to=eo("fetch"),ro=eo("Request"),no=eo("Headers"),ao=ro&&ro.prototype,io=no&&no.prototype,oo=s.RegExp,so=s.TypeError,co=s.decodeURIComponent,uo=s.encodeURIComponent,ho=x("".charAt),fo=x([].join),po=x([].push),lo=x("".replace),go=x([].shift),bo=x([].splice),vo=x("".split),Io=x("".slice),mo=/\+/g,ko=Array(4),xo=function(e){return ko[e-1]||(ko[e-1]=oo("((?:%[\\da-f]{2}){"+e+"})","gi"))},yo=function(e){try{return co(e)}catch(t){return e}},wo=function(e){var t=lo(e,mo," "),r=4;try{return co(t)}catch(e){for(;r;)t=lo(t,xo(r--),yo);return t}},Co=/[!'()~]|%20/g,Oo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},zo=function(e){return Oo[e]},Po=function(e){return lo(uo(e),Co,zo)},Eo=ai((function(e,t){Ki(this,{type:"URLSearchParamsIterator",iterator:Wi(Qi(e).entries),kind:t})}),"Iterator",(function(){var e=Xi(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),qo=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ho(e,0)?Io(e,1):e:Gt(e)))};qo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,a,i,o,s,c=Ni(e);if(c)for(r=(t=Wi(e,c)).next;!(n=f(r,t)).done;){if(i=(a=Wi(Ee(n.value))).next,(o=f(i,a)).done||(s=f(i,a)).done||!f(i,a).done)throw so("Expected sequence with length 2");po(this.entries,{key:Gt(o.value),value:Gt(s.value)})}else for(var d in e)ie(e,d)&&po(this.entries,{key:d,value:Gt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=vo(e,"&"),a=0;a<n.length;)(t=n[a++]).length&&(r=vo(t,"="),po(this.entries,{key:wo(go(r)),value:wo(fo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Po(e.key)+"="+Po(e.value));return fo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var jo=function(){Bi(this,So);var e=arguments.length>0?arguments[0]:void 0;Ki(this,new qo(e))},So=jo.prototype;if(_i(So,{append:function(e,t){Fi(arguments.length,2);var r=Qi(this);po(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){Fi(arguments.length,1);for(var t=Qi(this),r=t.entries,n=Gt(e),a=0;a<r.length;)r[a].key===n?bo(r,a,1):a++;t.updateURL()},get:function(e){Fi(arguments.length,1);for(var t=Qi(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){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=[],a=0;a<t.length;a++)t[a].key===r&&po(n,t[a].value);return n},has:function(e){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Fi(arguments.length,1);for(var r,n=Qi(this),a=n.entries,i=!1,o=Gt(e),s=Gt(t),c=0;c<a.length;c++)(r=a[c]).key===o&&(i?bo(a,c--,1):(i=!0,r.value=s));i||po(a,{key:o,value:s}),n.updateURL()},sort:function(){var e=Qi(this);$i(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Qi(this).entries,n=lr(e,arguments.length>1?arguments[1]:void 0),a=0;a<r.length;)n((t=r[a++]).value,t.key,this)},keys:function(){return new Eo(this,"keys")},values:function(){return new Eo(this,"values")},entries:function(){return new Eo(this,"entries")}},{enumerable:!0}),nt(So,Yi,So.entries,{name:"entries"}),nt(So,"toString",(function(){return Qi(this).serialize()}),{enumerable:!0}),fr(jo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!Ri},{URLSearchParams:jo}),!Ri&&S(no)){var To=x(io.has),Mo=x(io.set),Ro=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(r))return t=e.headers?new no(e.headers):new no,To(t,"content-type")||Mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Gt(r)),headers:b(0,t)})}return e};if(S(to)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return to(e,arguments.length>1?Ro(arguments[1]):{})}}),S(ro)){var _o=function(e){return Bi(this,ao),new ro(e,arguments.length>1?Ro(arguments[1]):{})};ao.constructor=_o,_o.prototype=ao,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_o})}}var Ao={URLSearchParams:jo,getState:Qi};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=fa((function e(t){if(ua(this,e),pa(this,"baseUri",void 0),pa(this,"proxy",void 0),pa(this,"headers",void 0),pa(this,"parameters",void 0),pa(this,"fetchOptions",void 0),pa(this,"transformRequest",void 0),pa(this,"throwOnBadResponse",void 0),this.headers=Uo({},t.headers),this.parameters=Uo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Uo({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 Lo(e){return(Lo="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)}pa(No,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Rt({global:!0},{globalThis:s});var Wo="object"===("undefined"==typeof window?"undefined":Lo(window))&&"object"===Lo(window.document),Do="object"===("undefined"==typeof process?"undefined":Lo(process))&&"object"===Lo(process.versions)&&"string"==typeof process.versions.node,Fo=Wo?window:globalThis,Jo="function"==typeof Fo.fetch,Go=function(){if(Do)return require("node-fetch").default;if(!Jo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Fo.fetch}(),Ho=Function,Vo=x([].concat),$o=x([].join),Yo={},Ko=function(e,t,r){if(!ie(Yo,t)){for(var n=[],a=0;a<t;a++)n[a]="a["+a+"]";Yo[t]=Ho("C,a","return new C("+$o(n,",")+")")}return Yo[t](e,r)},Qo=u?Ho.bind:function(e){var t=Y(this),r=t.prototype,n=fn(arguments,1),a=function(){var r=Vo(n,fn(arguments));return this instanceof a?Ko(t,r.length,r):t.apply(e,r)};return T(r)&&(a.prototype=r),a},Xo=TypeError,Zo=function(e){if(Cr(e))return e;throw Xo(V(e)+" is not a constructor")},es=R("Reflect","construct"),ts=Object.prototype,rs=[].push,ns=c((function(){function e(){}return!(es((function(){}),[],e)instanceof e)})),as=!c((function(){es((function(){}))})),is=ns||as;Rt({target:"Reflect",stat:!0,forced:is,sham:is},{construct:function(e,t){Zo(e),Ee(t);var r=arguments.length<3?e:Zo(arguments[2]);if(as&&!ns)return es(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 hn(rs,n,t),new(hn(Qo,e,n))}var a=r.prototype,i=Zt(T(a)?a:ts),o=hn(e,i,t);return T(o)?o:i}});var os=TypeError,ss=function(e){if(e>9007199254740991)throw os("Maximum allowed index exceeded");return e},cs=le("isConcatSpreadable"),ds=W>=51||!c((function(){var e=[];return e[cs]=!1,e.concat()[0]!==e})),us=En("concat"),hs=function(e){if(!T(e))return!1;var t=e[cs];return void 0!==t?!!t:gr(e)};function fs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ps(e,t){return(ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ls(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ps(e,t)}function gs(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fs(e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vs(){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 Is(e,t,r){return(Is=vs()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&ps(a,r.prototype),a}).apply(null,arguments)}function ms(e){var t="function"==typeof Map?new Map:void 0;return(ms=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 Is(e,arguments,bs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ps(n,e)})(e)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return gs(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!ds||!us},{concat:function(e){var t,r,n,a,i,o=ne(this),s=Pr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(hs(i=-1===t?o:arguments[t]))for(a=pt(i),ss(c+a),r=0;r<a;r++,c++)r in i&&er(s,c,i[r]);else ss(c+1),er(s,c++,i);return s.length=c,s}});var xs,ys,ws=function(e){ls(r,e);var t=ks(r);function r(e){var n;return ua(this,r),pa(fs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fa(r)}(ms(Error)),Cs=s.RegExp,Os=c((function(){var e=Cs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),zs=Os||c((function(){return!Cs("a","y").sticky})),Ps={BROKEN_CARET:Os||c((function(){var e=Cs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:zs,UNSUPPORTED_Y:Os},Es=s.RegExp,qs=c((function(){var e=Es(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),js=s.RegExp,Ss=c((function(){var e=js("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ts=tt.get,Ms=te("native-string-replace",String.prototype.replace),Rs=RegExp.prototype.exec,_s=Rs,As=x("".charAt),Bs=x("".indexOf),Us=x("".replace),Ns=x("".slice),Ls=(ys=/b*/g,f(Rs,xs=/a/,"a"),f(Rs,ys,"a"),0!==xs.lastIndex||0!==ys.lastIndex),Ws=Ps.BROKEN_CARET,Ds=void 0!==/()??/.exec("")[1];(Ls||Ds||Ws||qs||Ss)&&(_s=function(e){var t,r,n,a,i,o,s,c=this,d=Ts(c),u=Gt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=f(_s,h,u),c.lastIndex=h.lastIndex,t;var p=d.groups,l=Ws&&c.sticky,g=f(ra,c),b=c.source,v=0,I=u;if(l&&(g=Us(g,"y",""),-1===Bs(g,"g")&&(g+="g"),I=Ns(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==As(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ds&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ls&&(n=c.lastIndex),a=f(Rs,l?r:c,I),l?a?(a.input=Ns(a.input,v),a[0]=Ns(a[0],v),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Ls&&a&&(c.lastIndex=c.global?a.index+a[0].length:n),Ds&&a&&a.length>1&&f(Ms,a[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&p)for(a.groups=o=Zt(null),i=0;i<p.length;i++)o[(s=p[i])[0]]=a[s[1]];return a});var Fs=_s;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Fs},{exec:Fs});var Js=le("species"),Gs=RegExp.prototype,Hs=function(e,t,r,n){var a=le(e),i=!c((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Js]=function(){return r},r.flags="",r[a]=/./[a]),r.exec=function(){return t=!0,null},r[a](""),!t}));if(!i||!o||r){var s=x(/./[a]),d=t(a,""[e],(function(e,t,r,n,a){var o=x(e),c=t.exec;return c===Fs||c===Gs.exec?i&&!a?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Gs,a,d[1])}n&&Me(Gs[a],"sham",!0)},Vs=Ci.charAt,$s=function(e,t,r){return t+(r?Vs(e,t).length:1)},Ys=Math.floor,Ks=x("".charAt),Qs=x("".replace),Xs=x("".slice),Zs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ec=/\$([$&'`]|\d{1,2})/g,tc=function(e,t,r,n,a,i){var o=r+e.length,s=n.length,c=ec;return void 0!==a&&(a=ne(a),c=Zs),Qs(i,c,(function(i,c){var d;switch(Ks(c,0)){case"$":return"$";case"&":return e;case"`":return Xs(t,0,r);case"'":return Xs(t,o);case"<":d=a[Xs(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var h=Ys(u/10);return 0===h?i:h<=s?void 0===n[h-1]?Ks(c,1):n[h-1]+Ks(c,1):i}d=n[u-1]}return void 0===d?"":d}))},rc=TypeError,nc=function(e,t){var r=e.exec;if(S(r)){var n=f(r,e,t);return null!==n&&Ee(n),n}if("RegExp"===C(e))return f(Fs,e,t);throw rc("RegExp#exec called on incompatible receiver")},ac=le("replace"),ic=Math.max,oc=Math.min,sc=x([].concat),cc=x([].push),dc=x("".indexOf),uc=x("".slice),hc="$0"==="a".replace(/./,"$0"),fc=!!/./[ac]&&""===/./[ac]("a","$0");Hs("replace",(function(e,t,r){var n=fc?"$":"$0";return[function(e,r){var n=q(this),a=null==e?void 0:K(e,ac);return a?f(a,e,n,r):f(t,Gt(n),e,r)},function(e,a){var i=Ee(this),o=Gt(e);if("string"==typeof a&&-1===dc(a,n)&&-1===dc(a,"$<")){var s=r(t,i,o,a);if(s.done)return s.value}var c=S(a);c||(a=Gt(a));var d=i.global;if(d){var u=i.unicode;i.lastIndex=0}for(var h=[];;){var f=nc(i,o);if(null===f)break;if(cc(h,f),!d)break;""===Gt(f[0])&&(i.lastIndex=$s(o,ft(i.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Gt((f=h[b])[0]),I=ic(oc(st(f.index),o.length),0),m=[],k=1;k<f.length;k++)cc(m,void 0===(p=f[k])?p:String(p));var x=f.groups;if(c){var y=sc([v],m,I,o);void 0!==x&&cc(y,x);var w=Gt(hn(a,void 0,y))}else w=tc(v,o,I,m,x,a);I>=g&&(l+=uc(o,g,I)+w,g=I+v.length)}return l+uc(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!hc||fc);var pc,lc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},gc=Object.assign,bc=Object.defineProperty,vc=x([].concat),Ic=!gc||c((function(){if(d&&1!==gc({b:1},gc(bc({},"a",{enumerable:!0,get:function(){bc(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!=gc({},e)[r]||"abcdefghijklmnopqrst"!=_t(gc({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,a=1,i=yt.f,o=g.f;n>a;)for(var s,c=P(arguments[a++]),u=i?vc(_t(c),i(c)):_t(c),h=u.length,p=0;h>p;)s=u[p++],d&&!f(o,c,s)||(r[s]=c[s]);return r}:gc,mc=function(e,t,r){var n,a;Ee(e);try{if(!(n=K(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw r;if(a)throw n;return Ee(n),r},kc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){mc(e,"throw",t)}},xc=le("iterator"),yc=Array.prototype,wc=function(e){return void 0!==e&&(Va.Array===e||yc[xc]===e)},Cc=Array,Oc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,a=n>1?arguments[1]:void 0,i=void 0!==a;i&&(a=lr(a,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Ni(t),l=0;if(!p||this===Cc&&wc(p))for(o=pt(t),s=r?new this(o):Cc(o);o>l;l++)h=i?a(t[l],l):t[l],er(s,l,h);else for(u=(d=Wi(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=i?kc(d,a,[c.value,l],!0):c.value,er(s,l,h);return s.length=l,s},zc=/[^\0-\u007E]/,Pc=/[.\u3002\uFF0E\uFF61]/g,Ec="Overflow: input needs wider integers to process",qc=RangeError,jc=x(Pc.exec),Sc=Math.floor,Tc=String.fromCharCode,Mc=x("".charCodeAt),Rc=x([].join),_c=x([].push),Ac=x("".replace),Bc=x("".split),Uc=x("".toLowerCase),Nc=function(e){return e+22+75*(e<26)},Lc=function(e,t,r){var n=0;for(e=r?Sc(e/700):e>>1,e+=Sc(e/t);e>455;)e=Sc(e/35),n+=36;return Sc(n+36*e/(e+38))},Wc=function(e){var t,r,n=[],a=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Mc(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Mc(e,r++);56320==(64512&i)?_c(t,((1023&a)<<10)+(1023&i)+65536):(_c(t,a),r--)}else _c(t,a)}return t}(e)).length,i=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&_c(n,Tc(r));var c=n.length,d=c;for(c&&_c(n,"-");d<a;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var h=d+1;if(u-i>Sc((2147483647-o)/h))throw qc(Ec);for(o+=(u-i)*h,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++o>2147483647)throw qc(Ec);if(r==i){for(var f=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(f<l)break;var g=f-l,b=36-l;_c(n,Tc(Nc(l+g%b))),f=Sc(g/b),p+=36}_c(n,Tc(Nc(f))),s=Lc(o,h,d==c),o=0,d++}}o++,i++}return Rc(n,"")},Dc=Ci.codeAt,Fc=tt.set,Jc=tt.getterFor("URL"),Gc=Ao.URLSearchParams,Hc=Ao.getState,Vc=s.URL,$c=s.TypeError,Yc=s.parseInt,Kc=Math.floor,Qc=Math.pow,Xc=x("".charAt),Zc=x(/./.exec),ed=x([].join),td=x(1..toString),rd=x([].pop),nd=x([].push),ad=x("".replace),id=x([].shift),od=x("".split),sd=x("".slice),cd=x("".toLowerCase),dd=x([].unshift),ud=/[a-z]/i,hd=/[\d+-.a-z]/i,fd=/\d/,pd=/^0x/i,ld=/^[0-7]+$/,gd=/^\d+$/,bd=/^[\da-f]+$/i,vd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Id=/[\0\t\n\r #/:<>?@[\\\]^|]/,md=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kd=/[\t\n\r]/g,xd=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)dd(t,e%256),e=Kc(e/256);return ed(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=td(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yd={},wd=Ic({},yd,{" ":1,'"':1,"<":1,">":1,"`":1}),Cd=Ic({},wd,{"#":1,"?":1,"{":1,"}":1}),Od=Ic({},Cd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),zd=function(e,t){var r=Dc(e,0);return r>32&&r<127&&!ie(t,e)?e:encodeURIComponent(e)},Pd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ed=function(e,t){var r;return 2==e.length&&Zc(ud,Xc(e,0))&&(":"==(r=Xc(e,1))||!t&&"|"==r)},qd=function(e){var t;return e.length>1&&Ed(sd(e,0,2))&&(2==e.length||"/"===(t=Xc(e,2))||"\\"===t||"?"===t||"#"===t)},jd=function(e){return"."===e||"%2e"===cd(e)},Sd={},Td={},Md={},Rd={},_d={},Ad={},Bd={},Ud={},Nd={},Ld={},Wd={},Dd={},Fd={},Jd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd={},Xd=function(e,t,r){var n,a,i,o=Gt(e);if(t){if(a=this.parse(o))throw $c(a);this.searchParams=null}else{if(void 0!==r&&(n=new Xd(r,!0)),a=this.parse(o,null,n))throw $c(a);(i=Hc(new Gc)).bindURL(this),this.searchParams=i}};Xd.prototype={type:"URL",parse:function(e,t,r){var n,a,i,o,s,c=this,d=t||Sd,u=0,h="",f=!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=ad(e,md,"")),e=ad(e,kd,""),n=Oc(e);u<=n.length;){switch(a=n[u],d){case Sd:if(!a||!Zc(ud,a)){if(t)return"Invalid scheme";d=Md;continue}h+=cd(a),d=Td;break;case Td:if(a&&(Zc(hd,a)||"+"==a||"-"==a||"."==a))h+=cd(a);else{if(":"!=a){if(t)return"Invalid scheme";h="",d=Md,u=0;continue}if(t&&(c.isSpecial()!=ie(Pd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Pd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Jd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Rd:c.isSpecial()?d=Ud:"/"==n[u+1]?(d=_d,u++):(c.cannotBeABaseURL=!0,nd(c.path,""),d=Yd)}break;case Md:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Qd;break}d="file"==r.scheme?Jd:Ad;continue;case Rd:if("/"!=a||"/"!=n[u+1]){d=Ad;continue}d=Nd,u++;break;case _d:if("/"==a){d=Ld;break}d=$d;continue;case Ad:if(c.scheme=r.scheme,a==pc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query;else if("/"==a||"\\"==a&&c.isSpecial())d=Bd;else if("?"==a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=$d;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}break;case Bd:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=$d;continue}d=Ld}else d=Nd;break;case Ud:if(d=Nd,"/"!=a||"/"!=Xc(h,u+1))continue;u++;break;case Nd:if("/"!=a&&"\\"!=a){d=Ld;continue}break;case Ld:if("@"==a){f&&(h="%40"+h),f=!0,i=Oc(h);for(var g=0;g<i.length;g++){var b=i[g];if(":"!=b||l){var v=zd(b,Od);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Oc(h).length+1,h="",d=Wd}else h+=a;break;case Wd:case Dd:if(t&&"file"==c.scheme){d=Hd;continue}if(":"!=a||p){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Vd,t)return;continue}"["==a?p=!0:"]"==a&&(p=!1),h+=a}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Fd,t==Dd)return}break;case Fd:if(!Zc(fd,a)){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()||t){if(""!=h){var I=Yc(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Pd[c.scheme]?null:I,h=""}if(t)return;d=Vd;continue}return"Invalid port"}h+=a;break;case Jd:if(c.scheme="file","/"==a||"\\"==a)d=Gd;else{if(!r||"file"!=r.scheme){d=$d;continue}if(a==pc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==a)c.host=r.host,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=a){qd(ed(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=$d;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}}break;case Gd:if("/"==a||"\\"==a){d=Hd;break}r&&"file"==r.scheme&&!qd(ed(nr(n,u),""))&&(Ed(r.path[0],!0)?nd(c.path,r.path[0]):c.host=r.host),d=$d;continue;case Hd:if(a==pc||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Ed(h))d=$d;else if(""==h){if(c.host="",t)return;d=Vd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Vd}continue}h+=a;break;case Vd:if(c.isSpecial()){if(d=$d,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=pc&&(d=$d,"/"!=a))continue}else c.fragment="",d=Qd;else c.query="",d=Kd;break;case $d:if(a==pc||"/"==a||"\\"==a&&c.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=cd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||nd(c.path,"")):jd(h)?"/"==a||"\\"==a&&c.isSpecial()||nd(c.path,""):("file"==c.scheme&&!c.path.length&&Ed(h)&&(c.host&&(c.host=""),h=Xc(h,0)+":"),nd(c.path,h)),h="","file"==c.scheme&&(a==pc||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)id(c.path);"?"==a?(c.query="",d=Kd):"#"==a&&(c.fragment="",d=Qd)}else h+=zd(a,Cd);break;case Yd:"?"==a?(c.query="",d=Kd):"#"==a?(c.fragment="",d=Qd):a!=pc&&(c.path[0]+=zd(a,yd));break;case Kd:t||"#"!=a?a!=pc&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":zd(a,yd)):(c.fragment="",d=Qd);break;case Qd:a!=pc&&(c.fragment+=zd(a,wd))}u++}},parseHost:function(e){var t,r,n;if("["==Xc(e,0)){if("]"!=Xc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,a,i,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return Xc(e,h)};if(":"==f()){if(":"!=Xc(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&Zc(bd,f());)t=16*t+Yc(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Zc(fd,f()))return;for(;Zc(fd,f());){if(i=Yc(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[d]=256*c[d]+a,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(sd(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],a=Bc(Ac(Uc(e),Pc,"."),".");for(t=0;t<a.length;t++)r=a[t],_c(n,jc(zc,r)?"xn--"+Wc(r):r);return Rc(n,".")}(e),Zc(vd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,a,i,o,s,c=od(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(a=c[n]))return e;if(i=10,a.length>1&&"0"==Xc(a,0)&&(i=Zc(pd,a)?16:8,a=sd(a,8==i?1:2)),""===a)o=0;else{if(!Zc(10==i?gd:8==i?ld:bd,a))return e;o=Yc(a,i)}nd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Qc(256,5-t))return null}else if(o>255)return null;for(s=rd(r),n=0;n<r.length;n++)s+=r[n]*Qc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Zc(Id,e))return"Invalid host";for(t="",r=Oc(e),n=0;n<r.length;n++)t+=zd(r[n],yd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ie(Pd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ed(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=xd(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+ed(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw $c(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Zd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Gt(e)+":",Sd)},getUsername:function(){return this.username},setUsername:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=zd(t[r],Od)}},getPassword:function(){return this.password},setPassword:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=zd(t[r],Od)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xd(e):xd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wd)},getHostname:function(){var e=this.host;return null===e?"":xd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Dd)},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,Fd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ed(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Vd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Gt(e))?this.query=null:("?"==Xc(e,0)&&(e=sd(e,1)),this.query="",this.parse(e,Kd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Gt(e))?("#"==Xc(e,0)&&(e=sd(e,1)),this.fragment="",this.parse(e,Qd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Zd=function(e){var t=Bi(this,eu),r=Fi(arguments.length,1)>1?arguments[1]:void 0,n=Fc(t,new Xd(e,!1,r));d||(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())},eu=Zd.prototype,tu=function(e,t){return{get:function(){return Jc(this)[e]()},set:t&&function(e){return Jc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(lc(eu,"href",tu("serialize","setHref")),lc(eu,"origin",tu("getOrigin")),lc(eu,"protocol",tu("getProtocol","setProtocol")),lc(eu,"username",tu("getUsername","setUsername")),lc(eu,"password",tu("getPassword","setPassword")),lc(eu,"host",tu("getHost","setHost")),lc(eu,"hostname",tu("getHostname","setHostname")),lc(eu,"port",tu("getPort","setPort")),lc(eu,"pathname",tu("getPathname","setPathname")),lc(eu,"search",tu("getSearch","setSearch")),lc(eu,"searchParams",tu("getSearchParams")),lc(eu,"hash",tu("getHash","setHash"))),nt(eu,"toJSON",(function(){return Jc(this).serialize()}),{enumerable:!0}),nt(eu,"toString",(function(){return Jc(this).serialize()}),{enumerable:!0}),Vc){var ru=Vc.createObjectURL,nu=Vc.revokeObjectURL;ru&&nt(Zd,"createObjectURL",lr(ru,Vc)),nu&&nt(Zd,"revokeObjectURL",lr(nu,Vc))}function au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bs(e);if(t){var a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return gs(this,r)}}fr(Zd,"URL"),Rt({global:!0,constructor:!0,forced:!Ri,sham:!d},{URL:Zd});var iu=function(e){ls(r,e);var t=au(r);function r(e,n,a){var i;return ua(this,r),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==a?void 0:a.pathParams))).addQueryParams(null==a?void 0:a.queryParams),null!=a&&a.origin&&i.replaceOrigin(null==a?void 0:a.origin),i}return fa(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var a=0;a<n.length;a+=1)t.searchParams.append(r,String(n[a]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(ms(URL)),ou="commerce-sdk-isomorphic@1.13.0";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){pa(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}var du=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T,M,R,_,A;return fa(e,[{key:"createBasket",value:(A=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==a.temporary&&(o.temporary=a.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"transferBasket",value:(_=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Go(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 ws(u);case 40:return e.next=42,u.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"mergeBasket",value:(R=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(P=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(O=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(y=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeItemFromBasket",value:(x=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(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 ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(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 ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=50,Go(s.toString(),d);case 50:if(u=e.sent,!r){e.next=55;break}return e.abrupt("return",u);case 55:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=59;break}throw new ws(u);case 59:return e.next=61,u.text();case 61:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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!==a.exchange&&(o.exchange=a.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===a.siteId){e.next=31;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45: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 hu(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){pa(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}pa(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var fu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a;return fa(e,[{key:"getShopperContext",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=30,Go(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=37;break}throw new ws(u);case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43: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){pa(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}pa(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var gu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T;return fa(e,[{key:"registerCustomer",value:(T=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(S=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for invalidateCustomerAuth: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Go(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 ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeCustomer",value:(j=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.clientId){e.next=21;break}o.clientId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(q=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeTrustedSystem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(O=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.externalId){e.next=21;break}o.externalId=a.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===a.authenticationProviderId){e.next=30;break}o.authenticationProviderId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(C=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(x=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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!==a.crossSites&&(o.crossSites=a.crossSites),void 0!==n.from?o.from=n.from:void 0!==a.from&&(o.from=a.from),void 0!==n.until?o.until=n.until:void 0!==a.until&&(o.until=a.until),void 0!==n.status?o.status=n.status:void 0!==a.status&&(o.status=a.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.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!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Go(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new ws(u);case 53:return e.next=55,u.text();case 55:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(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=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(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=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=63;break}throw new ws(u);case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.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}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.email&&(o.email=a.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==a.firstName&&(o.firstName=a.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==a.lastName&&(o.lastName=a.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}o.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.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}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(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 ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60: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){pa(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}pa(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Iu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"retrieveResults",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.locale){e.next=30;break}o.locale=a.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!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.suggestionTypes){e.next=30;break}o.suggestionTypes=a.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!==a.searchText&&(o.searchText=a.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}o.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function mu(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 ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var xu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPages",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.categoryId&&(o.categoryId=a.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==a.productId&&(o.productId=a.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===a.aspectTypeId){e.next=23;break}o.aspectTypeId=a.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!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Go(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 ws(u);case 52:return e.next=54,u.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.pageId=n.pageId,e.next=21;break;case 16:if(void 0===a.pageId){e.next=20;break}i.pageId=a.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!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var Cu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fa(e,[{key:"getGiftCertificate",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new iu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=wu(wu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(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 ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Pu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v;return fa(e,[{key:"authenticateCustomer",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.client_id){e.next=21;break}o.client_id=a.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===a.refresh_token){e.next=30;break}o.refresh_token=a.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!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.redirect_uri){e.next=21;break}o.redirect_uri=a.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===a.response_type){e.next=30;break}o.response_type=a.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===a.client_id){e.next=39;break}o.client_id=a.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!==a.scope&&(o.scope=a.scope),void 0!==n.state?o.state=n.state:void 0!==a.state&&(o.state=a.state),void 0!==n.usid?o.usid=n.usid:void 0!==a.usid&&(o.usid=a.usid),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.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===a.code_challenge){e.next=53;break}o.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==a.ui_locales&&(o.ui_locales=a.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=62,Go(s.toString(),d);case 62:if(u=e.sent,!r){e.next=67;break}return e.abrupt("return",u);case 67:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=69;break}throw new ws(u);case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.client_id){e.next=21;break}o.client_id=a.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===a.channel_id){e.next=30;break}o.channel_id=a.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===a.code_challenge){e.next=39;break}o.code_challenge=a.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===a.login_id){e.next=48;break}o.login_id=a.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===a.idp_origin){e.next=57;break}o.idp_origin=a.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===a.redirect_uri){e.next=66;break}o.redirect_uri=a.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===a.response_type){e.next=75;break}o.response_type=a.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=83,Go(s.toString(),d);case 83:if(u=e.sent,!r){e.next=88;break}return e.abrupt("return",u);case 88:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=90;break}throw new ws(u);case 90:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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!==a.channel_id&&(o.channel_id=a.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=21,Go(s.toString(),d);case 21:if(u=e.sent,!r){e.next=26;break}return e.abrupt("return",u);case 26:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=30;break}throw new ws(u);case 30:return e.next=32,u.text();case 32:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(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 ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Eu(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 qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Eu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ju=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s;return fa(e,[{key:"createOrder",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Go(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 ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(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 ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(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 ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51: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 Tu(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){pa(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}pa(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Mu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a;return fa(e,[{key:"getProducts",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===a.ids){e.next=22;break}o.ids=a.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new iu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new iu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.ids){e.next=21;break}o.ids=a.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!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.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!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(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 ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Ru(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 _u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ru(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Au=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPromotions",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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===a.ids){e.next=30;break}o.ids=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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}i.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}i.campaignId=a.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===a.siteId){e.next=30;break}o.siteId=a.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!==a.startDate&&(o.startDate=a.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==a.endDate&&(o.endDate=a.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Bu=TypeError,Uu=function(e,t){if(!delete e[t])throw Bu("Cannot delete property "+V(t)+" of "+V(e))},Nu=A.match(/firefox\/(\d+)/i),Lu=!!Nu&&+Nu[1],Wu=/MSIE|Trident/.test(A),Du=A.match(/AppleWebKit\/(\d+)\./),Fu=!!Du&&+Du[1],Ju=[],Gu=x(Ju.sort),Hu=x(Ju.push),Vu=c((function(){Ju.sort(void 0)})),$u=c((function(){Ju.sort(null)})),Yu=Un("sort"),Ku=!c((function(){if(W)return W<70;if(!(Lu&&Lu>3)){if(Wu)return!0;if(Fu)return Fu<603;var e,t,r,n,a="";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++)Ju.push({k:t+n,v:r})}for(Ju.sort((function(e,t){return t.v-e.v})),n=0;n<Ju.length;n++)t=Ju[n].k.charAt(0),a.charAt(a.length-1)!==t&&(a+=t);return"DGBEFHACIJK"!==a}}));function Qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Vu||!$u||!Yu||!Ku},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(Ku)return void 0===e?Gu(t):Gu(t,e);var r,n,a=[],i=pt(t);for(n=0;n<i;n++)n in t&&Hu(a,t[n]);for($i(a,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=a.length,n=0;n<r;)t[n]=a[n++];for(;n<i;)Uu(t,n++);return t}});var Zu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=Xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"productSearch",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==a.q&&(o.q=a.q),void 0!==n.refine?o.refine=n.refine:void 0!==a.refine&&(o.refine=a.refine),void 0!==n.sort?o.sort=n.sort:void 0!==a.sort&&(o.sort=a.sort),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==a.allVariationProperties&&(o.allVariationProperties=a.allVariationProperties),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.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===a.siteId){e.next=21;break}o.siteId=a.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===a.q){e.next=30;break}o.q=a.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!==a.limit&&(o.limit=a.limit),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function eh(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 th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var rh=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=th({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fa(e,[{key:"getUrlMapping",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===a.urlSegment){e.next=21;break}o.urlSegment=a.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new iu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=th(th({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=th(th({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(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 ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(rh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var nh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Hs("search",(function(e,t,r){return[function(t){var r=q(this),n=null==t?void 0:K(t,e);return n?f(n,t,r):new RegExp(t)[e](Gt(r))},function(e){var n=Ee(this),a=Gt(e),i=r(t,n,a);if(i.done)return i.value;var o=n.lastIndex;nh(o,0)||(n.lastIndex=0);var s=nc(n,a);return nh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var ah=le("iterator"),ih=!1;try{var oh=0,sh={next:function(){return{done:!!oh++}},return:function(){ih=!0}};sh[ah]=function(){return this},Array.from(sh,(function(){throw 2}))}catch(e){}var ch,dh,uh,hh=function(e,t){if(!t&&!ih)return!1;var r=!1;try{var n={};n[ah]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},fh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ph=Te.f,lh=tt.enforce,gh=tt.get,bh=s.Int8Array,vh=bh&&bh.prototype,Ih=s.Uint8ClampedArray,mh=Ih&&Ih.prototype,kh=bh&&Xa(bh),xh=vh&&Xa(vh),yh=Object.prototype,wh=s.TypeError,Ch=le("toStringTag"),Oh=de("TYPED_ARRAY_TAG"),zh=fh&&!!si&&"Opera"!==Ft(s.opera),Ph=!1,Eh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},qh={BigInt64Array:8,BigUint64Array:8},jh=function(e){var t=Xa(e);if(T(t)){var r=gh(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:jh(t)}},Sh=function(e){if(!T(e))return!1;var t=Ft(e);return ie(Eh,t)||ie(qh,t)};for(ch in Eh)(uh=(dh=s[ch])&&dh.prototype)?lh(uh).TypedArrayConstructor=dh:zh=!1;for(ch in qh)(uh=(dh=s[ch])&&dh.prototype)&&(lh(uh).TypedArrayConstructor=dh);if((!zh||!S(kh)||kh===Function.prototype)&&(kh=function(){throw wh("Incorrect invocation")},zh))for(ch in Eh)s[ch]&&si(s[ch],kh);if((!zh||!xh||xh===yh)&&(xh=kh.prototype,zh))for(ch in Eh)s[ch]&&si(s[ch].prototype,xh);if(zh&&Xa(mh)!==xh&&si(mh,xh),d&&!ie(xh,Ch))for(ch in Ph=!0,ph(xh,Ch,{get:function(){return T(this)?this[Oh]:void 0}}),Eh)s[ch]&&Me(s[ch],Oh,ch);var Th={NATIVE_ARRAY_BUFFER_VIEWS:zh,TYPED_ARRAY_TAG:Ph&&Oh,aTypedArray:function(e){if(Sh(e))return e;throw wh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!si||_(kh,e)))return e;throw wh(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var a in Eh){var i=s[a];if(i&&ie(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}xh[e]&&!r||nt(xh,e,r?t:zh&&vh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(d){if(si){if(r)for(n in Eh)if((a=s[n])&&ie(a,e))try{delete a[e]}catch(e){}if(kh[e]&&!r)return;try{return nt(kh,e,r?t:zh&&kh[e]||t)}catch(e){}}for(n in Eh)!(a=s[n])||a[e]&&!r||nt(a,e,t)}},getTypedArrayConstructor:jh,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ie(Eh,t)||ie(qh,t)},isTypedArray:Sh,TypedArray:kh,TypedArrayPrototype:xh},Mh=Th.NATIVE_ARRAY_BUFFER_VIEWS,Rh=s.ArrayBuffer,_h=s.Int8Array,Ah=!Mh||!c((function(){_h(1)}))||!c((function(){new _h(-1)}))||!hh((function(e){new _h,new _h(null),new _h(1.5),new _h(e)}),!0)||c((function(){return 1!==new _h(new Rh(2),1,void 0).length})),Bh=RangeError,Uh=function(e){if(void 0===e)return 0;var t=st(e),r=ft(t);if(t!==r)throw Bh("Wrong length or index");return r},Nh=Array,Lh=Math.abs,Wh=Math.pow,Dh=Math.floor,Fh=Math.log,Jh=Math.LN2,Gh=function(e,t,r){var n,a,i,o=Nh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Wh(2,-24)-Wh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Lh(e))!=e||e===1/0?(a=e!=e?1:0,n=c):(n=Dh(Fh(e)/Jh),e*(i=Wh(2,-n))<1&&(n--,i*=2),(e+=n+d>=1?u/i:u*Wh(2,1-d))*i>=2&&(n++,i/=2),n+d>=c?(a=0,n=c):n+d>=1?(a=(e*i-1)*Wh(2,t),n+=d):(a=e*Wh(2,d-1)*Wh(2,t),n=0));t>=8;)o[f++]=255&a,a/=256,t-=8;for(n=n<<t|a,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Hh=function(e,t){var r,n=e.length,a=8*n-t-1,i=(1<<a)-1,o=i>>1,s=a-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===i)return r?NaN:d?-1/0:1/0;r+=Wh(2,t),u-=o}return(d?-1:1)*r*Wh(2,u-t)},Vh=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,a=ut(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,o=void 0===i?r:ut(i,r);o>a;)t[a++]=e;return t},$h=xt.f,Yh=Te.f,Kh=Be.PROPER,Qh=Be.CONFIGURABLE,Xh=tt.get,Zh=tt.set,ef=s.ArrayBuffer,tf=ef,rf=tf&&tf.prototype,nf=s.DataView,af=nf&&nf.prototype,of=Object.prototype,sf=s.Array,cf=s.RangeError,df=x(Vh),uf=x([].reverse),hf=Gh,ff=Hh,pf=function(e){return[255&e]},lf=function(e){return[255&e,e>>8&255]},gf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},bf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},vf=function(e){return hf(e,23,4)},If=function(e){return hf(e,52,8)},mf=function(e,t){Yh(e.prototype,t,{get:function(){return Xh(this)[t]}})},kf=function(e,t,r,n){var a=Uh(r),i=Xh(e);if(a+t>i.byteLength)throw cf("Wrong index");var o=Xh(i.buffer).bytes,s=a+i.byteOffset,c=nr(o,s,s+t);return n?c:uf(c)},xf=function(e,t,r,n,a,i){var o=Uh(r),s=Xh(e);if(o+t>s.byteLength)throw cf("Wrong index");for(var c=Xh(s.buffer).bytes,d=o+s.byteOffset,u=n(+a),h=0;h<t;h++)c[d+h]=u[i?h:t-h-1]};if(fh){var yf=Kh&&"ArrayBuffer"!==ef.name;if(c((function(){ef(1)}))&&c((function(){new ef(-1)}))&&!c((function(){return new ef,new ef(1.5),new ef(NaN),yf&&!Qh})))yf&&Qh&&Me(ef,"name","ArrayBuffer");else{(tf=function(e){return Bi(this,rf),new ef(Uh(e))}).prototype=rf;for(var wf,Cf=$h(ef),Of=0;Cf.length>Of;)(wf=Cf[Of++])in tf||Me(tf,wf,ef[wf]);rf.constructor=tf}si&&Xa(af)!==of&&si(af,of);var zf=new nf(new tf(2)),Pf=x(af.setInt8);zf.setInt8(0,2147483648),zf.setInt8(1,2147483649),!zf.getInt8(0)&&zf.getInt8(1)||_i(af,{setInt8:function(e,t){Pf(this,e,t<<24>>24)},setUint8:function(e,t){Pf(this,e,t<<24>>24)}},{unsafe:!0})}else rf=(tf=function(e){Bi(this,rf);var t=Uh(e);Zh(this,{bytes:df(sf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,af=(nf=function(e,t,r){Bi(this,af),Bi(e,rf);var n=Xh(e).byteLength,a=st(t);if(a<0||a>n)throw cf("Wrong offset");if(a+(r=void 0===r?n-a:ft(r))>n)throw cf("Wrong length");Zh(this,{buffer:e,byteLength:r,byteOffset:a}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,d&&(mf(tf,"byteLength"),mf(nf,"buffer"),mf(nf,"byteLength"),mf(nf,"byteOffset")),_i(af,{getInt8:function(e){return kf(this,1,e)[0]<<24>>24},getUint8:function(e){return kf(this,1,e)[0]},getInt16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return ff(kf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return ff(kf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){xf(this,1,e,pf,t)},setUint8:function(e,t){xf(this,1,e,pf,t)},setInt16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){xf(this,4,e,vf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){xf(this,8,e,If,t,arguments.length>2?arguments[2]:void 0)}});fr(tf,"ArrayBuffer"),fr(nf,"DataView");var Ef={ArrayBuffer:tf,DataView:nf},qf=Math.floor,jf=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&qf(e)===e},Sf=RangeError,Tf=RangeError,Mf=function(e,t){var r=function(e){var t=st(e);if(t<0)throw Sf("The argument can't be less than 0");return t}(e);if(r%t)throw Tf("Wrong offset");return r},Rf=Th.aTypedArrayConstructor,_f=function(e){var t,r,n,a,i,o,s=Zo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Ni(c);if(p&&!wc(p))for(o=(i=Wi(c,p)).next,c=[];!(a=f(o,i)).done;)c.push(a.value);for(h&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(Rf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},Af=le("species"),Bf=function(e){var t=R(e),r=Te.f;d&&t&&!t[Af]&&r(t,Af,{configurable:!0,get:function(){return this}})};n((function(e){var t=xt.f,r=jr.forEach,n=tt.get,a=tt.set,i=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,h=s.RangeError,p=Ef.ArrayBuffer,l=p.prototype,g=Ef.DataView,v=Th.NATIVE_ARRAY_BUFFER_VIEWS,I=Th.TYPED_ARRAY_TAG,m=Th.TypedArray,k=Th.TypedArrayPrototype,x=Th.aTypedArrayConstructor,y=Th.isTypedArray,w=function(e,t){x(e);for(var r=0,n=t.length,a=new e(n);n>r;)a[r]=t[r++];return a},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return _(l,e)||"ArrayBuffer"==(t=Ft(e))||"SharedArrayBuffer"==t},z=function(e,t){return y(e)&&!G(t)&&t in e&&jf(+t)&&t>=0},P=function(e,t){return t=Ie(t),z(e,t)?b(2,e[t]):c(e,t)},E=function(e,t,r){return t=Ie(t),!(z(e,t)&&T(r)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=P,Te.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:P,defineProperty:E}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",x="get"+e,C="set"+e,z=s[b],P=z,E=P&&P.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),a.view[C](t*l+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Ah&&(P=c((function(e,t,r,n){return Bi(e,E),function(e,t,r){var n,a;return si&&S(n=t.constructor)&&n!==r&&T(a=n.prototype)&&a!==r.prototype&&si(e,a),e}(T(t)?O(t)?void 0!==n?new z(t,Mf(r,l),n):void 0!==r?new z(t,Mf(r,l)):new z(t):y(t)?w(P,t):f(_f,P,t):new z(Uh(t)),e,P)})),si&&si(P,m),r(t(z),(function(e){e in P||Me(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Bi(e,E);var i,o,s,c=0,d=0;if(T(t)){if(!O(t))return y(t)?w(P,t):f(_f,P,t);i=t,d=Mf(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=Uh(t),i=new p(o=s*l);for(a(e,{buffer:i,byteOffset:d,byteLength:o,length:s,view:new g(i)});c<s;)j(e,c++)})),si&&si(P,m),E=P.prototype=Zt(k)),E.constructor!==P&&Me(E,"constructor",P),i(E).TypedArrayConstructor=P,I&&Me(E,I,b);var M=P!=z;q[b]=P,Rt({global:!0,constructor:!0,forced:M,sham:!v},q),"BYTES_PER_ELEMENT"in P||Me(P,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),Bf(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Uf=Math.min,Nf=x([].copyWithin||function(e,t){var r=ne(this),n=pt(r),a=ut(e,n),i=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Uf((void 0===o?n:ut(o,n))-i,n-a),c=1;for(i<a&&a<i+s&&(c=-1,i+=s-1,a+=s-1);s-- >0;)i in r?r[a]=r[i]:Uu(r,a),a+=c,i+=c;return r}),Lf=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("copyWithin",(function(e,t){return Nf(Lf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Wf=jr.every,Df=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("every",(function(e){return Wf(Df(this),e,arguments.length>1?arguments[1]:void 0)}));var Ff=TypeError,Jf=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ff("Can't convert number to bigint");return BigInt(t)},Gf=Th.aTypedArray,Hf=Th.exportTypedArrayMethod,Vf=x("".slice);Hf("fill",(function(e){var t=arguments.length;Gf(this);var r="Big"===Vf(Ft(this),0,3)?Jf(e):+e;return f(Vh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var $f=le("species"),Yf=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[$f])?t:Zo(r)},Kf=Th.aTypedArrayConstructor,Qf=Th.getTypedArrayConstructor,Xf=function(e){return Kf(Yf(e,Qf(e)))},Zf=function(e,t){return function(e,t){for(var r=0,n=pt(t),a=new e(n);n>r;)a[r]=t[r++];return a}(Xf(e),t)},ep=jr.filter,tp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("filter",(function(e){var t=ep(tp(this),e,arguments.length>1?arguments[1]:void 0);return Zf(this,t)}));var rp=jr.find,np=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("find",(function(e){return rp(np(this),e,arguments.length>1?arguments[1]:void 0)}));var ap=jr.findIndex,ip=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("findIndex",(function(e){return ap(ip(this),e,arguments.length>1?arguments[1]:void 0)}));var op=jr.forEach,sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("forEach",(function(e){op(sp(this),e,arguments.length>1?arguments[1]:void 0)}));var cp=gt.includes,dp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("includes",(function(e){return cp(dp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=gt.indexOf,hp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("indexOf",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var fp=le("iterator"),pp=s.Uint8Array,lp=x(Ii.values),gp=x(Ii.keys),bp=x(Ii.entries),vp=Th.aTypedArray,Ip=Th.exportTypedArrayMethod,mp=pp&&pp.prototype,kp=!c((function(){mp[fp].call([1])})),xp=!!mp&&mp.values&&mp[fp]===mp.values&&"values"===mp.values.name,yp=function(){return lp(vp(this))};Ip("entries",(function(){return bp(vp(this))}),kp),Ip("keys",(function(){return gp(vp(this))}),kp),Ip("values",yp,kp||!xp,{name:"values"}),Ip(fp,yp,kp||!xp,{name:"values"});var wp=Th.aTypedArray,Cp=Th.exportTypedArrayMethod,Op=x([].join);Cp("join",(function(e){return Op(wp(this),e)}));var zp=Math.min,Pp=[].lastIndexOf,Ep=!!Pp&&1/[1].lastIndexOf(1,-0)<0,qp=Un("lastIndexOf"),jp=Ep||!qp?function(e){if(Ep)return hn(Pp,this,arguments)||0;var t=j(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=zp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pp,Sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(jp,Sp(this),t>1?[e,arguments[1]]:[e])}));var Tp=jr.map,Mp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("map",(function(e){return Tp(Mp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Xf(e))(t)}))}));var Rp=TypeError,_p=function(e){return function(t,r,n,a){Y(r);var i=ne(t),o=P(i),s=pt(i),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){a=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Rp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(a=r(a,o[c],c,i));return a}},Ap={left:_p(!1),right:_p(!0)},Bp=Ap.left,Up=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Bp(Up(this),e,t,t>1?arguments[1]:void 0)}));var Np=Ap.right,Lp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Np(Lp(this),e,t,t>1?arguments[1]:void 0)}));var Wp=Th.aTypedArray,Dp=Th.exportTypedArrayMethod,Fp=Math.floor;Dp("reverse",(function(){for(var e,t=Wp(this).length,r=Fp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Jp=s.RangeError,Gp=s.Int8Array,Hp=Gp&&Gp.prototype,Vp=Hp&&Hp.set,$p=Th.aTypedArray,Yp=Th.exportTypedArrayMethod,Kp=!c((function(){var e=new Uint8ClampedArray(2);return f(Vp,e,{length:1,0:3},1),3!==e[1]})),Qp=Kp&&Th.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new Gp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Yp("set",(function(e){$p(this);var t=Mf(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Kp)return f(Vp,this,r,t);var n=this.length,a=pt(r),i=0;if(a+t>n)throw Jp("Wrong length");for(;i<a;)this[t+i]=r[i++]}),!Kp||Qp);var Xp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Xp(this),e,t),n=Xf(this),a=0,i=r.length,o=new n(i);i>a;)o[a]=r[a++];return o}),c((function(){new Int8Array(1).slice()})));var Zp=jr.some,el=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("some",(function(e){return Zp(el(this),e,arguments.length>1?arguments[1]:void 0)}));var tl=Th.aTypedArray,rl=Th.exportTypedArrayMethod,nl=s.Uint16Array,al=nl&&x(nl.prototype.sort),il=!(!al||c((function(){al(new nl(2),null)}))&&c((function(){al(new nl(2),{})}))),ol=!!al&&!c((function(){if(W)return W<74;if(Lu)return Lu<67;if(Wu)return!0;if(Fu)return Fu<602;var e,t,r=new nl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(al(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));rl("sort",(function(e){return void 0!==e&&Y(e),ol?al(this,e):$i(tl(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))}),!ol||il);var sl=s.Int8Array,cl=Th.aTypedArray,dl=Th.exportTypedArrayMethod,ul=[].toLocaleString,hl=!!sl&&c((function(){ul.call(new sl(1))}));dl("toLocaleString",(function(){return hn(ul,hl?fn(cl(this)):cl(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new sl([1,2]).toLocaleString()}))||!c((function(){sl.prototype.toLocaleString.call([1,2])})));var fl=Th.exportTypedArrayMethod,pl=s.Uint8Array,ll=pl&&pl.prototype||{},gl=[].toString,bl=x([].join);c((function(){gl.call({})}))&&(gl=function(){return bl(this)});var vl=ll.toString!=gl;fl("toString",gl,vl);var Il,ml,kl,xl,yl="process"==C(s.process),wl=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),Cl=s.setImmediate,Ol=s.clearImmediate,zl=s.process,Pl=s.Dispatch,El=s.Function,ql=s.MessageChannel,jl=s.String,Sl=0,Tl={};try{Il=s.location}catch(e){}var Ml=function(e){if(ie(Tl,e)){var t=Tl[e];delete Tl[e],t()}},Rl=function(e){return function(){Ml(e)}},_l=function(e){Ml(e.data)},Al=function(e){s.postMessage(jl(e),Il.protocol+"//"+Il.host)};Cl&&Ol||(Cl=function(e){Fi(arguments.length,1);var t=S(e)?e:El(e),r=fn(arguments,1);return Tl[++Sl]=function(){hn(t,void 0,r)},ml(Sl),Sl},Ol=function(e){delete Tl[e]},yl?ml=function(e){zl.nextTick(Rl(e))}:Pl&&Pl.now?ml=function(e){Pl.now(Rl(e))}:ql&&!wl?(xl=(kl=new ql).port2,kl.port1.onmessage=_l,ml=lr(xl.postMessage,xl)):s.addEventListener&&S(s.postMessage)&&!s.importScripts&&Il&&"file:"!==Il.protocol&&!c(Al)?(ml=Al,s.addEventListener("message",_l,!1)):ml="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),Ml(e)}}:function(e){setTimeout(Rl(e),0)});var Bl,Ul,Nl,Ll,Wl,Dl,Fl,Jl,Gl={set:Cl,clear:Ol},Hl=/ipad|iphone|ipod/i.test(A)&&void 0!==s.Pebble,Vl=/web0s(?!.*chrome)/i.test(A),$l=Ce.f,Yl=Gl.set,Kl=s.MutationObserver||s.WebKitMutationObserver,Ql=s.document,Xl=s.process,Zl=s.Promise,eg=$l(s,"queueMicrotask"),tg=eg&&eg.value;tg||(Bl=function(){var e,t;for(yl&&(e=Xl.domain)&&e.exit();Ul;){t=Ul.fn,Ul=Ul.next;try{t()}catch(e){throw Ul?Ll():Nl=void 0,e}}Nl=void 0,e&&e.enter()},wl||yl||Vl||!Kl||!Ql?!Hl&&Zl&&Zl.resolve?((Fl=Zl.resolve(void 0)).constructor=Zl,Jl=lr(Fl.then,Fl),Ll=function(){Jl(Bl)}):yl?Ll=function(){Xl.nextTick(Bl)}:(Yl=lr(Yl,s),Ll=function(){Yl(Bl)}):(Wl=!0,Dl=Ql.createTextNode(""),new Kl(Bl).observe(Dl,{characterData:!0}),Ll=function(){Dl.data=Wl=!Wl}));var rg=tg||function(e){var t={fn:e,next:void 0};Nl&&(Nl.next=t),Ul||(Ul=t,Ll()),Nl=t},ng=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ag=function(){this.head=null,this.tail=null};ag.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 ig=ag,og=s.Promise,sg="object"==typeof window&&"object"!=typeof Deno;og&&og.prototype;var cg,dg,ug,hg=le("species"),fg=!1,pg=S(s.PromiseRejectionEvent),lg={CONSTRUCTOR:Tt("Promise",(function(){var e=De(og),t=e!==String(og);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new og((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[hg]=n,!(fg=r.then((function(){}))instanceof n)||!t&&sg&&!pg})),REJECTION_EVENT:pg,SUBCLASSING:fg},gg=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=Y(t),this.reject=Y(r)},bg={f:function(e){return new gg(e)}},vg=Gl.set,Ig=lg.CONSTRUCTOR,mg=lg.REJECTION_EVENT,kg=lg.SUBCLASSING,xg=tt.getterFor("Promise"),yg=tt.set,wg=og&&og.prototype,Cg=og,Og=wg,zg=s.TypeError,Pg=s.document,Eg=s.process,qg=bg.f,jg=qg,Sg=!!(Pg&&Pg.createEvent&&s.dispatchEvent),Tg=function(e){var t;return!(!T(e)||!S(t=e.then))&&t},Mg=function(e,t){var r,n,a,i=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&&Ug(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),a=!0)),r===e.promise?d(zg("Promise-chain cycle")):(n=Tg(r))?f(n,r,c,d):c(r)):d(i)}catch(e){u&&!a&&u.exit(),d(e)}},Rg=function(e,t){e.notified||(e.notified=!0,rg((function(){for(var r,n=e.reactions;r=n.get();)Mg(r,e);e.notified=!1,t&&!e.rejection&&Ag(e)})))},_g=function(e,t,r){var n,a;Sg?((n=Pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!mg&&(a=s["on"+e])?a(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Ag=function(e){f(vg,s,(function(){var t,r=e.facade,n=e.value;if(Bg(e)&&(t=ng((function(){yl?Eg.emit("unhandledRejection",n,r):_g("unhandledrejection",r,n)})),e.rejection=yl||Bg(e)?2:1,t.error))throw t.value}))},Bg=function(e){return 1!==e.rejection&&!e.parent},Ug=function(e){f(vg,s,(function(){var t=e.facade;yl?Eg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Ng=function(e,t,r){return function(n){e(t,n,r)}},Lg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Rg(e,!0))},Wg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw zg("Promise can't be resolved itself");var n=Tg(t);n?rg((function(){var r={done:!1};try{f(n,t,Ng(Wg,r,e),Ng(Lg,r,e))}catch(t){Lg(r,t,e)}})):(e.value=t,e.state=1,Rg(e,!1))}catch(t){Lg({done:!1},t,e)}}};if(Ig&&(Og=(Cg=function(e){Bi(this,Og),Y(e),f(cg,this);var t=xg(this);try{e(Ng(Wg,t),Ng(Lg,t))}catch(e){Lg(t,e)}}).prototype,(cg=function(e){yg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ig,rejection:!1,state:0,value:void 0})}).prototype=nt(Og,"then",(function(e,t){var r=xg(this),n=qg(Yf(this,Cg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=yl?Eg.domain:void 0,0==r.state?r.reactions.add(n):rg((function(){Mg(n,r)})),n.promise})),dg=function(){var e=new cg,t=xg(e);this.promise=e,this.resolve=Ng(Wg,t),this.reject=Ng(Lg,t)},bg.f=qg=function(e){return e===Cg||void 0===e?new dg(e):jg(e)},S(og)&&wg!==Object.prototype)){ug=wg.then,kg||nt(wg,"then",(function(e,t){var r=this;return new Cg((function(e,t){f(ug,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete wg.constructor}catch(e){}si&&si(wg,Og)}Rt({global:!0,constructor:!0,wrap:!0,forced:Ig},{Promise:Cg}),fr(Cg,"Promise",!1),Bf("Promise");var Dg=TypeError,Fg=function(e,t){this.stopped=e,this.result=t},Jg=Fg.prototype,Gg=function(e,t,r){var n,a,i,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=lr(t,u),v=function(e){return n&&mc(n,"normal",e),new Fg(!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(!(a=Ni(e)))throw Dg(V(e)+" is not iterable");if(wc(a)){for(i=0,o=pt(e);o>i;i++)if((s=I(e[i]))&&_(Jg,s))return s;return new Fg(!1)}n=Wi(e,a)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){mc(n,"throw",e)}if("object"==typeof s&&s&&_(Jg,s))return s}return new Fg(!1)},Hg=lg.CONSTRUCTOR||!hh((function(e){og.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Hg},{all:function(e){var t=this,r=bg.f(t),n=r.resolve,a=r.reject,i=ng((function(){var r=Y(t.resolve),i=[],o=0,s=1;Gg(e,(function(e){var c=o++,d=!1;s++,f(r,t,e).then((function(e){d||(d=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise}});var Vg=lg.CONSTRUCTOR,$g=og&&og.prototype;if(Rt({target:"Promise",proto:!0,forced:Vg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(og)){var Yg=R("Promise").prototype.catch;$g.catch!==Yg&&nt($g,"catch",Yg,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Hg},{race:function(e){var t=this,r=bg.f(t),n=r.reject,a=ng((function(){var a=Y(t.resolve);Gg(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:lg.CONSTRUCTOR},{reject:function(e){var t=bg.f(this);return f(t.reject,void 0,e),t.promise}});var Kg=lg.CONSTRUCTOR;function Qg(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 Xg(e){return function(e){if(Array.isArray(e))return Qg(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 Qg(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)?Qg(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 Zg(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 eb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zg(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Kg},{resolve:function(e){return function(e,t){if(Ee(e),T(t)&&t.constructor===e)return t;var r=bg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Gg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var tb=Wo?btoa:function(e){return Buffer.from(e).toString("base64")},rb=function(e){var t,r,n=new URL(e),a=new URLSearchParams(n.search),i=null!==(t=a.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=a.get("code"))&&void 0!==r?r:"",usid:i}},nb=function(){return t.nanoid(128)},ab=function(){var e=da(Na.mark((function e(t){var r,n,a,i,o,s,c;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Wo||!window.crypto){e.next=12;break}return a=new TextEncoder,i=a.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,Xg(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 ib(e,t,r){return ob.apply(this,arguments)}function ob(){return(ob=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ab(r);case 2:return i=e.sent,(o=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),s={parameters:eb(eb({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:i},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===(a=c.headers)||void 0===a?void 0:a.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new ws(c);case 14:return e.abrupt("return",eb({url:d},rb(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sb(){return(sb=da(Na.mark((function e(t,r,n){var a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Basic ".concat(tb("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),i={headers:{Authorization:a},body:eb({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(i));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cb(){return(cb=da(Na.mark((function e(t,r){var n,a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nb(),e.next=3,ib(t,n,eb({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return a=e.sent,i={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:a.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:a.usid},e.abrupt("return",t.getAccessToken({body:i}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function db(){return(db=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h,f,p,l,g,b,v;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=nb(),e.next=3,ab(i);case 3:return o=e.sent,(s=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),c="Basic ".concat(tb("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:eb({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(a=u.headers)||void 0===a?void 0:a.get("location"))||u.url,f=new URL(h),p=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new ws(u);case 16:if(l=rb(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:i,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},!r.clientSecret){e.next=22;break}return b="Basic ".concat(tb("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:b},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ub=Object.freeze({__proto__:null,isBrowser:Wo,isNode:Do,globalObject:Fo,hasFetchAvailable:Jo,fetch:Go,stringToBase64:tb,getCodeAndUsidFromUrl:rb,createCodeVerifier:nb,generateCodeChallenge:ab,authorize:ib,loginGuestUserPrivate:function(e,t,r){return sb.apply(this,arguments)},loginGuestUser:function(e,t){return cb.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return db.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var a={headers:{Authorization:"Basic ".concat(tb("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(a)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=No,e.ShopperBaskets=du,e.ShopperContexts=fu,e.ShopperCustomers=gu,e.ShopperDiscoverySearch=Iu,e.ShopperExperience=xu,e.ShopperGiftCertificates=Cu,e.ShopperLogin=Pu,e.ShopperOrders=ju,e.ShopperProducts=Mu,e.ShopperPromotions=Au,e.ShopperSearch=Zu,e.ShopperSeo=rh,e.TemplateURL=iu,e.helpers=ub,Object.defineProperty(e,"__esModule",{value:!0})}));