commerce-sdk-isomorphic 1.4.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +83 -66
- package/lib/index.cjs.d.ts +6021 -4398
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +6021 -4398
- package/lib/index.esm.js +1 -1
- package/package.json +52 -38
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Request as e,fetch as r}from"cross-fetch";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,r,t){return e(t={path:r,exports:{},require:function(e,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==r&&t.path)}},t.exports),t.exports}var i=function(e){return e&&e.Math==Math&&e},a=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},s=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u={f:c&&!d.call({1:2},1)?function(e){var r=c(this,e);return!!r&&r.enumerable}:d},f=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}},h={}.toString,l=function(e){return h.call(e).slice(8,-1)},p="".split,g=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==l(e)?p.call(e,""):Object(e)}:Object,b=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},I=function(e){return g(b(e))},v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},m=function(e,r){if(!v(e))return e;var t,n;if(r&&"function"==typeof(t=e.toString)&&!v(n=t.call(e)))return n;if("function"==typeof(t=e.valueOf)&&!v(n=t.call(e)))return n;if(!r&&"function"==typeof(t=e.toString)&&!v(n=t.call(e)))return n;throw TypeError("Can't convert object to primitive value")},k={}.hasOwnProperty,x=function(e,r){return k.call(e,r)},y=a.document,w=v(y)&&v(y.createElement),z=function(e){return w?y.createElement(e):{}},C=!s&&!o((function(){return 7!=Object.defineProperty(z("div"),"a",{get:function(){return 7}}).a})),q=Object.getOwnPropertyDescriptor,E={f:s?q:function(e,r){if(e=I(e),r=m(r,!0),C)try{return q(e,r)}catch(e){}if(x(e,r))return f(!u.f.call(e,r),e[r])}},P=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},O=Object.defineProperty,j={f:s?O:function(e,r,t){if(P(e),r=m(r,!0),P(t),C)try{return O(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e}},S=s?function(e,r,t){return j.f(e,r,f(1,t))}:function(e,r,t){return e[r]=t,e},M=function(e,r){try{S(a,e,r)}catch(t){a[e]=r}return r},T=a["__core-js_shared__"]||M("__core-js_shared__",{}),U=Function.toString;"function"!=typeof T.inspectSource&&(T.inspectSource=function(e){return U.call(e)});var R,L,A,_=T.inspectSource,N=a.WeakMap,B="function"==typeof N&&/native code/.test(_(N)),D=n((function(e){(e.exports=function(e,r){return T[e]||(T[e]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),F=0,G=Math.random(),$=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++F+G).toString(36)},H=D("keys"),V=function(e){return H[e]||(H[e]=$(e))},Y={},W=a.WeakMap;if(B){var J=new W,K=J.get,Q=J.has,X=J.set;R=function(e,r){return X.call(J,e,r),r},L=function(e){return K.call(J,e)||{}},A=function(e){return Q.call(J,e)}}else{var Z=V("state");Y[Z]=!0,R=function(e,r){return S(e,Z,r),r},L=function(e){return x(e,Z)?e[Z]:{}},A=function(e){return x(e,Z)}}var ee={set:R,get:L,has:A,enforce:function(e){return A(e)?L(e):R(e,{})},getterFor:function(e){return function(r){var t;if(!v(r)||(t=L(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}}},re=n((function(e){var r=ee.get,t=ee.enforce,n=String(String).split("String");(e.exports=function(e,r,i,o){var s=!!o&&!!o.unsafe,d=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof r||x(i,"name")||S(i,"name",r),t(i).source=n.join("string"==typeof r?r:"")),e!==a?(s?!c&&e[r]&&(d=!0):delete e[r],d?e[r]=i:S(e,r,i)):d?e[r]=i:M(r,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&r(this).source||_(this)}))})),te=a,ne=function(e){return"function"==typeof e?e:void 0},ie=function(e,r){return arguments.length<2?ne(te[e])||ne(a[e]):te[e]&&te[e][r]||a[e]&&a[e][r]},ae=Math.ceil,oe=Math.floor,se=function(e){return isNaN(e=+e)?0:(e>0?oe:ae)(e)},de=Math.min,ce=function(e){return e>0?de(se(e),9007199254740991):0},ue=Math.max,fe=Math.min,he=function(e){return function(r,t,n){var i,a=I(r),o=ce(a.length),s=function(e,r){var t=se(e);return t<0?ue(t+r,0):fe(t,r)}(n,o);if(e&&t!=t){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===t)return e||s||0;return!e&&-1}},le={includes:he(!0),indexOf:he(!1)}.indexOf,pe=function(e,r){var t,n=I(e),i=0,a=[];for(t in n)!x(Y,t)&&x(n,t)&&a.push(t);for(;r.length>i;)x(n,t=r[i++])&&(~le(a,t)||a.push(t));return a},ge=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=ge.concat("length","prototype"),Ie={f:Object.getOwnPropertyNames||function(e){return pe(e,be)}},ve={f:Object.getOwnPropertySymbols},me=ie("Reflect","ownKeys")||function(e){var r=Ie.f(P(e)),t=ve.f;return t?r.concat(t(e)):r},ke=function(e,r){for(var t=me(r),n=j.f,i=E.f,a=0;a<t.length;a++){var o=t[a];x(e,o)||n(e,o,i(r,o))}},xe=/#|\.prototype\./,ye=function(e,r){var t=ze[we(e)];return t==qe||t!=Ce&&("function"==typeof r?o(r):!!r)},we=ye.normalize=function(e){return String(e).replace(xe,".").toLowerCase()},ze=ye.data={},Ce=ye.NATIVE="N",qe=ye.POLYFILL="P",Ee=ye,Pe=E.f,Oe=function(e,r){var t,n,i,o,s,d=e.target,c=e.global,u=e.stat;if(t=c?a:u?a[d]||M(d,{}):(a[d]||{}).prototype)for(n in r){if(o=r[n],i=e.noTargetGet?(s=Pe(t,n))&&s.value:t[n],!Ee(c?n:d+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;ke(o,i)}(e.sham||i&&i.sham)&&S(o,"sham",!0),re(t,n,o,e)}},je=function(e){return Object(b(e))},Se=Object.keys||function(e){return pe(e,ge)},Me=o((function(){Se(1)}));Oe({target:"Object",stat:!0,forced:Me},{keys:function(e){return Se(je(e))}});var Te,Ue=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Re=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Le=Array.isArray||function(e){return"Array"==l(e)},Ae=s?Object.defineProperties:function(e,r){P(e);for(var t,n=Se(r),i=n.length,a=0;i>a;)j.f(e,t=n[a++],r[t]);return e},_e=ie("document","documentElement"),Ne=V("IE_PROTO"),Be=function(){},De=function(e){return"<script>"+e+"<\/script>"},Fe=function(){try{Te=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,r;Fe=Te?function(e){e.write(De("")),e.close();var r=e.parentWindow.Object;return e=null,r}(Te):((r=z("iframe")).style.display="none",_e.appendChild(r),r.src=String("javascript:"),(e=r.contentWindow.document).open(),e.write(De("document.F=Object")),e.close(),e.F);for(var t=ge.length;t--;)delete Fe.prototype[ge[t]];return Fe()};Y[Ne]=!0;var Ge=Object.create||function(e,r){var t;return null!==e?(Be.prototype=P(e),t=new Be,Be.prototype=null,t[Ne]=e):t=Fe(),void 0===r?t:Ae(t,r)},$e=Ie.f,He={}.toString,Ve="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ye={f:function(e){return Ve&&"[object Window]"==He.call(e)?function(e){try{return $e(e)}catch(e){return Ve.slice()}}(e):$e(I(e))}},We=D("wks"),Je=a.Symbol,Ke=Re?Je:Je&&Je.withoutSetter||$,Qe=function(e){return x(We,e)||(Ue&&x(Je,e)?We[e]=Je[e]:We[e]=Ke("Symbol."+e)),We[e]},Xe={f:Qe},Ze=j.f,er=j.f,rr=Qe("toStringTag"),tr=function(e,r,t){e&&!x(e=t?e:e.prototype,rr)&&er(e,rr,{configurable:!0,value:r})},nr=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},ir=function(e,r,t){if(nr(e),void 0===r)return e;switch(t){case 0:return function(){return e.call(r)};case 1:return function(t){return e.call(r,t)};case 2:return function(t,n){return e.call(r,t,n)};case 3:return function(t,n,i){return e.call(r,t,n,i)}}return function(){return e.apply(r,arguments)}},ar=Qe("species"),or=function(e,r){var t;return Le(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!Le(t.prototype)?v(t)&&null===(t=t[ar])&&(t=void 0):t=void 0),new(void 0===t?Array:t)(0===r?0:r)},sr=[].push,dr=function(e){var r=1==e,t=2==e,n=3==e,i=4==e,a=6==e,o=5==e||a;return function(s,d,c,u){for(var f,h,l=je(s),p=g(l),b=ir(d,c,3),I=ce(p.length),v=0,m=u||or,k=r?m(s,I):t?m(s,0):void 0;I>v;v++)if((o||v in p)&&(h=b(f=p[v],v,l),e))if(r)k[v]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:sr.call(k,f)}else if(i)return!1;return a?-1:n||i?i:k}},cr={forEach:dr(0),map:dr(1),filter:dr(2),some:dr(3),every:dr(4),find:dr(5),findIndex:dr(6)},ur=cr.forEach,fr=V("hidden"),hr=Qe("toPrimitive"),lr=ee.set,pr=ee.getterFor("Symbol"),gr=Object.prototype,br=a.Symbol,Ir=ie("JSON","stringify"),vr=E.f,mr=j.f,kr=Ye.f,xr=u.f,yr=D("symbols"),wr=D("op-symbols"),zr=D("string-to-symbol-registry"),Cr=D("symbol-to-string-registry"),qr=D("wks"),Er=a.QObject,Pr=!Er||!Er.prototype||!Er.prototype.findChild,Or=s&&o((function(){return 7!=Ge(mr({},"a",{get:function(){return mr(this,"a",{value:7}).a}})).a}))?function(e,r,t){var n=vr(gr,r);n&&delete gr[r],mr(e,r,t),n&&e!==gr&&mr(gr,r,n)}:mr,jr=function(e,r){var t=yr[e]=Ge(br.prototype);return lr(t,{type:"Symbol",tag:e,description:r}),s||(t.description=r),t},Sr=Re?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof br},Mr=function(e,r,t){e===gr&&Mr(wr,r,t),P(e);var n=m(r,!0);return P(t),x(yr,n)?(t.enumerable?(x(e,fr)&&e[fr][n]&&(e[fr][n]=!1),t=Ge(t,{enumerable:f(0,!1)})):(x(e,fr)||mr(e,fr,f(1,{})),e[fr][n]=!0),Or(e,n,t)):mr(e,n,t)},Tr=function(e,r){P(e);var t=I(r),n=Se(t).concat(Ar(t));return ur(n,(function(r){s&&!Ur.call(t,r)||Mr(e,r,t[r])})),e},Ur=function(e){var r=m(e,!0),t=xr.call(this,r);return!(this===gr&&x(yr,r)&&!x(wr,r))&&(!(t||!x(this,r)||!x(yr,r)||x(this,fr)&&this[fr][r])||t)},Rr=function(e,r){var t=I(e),n=m(r,!0);if(t!==gr||!x(yr,n)||x(wr,n)){var i=vr(t,n);return!i||!x(yr,n)||x(t,fr)&&t[fr][n]||(i.enumerable=!0),i}},Lr=function(e){var r=kr(I(e)),t=[];return ur(r,(function(e){x(yr,e)||x(Y,e)||t.push(e)})),t},Ar=function(e){var r=e===gr,t=kr(r?wr:I(e)),n=[];return ur(t,(function(e){!x(yr,e)||r&&!x(gr,e)||n.push(yr[e])})),n};if(Ue||(re((br=function(){if(this instanceof br)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=$(e),t=function(e){this===gr&&t.call(wr,e),x(this,fr)&&x(this[fr],r)&&(this[fr][r]=!1),Or(this,r,f(1,e))};return s&&Pr&&Or(gr,r,{configurable:!0,set:t}),jr(r,e)}).prototype,"toString",(function(){return pr(this).tag})),re(br,"withoutSetter",(function(e){return jr($(e),e)})),u.f=Ur,j.f=Mr,E.f=Rr,Ie.f=Ye.f=Lr,ve.f=Ar,Xe.f=function(e){return jr(Qe(e),e)},s&&(mr(br.prototype,"description",{configurable:!0,get:function(){return pr(this).description}}),re(gr,"propertyIsEnumerable",Ur,{unsafe:!0}))),Oe({global:!0,wrap:!0,forced:!Ue,sham:!Ue},{Symbol:br}),ur(Se(qr),(function(e){!function(e){var r=te.Symbol||(te.Symbol={});x(r,e)||Ze(r,e,{value:Xe.f(e)})}(e)})),Oe({target:"Symbol",stat:!0,forced:!Ue},{for:function(e){var r=String(e);if(x(zr,r))return zr[r];var t=br(r);return zr[r]=t,Cr[t]=r,t},keyFor:function(e){if(!Sr(e))throw TypeError(e+" is not a symbol");if(x(Cr,e))return Cr[e]},useSetter:function(){Pr=!0},useSimple:function(){Pr=!1}}),Oe({target:"Object",stat:!0,forced:!Ue,sham:!s},{create:function(e,r){return void 0===r?Ge(e):Tr(Ge(e),r)},defineProperty:Mr,defineProperties:Tr,getOwnPropertyDescriptor:Rr}),Oe({target:"Object",stat:!0,forced:!Ue},{getOwnPropertyNames:Lr,getOwnPropertySymbols:Ar}),Oe({target:"Object",stat:!0,forced:o((function(){ve.f(1)}))},{getOwnPropertySymbols:function(e){return ve.f(je(e))}}),Ir){var _r=!Ue||o((function(){var e=br();return"[null]"!=Ir([e])||"{}"!=Ir({a:e})||"{}"!=Ir(Object(e))}));Oe({target:"JSON",stat:!0,forced:_r},{stringify:function(e,r,t){for(var n,i=[e],a=1;arguments.length>a;)i.push(arguments[a++]);if(n=r,(v(r)||void 0!==e)&&!Sr(e))return Le(r)||(r=function(e,r){if("function"==typeof n&&(r=n.call(this,e,r)),!Sr(r))return r}),i[1]=r,Ir.apply(null,i)}})}br.prototype[hr]||S(br.prototype,hr,br.prototype.valueOf),tr(br,"Symbol"),Y[fr]=!0;var Nr,Br,Dr=ie("navigator","userAgent")||"",Fr=a.process,Gr=Fr&&Fr.versions,$r=Gr&&Gr.v8;$r?Br=(Nr=$r.split("."))[0]+Nr[1]:Dr&&(!(Nr=Dr.match(/Edge\/(\d+)/))||Nr[1]>=74)&&(Nr=Dr.match(/Chrome\/(\d+)/))&&(Br=Nr[1]);var Hr=Br&&+Br,Vr=Qe("species"),Yr=function(e){return Hr>=51||!o((function(){var r=[];return(r.constructor={})[Vr]=function(){return{foo:1}},1!==r[e](Boolean).foo}))},Wr=Object.defineProperty,Jr={},Kr=function(e){throw e},Qr=function(e,r){if(x(Jr,e))return Jr[e];r||(r={});var t=[][e],n=!!x(r,"ACCESSORS")&&r.ACCESSORS,i=x(r,0)?r[0]:Kr,a=x(r,1)?r[1]:void 0;return Jr[e]=!!t&&!o((function(){if(n&&!s)return!0;var e={length:-1};n?Wr(e,1,{enumerable:!0,get:Kr}):e[1]=1,t.call(e,i,a)}))},Xr=cr.filter,Zr=Yr("filter"),et=Qr("filter");Oe({target:"Array",proto:!0,forced:!Zr||!et},{filter:function(e){return Xr(this,e,arguments.length>1?arguments[1]:void 0)}});var rt={};rt[Qe("toStringTag")]="z";var tt="[object z]"===String(rt),nt=Qe("toStringTag"),it="Arguments"==l(function(){return arguments}()),at=tt?l:function(e){var r,t,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,r){try{return e[r]}catch(e){}}(r=Object(e),nt))?t:it?l(r):"Object"==(n=l(r))&&"function"==typeof r.callee?"Arguments":n},ot=tt?{}.toString:function(){return"[object "+at(this)+"]"};tt||re(Object.prototype,"toString",ot,{unsafe:!0});var st=E.f,dt=o((function(){st(1)}));Oe({target:"Object",stat:!0,forced:!s||dt,sham:!s},{getOwnPropertyDescriptor:function(e,r){return st(I(e),r)}});var ct={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},ut=function(e,r){var t=[][e];return!!t&&o((function(){t.call(null,r||function(){throw 1},1)}))},ft=cr.forEach,ht=ut("forEach"),lt=Qr("forEach"),pt=ht&<?[].forEach:function(e){return ft(this,e,arguments.length>1?arguments[1]:void 0)};for(var gt in ct){var bt=a[gt],It=bt&&bt.prototype;if(It&&It.forEach!==pt)try{S(It,"forEach",pt)}catch(e){It.forEach=pt}}var vt=function(e,r,t){var n=m(r);n in e?j.f(e,n,f(0,t)):e[n]=t};Oe({target:"Object",stat:!0,sham:!s},{getOwnPropertyDescriptors:function(e){for(var r,t,n=I(e),i=E.f,a=me(n),o={},s=0;a.length>s;)void 0!==(t=i(n,r=a[s++]))&&vt(o,r,t);return o}});var mt=[].join,kt=g!=Object,xt=ut("join",",");Oe({target:"Array",proto:!0,forced:kt||!xt},{join:function(e){return mt.call(I(this),void 0===e?",":e)}});var yt=function(){var e=P(this),r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r},wt=RegExp.prototype,zt=wt.toString,Ct=o((function(){return"/a/b"!=zt.call({source:"a",flags:"b"})})),qt="toString"!=zt.name;function Et(e,r,t,n,i,a,o){try{var s=e[a](o),d=s.value}catch(e){return void t(e)}s.done?r(d):Promise.resolve(d).then(n,i)}function Pt(e){return function(){var r=this,t=arguments;return new Promise((function(n,i){var a=e.apply(r,t);function o(e){Et(a,n,i,o,s,"next",e)}function s(e){Et(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Ot(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function jt(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function St(e,r,t){return r&&jt(e.prototype,r),t&&jt(e,t),e}function Mt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}(Ct||qt)&&re(RegExp.prototype,"toString",(function(){var e=P(this),r=String(e.source),t=e.flags;return"/"+r+"/"+String(void 0===t&&e instanceof RegExp&&!("flags"in wt)?yt.call(e):t)}),{unsafe:!0});var Tt=Object.prototype,Ut=Tt.hasOwnProperty,Rt="function"==typeof Symbol?Symbol:{},Lt=Rt.iterator||"@@iterator",At=Rt.asyncIterator||"@@asyncIterator",_t=Rt.toStringTag||"@@toStringTag";function Nt(e,r,t,n){var i=r&&r.prototype instanceof Ft?r:Ft,a=Object.create(i.prototype),o=new rn(n||[]);return a._invoke=function(e,r,t){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return nn()}for(t.method=i,t.arg=a;;){var o=t.delegate;if(o){var s=Xt(o,t);if(s){if(s===Dt)continue;return s}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===n)throw n="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);n="executing";var d=Bt(e,r,t);if("normal"===d.type){if(n=t.done?"completed":"suspendedYield",d.arg===Dt)continue;return{value:d.arg,done:t.done}}"throw"===d.type&&(n="completed",t.method="throw",t.arg=d.arg)}}}(e,t,o),a}function Bt(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}var Dt={};function Ft(){}function Gt(){}function $t(){}var Ht={};Ht[Lt]=function(){return this};var Vt=Object.getPrototypeOf,Yt=Vt&&Vt(Vt(tn([])));Yt&&Yt!==Tt&&Ut.call(Yt,Lt)&&(Ht=Yt);var Wt=$t.prototype=Ft.prototype=Object.create(Ht);function Jt(e){["next","throw","return"].forEach((function(r){e[r]=function(e){return this._invoke(r,e)}}))}function Kt(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===Gt||"GeneratorFunction"===(r.displayName||r.name))}function Qt(e,r){var t;this._invoke=function(n,i){function a(){return new r((function(t,a){!function t(n,i,a,o){var s=Bt(e[n],e,i);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&Ut.call(c,"__await")?r.resolve(c.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):r.resolve(c).then((function(e){d.value=e,a(d)}),(function(e){return t("throw",e,a,o)}))}o(s.arg)}(n,i,t,a)}))}return t=t?t.then(a,a):a()}}function Xt(e,r){var t=e.iterator[r.method];if(void 0===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=void 0,Xt(e,r),"throw"===r.method))return Dt;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return Dt}var n=Bt(t,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,Dt;var i=n.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,Dt):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,Dt)}function Zt(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function en(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function rn(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Zt,this),this.reset(!0)}function tn(e){if(e){var r=e[Lt];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var t=-1,n=function r(){for(;++t<e.length;)if(Ut.call(e,t))return r.value=e[t],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:nn}}function nn(){return{value:void 0,done:!0}}Gt.prototype=Wt.constructor=$t,$t.constructor=Gt,$t[_t]=Gt.displayName="GeneratorFunction",Jt(Qt.prototype),Qt.prototype[At]=function(){return this},Jt(Wt),Wt[_t]="Generator",Wt[Lt]=function(){return this},Wt.toString=function(){return"[object Generator]"},rn.prototype={constructor:rn,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(en),!e)for(var r in this)"t"===r.charAt(0)&&Ut.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function t(t,n){return a.type="throw",a.arg=e,r.next=t,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=Ut.call(i,"catchLoc"),s=Ut.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc<=this.prev&&Ut.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,Dt):this.complete(a)},complete:function(e,r){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&&r&&(this.next=r),Dt},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),en(t),Dt}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var i=n.arg;en(t)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,t){return this.delegate={iterator:tn(e),resultName:r,nextLoc:t},"next"===this.method&&(this.arg=void 0),Dt}};var an={wrap:Nt,isGeneratorFunction:Kt,AsyncIterator:Qt,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,$t):(e.__proto__=$t,_t in e||(e[_t]="GeneratorFunction")),e.prototype=Object.create(Wt),e},awrap:function(e){return{__await:e}},async:function(e,r,t,n,i){void 0===i&&(i=Promise);var a=new Qt(Nt(e,r,t,n),i);return Kt(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var r=[];for(var t in e)r.push(t);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},values:tn},on=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sn=V("IE_PROTO"),dn=Object.prototype,cn=on?Object.getPrototypeOf:function(e){return e=je(e),x(e,sn)?e[sn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?dn:null},un=o((function(){cn(1)}));function fn(e){return(fn="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)}function hn(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ln(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hn(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hn(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Oe({target:"Object",stat:!0,forced:un,sham:!on},{getPrototypeOf:function(e){return cn(je(e))}});var pn=function e(r){if(Ot(this,e),Mt(this,"baseUri",void 0),Mt(this,"proxy",void 0),Mt(this,"headers",void 0),Mt(this,"parameters",void 0),Mt(this,"fetchOptions",void 0),Mt(this,"transformRequest",void 0),this.headers=ln({},r.headers),this.parameters=ln({},r.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=ln({},r.fetchOptions),this.transformRequest=r.transformRequest||e.defaults.transformRequest,r.baseUri&&(this.baseUri=r.baseUri),r.proxy&&(this.proxy=r.proxy)};Mt(pn,"defaults",{transformRequest:function(e,r){if(null==e||"object"!==fn(e))return e;var t=Object.getPrototypeOf(e);return Array.isArray(e)||t===Object.prototype||null===t?(r["Content-Type"]="application/json",JSON.stringify(e)):e}});var gn=[].slice,bn={},In=function(e,r,t){if(!(r in bn)){for(var n=[],i=0;i<r;i++)n[i]="a["+i+"]";bn[r]=Function("C,a","return new C("+n.join(",")+")")}return bn[r](e,t)},vn=Function.bind||function(e){var r=nr(this),t=gn.call(arguments,1),n=function(){var i=t.concat(gn.call(arguments));return this instanceof n?In(r,i.length,i):r.apply(e,i)};return v(r.prototype)&&(n.prototype=r.prototype),n},mn=ie("Reflect","construct"),kn=o((function(){function e(){}return!(mn((function(){}),[],e)instanceof e)})),xn=!o((function(){mn((function(){}))})),yn=kn||xn;function wn(e,r){return RegExp(e,r)}Oe({target:"Reflect",stat:!0,forced:yn,sham:yn},{construct:function(e,r){nr(e),P(r);var t=arguments.length<3?e:nr(arguments[2]);if(xn&&!kn)return mn(e,r,t);if(e==t){switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3])}var n=[null];return n.push.apply(n,r),new(vn.apply(e,n))}var i=t.prototype,a=Ge(v(i)?i:Object.prototype),o=Function.apply.call(e,a,r);return v(o)?o:a}});var zn,Cn,qn={UNSUPPORTED_Y:o((function(){var e=wn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:o((function(){var e=wn("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},En=RegExp.prototype.exec,Pn=String.prototype.replace,On=En,jn=(zn=/a/,Cn=/b*/g,En.call(zn,"a"),En.call(Cn,"a"),0!==zn.lastIndex||0!==Cn.lastIndex),Sn=qn.UNSUPPORTED_Y||qn.BROKEN_CARET,Mn=void 0!==/()??/.exec("")[1];(jn||Mn||Sn)&&(On=function(e){var r,t,n,i,a=this,o=Sn&&a.sticky,s=yt.call(a),d=a.source,c=0,u=e;return o&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),u=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(d="(?: "+d+")",u=" "+u,c++),t=new RegExp("^(?:"+d+")",s)),Mn&&(t=new RegExp("^"+d+"$(?!\\s)",s)),jn&&(r=a.lastIndex),n=En.call(o?t:a,u),o?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=a.lastIndex,a.lastIndex+=n[0].length):a.lastIndex=0:jn&&n&&(a.lastIndex=a.global?n.index+n[0].length:r),Mn&&n&&n.length>1&&Pn.call(n[0],t,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var Tn=On;Oe({target:"RegExp",proto:!0,forced:/./.exec!==Tn},{exec:Tn});var Un=Qe("species"),Rn=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Ln="$0"==="a".replace(/./,"$0"),An=Qe("replace"),_n=!!/./[An]&&""===/./[An]("a","$0"),Nn=!o((function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return 2!==t.length||"a"!==t[0]||"b"!==t[1]})),Bn=function(e){return function(r,t){var n,i,a=String(b(r)),o=se(t),s=a.length;return o<0||o>=s?e?"":void 0:(n=a.charCodeAt(o))<55296||n>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):n:e?a.slice(o,o+2):i-56320+(n-55296<<10)+65536}},Dn={codeAt:Bn(!1),charAt:Bn(!0)},Fn=Dn.charAt,Gn=function(e,r,t){return r+(t?Fn(e,r).length:1)},$n=function(e,r){var t=e.exec;if("function"==typeof t){var n=t.call(e,r);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==l(e))throw TypeError("RegExp#exec called on incompatible receiver");return Tn.call(e,r)},Hn=Math.max,Vn=Math.min,Yn=Math.floor,Wn=/\$([$&'`]|\d\d?|<[^>]*>)/g,Jn=/\$([$&'`]|\d\d?)/g;!function(e,r,t,n){var i=Qe(e),a=!o((function(){var r={};return r[i]=function(){return 7},7!=""[e](r)})),s=a&&!o((function(){var r=!1,t=/a/;return"split"===e&&((t={}).constructor={},t.constructor[Un]=function(){return t},t.flags="",t[i]=/./[i]),t.exec=function(){return r=!0,null},t[i](""),!r}));if(!a||!s||"replace"===e&&(!Rn||!Ln||_n)||"split"===e&&!Nn){var d=/./[i],c=t(i,""[e],(function(e,r,t,n,i){return r.exec===Tn?a&&!i?{done:!0,value:d.call(r,t,n)}:{done:!0,value:e.call(t,r,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Ln,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:_n}),u=c[0],f=c[1];re(String.prototype,e,u),re(RegExp.prototype,i,2==r?function(e,r){return f.call(e,this,r)}:function(e){return f.call(e,this)})}n&&S(RegExp.prototype[i],"sham",!0)}("replace",2,(function(e,r,t,n){var i=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=n.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(t,n){var i=b(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,i,n):r.call(String(i),t,n)},function(e,n){if(!i&&a||"string"==typeof n&&-1===n.indexOf(o)){var d=t(r,e,this,n);if(d.done)return d.value}var c=P(e),u=String(this),f="function"==typeof n;f||(n=String(n));var h=c.global;if(h){var l=c.unicode;c.lastIndex=0}for(var p=[];;){var g=$n(c,u);if(null===g)break;if(p.push(g),!h)break;""===String(g[0])&&(c.lastIndex=Gn(u,ce(c.lastIndex),l))}for(var b,I="",v=0,m=0;m<p.length;m++){g=p[m];for(var k=String(g[0]),x=Hn(Vn(se(g.index),u.length),0),y=[],w=1;w<g.length;w++)y.push(void 0===(b=g[w])?b:String(b));var z=g.groups;if(f){var C=[k].concat(y,x,u);void 0!==z&&C.push(z);var q=String(n.apply(void 0,C))}else q=s(k,u,x,y,z,n);x>=v&&(I+=u.slice(v,x)+q,v=x+k.length)}return I+u.slice(v)}];function s(e,t,n,i,a,o){var s=n+e.length,d=i.length,c=Jn;return void 0!==a&&(a=je(a),c=Wn),r.call(o,c,(function(r,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return r;if(u>d){var f=Yn(u/10);return 0===f?r:f<=d?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):r}c=i[u-1]}return void 0===c?"":c}))}}));var Kn=Qe("isConcatSpreadable"),Qn=Hr>=51||!o((function(){var e=[];return e[Kn]=!1,e.concat()[0]!==e})),Xn=Yr("concat"),Zn=function(e){if(!v(e))return!1;var r=e[Kn];return void 0!==r?!!r:Le(e)};Oe({target:"Array",proto:!0,forced:!Qn||!Xn},{concat:function(e){var r,t,n,i,a,o=je(this),s=or(o,0),d=0;for(r=-1,n=arguments.length;r<n;r++)if(Zn(a=-1===r?o:arguments[r])){if(d+(i=ce(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(t=0;t<i;t++,d++)t in a&&vt(s,d,a[t])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");vt(s,d++,a)}return s.length=d,s}});var ei=Qe("unscopables"),ri=Array.prototype;null==ri[ei]&&j.f(ri,ei,{configurable:!0,value:Ge(null)});var ti,ni,ii,ai=function(e){ri[ei][e]=!0},oi={},si=Qe("iterator"),di=!1;[].keys&&("next"in(ii=[].keys())?(ni=cn(cn(ii)))!==Object.prototype&&(ti=ni):di=!0),null==ti&&(ti={}),x(ti,si)||S(ti,si,(function(){return this}));var ci={IteratorPrototype:ti,BUGGY_SAFARI_ITERATORS:di},ui=ci.IteratorPrototype,fi=function(){return this},hi=function(e,r,t){var n=r+" Iterator";return e.prototype=Ge(ui,{next:f(1,t)}),tr(e,n,!1),oi[n]=fi,e},li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,r=!1,t={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(t,[]),r=t instanceof Array}catch(e){}return function(t,n){return P(t),function(e){if(!v(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(n),r?e.call(t,n):t.__proto__=n,t}}():void 0),pi=ci.IteratorPrototype,gi=ci.BUGGY_SAFARI_ITERATORS,bi=Qe("iterator"),Ii=function(){return this},vi=function(e,r,t,n,i,a,o){hi(t,r,n);var s,d,c,u=function(e){if(e===i&&g)return g;if(!gi&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new t(this,e)}}return function(){return new t(this)}},f=r+" Iterator",h=!1,l=e.prototype,p=l[bi]||l["@@iterator"]||i&&l[i],g=!gi&&p||u(i),b="Array"==r&&l.entries||p;if(b&&(s=cn(b.call(new e)),pi!==Object.prototype&&s.next&&(cn(s)!==pi&&(li?li(s,pi):"function"!=typeof s[bi]&&S(s,bi,Ii)),tr(s,f,!0))),"values"==i&&p&&"values"!==p.name&&(h=!0,g=function(){return p.call(this)}),l[bi]!==g&&S(l,bi,g),oi[r]=g,i)if(d={values:u("values"),keys:a?g:u("keys"),entries:u("entries")},o)for(c in d)(gi||h||!(c in l))&&re(l,c,d[c]);else Oe({target:r,proto:!0,forced:gi||h},d);return d},mi=ee.set,ki=ee.getterFor("Array Iterator"),xi=vi(Array,"Array",(function(e,r){mi(this,{type:"Array Iterator",target:I(e),index:0,kind:r})}),(function(){var e=ki(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:n,done:!1}:"values"==t?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}}),"values");oi.Arguments=oi.Array,ai("keys"),ai("values"),ai("entries");var yi=Dn.charAt,wi=ee.set,zi=ee.getterFor("String Iterator");vi(String,"String",(function(e){wi(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,r=zi(this),t=r.string,n=r.index;return n>=t.length?{value:void 0,done:!0}:(e=yi(t,n),r.index+=e.length,{value:e,done:!1})}));var Ci=Qe("iterator"),qi=Qe("toStringTag"),Ei=xi.values;for(var Pi in ct){var Oi=a[Pi],ji=Oi&&Oi.prototype;if(ji){if(ji[Ci]!==Ei)try{S(ji,Ci,Ei)}catch(e){ji[Ci]=Ei}if(ji[qi]||S(ji,qi,Pi),ct[Pi])for(var Si in xi)if(ji[Si]!==xi[Si])try{S(ji,Si,xi[Si])}catch(e){ji[Si]=xi[Si]}}}var Mi=Qe("iterator"),Ti=!o((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,t="";return e.pathname="c%20d",r.forEach((function(e,n){r.delete("b"),t+=n+e})),!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[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"!==t||"x"!==new URL("http://x",void 0).host})),Ui=function(e,r,t){if(!(e instanceof r))throw TypeError("Incorrect "+(t?t+" ":"")+"invocation");return e},Ri=Object.assign,Li=Object.defineProperty,Ai=!Ri||o((function(){if(s&&1!==Ri({b:1},Ri(Li({},"a",{enumerable:!0,get:function(){Li(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),7!=Ri({},e)[t]||"abcdefghijklmnopqrst"!=Se(Ri({},r)).join("")}))?function(e,r){for(var t=je(e),n=arguments.length,i=1,a=ve.f,o=u.f;n>i;)for(var d,c=g(arguments[i++]),f=a?Se(c).concat(a(c)):Se(c),h=f.length,l=0;h>l;)d=f[l++],s&&!o.call(c,d)||(t[d]=c[d]);return t}:Ri,_i=function(e,r,t,n){try{return n?r(P(t)[0],t[1]):r(t)}catch(r){var i=e.return;throw void 0!==i&&P(i.call(e)),r}},Ni=Qe("iterator"),Bi=Array.prototype,Di=function(e){return void 0!==e&&(oi.Array===e||Bi[Ni]===e)},Fi=Qe("iterator"),Gi=function(e){if(null!=e)return e[Fi]||e["@@iterator"]||oi[at(e)]},$i=function(e){var r,t,n,i,a,o,s=je(e),d="function"==typeof this?this:Array,c=arguments.length,u=c>1?arguments[1]:void 0,f=void 0!==u,h=Gi(s),l=0;if(f&&(u=ir(u,c>2?arguments[2]:void 0,2)),null==h||d==Array&&Di(h))for(t=new d(r=ce(s.length));r>l;l++)o=f?u(s[l],l):s[l],vt(t,l,o);else for(a=(i=h.call(s)).next,t=new d;!(n=a.call(i)).done;l++)o=f?_i(i,u,[n.value,l],!0):n.value,vt(t,l,o);return t.length=l,t},Hi=/[^\0-\u007E]/,Vi=/[.\u3002\uFF0E\uFF61]/g,Yi="Overflow: input needs wider integers to process",Wi=Math.floor,Ji=String.fromCharCode,Ki=function(e){return e+22+75*(e<26)},Qi=function(e,r,t){var n=0;for(e=t?Wi(e/700):e>>1,e+=Wi(e/r);e>455;n+=36)e=Wi(e/35);return Wi(n+36*e/(e+38))},Xi=function(e){var r,t,n=[],i=(e=function(e){for(var r=[],t=0,n=e.length;t<n;){var i=e.charCodeAt(t++);if(i>=55296&&i<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&i)<<10)+(1023&a)+65536):(r.push(i),t--)}else r.push(i)}return r}(e)).length,a=128,o=0,s=72;for(r=0;r<e.length;r++)(t=e[r])<128&&n.push(Ji(t));var d=n.length,c=d;for(d&&n.push("-");c<i;){var u=2147483647;for(r=0;r<e.length;r++)(t=e[r])>=a&&t<u&&(u=t);var f=c+1;if(u-a>Wi((2147483647-o)/f))throw RangeError(Yi);for(o+=(u-a)*f,a=u,r=0;r<e.length;r++){if((t=e[r])<a&&++o>2147483647)throw RangeError(Yi);if(t==a){for(var h=o,l=36;;l+=36){var p=l<=s?1:l>=s+26?26:l-s;if(h<p)break;var g=h-p,b=36-p;n.push(Ji(Ki(p+g%b))),h=Wi(g/b)}n.push(Ji(Ki(h))),s=Qi(o,f,c==d),o=0,++c}}++o,++a}return n.join("")},Zi=function(e){var r=Gi(e);if("function"!=typeof r)throw TypeError(String(e)+" is not iterable");return P(r.call(e))},ea=ie("fetch"),ra=ie("Headers"),ta=Qe("iterator"),na=ee.set,ia=ee.getterFor("URLSearchParams"),aa=ee.getterFor("URLSearchParamsIterator"),oa=/\+/g,sa=Array(4),da=function(e){return sa[e-1]||(sa[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},ca=function(e){try{return decodeURIComponent(e)}catch(r){return e}},ua=function(e){var r=e.replace(oa," "),t=4;try{return decodeURIComponent(r)}catch(e){for(;t;)r=r.replace(da(t--),ca);return r}},fa=/[!'()~]|%20/g,ha={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},la=function(e){return ha[e]},pa=function(e){return encodeURIComponent(e).replace(fa,la)},ga=function(e,r){if(r)for(var t,n,i=r.split("&"),a=0;a<i.length;)(t=i[a++]).length&&(n=t.split("="),e.push({key:ua(n.shift()),value:ua(n.join("="))}))},ba=function(e){this.entries.length=0,ga(this.entries,e)},Ia=function(e,r){if(e<r)throw TypeError("Not enough arguments")},va=hi((function(e,r){na(this,{type:"URLSearchParamsIterator",iterator:Zi(ia(e).entries),kind:r})}),"Iterator",(function(){var e=aa(this),r=e.kind,t=e.iterator.next(),n=t.value;return t.done||(t.value="keys"===r?n.key:"values"===r?n.value:[n.key,n.value]),t})),ma=function(){Ui(this,ma,"URLSearchParams");var e,r,t,n,i,a,o,s,d,c=arguments.length>0?arguments[0]:void 0,u=this,f=[];if(na(u,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:ba}),void 0!==c)if(v(c))if("function"==typeof(e=Gi(c)))for(t=(r=e.call(c)).next;!(n=t.call(r)).done;){if((o=(a=(i=Zi(P(n.value))).next).call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");f.push({key:o.value+"",value:s.value+""})}else for(d in c)x(c,d)&&f.push({key:d,value:c[d]+""});else ga(f,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},ka=ma.prototype;!function(e,r,t){for(var n in r)re(e,n,r[n],t)}(ka,{append:function(e,r){Ia(arguments.length,2);var t=ia(this);t.entries.push({key:e+"",value:r+""}),t.updateURL()},delete:function(e){Ia(arguments.length,1);for(var r=ia(this),t=r.entries,n=e+"",i=0;i<t.length;)t[i].key===n?t.splice(i,1):i++;r.updateURL()},get:function(e){Ia(arguments.length,1);for(var r=ia(this).entries,t=e+"",n=0;n<r.length;n++)if(r[n].key===t)return r[n].value;return null},getAll:function(e){Ia(arguments.length,1);for(var r=ia(this).entries,t=e+"",n=[],i=0;i<r.length;i++)r[i].key===t&&n.push(r[i].value);return n},has:function(e){Ia(arguments.length,1);for(var r=ia(this).entries,t=e+"",n=0;n<r.length;)if(r[n++].key===t)return!0;return!1},set:function(e,r){Ia(arguments.length,1);for(var t,n=ia(this),i=n.entries,a=!1,o=e+"",s=r+"",d=0;d<i.length;d++)(t=i[d]).key===o&&(a?i.splice(d--,1):(a=!0,t.value=s));a||i.push({key:o,value:s}),n.updateURL()},sort:function(){var e,r,t,n=ia(this),i=n.entries,a=i.slice();for(i.length=0,t=0;t<a.length;t++){for(e=a[t],r=0;r<t;r++)if(i[r].key>e.key){i.splice(r,0,e);break}r===t&&i.push(e)}n.updateURL()},forEach:function(e){for(var r,t=ia(this).entries,n=ir(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<t.length;)n((r=t[i++]).value,r.key,this)},keys:function(){return new va(this,"keys")},values:function(){return new va(this,"values")},entries:function(){return new va(this,"entries")}},{enumerable:!0}),re(ka,ta,ka.entries),re(ka,"toString",(function(){for(var e,r=ia(this).entries,t=[],n=0;n<r.length;)e=r[n++],t.push(pa(e.key)+"="+pa(e.value));return t.join("&")}),{enumerable:!0}),tr(ma,"URLSearchParams"),Oe({global:!0,forced:!Ti},{URLSearchParams:ma}),Ti||"function"!=typeof ea||"function"!=typeof ra||Oe({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var r,t,n,i=[e];return arguments.length>1&&(v(r=arguments[1])&&(t=r.body,"URLSearchParams"===at(t)&&((n=r.headers?new ra(r.headers):new ra).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),r=Ge(r,{body:f(0,String(t)),headers:f(0,n)}))),i.push(r)),ea.apply(this,i)}});var xa,ya={URLSearchParams:ma,getState:ia},wa=Dn.codeAt,za=a.URL,Ca=ya.URLSearchParams,qa=ya.getState,Ea=ee.set,Pa=ee.getterFor("URL"),Oa=Math.floor,ja=Math.pow,Sa=/[A-Za-z]/,Ma=/[\d+-.A-Za-z]/,Ta=/\d/,Ua=/^(0x|0X)/,Ra=/^[0-7]+$/,La=/^\d+$/,Aa=/^[\dA-Fa-f]+$/,_a=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Na=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Ba=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Da=/[\u0009\u000A\u000D]/g,Fa=function(e,r){var t,n,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return"Invalid host";if(!(t=$a(r.slice(1,-1))))return"Invalid host";e.host=t}else if(Xa(e)){if(r=function(e){var r,t,n=[],i=e.toLowerCase().replace(Vi,".").split(".");for(r=0;r<i.length;r++)t=i[r],n.push(Hi.test(t)?"xn--"+Xi(t):t);return n.join(".")}(r),_a.test(r))return"Invalid host";if(null===(t=Ga(r)))return"Invalid host";e.host=t}else{if(Na.test(r))return"Invalid host";for(t="",n=$i(r),i=0;i<n.length;i++)t+=Ka(n[i],Va);e.host=t}},Ga=function(e){var r,t,n,i,a,o,s,d=e.split(".");if(d.length&&""==d[d.length-1]&&d.pop(),(r=d.length)>4)return e;for(t=[],n=0;n<r;n++){if(""==(i=d[n]))return e;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=Ua.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?La:8==a?Ra:Aa).test(i))return e;o=parseInt(i,a)}t.push(o)}for(n=0;n<r;n++)if(o=t[n],n==r-1){if(o>=ja(256,5-r))return null}else if(o>255)return null;for(s=t.pop(),n=0;n<t.length;n++)s+=t[n]*ja(256,3-n);return s},$a=function(e){var r,t,n,i,a,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,f=0,h=function(){return e.charAt(f)};if(":"==h()){if(":"!=e.charAt(1))return;f+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(r=t=0;t<4&&Aa.test(h());)r=16*r+parseInt(h(),16),f++,t++;if("."==h()){if(0==t)return;if(f-=t,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Ta.test(h()))return;for(;Ta.test(h());){if(a=parseInt(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;d[c++]=r}else{if(null!==u)return;f++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d},Ha=function(e){var r,t,n,i;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=Oa(e/256);return r.join(".")}if("object"==typeof e){for(r="",n=function(e){for(var r=null,t=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>t&&(r=n,t=i),n=null,i=0):(null===n&&(n=a),++i);return i>t&&(r=n,t=i),r}(e),t=0;t<8;t++)i&&0===e[t]||(i&&(i=!1),n===t?(r+=t?":":"::",i=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},Va={},Ya=Ai({},Va,{" ":1,'"':1,"<":1,">":1,"`":1}),Wa=Ai({},Ya,{"#":1,"?":1,"{":1,"}":1}),Ja=Ai({},Wa,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ka=function(e,r){var t=wa(e,0);return t>32&&t<127&&!x(r,e)?e:encodeURIComponent(e)},Qa={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Xa=function(e){return x(Qa,e.scheme)},Za=function(e){return""!=e.username||""!=e.password},eo=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},ro=function(e,r){var t;return 2==e.length&&Sa.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},to=function(e){var r;return e.length>1&&ro(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},no=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&ro(r[0],!0)||r.pop()},io=function(e){return"."===e||"%2e"===e.toLowerCase()},ao={},oo={},so={},co={},uo={},fo={},ho={},lo={},po={},go={},bo={},Io={},vo={},mo={},ko={},xo={},yo={},wo={},zo={},Co={},qo={},Eo=function(e,r,t,n){var i,a,o,s,d,c=t||ao,u=0,f="",h=!1,l=!1,p=!1;for(t||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=r.replace(Ba,"")),r=r.replace(Da,""),i=$i(r);u<=i.length;){switch(a=i[u],c){case ao:if(!a||!Sa.test(a)){if(t)return"Invalid scheme";c=so;continue}f+=a.toLowerCase(),c=oo;break;case oo:if(a&&(Ma.test(a)||"+"==a||"-"==a||"."==a))f+=a.toLowerCase();else{if(":"!=a){if(t)return"Invalid scheme";f="",c=so,u=0;continue}if(t&&(Xa(e)!=x(Qa,f)||"file"==f&&(Za(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,t)return void(Xa(e)&&Qa[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?c=mo:Xa(e)&&n&&n.scheme==e.scheme?c=co:Xa(e)?c=lo:"/"==i[u+1]?(c=uo,u++):(e.cannotBeABaseURL=!0,e.path.push(""),c=zo)}break;case so:if(!n||n.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==a){e.scheme=n.scheme,e.path=n.path.slice(),e.query=n.query,e.fragment="",e.cannotBeABaseURL=!0,c=qo;break}c="file"==n.scheme?mo:fo;continue;case co:if("/"!=a||"/"!=i[u+1]){c=fo;continue}c=po,u++;break;case uo:if("/"==a){c=go;break}c=wo;continue;case fo:if(e.scheme=n.scheme,a==xa)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query;else if("/"==a||"\\"==a&&Xa(e))c=ho;else if("?"==a)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query="",c=Co;else{if("#"!=a){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.path.pop(),c=wo;continue}e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query,e.fragment="",c=qo}break;case ho:if(!Xa(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,c=wo;continue}c=go}else c=po;break;case lo:if(c=po,"/"!=a||"/"!=f.charAt(u+1))continue;u++;break;case po:if("/"!=a&&"\\"!=a){c=go;continue}break;case go:if("@"==a){h&&(f="%40"+f),h=!0,o=$i(f);for(var g=0;g<o.length;g++){var b=o[g];if(":"!=b||p){var I=Ka(b,Ja);p?e.password+=I:e.username+=I}else p=!0}f=""}else if(a==xa||"/"==a||"?"==a||"#"==a||"\\"==a&&Xa(e)){if(h&&""==f)return"Invalid authority";u-=$i(f).length+1,f="",c=bo}else f+=a;break;case bo:case Io:if(t&&"file"==e.scheme){c=xo;continue}if(":"!=a||l){if(a==xa||"/"==a||"?"==a||"#"==a||"\\"==a&&Xa(e)){if(Xa(e)&&""==f)return"Invalid host";if(t&&""==f&&(Za(e)||null!==e.port))return;if(s=Fa(e,f))return s;if(f="",c=yo,t)return;continue}"["==a?l=!0:"]"==a&&(l=!1),f+=a}else{if(""==f)return"Invalid host";if(s=Fa(e,f))return s;if(f="",c=vo,t==Io)return}break;case vo:if(!Ta.test(a)){if(a==xa||"/"==a||"?"==a||"#"==a||"\\"==a&&Xa(e)||t){if(""!=f){var v=parseInt(f,10);if(v>65535)return"Invalid port";e.port=Xa(e)&&v===Qa[e.scheme]?null:v,f=""}if(t)return;c=yo;continue}return"Invalid port"}f+=a;break;case mo:if(e.scheme="file","/"==a||"\\"==a)c=ko;else{if(!n||"file"!=n.scheme){c=wo;continue}if(a==xa)e.host=n.host,e.path=n.path.slice(),e.query=n.query;else if("?"==a)e.host=n.host,e.path=n.path.slice(),e.query="",c=Co;else{if("#"!=a){to(i.slice(u).join(""))||(e.host=n.host,e.path=n.path.slice(),no(e)),c=wo;continue}e.host=n.host,e.path=n.path.slice(),e.query=n.query,e.fragment="",c=qo}}break;case ko:if("/"==a||"\\"==a){c=xo;break}n&&"file"==n.scheme&&!to(i.slice(u).join(""))&&(ro(n.path[0],!0)?e.path.push(n.path[0]):e.host=n.host),c=wo;continue;case xo:if(a==xa||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&ro(f))c=wo;else if(""==f){if(e.host="",t)return;c=yo}else{if(s=Fa(e,f))return s;if("localhost"==e.host&&(e.host=""),t)return;f="",c=yo}continue}f+=a;break;case yo:if(Xa(e)){if(c=wo,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=xa&&(c=wo,"/"!=a))continue}else e.fragment="",c=qo;else e.query="",c=Co;break;case wo:if(a==xa||"/"==a||"\\"==a&&Xa(e)||!t&&("?"==a||"#"==a)){if(".."===(d=(d=f).toLowerCase())||"%2e."===d||".%2e"===d||"%2e%2e"===d?(no(e),"/"==a||"\\"==a&&Xa(e)||e.path.push("")):io(f)?"/"==a||"\\"==a&&Xa(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&ro(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(a==xa||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=Co):"#"==a&&(e.fragment="",c=qo)}else f+=Ka(a,Wa);break;case zo:"?"==a?(e.query="",c=Co):"#"==a?(e.fragment="",c=qo):a!=xa&&(e.path[0]+=Ka(a,Va));break;case Co:t||"#"!=a?a!=xa&&("'"==a&&Xa(e)?e.query+="%27":e.query+="#"==a?"%23":Ka(a,Va)):(e.fragment="",c=qo);break;case qo:a!=xa&&(e.fragment+=Ka(a,Ya))}u++}},Po=function(e){var r,t,n=Ui(this,Po,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),o=Ea(n,{type:"URL"});if(void 0!==i)if(i instanceof Po)r=Pa(i);else if(t=Eo(r={},String(i)))throw TypeError(t);if(t=Eo(o,a,null,r))throw TypeError(t);var d=o.searchParams=new Ca,c=qa(d);c.updateSearchParams(o.query),c.updateURL=function(){o.query=String(d)||null},s||(n.href=jo.call(n),n.origin=So.call(n),n.protocol=Mo.call(n),n.username=To.call(n),n.password=Uo.call(n),n.host=Ro.call(n),n.hostname=Lo.call(n),n.port=Ao.call(n),n.pathname=_o.call(n),n.search=No.call(n),n.searchParams=Bo.call(n),n.hash=Do.call(n))},Oo=Po.prototype,jo=function(){var e=Pa(this),r=e.scheme,t=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,d=e.fragment,c=r+":";return null!==i?(c+="//",Za(e)&&(c+=t+(n?":"+n:"")+"@"),c+=Ha(i),null!==a&&(c+=":"+a)):"file"==r&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},So=function(){var e=Pa(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URL(r.path[0]).origin}catch(e){return"null"}return"file"!=r&&Xa(e)?r+"://"+Ha(e.host)+(null!==t?":"+t:""):"null"},Mo=function(){return Pa(this).scheme+":"},To=function(){return Pa(this).username},Uo=function(){return Pa(this).password},Ro=function(){var e=Pa(this),r=e.host,t=e.port;return null===r?"":null===t?Ha(r):Ha(r)+":"+t},Lo=function(){var e=Pa(this).host;return null===e?"":Ha(e)},Ao=function(){var e=Pa(this).port;return null===e?"":String(e)},_o=function(){var e=Pa(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},No=function(){var e=Pa(this).query;return e?"?"+e:""},Bo=function(){return Pa(this).searchParams},Do=function(){var e=Pa(this).fragment;return e?"#"+e:""},Fo=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(s&&Ae(Oo,{href:Fo(jo,(function(e){var r=Pa(this),t=String(e),n=Eo(r,t);if(n)throw TypeError(n);qa(r.searchParams).updateSearchParams(r.query)})),origin:Fo(So),protocol:Fo(Mo,(function(e){var r=Pa(this);Eo(r,String(e)+":",ao)})),username:Fo(To,(function(e){var r=Pa(this),t=$i(String(e));if(!eo(r)){r.username="";for(var n=0;n<t.length;n++)r.username+=Ka(t[n],Ja)}})),password:Fo(Uo,(function(e){var r=Pa(this),t=$i(String(e));if(!eo(r)){r.password="";for(var n=0;n<t.length;n++)r.password+=Ka(t[n],Ja)}})),host:Fo(Ro,(function(e){var r=Pa(this);r.cannotBeABaseURL||Eo(r,String(e),bo)})),hostname:Fo(Lo,(function(e){var r=Pa(this);r.cannotBeABaseURL||Eo(r,String(e),Io)})),port:Fo(Ao,(function(e){var r=Pa(this);eo(r)||(""==(e=String(e))?r.port=null:Eo(r,e,vo))})),pathname:Fo(_o,(function(e){var r=Pa(this);r.cannotBeABaseURL||(r.path=[],Eo(r,e+"",yo))})),search:Fo(No,(function(e){var r=Pa(this);""==(e=String(e))?r.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),r.query="",Eo(r,e,Co)),qa(r.searchParams).updateSearchParams(r.query)})),searchParams:Fo(Bo),hash:Fo(Do,(function(e){var r=Pa(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),r.fragment="",Eo(r,e,qo)):r.fragment=null}))}),re(Oo,"toJSON",(function(){return jo.call(this)}),{enumerable:!0}),re(Oo,"toString",(function(){return jo.call(this)}),{enumerable:!0}),za){var Go=za.createObjectURL,$o=za.revokeObjectURL;Go&&re(Po,"createObjectURL",(function(e){return Go.apply(za,arguments)})),$o&&re(Po,"revokeObjectURL",(function(e){return $o.apply(za,arguments)}))}function Ho(e,r){return(Ho=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function Vo(e,r){return!r||"object"!==fn(r)&&"function"!=typeof r?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):r}function Yo(e){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wo(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Jo(e,r,t){return(Jo=Wo()?Reflect.construct:function(e,r,t){var n=[null];n.push.apply(n,r);var i=new(Function.bind.apply(e,n));return t&&Ho(i,t.prototype),i}).apply(null,arguments)}function Ko(e){var r="function"==typeof Map?new Map:void 0;return(Ko=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return Jo(e,arguments,Yo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ho(n,e)})(e)}function Qo(e){var r=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 t,n=Yo(e);if(r){var i=Yo(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return Vo(this,t)}}tr(Po,"URL"),Oe({global:!0,forced:!Ti,sham:!s},{URL:Po});var Xo=function(e){!function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Ho(e,r)}(t,Ko(URL));var r=Qo(t);function t(e,n,i){var a;return Ot(this,t),(a=r.call(this,t.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return St(t,[{key:"replaceOrigin",value:function(e){var r=new URL(e);this.protocol=r.protocol,this.host=r.host,this.pathname="".concat(r.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var r=this;e&&Object.keys(e).forEach((function(t){var n=e[t];if(Array.isArray(n))for(var i=0;i<n.length;i+=1)r.searchParams.append(t,String(n[i]));else r.searchParams.append(t,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,r){return r?e.replace(/\{([^\}]+)\}/g,(function(e,t){return String(r[t])})):e}}]),t}(),Zo="commerce-sdk-isomorphic@1.4.0";function es(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function rs(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?es(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):es(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var ts=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(rs({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i,a,o,s,d,c,u,f,h,l,p,g,b,I,v,m,k,x,y,w,z,C,q,E,P,O,j,S,M,T;return St(t,[{key:"createBasket",value:(T=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0!==a.taxMode?d.taxMode=a.taxMode:void 0!==o.taxMode&&(d.taxMode=o.taxMode),void 0===a.siteId){t.next=18;break}d.siteId=a.siteId,t.next=23;break;case 18:if(void 0===o.siteId){t.next=22;break}d.siteId=o.siteId,t.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=30,r(f);case 30:if(h=t.sent,!i){t.next=35;break}return t.abrupt("return",h);case 35:return t.abrupt("return",h.json());case 36:case"end":return t.stop()}}),t,this)}))),function(e,r){return T.apply(this,arguments)})},{key:"transferBasket",value:(M=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0!==a.overrideExisting?d.overrideExisting=a.overrideExisting:void 0!==o.overrideExisting&&(d.overrideExisting=o.overrideExisting),void 0===a.siteId){t.next=18;break}d.siteId=a.siteId,t.next=23;break;case 18:if(void 0===o.siteId){t.next=22;break}d.siteId=o.siteId,t.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return c=new Xo("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=29,r(f);case 29:if(h=t.sent,!i){t.next=34;break}return t.abrupt("return",h);case 34:return t.abrupt("return",h.json());case 35:case"end":return t.stop()}}),t,this)}))),function(e,r){return M.apply(this,arguments)})},{key:"mergeBasket",value:(S=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0!==a.createDestinationBasket?d.createDestinationBasket=a.createDestinationBasket:void 0!==o.createDestinationBasket&&(d.createDestinationBasket=o.createDestinationBasket),void 0!==a.productItemMergeMode?d.productItemMergeMode=a.productItemMergeMode:void 0!==o.productItemMergeMode&&(d.productItemMergeMode=o.productItemMergeMode),void 0===a.siteId){t.next=19;break}d.siteId=a.siteId,t.next=24;break;case 19:if(void 0===o.siteId){t.next=23;break}d.siteId=o.siteId,t.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return c=new Xo("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=30,r(f);case 30:if(h=t.sent,!i){t.next=35;break}return t.abrupt("return",h);case 35:return t.abrupt("return",h.json());case 36:case"end":return t.stop()}}),t,this)}))),function(e,r){return S.apply(this,arguments)})},{key:"deleteBasket",value:(j=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return j.apply(this,arguments)})},{key:"getBasket",value:(O=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return O.apply(this,arguments)})},{key:"updateBasket",value:(P=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return P.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(E=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0!==a.useAsShipping?d.useAsShipping=a.useAsShipping:void 0!==o.useAsShipping&&(d.useAsShipping=o.useAsShipping),void 0!==a.removeExternalTax?d.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(d.removeExternalTax=o.removeExternalTax),void 0===a.siteId){t.next=28;break}d.siteId=a.siteId,t.next=33;break;case 28:if(void 0===o.siteId){t.next=32;break}d.siteId=o.siteId,t.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=40,r(f);case 40:if(h=t.sent,!i){t.next=45;break}return t.abrupt("return",h);case 45:return t.abrupt("return",h.json());case 46:case"end":return t.stop()}}),t,this)}))),function(e,r){return E.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(C=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.couponItemId){t.next=25;break}s.couponItemId=a.couponItemId,t.next=30;break;case 25:if(void 0===o.couponItemId){t.next=29;break}s.couponItemId=o.couponItemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return C.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(w=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return w.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(y=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.giftCertificateItemId){t.next=25;break}s.giftCertificateItemId=a.giftCertificateItemId,t.next=30;break;case 25:if(void 0===o.giftCertificateItemId){t.next=29;break}s.giftCertificateItemId=o.giftCertificateItemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return y.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(x=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.giftCertificateItemId){t.next=25;break}s.giftCertificateItemId=a.giftCertificateItemId,t.next=30;break;case 25:if(void 0===o.giftCertificateItemId){t.next=29;break}s.giftCertificateItemId=o.giftCertificateItemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return x.apply(this,arguments)})},{key:"addItemToBasket",value:(k=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return k.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){t.next=25;break}s.itemId=a.itemId,t.next=30;break;case 25:if(void 0===o.itemId){t.next=29;break}s.itemId=o.itemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(v=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){t.next=25;break}s.itemId=a.itemId,t.next=30;break;case 25:if(void 0===o.itemId){t.next=29;break}s.itemId=o.itemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(d={},void 0!==a.removeExternalTax?d.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(d.removeExternalTax=o.removeExternalTax),void 0===a.siteId){t.next=36;break}d.siteId=a.siteId,t.next=41;break;case 36:if(void 0===o.siteId){t.next=40;break}d.siteId=o.siteId,t.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=48,r(f);case 48:if(h=t.sent,!i){t.next=53;break}return t.abrupt("return",h);case 53:return t.abrupt("return",h.json());case 54:case"end":return t.stop()}}),t,this)}))),function(e,r){return v.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(I=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){t.next=25;break}s.itemId=a.itemId,t.next=30;break;case 25:if(void 0===o.itemId){t.next=29;break}s.itemId=o.itemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return I.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(b=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return b.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(g=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return g.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(p=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0!==a.removeExternalTax?d.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(d.removeExternalTax=o.removeExternalTax),void 0===a.siteId){t.next=36;break}d.siteId=a.siteId,t.next=41;break;case 36:if(void 0===o.siteId){t.next=40;break}d.siteId=o.siteId,t.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=48,r(f);case 48:if(h=t.sent,!i){t.next=53;break}return t.abrupt("return",h);case 53:return t.abrupt("return",h.json());case 54:case"end":return t.stop()}}),t,this)}))),function(e,r){return p.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(l=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return l.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(f=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return f.apply(this,arguments)})},{key:"createShipmentForBasket",value:(u=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return u.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){t.next=25;break}s.shipmentId=a.shipmentId,t.next=30;break;case 25:if(void 0===o.shipmentId){t.next=29;break}s.shipmentId=o.shipmentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(d=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){t.next=25;break}s.shipmentId=a.shipmentId,t.next=30;break;case 25:if(void 0===o.shipmentId){t.next=29;break}s.shipmentId=o.shipmentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return d.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(s=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){t.next=25;break}s.shipmentId=a.shipmentId,t.next=30;break;case 25:if(void 0===o.shipmentId){t.next=29;break}s.shipmentId=o.shipmentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(d={},void 0!==a.useAsBilling?d.useAsBilling=a.useAsBilling:void 0!==o.useAsBilling&&(d.useAsBilling=o.useAsBilling),void 0!==a.removeExternalTax?d.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(d.removeExternalTax=o.removeExternalTax),void 0===a.siteId){t.next=37;break}d.siteId=a.siteId,t.next=42;break;case 37:if(void 0===o.siteId){t.next=41;break}d.siteId=o.siteId,t.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=49,r(f);case 49:if(h=t.sent,!i){t.next=54;break}return t.abrupt("return",h);case 54:return t.abrupt("return",h.json());case 55:case"end":return t.stop()}}),t,this)}))),function(e,r){return s.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(o=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){t.next=25;break}s.shipmentId=a.shipmentId,t.next=30;break;case 25:if(void 0===o.shipmentId){t.next=29;break}s.shipmentId=o.shipmentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return o.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){t.next=25;break}s.shipmentId=a.shipmentId,t.next=30;break;case 25:if(void 0===o.shipmentId){t.next=29;break}s.shipmentId=o.shipmentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return a.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"addTaxesForBasket",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){t.next=16;break}s.basketId=a.basketId,t.next=21;break;case 16:if(void 0===o.basketId){t.next=20;break}s.basketId=o.basketId,t.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=rs(rs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),rs(rs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function ns(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function is(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ns(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ns(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(ts,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var as=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(is({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i,a,o,s,d,c,u,f,h,l,p,g,b,I,v,m,k,x,y,w,z,C,q,E,P,O,j,S,M,T,U;return St(t,[{key:"registerCustomer",value:(U=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return U.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(T=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return T.apply(this,arguments)})},{key:"authorizeCustomer",value:(M=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.clientId){t.next=17;break}d.clientId=a.clientId,t.next=22;break;case 17:if(void 0===o.clientId){t.next=21;break}d.clientId=o.clientId,t.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return M.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(S=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return S.apply(this,arguments)})},{key:"resetPassword",value:(j=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return j.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(P=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return P.apply(this,arguments)})},{key:"getExternalProfile",value:(E=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.externalId){t.next=17;break}d.externalId=a.externalId,t.next=22;break;case 17:if(void 0===o.externalId){t.next=21;break}d.externalId=o.externalId,t.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===a.authenticationProviderId){t.next=26;break}d.authenticationProviderId=a.authenticationProviderId,t.next=31;break;case 26:if(void 0===o.authenticationProviderId){t.next=30;break}d.authenticationProviderId=o.authenticationProviderId,t.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return E.apply(this,arguments)})},{key:"getCustomer",value:(q=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return q.apply(this,arguments)})},{key:"updateCustomer",value:(C=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return C.apply(this,arguments)})},{key:"createCustomerAddress",value:(z=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return z.apply(this,arguments)})},{key:"getCustomerAddress",value:(w=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){t.next=25;break}s.addressName=a.addressName,t.next=30;break;case 25:if(void 0===o.addressName){t.next=29;break}s.addressName=o.addressName,t.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return w.apply(this,arguments)})},{key:"removeCustomerAddress",value:(y=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){t.next=25;break}s.addressName=a.addressName,t.next=30;break;case 25:if(void 0===o.addressName){t.next=29;break}s.addressName=o.addressName,t.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return y.apply(this,arguments)})},{key:"updateCustomerAddress",value:(x=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){t.next=25;break}s.addressName=a.addressName,t.next=30;break;case 25:if(void 0===o.addressName){t.next=29;break}s.addressName=o.addressName,t.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return x.apply(this,arguments)})},{key:"getCustomerBaskets",value:(k=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return k.apply(this,arguments)})},{key:"getCustomerOrders",value:(m=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0!==a.crossSites?d.crossSites=a.crossSites:void 0!==o.crossSites&&(d.crossSites=o.crossSites),void 0!==a.from?d.from=a.from:void 0!==o.from&&(d.from=o.from),void 0!==a.until?d.until=a.until:void 0!==o.until&&(d.until=o.until),void 0!==a.status?d.status=a.status:void 0!==o.status&&(d.status=o.status),void 0===a.siteId){t.next=30;break}d.siteId=a.siteId,t.next=35;break;case 30:if(void 0===o.siteId){t.next=34;break}d.siteId=o.siteId,t.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==a.offset?d.offset=a.offset:void 0!==o.offset&&(d.offset=o.offset),void 0!==a.limit?d.limit=a.limit:void 0!==o.limit&&(d.limit=o.limit),c=new Xo("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=43,r(f);case 43:if(h=t.sent,!i){t.next=48;break}return t.abrupt("return",h);case 48:return t.abrupt("return",h.json());case 49:case"end":return t.stop()}}),t,this)}))),function(e,r){return m.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(I=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return I.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(b=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return b.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(g=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return g.apply(this,arguments)})},{key:"getCustomerProductLists",value:(p=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return p.apply(this,arguments)})},{key:"createCustomerProductList",value:(l=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return l.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(h=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return h.apply(this,arguments)})},{key:"getCustomerProductList",value:(f=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return f.apply(this,arguments)})},{key:"updateCustomerProductList",value:(u=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return u.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(c=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return c.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(d=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){t.next=34;break}s.itemId=a.itemId,t.next=39;break;case 34:if(void 0===o.itemId){t.next=38;break}s.itemId=o.itemId,t.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(d={},void 0===a.siteId){t.next=44;break}d.siteId=a.siteId,t.next=49;break;case 44:if(void 0===o.siteId){t.next=48;break}d.siteId=o.siteId,t.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=55,r(f);case 55:if(h=t.sent,!i){t.next=60;break}return t.abrupt("return",h);case 60:return t.abrupt("return",h.json());case 61:case"end":return t.stop()}}),t,this)}))),function(e,r){return d.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(s=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){t.next=34;break}s.itemId=a.itemId,t.next=39;break;case 34:if(void 0===o.itemId){t.next=38;break}s.itemId=o.itemId,t.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(d={},void 0===a.siteId){t.next=44;break}d.siteId=a.siteId,t.next=49;break;case 44:if(void 0===o.siteId){t.next=48;break}d.siteId=o.siteId,t.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=55,r(f);case 55:if(h=t.sent,!i){t.next=60;break}return t.abrupt("return",h);case 60:return t.abrupt("return",h.json());case 61:case"end":return t.stop()}}),t,this)}))),function(e,r){return s.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(o=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){t.next=16;break}s.customerId=a.customerId,t.next=21;break;case 16:if(void 0===o.customerId){t.next=20;break}s.customerId=o.customerId,t.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){t.next=25;break}s.listId=a.listId,t.next=30;break;case 25:if(void 0===o.listId){t.next=29;break}s.listId=o.listId,t.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){t.next=34;break}s.itemId=a.itemId,t.next=39;break;case 34:if(void 0===o.itemId){t.next=38;break}s.itemId=o.itemId,t.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(d={},void 0===a.siteId){t.next=44;break}d.siteId=a.siteId,t.next=49;break;case 44:if(void 0===o.siteId){t.next=48;break}d.siteId=o.siteId,t.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Xo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=55,r(f);case 55:if(h=t.sent,!i){t.next=60;break}return t.abrupt("return",h);case 60:return t.abrupt("return",h.json());case 61:case"end":return t.stop()}}),t,this)}))),function(e,r){return o.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(a=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0!==a.email?d.email=a.email:void 0!==o.email&&(d.email=o.email),void 0!==a.firstName?d.firstName=a.firstName:void 0!==o.firstName&&(d.firstName=o.firstName),void 0!==a.lastName?d.lastName=a.lastName:void 0!==o.lastName&&(d.lastName=o.lastName),void 0===a.siteId){t.next=20;break}d.siteId=a.siteId,t.next=25;break;case 20:if(void 0===o.siteId){t.next=24;break}d.siteId=o.siteId,t.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return c=new Xo("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=31,r(f);case 31:if(h=t.sent,!i){t.next=36;break}return t.abrupt("return",h);case 36:return t.abrupt("return",h.json());case 37:case"end":return t.stop()}}),t,this)}))),function(e,r){return a.apply(this,arguments)})},{key:"getPublicProductList",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.listId){t.next=16;break}s.listId=a.listId,t.next=21;break;case 16:if(void 0===o.listId){t.next=20;break}s.listId=o.listId,t.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getProductListItem",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.listId){t.next=16;break}s.listId=a.listId,t.next=21;break;case 16:if(void 0===o.listId){t.next=20;break}s.listId=o.listId,t.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===a.itemId){t.next=25;break}s.itemId=a.itemId,t.next=30;break;case 25:if(void 0===o.itemId){t.next=29;break}s.itemId=o.itemId,t.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Xo("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=is(is({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),is(is({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=46,r(f);case 46:if(h=t.sent,!i){t.next=51;break}return t.abrupt("return",h);case 51:return t.abrupt("return",h.json());case 52:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function os(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ss(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?os(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):os(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(as,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var ds=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(ss({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i;return St(t,[{key:"retrieveResults",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.channelId){t.next=16;break}s.channelId=a.channelId,t.next=21;break;case 16:if(void 0===o.channelId){t.next=20;break}s.channelId=o.channelId,t.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(d={},void 0===a.locale){t.next=26;break}d.locale=a.locale,t.next=31;break;case 26:if(void 0===o.locale){t.next=30;break}d.locale=o.locale,t.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==a.offset?d.offset=a.offset:void 0!==o.offset&&(d.offset=o.offset),void 0!==a.limit?d.limit=a.limit:void 0!==o.limit&&(d.limit=o.limit),c=new Xo("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ss(ss({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ss(ss({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=39,r(f);case 39:if(h=t.sent,!i){t.next=44;break}return t.abrupt("return",h);case 44:return t.abrupt("return",h.json());case 45:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getSuggestions",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.channelId){t.next=16;break}s.channelId=a.channelId,t.next=21;break;case 16:if(void 0===o.channelId){t.next=20;break}s.channelId=o.channelId,t.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(d={},void 0===a.suggestionTypes){t.next=26;break}d.suggestionTypes=a.suggestionTypes,t.next=31;break;case 26:if(void 0===o.suggestionTypes){t.next=30;break}d.suggestionTypes=o.suggestionTypes,t.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==a.searchText?d.searchText=a.searchText:void 0!==o.searchText&&(d.searchText=o.searchText),void 0===a.locale){t.next=36;break}d.locale=a.locale,t.next=41;break;case 36:if(void 0===o.locale){t.next=40;break}d.locale=o.locale,t.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return c=new Xo("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ss(ss({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ss(ss({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function cs(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function us(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?cs(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cs(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(ds,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var fs=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(us({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n;return St(t,[{key:"getGiftCertificate",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Xo("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=us(us({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),us(us({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function hs(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ls(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hs(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hs(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(fs,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var ps=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(ls({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i,a,o,s,d,c,u,f,h,l;return St(t,[{key:"retrieveCredQualityUserInfo",value:(l=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.username){t.next=17;break}d.username=a.username,t.next=22;break;case 17:if(void 0===o.username){t.next=21;break}d.username=o.username,t.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return c=new Xo("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=28,r(f);case 28:if(h=t.sent,!i){t.next=33;break}return t.abrupt("return",h);case 33:return t.abrupt("return",h.json());case 34:case"end":return t.stop()}}),t,this)}))),function(e,r){return l.apply(this,arguments)})},{key:"authenticateCustomer",value:(h=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return h.apply(this,arguments)})},{key:"logoutCustomer",value:(f=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.client_id){t.next=17;break}d.client_id=a.client_id,t.next=22;break;case 17:if(void 0===o.client_id){t.next=21;break}d.client_id=o.client_id,t.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===a.refresh_token){t.next=26;break}d.refresh_token=a.refresh_token,t.next=31;break;case 26:if(void 0===o.refresh_token){t.next=30;break}d.refresh_token=o.refresh_token,t.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==a.channel_id?d.channel_id=a.channel_id:void 0!==o.channel_id&&(d.channel_id=o.channel_id),c=new Xo("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return f.apply(this,arguments)})},{key:"authorizeCustomer",value:(u=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.redirect_uri){t.next=17;break}d.redirect_uri=a.redirect_uri,t.next=22;break;case 17:if(void 0===o.redirect_uri){t.next=21;break}d.redirect_uri=o.redirect_uri,t.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===a.response_type){t.next=26;break}d.response_type=a.response_type,t.next=31;break;case 26:if(void 0===o.response_type){t.next=30;break}d.response_type=o.response_type,t.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===a.client_id){t.next=35;break}d.client_id=a.client_id,t.next=40;break;case 35:if(void 0===o.client_id){t.next=39;break}d.client_id=o.client_id,t.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==a.scope?d.scope=a.scope:void 0!==o.scope&&(d.scope=o.scope),void 0!==a.state?d.state=a.state:void 0!==o.state&&(d.state=o.state),void 0!==a.usid?d.usid=a.usid:void 0!==o.usid&&(d.usid=o.usid),void 0!==a.hint?d.hint=a.hint:void 0!==o.hint&&(d.hint=o.hint),void 0!==a.channel_id?d.channel_id=a.channel_id:void 0!==o.channel_id&&(d.channel_id=o.channel_id),void 0===a.code_challenge){t.next=49;break}d.code_challenge=a.code_challenge,t.next=54;break;case 49:if(void 0===o.code_challenge){t.next=53;break}d.code_challenge=o.code_challenge,t.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return c=new Xo("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=60,r(f);case 60:if(h=t.sent,!i){t.next=65;break}return t.abrupt("return",h);case 65:return t.abrupt("return",h.json());case 66:case"end":return t.stop()}}),t,this)}))),function(e,r){return u.apply(this,arguments)})},{key:"getAccessToken",value:(c=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return c.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(d=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return d.apply(this,arguments)})},{key:"revokeToken",value:(s=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return s.apply(this,arguments)})},{key:"introspectToken",value:(o=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return o.apply(this,arguments)})},{key:"getUserInfo",value:(a=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},void 0!==a.channel_id?d.channel_id=a.channel_id:void 0!==o.channel_id&&(d.channel_id=o.channel_id),c=new Xo("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=20,r(f);case 20:if(h=t.sent,!i){t.next=25;break}return t.abrupt("return",h);case 25:return t.abrupt("return",h.json());case 26:case"end":return t.stop()}}),t,this)}))),function(e,r){return a.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getJwksUri",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return d={},c=new Xo("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ls(ls({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ls(ls({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=19,r(f);case 19:if(h=t.sent,!i){t.next=24;break}return t.abrupt("return",h);case 24:return t.abrupt("return",h.json());case 25:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function gs(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function bs(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?gs(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gs(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(ps,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Is=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(bs({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i,a,o,s,d,c;return St(t,[{key:"createOrder",value:(c=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=29,r(f);case 29:if(h=t.sent,!i){t.next=34;break}return t.abrupt("return",h);case 34:return t.abrupt("return",h.json());case 35:case"end":return t.stop()}}),t,this)}))),function(e,r){return c.apply(this,arguments)})},{key:"getOrder",value:(d=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return d.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(s=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return s.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(o=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return o.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(a=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===a.paymentInstrumentId){t.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,t.next=30;break;case 25:if(void 0===o.paymentInstrumentId){t.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,t.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(d={},void 0===a.siteId){t.next=35;break}d.siteId=a.siteId,t.next=40;break;case 35:if(void 0===o.siteId){t.next=39;break}d.siteId=o.siteId,t.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),t.next=47,r(f);case 47:if(h=t.sent,!i){t.next=52;break}return t.abrupt("return",h);case 52:return t.abrupt("return",h.json());case 53:case"end":return t.stop()}}),t,this)}))),function(e,r){return a.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){t.next=16;break}s.orderNo=a.orderNo,t.next=21;break;case 16:if(void 0===o.orderNo){t.next=20;break}s.orderNo=o.orderNo,t.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Xo("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=bs(bs({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),bs(bs({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=37,r(f);case 37:if(h=t.sent,!i){t.next=42;break}return t.abrupt("return",h);case 42:return t.abrupt("return",h.json());case 43:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function vs(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ms(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?vs(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vs(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(Is,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var ks=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(ms({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i,a,o;return St(t,[{key:"getProducts",value:(o=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.ids){t.next=17;break}d.ids=a.ids,t.next=22;break;case 17:if(void 0===o.ids){t.next=21;break}d.ids=o.ids,t.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==a.inventoryIds?d.inventoryIds=a.inventoryIds:void 0!==o.inventoryIds&&(d.inventoryIds=o.inventoryIds),void 0!==a.currency?d.currency=a.currency:void 0!==o.currency&&(d.currency=o.currency),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),void 0!==a.allImages?d.allImages=a.allImages:void 0!==o.allImages&&(d.allImages=o.allImages),void 0!==a.perPricebook?d.perPricebook=a.perPricebook:void 0!==o.perPricebook&&(d.perPricebook=o.perPricebook),void 0===a.siteId){t.next=31;break}d.siteId=a.siteId,t.next=36;break;case 31:if(void 0===o.siteId){t.next=35;break}d.siteId=o.siteId,t.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Xo("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ms(ms({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ms(ms({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=42,r(f);case 42:if(h=t.sent,!i){t.next=47;break}return t.abrupt("return",h);case 47:return t.abrupt("return",h.json());case 48:case"end":return t.stop()}}),t,this)}))),function(e,r){return o.apply(this,arguments)})},{key:"getProduct",value:(a=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.id){t.next=16;break}s.id=a.id,t.next=21;break;case 16:if(void 0===o.id){t.next=20;break}s.id=o.id,t.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(d={},void 0!==a.inventoryIds?d.inventoryIds=a.inventoryIds:void 0!==o.inventoryIds&&(d.inventoryIds=o.inventoryIds),void 0!==a.currency?d.currency=a.currency:void 0!==o.currency&&(d.currency=o.currency),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),void 0!==a.allImages?d.allImages=a.allImages:void 0!==o.allImages&&(d.allImages=o.allImages),void 0!==a.perPricebook?d.perPricebook=a.perPricebook:void 0!==o.perPricebook&&(d.perPricebook=o.perPricebook),void 0===a.siteId){t.next=31;break}d.siteId=a.siteId,t.next=36;break;case 31:if(void 0===o.siteId){t.next=35;break}d.siteId=o.siteId,t.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Xo("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ms(ms({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ms(ms({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=42,r(f);case 42:if(h=t.sent,!i){t.next=47;break}return t.abrupt("return",h);case 47:return t.abrupt("return",h.json());case 48:case"end":return t.stop()}}),t,this)}))),function(e,r){return a.apply(this,arguments)})},{key:"getCategories",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.ids){t.next=17;break}d.ids=a.ids,t.next=22;break;case 17:if(void 0===o.ids){t.next=21;break}d.ids=o.ids,t.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==a.levels?d.levels=a.levels:void 0!==o.levels&&(d.levels=o.levels),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),void 0===a.siteId){t.next=28;break}d.siteId=a.siteId,t.next=33;break;case 28:if(void 0===o.siteId){t.next=32;break}d.siteId=o.siteId,t.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Xo("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ms(ms({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ms(ms({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=39,r(f);case 39:if(h=t.sent,!i){t.next=44;break}return t.abrupt("return",h);case 44:return t.abrupt("return",h.json());case 45:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getCategory",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.id){t.next=16;break}s.id=a.id,t.next=21;break;case 16:if(void 0===o.id){t.next=20;break}s.id=o.id,t.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(d={},void 0!==a.levels?d.levels=a.levels:void 0!==o.levels&&(d.levels=o.levels),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),void 0===a.siteId){t.next=28;break}d.siteId=a.siteId,t.next=33;break;case 28:if(void 0===o.siteId){t.next=32;break}d.siteId=o.siteId,t.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Xo("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ms(ms({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ms(ms({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=39,r(f);case 39:if(h=t.sent,!i){t.next=44;break}return t.abrupt("return",h);case 44:return t.abrupt("return",h.json());case 45:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();function xs(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ys(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?xs(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xs(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Mt(ks,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var ws=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(ys({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i;return St(t,[{key:"getPromotions",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===a.ids){t.next=26;break}d.ids=a.ids,t.next=31;break;case 26:if(void 0===o.ids){t.next=30;break}d.ids=o.ids,t.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ys(ys({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ys(ys({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=38,r(f);case 38:if(h=t.sent,!i){t.next=43;break}return t.abrupt("return",h);case 43:return t.abrupt("return",h.json());case 44:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.campaignId){t.next=16;break}s.campaignId=a.campaignId,t.next=21;break;case 16:if(void 0===o.campaignId){t.next=20;break}s.campaignId=o.campaignId,t.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(d={},void 0===a.siteId){t.next=26;break}d.siteId=a.siteId,t.next=31;break;case 26:if(void 0===o.siteId){t.next=30;break}d.siteId=o.siteId,t.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.startDate?d.startDate=a.startDate:void 0!==o.startDate&&(d.startDate=o.startDate),void 0!==a.endDate?d.endDate=a.endDate:void 0!==o.endDate&&(d.endDate=o.endDate),void 0!==a.currency?d.currency=a.currency:void 0!==o.currency&&(d.currency=o.currency),c=new Xo("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=ys(ys({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),ys(ys({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=40,r(f);case 40:if(h=t.sent,!i){t.next=45;break}return t.abrupt("return",h);case 45:return t.abrupt("return",h.json());case 46:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();Mt(ws,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var zs=[],Cs=zs.sort,qs=o((function(){zs.sort(void 0)})),Es=o((function(){zs.sort(null)})),Ps=ut("sort");function Os(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function js(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Os(Object(t),!0).forEach((function(r){Mt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Os(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}Oe({target:"Array",proto:!0,forced:qs||!Es||!Ps},{sort:function(e){return void 0===e?Cs.call(je(this)):Cs.call(je(this),nr(e))}});var Ss=function(){function t(e){Ot(this,t),Mt(this,"clientConfig",void 0),this.clientConfig=new pn(js({baseUri:(this instanceof t?this.constructor:void 0).defaultBaseUri},e))}var n,i;return St(t,[{key:"productSearch",value:(i=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==a.q?d.q=a.q:void 0!==o.q&&(d.q=o.q),void 0!==a.refine?d.refine=a.refine:void 0!==o.refine&&(d.refine=o.refine),void 0!==a.sort?d.sort=a.sort:void 0!==o.sort&&(d.sort=o.sort),void 0!==a.currency?d.currency=a.currency:void 0!==o.currency&&(d.currency=o.currency),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),void 0!==a.offset?d.offset=a.offset:void 0!==o.offset&&(d.offset=o.offset),void 0!==a.limit?d.limit=a.limit:void 0!==o.limit&&(d.limit=o.limit),c=new Xo("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=js(js({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),js(js({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=35,r(f);case 35:if(h=t.sent,!i){t.next=40;break}return t.abrupt("return",h);case 40:return t.abrupt("return",h.json());case 41:case"end":return t.stop()}}),t,this)}))),function(e,r){return i.apply(this,arguments)})},{key:"getSearchSuggestions",value:(n=Pt(an.mark((function t(n,i){var a,o,s,d,c,u,f,h;return an.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){t.next=7;break}s.organizationId=a.organizationId,t.next=12;break;case 7:if(void 0===o.organizationId){t.next=11;break}s.organizationId=o.organizationId,t.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(d={},void 0===a.siteId){t.next=17;break}d.siteId=a.siteId,t.next=22;break;case 17:if(void 0===o.siteId){t.next=21;break}d.siteId=o.siteId,t.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===a.q){t.next=26;break}d.q=a.q,t.next=31;break;case 26:if(void 0===o.q){t.next=30;break}d.q=o.q,t.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==a.limit?d.limit=a.limit:void 0!==o.limit&&(d.limit=o.limit),void 0!==a.currency?d.currency=a.currency:void 0!==o.currency&&(d.currency=o.currency),void 0!==a.locale?d.locale=a.locale:void 0!==o.locale&&(d.locale=o.locale),c=new Xo("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:this.clientConfig.proxy}),(u=js(js({},this.clientConfig.headers),null==n?void 0:n.headers))["user-agent"]=[u["user-agent"],Zo].join(" "),f=new e(c.toString(),js(js({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),t.next=40,r(f);case 40:if(h=t.sent,!i){t.next=45;break}return t.abrupt("return",h);case 45:return t.abrupt("return",h.json());case 46:case"end":return t.stop()}}),t,this)}))),function(e,r){return n.apply(this,arguments)})}]),t}();Mt(Ss,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");export{pn as ClientConfig,ts as ShopperBaskets,as as ShopperCustomers,ds as ShopperDiscoverySearch,fs as ShopperGiftCertificates,ps as ShopperLogin,Is as ShopperOrders,ks as ShopperProducts,ws as ShopperPromotions,Ss as ShopperSearch,Xo as TemplateURL};
|
|
1
|
+
import{Request as e,fetch as t}from"cross-fetch";import{nanoid as r}from"nanoid";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,o,s=function(e){return e&&e.Math==Math&&e},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!d((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,p=f?h.bind(h):function(){return h.apply(h,arguments)},l={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!l.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:l},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I=Function.prototype,m=I.bind,x=I.call,k=f&&m.bind(x,x),w=f?function(e){return e&&k(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},y=w({}.toString),C=w("".slice),z=function(e){return C(y(e),8,-1)},O=c.Object,E=w("".split),q=d((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==z(e)?E(e,""):O(e)}:O,P=c.TypeError,S=function(e){if(null==e)throw P("Can't call method on "+e);return e},j=function(e){return q(S(e))},M=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:M(e)},R=function(e){return M(e)?e:void 0},U=function(e,t){return arguments.length<2?R(c[e]):c[e]&&c[e][t]},A=w({}.isPrototypeOf),B=U("navigator","userAgent")||"",N=c.process,_=c.Deno,L=N&&N.versions||_&&_.version,D=L&&L.v8;D&&(o=(a=D.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&B&&(!(a=B.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=B.match(/Chrome\/(\d+)/))&&(o=+a[1]);var J=o,F=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&J&&J<41})),G=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=c.Object,Y=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return M(t)&&A(t.prototype,H(e))},V=c.String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=c.TypeError,K=function(e){if(M(e))return e;throw $(W(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=c.TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__core-js_shared__"]||ee("__core-js_shared__",{}),re=i((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=c.Object,ie=function(e){return ne(S(e))},ae=w({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,ce=Math.random(),de=w(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+de(++se+ce,36)},fe=re("wks"),he=c.Symbol,pe=he&&he.for,le=G?he:he&&he.withoutSetter||ue,ge=function(e){if(!oe(fe,e)||!F&&"string"!=typeof fe[e]){var t="Symbol."+e;F&&oe(he,e)?fe[e]=he[e]:fe[e]=G&&pe?pe(t):le(t)}return fe[e]},be=c.TypeError,ve=ge("toPrimitive"),Ie=function(e,t){if(!T(e)||Y(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=p(n,e,t),!T(r)||Y(r))return r;throw be("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&M(r=e.toString)&&!T(n=p(r,e)))return n;if(M(r=e.valueOf)&&!T(n=p(r,e)))return n;if("string"!==t&&M(r=e.toString)&&!T(n=p(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},me=function(e){var t=Ie(e,"string");return Y(t)?t:t+""},xe=c.document,ke=T(xe)&&T(xe.createElement),we=function(e){return ke?xe.createElement(e):{}},ye=!u&&!d((function(){return 7!=Object.defineProperty(we("div"),"a",{get:function(){return 7}}).a})),Ce=Object.getOwnPropertyDescriptor,ze={f:u?Ce:function(e,t){if(e=j(e),t=me(t),ye)try{return Ce(e,t)}catch(e){}if(oe(e,t))return v(!p(b.f,e,t),e[t])}},Oe=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ee=c.String,qe=c.TypeError,Pe=function(e){if(T(e))return e;throw qe(Ee(e)+" is not an object")},Se=c.TypeError,je=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Te={f:u?Oe?function(e,t,r){if(Pe(e),t=me(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Me(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(Pe(e),t=me(t),Pe(r),ye)try{return je(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Se("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Re=u?function(e,t,r){return Te.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=w(Function.toString);M(te.inspectSource)||(te.inspectSource=function(e){return Ue(e)});var Ae,Be,Ne,_e=te.inspectSource,Le=c.WeakMap,De=M(Le)&&/native code/.test(_e(Le)),Je=re("keys"),Fe=function(e){return Je[e]||(Je[e]=ue(e))},Ge={},He=c.TypeError,Ye=c.WeakMap;if(De||te.state){var Ve=te.state||(te.state=new Ye),We=w(Ve.get),$e=w(Ve.has),Ke=w(Ve.set);Ae=function(e,t){if($e(Ve,e))throw new He("Object already initialized");return t.facade=e,Ke(Ve,e,t),t},Be=function(e){return We(Ve,e)||{}},Ne=function(e){return $e(Ve,e)}}else{var Qe=Fe("state");Ge[Qe]=!0,Ae=function(e,t){if(oe(e,Qe))throw new He("Object already initialized");return t.facade=e,Re(e,Qe,t),t},Be=function(e){return oe(e,Qe)?e[Qe]:{}},Ne=function(e){return oe(e,Qe)}}var Xe={set:Ae,get:Be,has:Ne,enforce:function(e){return Ne(e)?Be(e):Ae(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Be(t)).type!==e)throw He("Incompatible receiver, "+e+" required");return r}}},Ze=Function.prototype,et=u&&Object.getOwnPropertyDescriptor,tt=oe(Ze,"name"),rt={EXISTS:tt,PROPER:tt&&"something"===function(){}.name,CONFIGURABLE:tt&&(!u||u&&et(Ze,"name").configurable)},nt=i((function(e){var t=rt.CONFIGURABLE,r=Xe.get,n=Xe.enforce,i=String(String).split("String");(e.exports=function(e,r,a,o){var s,d=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet,h=o&&void 0!==o.name?o.name:r;M(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!oe(a,"name")||t&&a.name!==h)&&Re(a,"name",h),(s=n(a)).source||(s.source=i.join("string"==typeof h?h:""))),e!==c?(d?!f&&e[r]&&(u=!0):delete e[r],u?e[r]=a:Re(e,r,a)):u?e[r]=a:ee(r,a)})(Function.prototype,"toString",(function(){return M(this)&&r(this).source||_e(this)}))})),it=Math.ceil,at=Math.floor,ot=function(e){var t=+e;return t!=t||0===t?0:(t>0?at:it)(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},ht=function(e){return ft(e.length)},pt=function(e){return function(t,r,n){var i,a=j(t),o=ht(a),s=dt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=w([].push),vt=function(e,t){var r,n=j(e),i=0,a=[];for(r in n)!oe(Ge,r)&&oe(n,r)&&bt(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=It.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return vt(e,mt)}},kt={f:Object.getOwnPropertySymbols},wt=w([].concat),yt=U("Reflect","ownKeys")||function(e){var t=xt.f(Pe(e)),r=kt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=Te.f,a=ze.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Ot=function(e,t){var r=qt[Et(e)];return r==St||r!=Pt&&(M(t)?d(t):!!t)},Et=Ot.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Ot.data={},Pt=Ot.NATIVE="N",St=Ot.POLYFILL="P",jt=Ot,Mt=ze.f,Tt=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,u=e.stat;if(r=d?c:u?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(a=t[n],i=e.noTargetGet?(o=Mt(r,n))&&o.value:r[n],!jt(d?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Re(a,"sham",!0),nt(r,n,a,e)}},Rt=Object.keys||function(e){return vt(e,It)},Ut=d((function(){Rt(1)}));Tt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return Rt(ie(e))}});var At=Function.prototype,Bt=At.apply,Nt=At.call,_t="object"==typeof Reflect&&Reflect.apply||(f?Nt.bind(Bt):function(){return Nt.apply(Bt,arguments)}),Lt=Array.isArray||function(e){return"Array"==z(e)},Dt={};Dt[ge("toStringTag")]="z";var Jt,Ft="[object z]"===String(Dt),Gt=ge("toStringTag"),Ht=c.Object,Yt="Arguments"==z(function(){return arguments}()),Vt=Ft?z: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=Ht(e),Gt))?r:Yt?z(t):"Object"==(n=z(t))&&M(t.callee)?"Arguments":n},Wt=c.String,$t=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return Wt(e)},Kt={f:u&&!Oe?Object.defineProperties:function(e,t){Pe(e);for(var r,n=j(t),i=Rt(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},Qt=U("document","documentElement"),Xt=Fe("IE_PROTO"),Zt=function(){},er=function(e){return"<script>"+e+"<\/script>"},tr=function(e){e.write(er("")),e.close();var t=e.parentWindow.Object;return e=null,t},rr=function(){try{Jt=new ActiveXObject("htmlfile")}catch(e){}var e,t;rr="undefined"!=typeof document?document.domain&&Jt?tr(Jt):((t=we("iframe")).style.display="none",Qt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(er("document.F=Object")),e.close(),e.F):tr(Jt);for(var r=It.length;r--;)delete rr.prototype[It[r]];return rr()};Ge[Xt]=!0;var nr=Object.create||function(e,t){var r;return null!==e?(Zt.prototype=Pe(e),r=new Zt,Zt.prototype=null,r[Xt]=e):r=rr(),void 0===t?r:Kt.f(r,t)},ir=function(e,t,r){var n=me(t);n in e?Te.f(e,n,v(0,r)):e[n]=r},ar=c.Array,or=Math.max,sr=function(e,t,r){for(var n=ht(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=ar(or(a-i,0)),s=0;i<a;i++,s++)ir(o,s,e[i]);return o.length=s,o},cr=xt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ur={f:function(e){return dr&&"Window"==z(e)?function(e){try{return cr(e)}catch(e){return sr(dr)}}(e):cr(j(e))}},fr=w([].slice),hr={f:ge},pr=c,lr=Te.f,gr=Te.f,br=ge("toStringTag"),vr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,br)&&gr(e,br,{configurable:!0,value:t})},Ir=w(w.bind),mr=function(e,t){return K(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},xr=function(){},kr=[],wr=U("Reflect","construct"),yr=/^\s*(?:class|function)\b/,Cr=w(yr.exec),zr=!yr.exec(xr),Or=function(e){if(!M(e))return!1;try{return wr(xr,kr,e),!0}catch(e){return!1}},Er=function(e){if(!M(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zr||!!Cr(yr,_e(e))}catch(e){return!0}};Er.sham=!0;var qr=!wr||d((function(){var e;return Or(Or.call)||!Or(Object)||!Or((function(){e=!0}))||e}))?Er:Or,Pr=ge("species"),Sr=c.Array,jr=function(e,t){return new(function(e){var t;return Lt(e)&&(t=e.constructor,(qr(t)&&(t===Sr||Lt(t.prototype))||T(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Sr:t}(e))(0===t?0:t)},Mr=w([].push),Tr=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,d,u,f){for(var h,p,l=ie(c),g=q(l),b=mr(d,u),v=ht(g),I=0,m=f||jr,x=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:Mr(x,h)}else switch(e){case 4:return!1;case 7:Mr(x,h)}return a?-1:n||i?i:x}},Rr={forEach:Tr(0),map:Tr(1),filter:Tr(2),some:Tr(3),every:Tr(4),find:Tr(5),findIndex:Tr(6),filterReject:Tr(7)},Ur=Rr.forEach,Ar=Fe("hidden"),Br=ge("toPrimitive"),Nr=Xe.set,_r=Xe.getterFor("Symbol"),Lr=Object.prototype,Dr=c.Symbol,Jr=Dr&&Dr.prototype,Fr=c.TypeError,Gr=c.QObject,Hr=U("JSON","stringify"),Yr=ze.f,Vr=Te.f,Wr=ur.f,$r=b.f,Kr=w([].push),Qr=re("symbols"),Xr=re("op-symbols"),Zr=re("string-to-symbol-registry"),en=re("symbol-to-string-registry"),tn=re("wks"),rn=!Gr||!Gr.prototype||!Gr.prototype.findChild,nn=u&&d((function(){return 7!=nr(Vr({},"a",{get:function(){return Vr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Yr(Lr,t);n&&delete Lr[t],Vr(e,t,r),n&&e!==Lr&&Vr(Lr,t,n)}:Vr,an=function(e,t){var r=Qr[e]=nr(Jr);return Nr(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},on=function(e,t,r){e===Lr&&on(Xr,t,r),Pe(e);var n=me(t);return Pe(r),oe(Qr,n)?(r.enumerable?(oe(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=nr(r,{enumerable:v(0,!1)})):(oe(e,Ar)||Vr(e,Ar,v(1,{})),e[Ar][n]=!0),nn(e,n,r)):Vr(e,n,r)},sn=function(e,t){Pe(e);var r=j(t),n=Rt(r).concat(fn(r));return Ur(n,(function(t){u&&!p(cn,r,t)||on(e,t,r[t])})),e},cn=function(e){var t=me(e),r=p($r,this,t);return!(this===Lr&&oe(Qr,t)&&!oe(Xr,t))&&(!(r||!oe(this,t)||!oe(Qr,t)||oe(this,Ar)&&this[Ar][t])||r)},dn=function(e,t){var r=j(e),n=me(t);if(r!==Lr||!oe(Qr,n)||oe(Xr,n)){var i=Yr(r,n);return!i||!oe(Qr,n)||oe(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},un=function(e){var t=Wr(j(e)),r=[];return Ur(t,(function(e){oe(Qr,e)||oe(Ge,e)||Kr(r,e)})),r},fn=function(e){var t=e===Lr,r=Wr(t?Xr:j(e)),n=[];return Ur(r,(function(e){!oe(Qr,e)||t&&!oe(Lr,e)||Kr(n,Qr[e])})),n};if(F||(Jr=(Dr=function(){if(A(Jr,this))throw Fr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$t(arguments[0]):void 0,t=ue(e),r=function(e){this===Lr&&p(r,Xr,e),oe(this,Ar)&&oe(this[Ar],t)&&(this[Ar][t]=!1),nn(this,t,v(1,e))};return u&&rn&&nn(Lr,t,{configurable:!0,set:r}),an(t,e)}).prototype,nt(Jr,"toString",(function(){return _r(this).tag})),nt(Dr,"withoutSetter",(function(e){return an(ue(e),e)})),b.f=cn,Te.f=on,Kt.f=sn,ze.f=dn,xt.f=ur.f=un,kt.f=fn,hr.f=function(e){return an(ge(e),e)},u&&(Vr(Jr,"description",{configurable:!0,get:function(){return _r(this).description}}),nt(Lr,"propertyIsEnumerable",cn,{unsafe:!0}))),Tt({global:!0,wrap:!0,forced:!F,sham:!F},{Symbol:Dr}),Ur(Rt(tn),(function(e){!function(e){var t=pr.Symbol||(pr.Symbol={});oe(t,e)||lr(t,e,{value:hr.f(e)})}(e)})),Tt({target:"Symbol",stat:!0,forced:!F},{for:function(e){var t=$t(e);if(oe(Zr,t))return Zr[t];var r=Dr(t);return Zr[t]=r,en[r]=t,r},keyFor:function(e){if(!Y(e))throw Fr(e+" is not a symbol");if(oe(en,e))return en[e]},useSetter:function(){rn=!0},useSimple:function(){rn=!1}}),Tt({target:"Object",stat:!0,forced:!F,sham:!u},{create:function(e,t){return void 0===t?nr(e):sn(nr(e),t)},defineProperty:on,defineProperties:sn,getOwnPropertyDescriptor:dn}),Tt({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:un,getOwnPropertySymbols:fn}),Tt({target:"Object",stat:!0,forced:d((function(){kt.f(1)}))},{getOwnPropertySymbols:function(e){return kt.f(ie(e))}}),Hr){var hn=!F||d((function(){var e=Dr();return"[null]"!=Hr([e])||"{}"!=Hr({a:e})||"{}"!=Hr(Object(e))}));Tt({target:"JSON",stat:!0,forced:hn},{stringify:function(e,t,r){var n=fr(arguments),i=t;if((T(t)||void 0!==e)&&!Y(e))return Lt(t)||(t=function(e,t){if(M(i)&&(t=p(i,this,e,t)),!Y(t))return t}),n[1]=t,_t(Hr,null,n)}})}if(!Jr[Br]){var pn=Jr.valueOf;nt(Jr,Br,(function(e){return p(pn,this)}))}vr(Dr,"Symbol"),Ge[Ar]=!0;var ln=ge("species"),gn=function(e){return J>=51||!d((function(){var t=[];return(t.constructor={})[ln]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},bn=Rr.filter,vn=gn("filter");Tt({target:"Array",proto:!0,forced:!vn},{filter:function(e){return bn(this,e,arguments.length>1?arguments[1]:void 0)}});var In=Ft?{}.toString:function(){return"[object "+Vt(this)+"]"};Ft||nt(Object.prototype,"toString",In,{unsafe:!0});var mn=ze.f,xn=d((function(){mn(1)}));Tt({target:"Object",stat:!0,forced:!u||xn,sham:!u},{getOwnPropertyDescriptor:function(e,t){return mn(j(e),t)}});var kn={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},wn=we("span").classList,yn=wn&&wn.constructor&&wn.constructor.prototype,Cn=yn===Object.prototype?void 0:yn,zn=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){throw 1},1)}))},On=Rr.forEach,En=zn("forEach")?[].forEach:function(e){return On(this,e,arguments.length>1?arguments[1]:void 0)},qn=function(e){if(e&&e.forEach!==En)try{Re(e,"forEach",En)}catch(t){e.forEach=En}};for(var Pn in kn)kn[Pn]&&qn(c[Pn]&&c[Pn].prototype);qn(Cn),Tt({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=j(e),i=ze.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&ir(o,t,r);return o}});var Sn=Kt.f;Tt({target:"Object",stat:!0,forced:Object.defineProperties!==Sn,sham:!u},{defineProperties:Sn});var jn=Te.f;Tt({target:"Object",stat:!0,forced:Object.defineProperty!==jn,sham:!u},{defineProperty:jn});var Mn=w([].join),Tn=q!=Object,Rn=zn("join",",");Tt({target:"Array",proto:!0,forced:Tn||!Rn},{join:function(e){return Mn(j(this),void 0===e?",":e)}});var Un=function(){var e=Pe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},An=rt.PROPER,Bn=RegExp.prototype,Nn=Bn.toString,_n=w(Un),Ln=d((function(){return"/a/b"!=Nn.call({source:"a",flags:"b"})})),Dn=An&&"toString"!=Nn.name;function Jn(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function Fn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Jn(a,n,i,o,s,"next",e)}function s(e){Jn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Yn(e,t,r){return t&&Hn(e.prototype,t),r&&Hn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Ln||Dn)&&nt(RegExp.prototype,"toString",(function(){var e=Pe(this),t=$t(e.source),r=e.flags;return"/"+t+"/"+$t(void 0===r&&A(Bn,e)&&!("flags"in Bn)?_n(e):r)}),{unsafe:!0});var Wn=Object.prototype,$n=Wn.hasOwnProperty,Kn="function"==typeof Symbol?Symbol:{},Qn=Kn.iterator||"@@iterator",Xn=Kn.asyncIterator||"@@asyncIterator",Zn=Kn.toStringTag||"@@toStringTag";function ei(e,t,r,n){var i=t&&t.prototype instanceof ni?t:ni,a=Object.create(i.prototype),o=new bi(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return Ii()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=pi(o,r);if(s){if(s===ri)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=ti(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ri)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function ti(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ri={};function ni(){}function ii(){}function ai(){}var oi={};oi[Qn]=function(){return this};var si=Object.getPrototypeOf,ci=si&&si(si(vi([])));ci&&ci!==Wn&&$n.call(ci,Qn)&&(oi=ci);var di=ai.prototype=ni.prototype=Object.create(oi);function ui(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function fi(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===ii||"GeneratorFunction"===(t.displayName||t.name))}function hi(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=ti(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&$n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function pi(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,pi(e,t),"throw"===t.method))return ri;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ri}var n=ti(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ri;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,ri):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ri)}function li(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 gi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function bi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(li,this),this.reset(!0)}function vi(e){if(e){var t=e[Qn];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($n.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:Ii}}function Ii(){return{value:void 0,done:!0}}ii.prototype=di.constructor=ai,ai.constructor=ii,ai[Zn]=ii.displayName="GeneratorFunction",ui(hi.prototype),hi.prototype[Xn]=function(){return this},ui(di),di[Zn]="Generator",di[Qn]=function(){return this},di.toString=function(){return"[object Generator]"},bi.prototype={constructor:bi,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(gi),!e)for(var t in this)"t"===t.charAt(0)&&$n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=$n.call(i,"catchLoc"),s=$n.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&$n.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,ri):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),ri},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),gi(r),ri}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;gi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:vi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ri}};var mi={wrap:ei,isGeneratorFunction:fi,AsyncIterator:hi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,ai):(e.__proto__=ai,Zn in e||(e[Zn]="GeneratorFunction")),e.prototype=Object.create(di),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new hi(ei(e,t,r,n),i);return fi(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:vi},xi=ge("unscopables"),ki=Array.prototype;null==ki[xi]&&Te.f(ki,xi,{configurable:!0,value:nr(null)});var wi,yi,Ci,zi=function(e){ki[xi][e]=!0},Oi={},Ei=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),qi=Fe("IE_PROTO"),Pi=c.Object,Si=Pi.prototype,ji=Ei?Pi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,qi))return t[qi];var r=t.constructor;return M(r)&&t instanceof r?r.prototype:t instanceof Pi?Si:null},Mi=ge("iterator"),Ti=!1;[].keys&&("next"in(Ci=[].keys())?(yi=ji(ji(Ci)))!==Object.prototype&&(wi=yi):Ti=!0),(null==wi||d((function(){var e={};return wi[Mi].call(e)!==e})))&&(wi={}),M(wi[Mi])||nt(wi,Mi,(function(){return this}));var Ri={IteratorPrototype:wi,BUGGY_SAFARI_ITERATORS:Ti},Ui=Ri.IteratorPrototype,Ai=function(){return this},Bi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=nr(Ui,{next:v(+!n,r)}),vr(e,i,!1),Oi[i]=Ai,e},Ni=c.String,_i=c.TypeError,Li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=w(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||M(e))return e;throw _i("Can't set "+Ni(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Di=rt.PROPER,Ji=rt.CONFIGURABLE,Fi=Ri.IteratorPrototype,Gi=Ri.BUGGY_SAFARI_ITERATORS,Hi=ge("iterator"),Yi=function(){return this},Vi=function(e,t,r,n,i,a,o){Bi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!Gi&&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)}},f=t+" Iterator",h=!1,l=e.prototype,g=l[Hi]||l["@@iterator"]||i&&l[i],b=!Gi&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=ji(v.call(new e)))!==Object.prototype&&s.next&&(ji(s)!==Fi&&(Li?Li(s,Fi):M(s[Hi])||nt(s,Hi,Yi)),vr(s,f,!0)),Di&&"values"==i&&g&&"values"!==g.name&&(Ji?Re(l,"name","values"):(h=!0,b=function(){return p(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(Gi||h||!(d in l))&&nt(l,d,c[d]);else Tt({target:t,proto:!0,forced:Gi||h},c);return l[Hi]!==b&&nt(l,Hi,b,{name:i}),Oi[t]=b,c},Wi=Te.f,$i=Xe.set,Ki=Xe.getterFor("Array Iterator"),Qi=Vi(Array,"Array",(function(e,t){$i(this,{type:"Array Iterator",target:j(e),index:0,kind:t})}),(function(){var e=Ki(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"),Xi=Oi.Arguments=Oi.Array;if(zi("keys"),zi("values"),zi("entries"),u&&"values"!==Xi.name)try{Wi(Xi,"name",{value:"values"})}catch(e){}var Zi=w("".charAt),ea=w("".charCodeAt),ta=w("".slice),ra=function(e){return function(t,r){var n,i,a=$t(S(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ea(a,o))<55296||n>56319||o+1===s||(i=ea(a,o+1))<56320||i>57343?e?Zi(a,o):n:e?ta(a,o,o+2):i-56320+(n-55296<<10)+65536}},na={codeAt:ra(!1),charAt:ra(!0)},ia=na.charAt,aa=Xe.set,oa=Xe.getterFor("String Iterator");Vi(String,"String",(function(e){aa(this,{type:"String Iterator",string:$t(e),index:0})}),(function(){var e,t=oa(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=ia(r,n),t.index+=e.length,{value:e,done:!1})}));var sa=ge("iterator"),ca=ge("toStringTag"),da=Qi.values,ua=function(e,t){if(e){if(e[sa]!==da)try{Re(e,sa,da)}catch(t){e[sa]=da}if(e[ca]||Re(e,ca,t),kn[t])for(var r in Qi)if(e[r]!==Qi[r])try{Re(e,r,Qi[r])}catch(t){e[r]=Qi[r]}}};for(var fa in kn)ua(c[fa]&&c[fa].prototype,fa);ua(Cn,"DOMTokenList");var ha=ge("iterator"),pa=!d((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ha]||"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})),la=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},ga=c.TypeError,ba=function(e,t){if(A(t,e))return e;throw ga("Incorrect invocation")},va=ge("iterator"),Ia=function(e){if(null!=e)return Q(e,va)||Q(e,"@@iterator")||Oi[Vt(e)]},ma=c.TypeError,xa=function(e,t){var r=arguments.length<2?Ia(e):t;if(K(r))return Pe(p(r,e));throw ma(W(e)+" is not iterable")},ka=c.TypeError,wa=function(e,t){if(e<t)throw ka("Not enough arguments");return e},ya=Math.floor,Ca=function(e,t){var r=e.length,n=ya(r/2);return r<8?za(e,t):Oa(e,Ca(sr(e,0,n),t),Ca(sr(e,n),t),t)},za=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Oa=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Ea=Ca,qa=ge("iterator"),Pa=Xe.set,Sa=Xe.getterFor("URLSearchParams"),ja=Xe.getterFor("URLSearchParamsIterator"),Ma=U("fetch"),Ta=U("Request"),Ra=U("Headers"),Ua=Ta&&Ta.prototype,Aa=Ra&&Ra.prototype,Ba=c.RegExp,Na=c.TypeError,_a=c.decodeURIComponent,La=c.encodeURIComponent,Da=w("".charAt),Ja=w([].join),Fa=w([].push),Ga=w("".replace),Ha=w([].shift),Ya=w([].splice),Va=w("".split),Wa=w("".slice),$a=/\+/g,Ka=Array(4),Qa=function(e){return Ka[e-1]||(Ka[e-1]=Ba("((?:%[\\da-f]{2}){"+e+"})","gi"))},Xa=function(e){try{return _a(e)}catch(t){return e}},Za=function(e){var t=Ga(e,$a," "),r=4;try{return _a(t)}catch(e){for(;r;)t=Ga(t,Qa(r--),Xa);return t}},eo=/[!'()~]|%20/g,to={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ro=function(e){return to[e]},no=function(e){return Ga(La(e),eo,ro)},io=Bi((function(e,t){Pa(this,{type:"URLSearchParamsIterator",iterator:xa(Sa(e).entries),kind:t})}),"Iterator",(function(){var e=ja(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),ao=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Da(e,0)?Wa(e,1):e:$t(e)))};ao.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ia(e);if(c)for(r=(t=xa(e,c)).next;!(n=p(r,t)).done;){if(a=(i=xa(Pe(n.value))).next,(o=p(a,i)).done||(s=p(a,i)).done||!p(a,i).done)throw Na("Expected sequence with length 2");Fa(this.entries,{key:$t(o.value),value:$t(s.value)})}else for(var d in e)oe(e,d)&&Fa(this.entries,{key:d,value:$t(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=Va(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Va(t,"="),Fa(this.entries,{key:Za(Ha(r)),value:Za(Ja(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Fa(r,no(e.key)+"="+no(e.value));return Ja(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var oo=function(){ba(this,so);var e=arguments.length>0?arguments[0]:void 0;Pa(this,new ao(e))},so=oo.prototype;if(la(so,{append:function(e,t){wa(arguments.length,2);var r=Sa(this);Fa(r.entries,{key:$t(e),value:$t(t)}),r.updateURL()},delete:function(e){wa(arguments.length,1);for(var t=Sa(this),r=t.entries,n=$t(e),i=0;i<r.length;)r[i].key===n?Ya(r,i,1):i++;t.updateURL()},get:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Fa(n,t[i].value);return n},has:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){wa(arguments.length,1);for(var r,n=Sa(this),i=n.entries,a=!1,o=$t(e),s=$t(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?Ya(i,c--,1):(a=!0,r.value=s));a||Fa(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Sa(this);Ea(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Sa(this).entries,n=mr(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new io(this,"keys")},values:function(){return new io(this,"values")},entries:function(){return new io(this,"entries")}},{enumerable:!0}),nt(so,qa,so.entries,{name:"entries"}),nt(so,"toString",(function(){return Sa(this).serialize()}),{enumerable:!0}),vr(oo,"URLSearchParams"),Tt({global:!0,forced:!pa},{URLSearchParams:oo}),!pa&&M(Ra)){var co=w(Aa.has),uo=w(Aa.set),fo=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new Ra(e.headers):new Ra,co(t,"content-type")||uo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),nr(e,{body:v(0,$t(r)),headers:v(0,t)})}return e};if(M(Ma)&&Tt({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Ma(e,arguments.length>1?fo(arguments[1]):{})}}),M(Ta)){var ho=function(e){return ba(this,Ua),new Ta(e,arguments.length>1?fo(arguments[1]):{})};Ua.constructor=ho,ho.prototype=Ua,Tt({global:!0,forced:!0},{Request:ho})}}var po={URLSearchParams:oo,getState:Sa};function lo(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 go(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bo=Yn((function e(t){if(Gn(this,e),Vn(this,"baseUri",void 0),Vn(this,"proxy",void 0),Vn(this,"headers",void 0),Vn(this,"parameters",void 0),Vn(this,"fetchOptions",void 0),Vn(this,"transformRequest",void 0),Vn(this,"throwOnBadResponse",void 0),this.headers=go({},t.headers),this.parameters=go({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=go({},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 vo(e){return(vo="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)}Vn(bo,"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}}});var Io="object"===("undefined"==typeof window?"undefined":vo(window))&&"object"===vo(window.document),mo="object"===("undefined"==typeof process?"undefined":vo(process))&&"object"===vo(process.versions)&&"string"==typeof process.versions.node,xo=c.Function,ko=w([].concat),wo=w([].join),yo={},Co=function(e,t,r){if(!oe(yo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";yo[t]=xo("C,a","return new C("+wo(n,",")+")")}return yo[t](e,r)},zo=f?xo.bind:function(e){var t=K(this),r=t.prototype,n=fr(arguments,1),i=function(){var r=ko(n,fr(arguments));return this instanceof i?Co(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},Oo=c.TypeError,Eo=function(e){if(qr(e))return e;throw Oo(W(e)+" is not a constructor")},qo=U("Reflect","construct"),Po=Object.prototype,So=[].push,jo=d((function(){function e(){}return!(qo((function(){}),[],e)instanceof e)})),Mo=!d((function(){qo((function(){}))})),To=jo||Mo;Tt({target:"Reflect",stat:!0,forced:To,sham:To},{construct:function(e,t){Eo(e),Pe(t);var r=arguments.length<3?e:Eo(arguments[2]);if(Mo&&!jo)return qo(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 _t(So,n,t),new(_t(zo,e,n))}var i=r.prototype,a=nr(T(i)?i:Po),o=_t(e,a,t);return T(o)?o:a}});var Ro=ge("isConcatSpreadable"),Uo=c.TypeError,Ao=J>=51||!d((function(){var e=[];return e[Ro]=!1,e.concat()[0]!==e})),Bo=gn("concat"),No=function(e){if(!T(e))return!1;var t=e[Ro];return void 0!==t?!!t:Lt(e)};function _o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lo(e,t){return(Lo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Do(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&&Lo(e,t)}function Jo(e,t){if(t&&("object"===vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _o(e)}function Fo(e){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Go(){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 Ho(e,t,r){return(Ho=Go()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Lo(i,r.prototype),i}).apply(null,arguments)}function Yo(e){var t="function"==typeof Map?new Map:void 0;return(Yo=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 Ho(e,arguments,Fo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Lo(n,e)})(e)}function Vo(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=Fo(e);if(t){var i=Fo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}Tt({target:"Array",proto:!0,forced:!Ao||!Bo},{concat:function(e){var t,r,n,i,a,o=ie(this),s=jr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(No(a=-1===t?o:arguments[t])){if(c+(i=ht(a))>9007199254740991)throw Uo("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in a&&ir(s,c,a[r])}else{if(c>=9007199254740991)throw Uo("Maximum allowed index exceeded");ir(s,c++,a)}return s.length=c,s}});var Wo,$o,Ko=function(e){Do(r,Yo(Error));var t=Vo(r);function r(e){var n;return Gn(this,r),Vn(_o(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return Yn(r)}(),Qo=c.RegExp,Xo=d((function(){var e=Qo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Zo=Xo||d((function(){return!Qo("a","y").sticky})),es={BROKEN_CARET:Xo||d((function(){var e=Qo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Zo,UNSUPPORTED_Y:Xo},ts=c.RegExp,rs=d((function(){var e=ts(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ns=c.RegExp,is=d((function(){var e=ns("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),as=Xe.get,os=re("native-string-replace",String.prototype.replace),ss=RegExp.prototype.exec,cs=ss,ds=w("".charAt),us=w("".indexOf),fs=w("".replace),hs=w("".slice),ps=($o=/b*/g,p(ss,Wo=/a/,"a"),p(ss,$o,"a"),0!==Wo.lastIndex||0!==$o.lastIndex),ls=es.BROKEN_CARET,gs=void 0!==/()??/.exec("")[1];(ps||gs||ls||rs||is)&&(cs=function(e){var t,r,n,i,a,o,s,c=this,d=as(c),u=$t(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=p(cs,f,u),c.lastIndex=f.lastIndex,t;var h=d.groups,l=ls&&c.sticky,g=p(Un,c),b=c.source,v=0,I=u;if(l&&(g=fs(g,"y",""),-1===us(g,"g")&&(g+="g"),I=hs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ds(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),gs&&(r=new RegExp("^"+b+"$(?!\\s)",g)),ps&&(n=c.lastIndex),i=p(ss,l?r:c,I),l?i?(i.input=hs(i.input,v),i[0]=hs(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:ps&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),gs&&i&&i.length>1&&p(os,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=nr(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var bs=cs;Tt({target:"RegExp",proto:!0,forced:/./.exec!==bs},{exec:bs});var vs=ge("species"),Is=RegExp.prototype,ms=function(e,t,r,n){var i=ge(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[vs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=w(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=w(e),c=t.exec;return c===bs||c===Is.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,c[0]),nt(Is,i,c[1])}n&&Re(Is[i],"sham",!0)},xs=na.charAt,ks=function(e,t,r){return t+(r?xs(e,t).length:1)},ws=Math.floor,ys=w("".charAt),Cs=w("".replace),zs=w("".slice),Os=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Es=/\$([$&'`]|\d{1,2})/g,qs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Es;return void 0!==i&&(i=ie(i),c=Os),Cs(a,c,(function(a,c){var d;switch(ys(c,0)){case"$":return"$";case"&":return e;case"`":return zs(t,0,r);case"'":return zs(t,o);case"<":d=i[zs(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=ws(u/10);return 0===f?a:f<=s?void 0===n[f-1]?ys(c,1):n[f-1]+ys(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Ps=c.TypeError,Ss=function(e,t){var r=e.exec;if(M(r)){var n=p(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===z(e))return p(bs,e,t);throw Ps("RegExp#exec called on incompatible receiver")},js=ge("replace"),Ms=Math.max,Ts=Math.min,Rs=w([].concat),Us=w([].push),As=w("".indexOf),Bs=w("".slice),Ns="$0"==="a".replace(/./,"$0"),_s=!!/./[js]&&""===/./[js]("a","$0");ms("replace",(function(e,t,r){var n=_s?"$":"$0";return[function(e,r){var n=S(this),i=null==e?void 0:Q(e,js);return i?p(i,e,n,r):p(t,$t(n),e,r)},function(e,i){var a=Pe(this),o=$t(e);if("string"==typeof i&&-1===As(i,n)&&-1===As(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=M(i);c||(i=$t(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Ss(a,o);if(null===h)break;if(Us(f,h),!d)break;""===$t(h[0])&&(a.lastIndex=ks(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=$t((h=f[b])[0]),I=Ms(Ts(ot(h.index),o.length),0),m=[],x=1;x<h.length;x++)Us(m,void 0===(p=h[x])?p:String(p));var k=h.groups;if(c){var w=Rs([v],m,I,o);void 0!==k&&Us(w,k);var y=$t(_t(i,void 0,w))}else y=qs(v,o,I,m,k,i);I>=g&&(l+=Bs(o,g,I)+y,g=I+v.length)}return l+Bs(o,g)}]}),!!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ns||_s);var Ls,Ds=Object.assign,Js=Object.defineProperty,Fs=w([].concat),Gs=!Ds||d((function(){if(u&&1!==Ds({b:1},Ds(Js({},"a",{enumerable:!0,get:function(){Js(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!=Ds({},e)[r]||"abcdefghijklmnopqrst"!=Rt(Ds({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=kt.f,o=b.f;n>i;)for(var s,c=q(arguments[i++]),d=a?Fs(Rt(c),a(c)):Rt(c),f=d.length,h=0;f>h;)s=d[h++],u&&!p(o,c,s)||(r[s]=c[s]);return r}:Ds,Hs=function(e,t,r){var n,i;Pe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=p(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Pe(n),r},Ys=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){Hs(e,"throw",t)}},Vs=ge("iterator"),Ws=Array.prototype,$s=function(e){return void 0!==e&&(Oi.Array===e||Ws[Vs]===e)},Ks=c.Array,Qs=function(e){var t=ie(e),r=qr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=mr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,h=Ia(t),l=0;if(!h||this==Ks&&$s(h))for(o=ht(t),s=r?new this(o):Ks(o);o>l;l++)f=a?i(t[l],l):t[l],ir(s,l,f);else for(u=(d=xa(t,h)).next,s=r?new this:[];!(c=p(u,d)).done;l++)f=a?Ys(d,i,[c.value,l],!0):c.value,ir(s,l,f);return s.length=l,s},Xs=/[^\0-\u007E]/,Zs=/[.\u3002\uFF0E\uFF61]/g,ec="Overflow: input needs wider integers to process",tc=c.RangeError,rc=w(Zs.exec),nc=Math.floor,ic=String.fromCharCode,ac=w("".charCodeAt),oc=w([].join),sc=w([].push),cc=w("".replace),dc=w("".split),uc=w("".toLowerCase),fc=function(e){return e+22+75*(e<26)},hc=function(e,t,r){var n=0;for(e=r?nc(e/700):e>>1,e+=nc(e/t);e>455;)e=nc(e/35),n+=36;return nc(n+36*e/(e+38))},pc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=ac(e,r++);if(i>=55296&&i<=56319&&r<n){var a=ac(e,r++);56320==(64512&a)?sc(t,((1023&i)<<10)+(1023&a)+65536):(sc(t,i),r--)}else sc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&sc(n,ic(r));var c=n.length,d=c;for(c&&sc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>nc((2147483647-o)/f))throw tc(ec);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw tc(ec);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;sc(n,ic(fc(l+g%b))),h=nc(g/b),p+=36}sc(n,ic(fc(h))),s=hc(o,f,d==c),o=0,d++}}o++,a++}return oc(n,"")},lc=Kt.f,gc=na.codeAt,bc=Xe.set,vc=Xe.getterFor("URL"),Ic=po.URLSearchParams,mc=po.getState,xc=c.URL,kc=c.TypeError,wc=c.parseInt,yc=Math.floor,Cc=Math.pow,zc=w("".charAt),Oc=w(/./.exec),Ec=w([].join),qc=w(1..toString),Pc=w([].pop),Sc=w([].push),jc=w("".replace),Mc=w([].shift),Tc=w("".split),Rc=w("".slice),Uc=w("".toLowerCase),Ac=w([].unshift),Bc=/[a-z]/i,Nc=/[\d+-.a-z]/i,_c=/\d/,Lc=/^0x/i,Dc=/^[0-7]+$/,Jc=/^\d+$/,Fc=/^[\da-f]+$/i,Gc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Hc=/[\0\t\n\r #/:<>?@[\\\]^|]/,Yc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Vc=/[\t\n\r]/g,Wc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Ac(t,e%256),e=yc(e/256);return Ec(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=qc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},$c={},Kc=Gs({},$c,{" ":1,'"':1,"<":1,">":1,"`":1}),Qc=Gs({},Kc,{"#":1,"?":1,"{":1,"}":1}),Xc=Gs({},Qc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Zc=function(e,t){var r=gc(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},ed={ftp:21,file:null,http:80,https:443,ws:80,wss:443},td=function(e,t){var r;return 2==e.length&&Oc(Bc,zc(e,0))&&(":"==(r=zc(e,1))||!t&&"|"==r)},rd=function(e){var t;return e.length>1&&td(Rc(e,0,2))&&(2==e.length||"/"===(t=zc(e,2))||"\\"===t||"?"===t||"#"===t)},nd=function(e){return"."===e||"%2e"===Uc(e)},id={},ad={},od={},sd={},cd={},dd={},ud={},fd={},hd={},pd={},ld={},gd={},bd={},vd={},Id={},md={},xd={},kd={},wd={},yd={},Cd={},zd=function(e,t,r){var n,i,a,o=$t(e);if(t){if(i=this.parse(o))throw kc(i);this.searchParams=null}else{if(void 0!==r&&(n=new zd(r,!0)),i=this.parse(o,null,n))throw kc(i);(a=mc(new Ic)).bindURL(this),this.searchParams=a}};zd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||id,u=0,f="",h=!1,p=!1,l=!1;for(e=$t(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=jc(e,Yc,"")),e=jc(e,Vc,""),n=Qs(e);u<=n.length;){switch(i=n[u],d){case id:if(!i||!Oc(Bc,i)){if(t)return"Invalid scheme";d=od;continue}f+=Uc(i),d=ad;break;case ad:if(i&&(Oc(Nc,i)||"+"==i||"-"==i||"."==i))f+=Uc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=od,u=0;continue}if(t&&(c.isSpecial()!=oe(ed,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&ed[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=vd:c.isSpecial()&&r&&r.scheme==c.scheme?d=sd:c.isSpecial()?d=fd:"/"==n[u+1]?(d=cd,u++):(c.cannotBeABaseURL=!0,Sc(c.path,""),d=wd)}break;case od:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=sr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Cd;break}d="file"==r.scheme?vd:dd;continue;case sd:if("/"!=i||"/"!=n[u+1]){d=dd;continue}d=hd,u++;break;case cd:if("/"==i){d=pd;break}d=kd;continue;case dd:if(c.scheme=r.scheme,i==Ls)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=ud;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query="",d=yd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.path.length--,d=kd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query,c.fragment="",d=Cd}break;case ud:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=kd;continue}d=pd}else d=hd;break;case fd:if(d=hd,"/"!=i||"/"!=zc(f,u+1))continue;u++;break;case hd:if("/"!=i&&"\\"!=i){d=pd;continue}break;case pd:if("@"==i){h&&(f="%40"+f),h=!0,a=Qs(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=Zc(b,Xc);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=Qs(f).length+1,f="",d=ld}else f+=i;break;case ld:case gd:if(t&&"file"==c.scheme){d=md;continue}if(":"!=i||p){if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=xd,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=bd,t==gd)return}break;case bd:if(!Oc(_c,i)){if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=wc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===ed[c.scheme]?null:I,f=""}if(t)return;d=xd;continue}return"Invalid port"}f+=i;break;case vd:if(c.scheme="file","/"==i||"\\"==i)d=Id;else{if(!r||"file"!=r.scheme){d=kd;continue}if(i==Ls)c.host=r.host,c.path=sr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=sr(r.path),c.query="",d=yd;else{if("#"!=i){rd(Ec(sr(n,u),""))||(c.host=r.host,c.path=sr(r.path),c.shortenPath()),d=kd;continue}c.host=r.host,c.path=sr(r.path),c.query=r.query,c.fragment="",d=Cd}}break;case Id:if("/"==i||"\\"==i){d=md;break}r&&"file"==r.scheme&&!rd(Ec(sr(n,u),""))&&(td(r.path[0],!0)?Sc(c.path,r.path[0]):c.host=r.host),d=kd;continue;case md:if(i==Ls||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&td(f))d=kd;else if(""==f){if(c.host="",t)return;d=xd}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=xd}continue}f+=i;break;case xd:if(c.isSpecial()){if(d=kd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Ls&&(d=kd,"/"!=i))continue}else c.fragment="",d=Cd;else c.query="",d=yd;break;case kd:if(i==Ls||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Uc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Sc(c.path,"")):nd(f)?"/"==i||"\\"==i&&c.isSpecial()||Sc(c.path,""):("file"==c.scheme&&!c.path.length&&td(f)&&(c.host&&(c.host=""),f=zc(f,0)+":"),Sc(c.path,f)),f="","file"==c.scheme&&(i==Ls||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)Mc(c.path);"?"==i?(c.query="",d=yd):"#"==i&&(c.fragment="",d=Cd)}else f+=Zc(i,Qc);break;case wd:"?"==i?(c.query="",d=yd):"#"==i?(c.fragment="",d=Cd):i!=Ls&&(c.path[0]+=Zc(i,$c));break;case yd:t||"#"!=i?i!=Ls&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Zc(i,$c)):(c.fragment="",d=Cd);break;case Cd:i!=Ls&&(c.fragment+=Zc(i,Kc))}u++}},parseHost:function(e){var t,r,n;if("["==zc(e,0)){if("]"!=zc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,f=0,h=function(){return zc(e,f)};if(":"==h()){if(":"!=zc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Oc(Fc,h());)t=16*t+wc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Oc(_c,h()))return;for(;Oc(_c,h());){if(a=wc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(Rc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=dc(cc(uc(e),Zs,"."),".");for(t=0;t<i.length;t++)r=i[t],sc(n,rc(Xs,r)?"xn--"+pc(r):r);return oc(n,".")}(e),Oc(Gc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Tc(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==zc(i,0)&&(a=Oc(Lc,i)?16:8,i=Rc(i,8==a?1:2)),""===i)o=0;else{if(!Oc(10==a?Jc:8==a?Dc:Fc,i))return e;o=wc(i,a)}Sc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Cc(256,5-t))return null}else if(o>255)return null;for(s=Pc(r),n=0;n<r.length;n++)s+=r[n]*Cc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Oc(Hc,e))return"Invalid host";for(t="",r=Qs(e),n=0;n<r.length;n++)t+=Zc(r[n],$c);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(ed,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&td(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=Wc(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Ec(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw kc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Od(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Wc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($t(e)+":",id)},getUsername:function(){return this.username},setUsername:function(e){var t=Qs($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Zc(t[r],Xc)}},getPassword:function(){return this.password},setPassword:function(e){var t=Qs($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Zc(t[r],Xc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Wc(e):Wc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,ld)},getHostname:function(){var e=this.host;return null===e?"":Wc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,gd)},getPort:function(){var e=this.port;return null===e?"":$t(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$t(e))?this.port=null:this.parse(e,bd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Ec(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,xd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$t(e))?this.query=null:("?"==zc(e,0)&&(e=Rc(e,1)),this.query="",this.parse(e,yd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$t(e))?("#"==zc(e,0)&&(e=Rc(e,1)),this.fragment="",this.parse(e,Cd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Od=function(e){var t=ba(this,Ed),r=arguments.length>1?arguments[1]:void 0,n=bc(t,new zd(e,!1,r));u||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Ed=Od.prototype,qd=function(e,t){return{get:function(){return vc(this)[e]()},set:t&&function(e){return vc(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&lc(Ed,{href:qd("serialize","setHref"),origin:qd("getOrigin"),protocol:qd("getProtocol","setProtocol"),username:qd("getUsername","setUsername"),password:qd("getPassword","setPassword"),host:qd("getHost","setHost"),hostname:qd("getHostname","setHostname"),port:qd("getPort","setPort"),pathname:qd("getPathname","setPathname"),search:qd("getSearch","setSearch"),searchParams:qd("getSearchParams"),hash:qd("getHash","setHash")}),nt(Ed,"toJSON",(function(){return vc(this).serialize()}),{enumerable:!0}),nt(Ed,"toString",(function(){return vc(this).serialize()}),{enumerable:!0}),xc){var Pd=xc.createObjectURL,Sd=xc.revokeObjectURL;Pd&&nt(Od,"createObjectURL",mr(Pd,xc)),Sd&&nt(Od,"revokeObjectURL",mr(Sd,xc))}function jd(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=Fo(e);if(t){var i=Fo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}vr(Od,"URL"),Tt({global:!0,forced:!pa,sham:!u},{URL:Od});var Md=function(e){Do(r,Yo(URL));var t=jd(r);function r(e,n,i){var a;return Gn(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return Yn(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(),Td="commerce-sdk-isomorphic@1.5.2";function Rd(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 Ud(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ad=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Ud({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,E,q,P,S,j,M,T;return Yn(r,[{key:"createBasket",value:(T=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0!==a.taxMode?c.taxMode=a.taxMode:void 0!==o.taxMode&&(c.taxMode=o.taxMode),void 0===a.siteId){r.next=18;break}c.siteId=a.siteId,r.next=23;break;case 18:if(void 0===o.siteId){r.next=22;break}c.siteId=o.siteId,r.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=30,t(f);case 30:if(h=r.sent,!i){r.next=35;break}return r.abrupt("return",h);case 35:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=39;break}throw new Ko(h);case 39:return r.next=41,h.text();case 41:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 43:case"end":return r.stop()}}),r,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"transferBasket",value:(M=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0!==a.overrideExisting?c.overrideExisting=a.overrideExisting:void 0!==o.overrideExisting&&(c.overrideExisting=o.overrideExisting),void 0===a.siteId){r.next=18;break}c.siteId=a.siteId,r.next=23;break;case 18:if(void 0===o.siteId){r.next=22;break}c.siteId=o.siteId,r.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return d=new Md("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"POST"})),r.next=29,t(f);case 29:if(h=r.sent,!i){r.next=34;break}return r.abrupt("return",h);case 34:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=38;break}throw new Ko(h);case 38:return r.next=40,h.text();case 40:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 42:case"end":return r.stop()}}),r,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"mergeBasket",value:(j=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0!==a.createDestinationBasket?c.createDestinationBasket=a.createDestinationBasket:void 0!==o.createDestinationBasket&&(c.createDestinationBasket=o.createDestinationBasket),void 0!==a.productItemMergeMode?c.productItemMergeMode=a.productItemMergeMode:void 0!==o.productItemMergeMode&&(c.productItemMergeMode=o.productItemMergeMode),void 0===a.siteId){r.next=19;break}c.siteId=a.siteId,r.next=24;break;case 19:if(void 0===o.siteId){r.next=23;break}c.siteId=o.siteId,r.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return d=new Md("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"POST"})),r.next=30,t(f);case 30:if(h=r.sent,!i){r.next=35;break}return r.abrupt("return",h);case 35:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=39;break}throw new Ko(h);case 39:return r.next=41,h.text();case 41:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 43:case"end":return r.stop()}}),r,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"deleteBasket",value:(S=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=44;break}throw new Ko(h);case 44:case"end":return r.stop()}}),r,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"getBasket",value:(P=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateBasket",value:(q=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(E=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0!==a.useAsShipping?c.useAsShipping=a.useAsShipping:void 0!==o.useAsShipping&&(c.useAsShipping=o.useAsShipping),void 0!==a.removeExternalTax?c.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(c.removeExternalTax=o.removeExternalTax),void 0===a.siteId){r.next=28;break}c.siteId=a.siteId,r.next=33;break;case 28:if(void 0===o.siteId){r.next=32;break}c.siteId=o.siteId,r.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=40,t(f);case 40:if(h=r.sent,!i){r.next=45;break}return r.abrupt("return",h);case 45:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=49;break}throw new Ko(h);case 49:return r.next=51,h.text();case 51:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"addCouponToBasket",value:(O=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(z=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.couponItemId){r.next=25;break}s.couponItemId=a.couponItemId,r.next=30;break;case 25:if(void 0===o.couponItemId){r.next=29;break}s.couponItemId=o.couponItemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(C=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(y=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(w=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.giftCertificateItemId){r.next=25;break}s.giftCertificateItemId=a.giftCertificateItemId,r.next=30;break;case 25:if(void 0===o.giftCertificateItemId){r.next=29;break}s.giftCertificateItemId=o.giftCertificateItemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(k=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.giftCertificateItemId){r.next=25;break}s.giftCertificateItemId=a.giftCertificateItemId,r.next=30;break;case 25:if(void 0===o.giftCertificateItemId){r.next=29;break}s.giftCertificateItemId=o.giftCertificateItemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addItemToBasket",value:(x=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){r.next=25;break}s.itemId=a.itemId,r.next=30;break;case 25:if(void 0===o.itemId){r.next=29;break}s.itemId=o.itemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(I=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){r.next=25;break}s.itemId=a.itemId,r.next=30;break;case 25:if(void 0===o.itemId){r.next=29;break}s.itemId=o.itemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(c={},void 0!==a.removeExternalTax?c.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(c.removeExternalTax=o.removeExternalTax),void 0===a.siteId){r.next=36;break}c.siteId=a.siteId,r.next=41;break;case 36:if(void 0===o.siteId){r.next=40;break}c.siteId=o.siteId,r.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=48,t(f);case 48:if(h=r.sent,!i){r.next=53;break}return r.abrupt("return",h);case 53:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=57;break}throw new Ko(h);case 57:return r.next=59,h.text();case 59:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 61:case"end":return r.stop()}}),r,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(v=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.itemId){r.next=25;break}s.itemId=a.itemId,r.next=30;break;case 25:if(void 0===o.itemId){r.next=29;break}s.itemId=o.itemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=53;break}throw new Ko(h);case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(b=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(g=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(l=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0!==a.removeExternalTax?c.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(c.removeExternalTax=o.removeExternalTax),void 0===a.siteId){r.next=36;break}c.siteId=a.siteId,r.next=41;break;case 36:if(void 0===o.siteId){r.next=40;break}c.siteId=o.siteId,r.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=48,t(f);case 48:if(h=r.sent,!i){r.next=53;break}return r.abrupt("return",h);case 53:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=57;break}throw new Ko(h);case 57:return r.next=59,h.text();case 59:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 61:case"end":return r.stop()}}),r,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(p=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(f=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=44;break}throw new Ko(h);case 44:case"end":return r.stop()}}),r,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createShipmentForBasket",value:(u=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(d=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){r.next=25;break}s.shipmentId=a.shipmentId,r.next=30;break;case 25:if(void 0===o.shipmentId){r.next=29;break}s.shipmentId=o.shipmentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(c=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){r.next=25;break}s.shipmentId=a.shipmentId,r.next=30;break;case 25:if(void 0===o.shipmentId){r.next=29;break}s.shipmentId=o.shipmentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(s=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){r.next=25;break}s.shipmentId=a.shipmentId,r.next=30;break;case 25:if(void 0===o.shipmentId){r.next=29;break}s.shipmentId=o.shipmentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(c={},void 0!==a.useAsBilling?c.useAsBilling=a.useAsBilling:void 0!==o.useAsBilling&&(c.useAsBilling=o.useAsBilling),void 0!==a.removeExternalTax?c.removeExternalTax=a.removeExternalTax:void 0!==o.removeExternalTax&&(c.removeExternalTax=o.removeExternalTax),void 0===a.siteId){r.next=37;break}c.siteId=a.siteId,r.next=42;break;case 37:if(void 0===o.siteId){r.next=41;break}c.siteId=o.siteId,r.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=49,t(f);case 49:if(h=r.sent,!i){r.next=54;break}return r.abrupt("return",h);case 54:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=58;break}throw new Ko(h);case 58:return r.next=60,h.text();case 60:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 62:case"end":return r.stop()}}),r,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){r.next=25;break}s.shipmentId=a.shipmentId,r.next=30;break;case 25:if(void 0===o.shipmentId){r.next=29;break}s.shipmentId=o.shipmentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===a.shipmentId){r.next=25;break}s.shipmentId=a.shipmentId,r.next=30;break;case 25:if(void 0===o.shipmentId){r.next=29;break}s.shipmentId=o.shipmentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"addTaxesForBasket",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.basketId){r.next=16;break}s.basketId=a.basketId,r.next=21;break;case 16:if(void 0===o.basketId){r.next=20;break}s.basketId=o.basketId,r.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=44;break}throw new Ko(h);case 44:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function Bd(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 Nd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Ad,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var _d=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Nd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o;return Yn(r,[{key:"getShopperContext",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.usid){r.next=16;break}s.usid=a.usid,r.next=21;break;case 16:if(void 0===o.usid){r.next=20;break}s.usid=o.usid,r.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return c={},d=new Md("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Nd(Nd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createShopperContext",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.usid){r.next=16;break}s.usid=a.usid,r.next=21;break;case 16:if(void 0===o.usid){r.next=20;break}s.usid=o.usid,r.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return c={},d=new Md("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Nd(Nd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"deleteShopperContext",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.usid){r.next=16;break}s.usid=a.usid,r.next=21;break;case 16:if(void 0===o.usid){r.next=20;break}s.usid=o.usid,r.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return c={},d=new Md("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Nd(Nd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=35;break}throw new Ko(h);case 35:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateShopperContext",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.usid){r.next=16;break}s.usid=a.usid,r.next=21;break;case 16:if(void 0===o.usid){r.next=20;break}s.usid=o.usid,r.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return c={},d=new Md("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Nd(Nd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function Ld(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 Dd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(_d,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var Jd=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Dd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,E,q,P,S,j,M,T,R;return Yn(r,[{key:"registerCustomer",value:(R=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(T=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=35;break}throw new Ko(h);case 35:case"end":return r.stop()}}),r,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"authorizeCustomer",value:(M=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.clientId){r.next=17;break}c.clientId=a.clientId,r.next=22;break;case 17:if(void 0===o.clientId){r.next=21;break}c.clientId=o.clientId,r.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(j=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"resetPassword",value:(S=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=35;break}throw new Ko(h);case 35:case"end":return r.stop()}}),r,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"registerExternalProfile",value:(q=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getExternalProfile",value:(E=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.externalId){r.next=17;break}c.externalId=a.externalId,r.next=22;break;case 17:if(void 0===o.externalId){r.next=21;break}c.externalId=o.externalId,r.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===a.authenticationProviderId){r.next=26;break}c.authenticationProviderId=a.authenticationProviderId,r.next=31;break;case 26:if(void 0===o.authenticationProviderId){r.next=30;break}c.authenticationProviderId=o.authenticationProviderId,r.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getCustomer",value:(O=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateCustomer",value:(z=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"createCustomerAddress",value:(C=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){r.next=25;break}s.addressName=a.addressName,r.next=30;break;case 25:if(void 0===o.addressName){r.next=29;break}s.addressName=o.addressName,r.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(w=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){r.next=25;break}s.addressName=a.addressName,r.next=30;break;case 25:if(void 0===o.addressName){r.next=29;break}s.addressName=o.addressName,r.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=53;break}throw new Ko(h);case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.addressName){r.next=25;break}s.addressName=a.addressName,r.next=30;break;case 25:if(void 0===o.addressName){r.next=29;break}s.addressName=o.addressName,r.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(x=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerOrders",value:(m=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0!==a.crossSites?c.crossSites=a.crossSites:void 0!==o.crossSites&&(c.crossSites=o.crossSites),void 0!==a.from?c.from=a.from:void 0!==o.from&&(c.from=o.from),void 0!==a.until?c.until=a.until:void 0!==o.until&&(c.until=o.until),void 0!==a.status?c.status=a.status:void 0!==o.status&&(c.status=o.status),void 0===a.siteId){r.next=30;break}c.siteId=a.siteId,r.next=35;break;case 30:if(void 0===o.siteId){r.next=34;break}c.siteId=o.siteId,r.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==a.offset?c.offset=a.offset:void 0!==o.offset&&(c.offset=o.offset),void 0!==a.limit?c.limit=a.limit:void 0!==o.limit&&(c.limit=o.limit),d=new Md("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=43,t(f);case 43:if(h=r.sent,!i){r.next=48;break}return r.abrupt("return",h);case 48:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=52;break}throw new Ko(h);case 52:return r.next=54,h.text();case 54:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 56:case"end":return r.stop()}}),r,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PUT"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=44;break}throw new Ko(h);case 44:case"end":return r.stop()}}),r,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(v=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(b=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=53;break}throw new Ko(h);case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(g=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getCustomerProductLists",value:(l=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"createCustomerProductList",value:(p=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(h=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=53;break}throw new Ko(h);case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getCustomerProductList",value:(f=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"updateCustomerProductList",value:(u=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(d=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(c=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){r.next=34;break}s.itemId=a.itemId,r.next=39;break;case 34:if(void 0===o.itemId){r.next=38;break}s.itemId=o.itemId,r.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(c={},void 0===a.siteId){r.next=44;break}c.siteId=a.siteId,r.next=49;break;case 44:if(void 0===o.siteId){r.next=48;break}c.siteId=o.siteId,r.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=55,t(f);case 55:if(h=r.sent,!i){r.next=60;break}return r.abrupt("return",h);case 60:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=62;break}throw new Ko(h);case 62:case"end":return r.stop()}}),r,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(s=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){r.next=34;break}s.itemId=a.itemId,r.next=39;break;case 34:if(void 0===o.itemId){r.next=38;break}s.itemId=o.itemId,r.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(c={},void 0===a.siteId){r.next=44;break}c.siteId=a.siteId,r.next=49;break;case 44:if(void 0===o.siteId){r.next=48;break}c.siteId=o.siteId,r.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=55,t(f);case 55:if(h=r.sent,!i){r.next=60;break}return r.abrupt("return",h);case 60:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=64;break}throw new Ko(h);case 64:return r.next=66,h.text();case 66:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 68:case"end":return r.stop()}}),r,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.customerId){r.next=16;break}s.customerId=a.customerId,r.next=21;break;case 16:if(void 0===o.customerId){r.next=20;break}s.customerId=o.customerId,r.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===a.listId){r.next=25;break}s.listId=a.listId,r.next=30;break;case 25:if(void 0===o.listId){r.next=29;break}s.listId=o.listId,r.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===a.itemId){r.next=34;break}s.itemId=a.itemId,r.next=39;break;case 34:if(void 0===o.itemId){r.next=38;break}s.itemId=o.itemId,r.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(c={},void 0===a.siteId){r.next=44;break}c.siteId=a.siteId,r.next=49;break;case 44:if(void 0===o.siteId){r.next=48;break}c.siteId=o.siteId,r.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return d=new Md("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=55,t(f);case 55:if(h=r.sent,!i){r.next=60;break}return r.abrupt("return",h);case 60:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=64;break}throw new Ko(h);case 64:return r.next=66,h.text();case 66:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 68:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0!==a.email?c.email=a.email:void 0!==o.email&&(c.email=o.email),void 0!==a.firstName?c.firstName=a.firstName:void 0!==o.firstName&&(c.firstName=o.firstName),void 0!==a.lastName?c.lastName=a.lastName:void 0!==o.lastName&&(c.lastName=o.lastName),void 0===a.siteId){r.next=20;break}c.siteId=a.siteId,r.next=25;break;case 20:if(void 0===o.siteId){r.next=24;break}c.siteId=o.siteId,r.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return d=new Md("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=31,t(f);case 31:if(h=r.sent,!i){r.next=36;break}return r.abrupt("return",h);case 36:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=40;break}throw new Ko(h);case 40:return r.next=42,h.text();case 42:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 44:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductList",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.listId){r.next=16;break}s.listId=a.listId,r.next=21;break;case 16:if(void 0===o.listId){r.next=20;break}s.listId=o.listId,r.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProductListItem",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.listId){r.next=16;break}s.listId=a.listId,r.next=21;break;case 16:if(void 0===o.listId){r.next=20;break}s.listId=o.listId,r.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===a.itemId){r.next=25;break}s.itemId=a.itemId,r.next=30;break;case 25:if(void 0===o.itemId){r.next=29;break}s.itemId=o.itemId,r.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return d=new Md("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Dd(Dd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=46,t(f);case 46:if(h=r.sent,!i){r.next=51;break}return r.abrupt("return",h);case 51:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=55;break}throw new Ko(h);case 55:return r.next=57,h.text();case 57:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 59:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function Fd(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 Gd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Jd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Hd=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Gd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i;return Yn(r,[{key:"retrieveResults",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.channelId){r.next=16;break}s.channelId=a.channelId,r.next=21;break;case 16:if(void 0===o.channelId){r.next=20;break}s.channelId=o.channelId,r.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(c={},void 0===a.locale){r.next=26;break}c.locale=a.locale,r.next=31;break;case 26:if(void 0===o.locale){r.next=30;break}c.locale=o.locale,r.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==a.offset?c.offset=a.offset:void 0!==o.offset&&(c.offset=o.offset),void 0!==a.limit?c.limit=a.limit:void 0!==o.limit&&(c.limit=o.limit),d=new Md("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Gd(Gd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=39,t(f);case 39:if(h=r.sent,!i){r.next=44;break}return r.abrupt("return",h);case 44:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=48;break}throw new Ko(h);case 48:return r.next=50,h.text();case 50:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 52:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getSuggestions",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.channelId){r.next=16;break}s.channelId=a.channelId,r.next=21;break;case 16:if(void 0===o.channelId){r.next=20;break}s.channelId=o.channelId,r.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(c={},void 0===a.suggestionTypes){r.next=26;break}c.suggestionTypes=a.suggestionTypes,r.next=31;break;case 26:if(void 0===o.suggestionTypes){r.next=30;break}c.suggestionTypes=o.suggestionTypes,r.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==a.searchText?c.searchText=a.searchText:void 0!==o.searchText&&(c.searchText=o.searchText),void 0===a.locale){r.next=36;break}c.locale=a.locale,r.next=41;break;case 36:if(void 0===o.locale){r.next=40;break}c.locale=o.locale,r.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return d=new Md("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Gd(Gd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function Yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Hd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Wd=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Vd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n;return Yn(r,[{key:"getGiftCertificate",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return d=new Md("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Vd(Vd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function $d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$d(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Wd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Qd=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Kd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o,s,c,d,u,f,h,p,l,g;return Yn(r,[{key:"retrieveCredQualityUserInfo",value:(g=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.username){r.next=17;break}c.username=a.username,r.next=22;break;case 17:if(void 0===o.username){r.next=21;break}c.username=o.username,r.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return d=new Md("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=28,t(f);case 28:if(h=r.sent,!i){r.next=33;break}return r.abrupt("return",h);case 33:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=37;break}throw new Ko(h);case 37:return r.next=39,h.text();case 39:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 41:case"end":return r.stop()}}),r,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authenticateCustomer",value:(l=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=26;break}throw new Ko(h);case 26:case"end":return r.stop()}}),r,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(p=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"logoutCustomer",value:(h=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.client_id){r.next=17;break}c.client_id=a.client_id,r.next=22;break;case 17:if(void 0===o.client_id){r.next=21;break}c.client_id=o.client_id,r.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===a.refresh_token){r.next=26;break}c.refresh_token=a.refresh_token,r.next=31;break;case 26:if(void 0===o.refresh_token){r.next=30;break}c.refresh_token=o.refresh_token,r.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==a.channel_id?c.channel_id=a.channel_id:void 0!==o.channel_id&&(c.channel_id=o.channel_id),d=new Md("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"authorizeCustomer",value:(f=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.redirect_uri){r.next=17;break}c.redirect_uri=a.redirect_uri,r.next=22;break;case 17:if(void 0===o.redirect_uri){r.next=21;break}c.redirect_uri=o.redirect_uri,r.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===a.response_type){r.next=26;break}c.response_type=a.response_type,r.next=31;break;case 26:if(void 0===o.response_type){r.next=30;break}c.response_type=o.response_type,r.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===a.client_id){r.next=35;break}c.client_id=a.client_id,r.next=40;break;case 35:if(void 0===o.client_id){r.next=39;break}c.client_id=o.client_id,r.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==a.scope?c.scope=a.scope:void 0!==o.scope&&(c.scope=o.scope),void 0!==a.state?c.state=a.state:void 0!==o.state&&(c.state=o.state),void 0!==a.usid?c.usid=a.usid:void 0!==o.usid&&(c.usid=o.usid),void 0!==a.hint?c.hint=a.hint:void 0!==o.hint&&(c.hint=o.hint),void 0!==a.channel_id?c.channel_id=a.channel_id:void 0!==o.channel_id&&(c.channel_id=o.channel_id),void 0===a.code_challenge){r.next=49;break}c.code_challenge=a.code_challenge,r.next=54;break;case 49:if(void 0===o.code_challenge){r.next=53;break}c.code_challenge=o.code_challenge,r.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return d=new Md("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=60,t(f);case 60:if(h=r.sent,!i){r.next=65;break}return r.abrupt("return",h);case 65:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=67;break}throw new Ko(h);case 67:case"end":return r.stop()}}),r,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getAccessToken",value:(u=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(d=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(c=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"revokeToken",value:(s=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"introspectToken",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getUserInfo",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},void 0!==a.channel_id?c.channel_id=a.channel_id:void 0!==o.channel_id&&(c.channel_id=o.channel_id),d=new Md("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=20,t(f);case 20:if(h=r.sent,!i){r.next=25;break}return r.abrupt("return",h);case 25:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=29;break}throw new Ko(h);case 29:return r.next=31,h.text();case 31:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 33:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getJwksUri",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return c={},d=new Md("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Kd(Kd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=19,t(f);case 19:if(h=r.sent,!i){r.next=24;break}return r.abrupt("return",h);case 24:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=28;break}throw new Ko(h);case 28:return r.next=30,h.text();case 30:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 32:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function Xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Qd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var eu=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=Zd({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o,s,c,d;return Yn(r,[{key:"createOrder",value:(d=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=29,t(f);case 29:if(h=r.sent,!i){r.next=34;break}return r.abrupt("return",h);case 34:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=38;break}throw new Ko(h);case 38:return r.next=40,h.text();case 40:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 42:case"end":return r.stop()}}),r,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getOrder",value:(c=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(s=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"POST"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:u,method:"DELETE"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===a.paymentInstrumentId){r.next=25;break}s.paymentInstrumentId=a.paymentInstrumentId,r.next=30;break;case 25:if(void 0===o.paymentInstrumentId){r.next=29;break}s.paymentInstrumentId=o.paymentInstrumentId,r.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(c={},void 0===a.siteId){r.next=35;break}c.siteId=a.siteId,r.next=40;break;case 35:if(void 0===o.siteId){r.next=39;break}c.siteId=o.siteId,r.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(n.body,u),headers:u,method:"PATCH"})),r.next=47,t(f);case 47:if(h=r.sent,!i){r.next=52;break}return r.abrupt("return",h);case 52:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=56;break}throw new Ko(h);case 56:return r.next=58,h.text();case 58:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 60:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.orderNo){r.next=16;break}s.orderNo=a.orderNo,r.next=21;break;case 16:if(void 0===o.orderNo){r.next=20;break}s.orderNo=o.orderNo,r.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return d=new Md("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=Zd(Zd({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=37,t(f);case 37:if(h=r.sent,!i){r.next=42;break}return r.abrupt("return",h);case 42:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=46;break}throw new Ko(h);case 46:return r.next=48,h.text();case 48:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 50:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var nu=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=ru({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i,a,o;return Yn(r,[{key:"getProducts",value:(o=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.ids){r.next=17;break}c.ids=a.ids,r.next=22;break;case 17:if(void 0===o.ids){r.next=21;break}c.ids=o.ids,r.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==a.inventoryIds?c.inventoryIds=a.inventoryIds:void 0!==o.inventoryIds&&(c.inventoryIds=o.inventoryIds),void 0!==a.currency?c.currency=a.currency:void 0!==o.currency&&(c.currency=o.currency),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),void 0!==a.allImages?c.allImages=a.allImages:void 0!==o.allImages&&(c.allImages=o.allImages),void 0!==a.perPricebook?c.perPricebook=a.perPricebook:void 0!==o.perPricebook&&(c.perPricebook=o.perPricebook),void 0===a.siteId){r.next=31;break}c.siteId=a.siteId,r.next=36;break;case 31:if(void 0===o.siteId){r.next=35;break}c.siteId=o.siteId,r.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return d=new Md("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=ru(ru({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=42,t(f);case 42:if(h=r.sent,!i){r.next=47;break}return r.abrupt("return",h);case 47:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=51;break}throw new Ko(h);case 51:return r.next=53,h.text();case 53:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 55:case"end":return r.stop()}}),r,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getProduct",value:(a=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.id){r.next=16;break}s.id=a.id,r.next=21;break;case 16:if(void 0===o.id){r.next=20;break}s.id=o.id,r.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(c={},void 0!==a.inventoryIds?c.inventoryIds=a.inventoryIds:void 0!==o.inventoryIds&&(c.inventoryIds=o.inventoryIds),void 0!==a.currency?c.currency=a.currency:void 0!==o.currency&&(c.currency=o.currency),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),void 0!==a.allImages?c.allImages=a.allImages:void 0!==o.allImages&&(c.allImages=o.allImages),void 0!==a.perPricebook?c.perPricebook=a.perPricebook:void 0!==o.perPricebook&&(c.perPricebook=o.perPricebook),void 0===a.siteId){r.next=31;break}c.siteId=a.siteId,r.next=36;break;case 31:if(void 0===o.siteId){r.next=35;break}c.siteId=o.siteId,r.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return d=new Md("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=ru(ru({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=42,t(f);case 42:if(h=r.sent,!i){r.next=47;break}return r.abrupt("return",h);case 47:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=51;break}throw new Ko(h);case 51:return r.next=53,h.text();case 53:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 55:case"end":return r.stop()}}),r,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getCategories",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.ids){r.next=17;break}c.ids=a.ids,r.next=22;break;case 17:if(void 0===o.ids){r.next=21;break}c.ids=o.ids,r.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==a.levels?c.levels=a.levels:void 0!==o.levels&&(c.levels=o.levels),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),void 0===a.siteId){r.next=28;break}c.siteId=a.siteId,r.next=33;break;case 28:if(void 0===o.siteId){r.next=32;break}c.siteId=o.siteId,r.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return d=new Md("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=ru(ru({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=39,t(f);case 39:if(h=r.sent,!i){r.next=44;break}return r.abrupt("return",h);case 44:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=48;break}throw new Ko(h);case 48:return r.next=50,h.text();case 50:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 52:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getCategory",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.id){r.next=16;break}s.id=a.id,r.next=21;break;case 16:if(void 0===o.id){r.next=20;break}s.id=o.id,r.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(c={},void 0!==a.levels?c.levels=a.levels:void 0!==o.levels&&(c.levels=o.levels),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),void 0===a.siteId){r.next=28;break}c.siteId=a.siteId,r.next=33;break;case 28:if(void 0===o.siteId){r.next=32;break}c.siteId=o.siteId,r.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return d=new Md("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=ru(ru({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=39,t(f);case 39:if(h=r.sent,!i){r.next=44;break}return r.abrupt("return",h);case 44:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=48;break}throw new Ko(h);case 48:return r.next=50,h.text();case 50:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 52:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();function iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var ou=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=au({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i;return Yn(r,[{key:"getPromotions",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===a.ids){r.next=26;break}c.ids=a.ids,r.next=31;break;case 26:if(void 0===o.ids){r.next=30;break}c.ids=o.ids,r.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=au(au({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),au(au({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=38,t(f);case 38:if(h=r.sent,!i){r.next=43;break}return r.abrupt("return",h);case 43:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=47;break}throw new Ko(h);case 47:return r.next=49,h.text();case 49:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 51:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===a.campaignId){r.next=16;break}s.campaignId=a.campaignId,r.next=21;break;case 16:if(void 0===o.campaignId){r.next=20;break}s.campaignId=o.campaignId,r.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(c={},void 0===a.siteId){r.next=26;break}c.siteId=a.siteId,r.next=31;break;case 26:if(void 0===o.siteId){r.next=30;break}c.siteId=o.siteId,r.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==a.startDate?c.startDate=a.startDate:void 0!==o.startDate&&(c.startDate=o.startDate),void 0!==a.endDate?c.endDate=a.endDate:void 0!==o.endDate&&(c.endDate=o.endDate),void 0!==a.currency?c.currency=a.currency:void 0!==o.currency&&(c.currency=o.currency),d=new Md("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=au(au({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),au(au({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=40,t(f);case 40:if(h=r.sent,!i){r.next=45;break}return r.abrupt("return",h);case 45:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=49;break}throw new Ko(h);case 49:return r.next=51,h.text();case 51:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();Vn(ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var su=B.match(/firefox\/(\d+)/i),cu=!!su&&+su[1],du=/MSIE|Trident/.test(B),uu=B.match(/AppleWebKit\/(\d+)\./),fu=!!uu&&+uu[1],hu=[],pu=w(hu.sort),lu=w(hu.push),gu=d((function(){hu.sort(void 0)})),bu=d((function(){hu.sort(null)})),vu=zn("sort"),Iu=!d((function(){if(J)return J<70;if(!(cu&&cu>3)){if(du)return!0;if(fu)return fu<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)hu.push({k:t+n,v:r})}for(hu.sort((function(e,t){return t.v-e.v})),n=0;n<hu.length;n++)t=hu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));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 xu(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){Vn(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}Tt({target:"Array",proto:!0,forced:gu||!bu||!vu||!Iu},{sort:function(e){void 0!==e&&K(e);var t=ie(this);if(Iu)return void 0===e?pu(t):pu(t,e);var r,n,i=[],a=ht(t);for(n=0;n<a;n++)n in t&&lu(i,t[n]);for(Ea(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:$t(t)>$t(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)delete t[n++];return t}});var ku=function(){function r(e){Gn(this,r),Vn(this,"clientConfig",void 0);var t=xu({},e);t.baseUri||(t.baseUri=(this instanceof r?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(t)}var n,i;return Yn(r,[{key:"productSearch",value:(i=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==a.q?c.q=a.q:void 0!==o.q&&(c.q=o.q),void 0!==a.refine?c.refine=a.refine:void 0!==o.refine&&(c.refine=o.refine),void 0!==a.sort?c.sort=a.sort:void 0!==o.sort&&(c.sort=o.sort),void 0!==a.currency?c.currency=a.currency:void 0!==o.currency&&(c.currency=o.currency),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),void 0!==a.offset?c.offset=a.offset:void 0!==o.offset&&(c.offset=o.offset),void 0!==a.limit?c.limit=a.limit:void 0!==o.limit&&(c.limit=o.limit),d=new Md("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=xu(xu({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),xu(xu({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=35,t(f);case 35:if(h=r.sent,!i){r.next=40;break}return r.abrupt("return",h);case 40:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=44;break}throw new Ko(h);case 44:return r.next=46,h.text();case 46:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 48:case"end":return r.stop()}}),r,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getSearchSuggestions",value:(n=Fn(mi.mark((function r(n,i){var a,o,s,c,d,u,f,h,p;return mi.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=(null==n?void 0:n.parameters)||{},o=this.clientConfig.parameters,s={shortCode:o.shortCode,version:o.version||"v1"},void 0===a.organizationId){r.next=7;break}s.organizationId=a.organizationId,r.next=12;break;case 7:if(void 0===o.organizationId){r.next=11;break}s.organizationId=o.organizationId,r.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(c={},void 0===a.siteId){r.next=17;break}c.siteId=a.siteId,r.next=22;break;case 17:if(void 0===o.siteId){r.next=21;break}c.siteId=o.siteId,r.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===a.q){r.next=26;break}c.q=a.q,r.next=31;break;case 26:if(void 0===o.q){r.next=30;break}c.q=o.q,r.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==a.limit?c.limit=a.limit:void 0!==o.limit&&(c.limit=o.limit),void 0!==a.currency?c.currency=a.currency:void 0!==o.currency&&(c.currency=o.currency),void 0!==a.locale?c.locale=a.locale:void 0!==o.locale&&(c.locale=o.locale),d=new Md("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:s,queryParams:c,origin:this.clientConfig.proxy}),u=xu(xu({},this.clientConfig.headers),null==n?void 0:n.headers),Io||(u["user-agent"]=[u["user-agent"],Td].join(" ")),f=new e(d.toString(),xu(xu({},this.clientConfig.fetchOptions),{},{headers:u,method:"GET"})),r.next=40,t(f);case 40:if(h=r.sent,!i){r.next=45;break}return r.abrupt("return",h);case 45:if(!this.clientConfig.throwOnBadResponse||h.ok||304===h.status){r.next=49;break}throw new Ko(h);case 49:return r.next=51,h.text();case 51:return p=r.sent,r.abrupt("return",p?JSON.parse(p):{});case 53:case"end":return r.stop()}}),r,this)}))),function(e,t){return n.apply(this,arguments)})}]),r}();Vn(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var wu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};ms("search",(function(e,t,r){return[function(t){var r=S(this),n=null==t?void 0:Q(t,e);return n?p(n,t,r):new RegExp(t)[e]($t(r))},function(e){var n=Pe(this),i=$t(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;wu(o,0)||(n.lastIndex=0);var s=Ss(n,i);return wu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var yu=ge("iterator"),Cu=!1;try{var zu=0,Ou={next:function(){return{done:!!zu++}},return:function(){Cu=!0}};Ou[yu]=function(){return this},Array.from(Ou,(function(){throw 2}))}catch(e){}var Eu,qu,Pu,Su=function(e,t){if(!t&&!Cu)return!1;var r=!1;try{var n={};n[yu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},ju="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Mu=Te.f,Tu=c.Int8Array,Ru=Tu&&Tu.prototype,Uu=c.Uint8ClampedArray,Au=Uu&&Uu.prototype,Bu=Tu&&ji(Tu),Nu=Ru&&ji(Ru),_u=Object.prototype,Lu=c.TypeError,Du=ge("toStringTag"),Ju=ue("TYPED_ARRAY_TAG"),Fu=ue("TYPED_ARRAY_CONSTRUCTOR"),Gu=ju&&!!Li&&"Opera"!==Vt(c.opera),Hu=!1,Yu={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Vu={BigInt64Array:8,BigUint64Array:8},Wu=function(e){if(!T(e))return!1;var t=Vt(e);return oe(Yu,t)||oe(Vu,t)};for(Eu in Yu)(Pu=(qu=c[Eu])&&qu.prototype)?Re(Pu,Fu,qu):Gu=!1;for(Eu in Vu)(Pu=(qu=c[Eu])&&qu.prototype)&&Re(Pu,Fu,qu);if((!Gu||!M(Bu)||Bu===Function.prototype)&&(Bu=function(){throw Lu("Incorrect invocation")},Gu))for(Eu in Yu)c[Eu]&&Li(c[Eu],Bu);if((!Gu||!Nu||Nu===_u)&&(Nu=Bu.prototype,Gu))for(Eu in Yu)c[Eu]&&Li(c[Eu].prototype,Nu);if(Gu&&ji(Au)!==Nu&&Li(Au,Nu),u&&!oe(Nu,Du))for(Eu in Hu=!0,Mu(Nu,Du,{get:function(){return T(this)?this[Ju]:void 0}}),Yu)c[Eu]&&Re(c[Eu],Ju,Eu);var $u={NATIVE_ARRAY_BUFFER_VIEWS:Gu,TYPED_ARRAY_CONSTRUCTOR:Fu,TYPED_ARRAY_TAG:Hu&&Ju,aTypedArray:function(e){if(Wu(e))return e;throw Lu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(M(e)&&(!Li||A(Bu,e)))return e;throw Lu(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Yu){var a=c[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Nu[e]&&!r||nt(Nu,e,r?t:Gu&&Ru[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(Li){if(r)for(n in Yu)if((i=c[n])&&oe(i,e))try{delete i[e]}catch(e){}if(Bu[e]&&!r)return;try{return nt(Bu,e,r?t:Gu&&Bu[e]||t)}catch(e){}}for(n in Yu)!(i=c[n])||i[e]&&!r||nt(i,e,t)}},isView:function(e){if(!T(e))return!1;var t=Vt(e);return"DataView"===t||oe(Yu,t)||oe(Vu,t)},isTypedArray:Wu,TypedArray:Bu,TypedArrayPrototype:Nu},Ku=$u.NATIVE_ARRAY_BUFFER_VIEWS,Qu=c.ArrayBuffer,Xu=c.Int8Array,Zu=!Ku||!d((function(){Xu(1)}))||!d((function(){new Xu(-1)}))||!Su((function(e){new Xu,new Xu(null),new Xu(1.5),new Xu(e)}),!0)||d((function(){return 1!==new Xu(new Qu(2),1,void 0).length})),ef=c.RangeError,tf=function(e){if(void 0===e)return 0;var t=ot(e),r=ft(t);if(t!==r)throw ef("Wrong length or index");return r},rf=c.Array,nf=Math.abs,af=Math.pow,of=Math.floor,sf=Math.log,cf=Math.LN2,df=function(e,t,r){var n,i,a,o=rf(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?af(2,-24)-af(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=nf(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=of(sf(e)/cf),e*(a=af(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*af(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*af(2,t),n+=d):(i=e*af(2,d-1)*af(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},uf=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=af(2,t),u-=o}return(d?-1:1)*r*af(2,u-t)},ff=function(e){for(var t=ie(this),r=ht(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},hf=xt.f,pf=Te.f,lf=rt.PROPER,gf=rt.CONFIGURABLE,bf=Xe.get,vf=Xe.set,If=c.ArrayBuffer,mf=If,xf=mf&&mf.prototype,kf=c.DataView,wf=kf&&kf.prototype,yf=Object.prototype,Cf=c.Array,zf=c.RangeError,Of=w(ff),Ef=w([].reverse),qf=df,Pf=uf,Sf=function(e){return[255&e]},jf=function(e){return[255&e,e>>8&255]},Mf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Tf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Rf=function(e){return qf(e,23,4)},Uf=function(e){return qf(e,52,8)},Af=function(e,t){pf(e.prototype,t,{get:function(){return bf(this)[t]}})},Bf=function(e,t,r,n){var i=tf(r),a=bf(e);if(i+t>a.byteLength)throw zf("Wrong index");var o=bf(a.buffer).bytes,s=i+a.byteOffset,c=sr(o,s,s+t);return n?c:Ef(c)},Nf=function(e,t,r,n,i,a){var o=tf(r),s=bf(e);if(o+t>s.byteLength)throw zf("Wrong index");for(var c=bf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(ju){var _f=lf&&"ArrayBuffer"!==If.name;if(d((function(){If(1)}))&&d((function(){new If(-1)}))&&!d((function(){return new If,new If(1.5),new If(NaN),_f&&!gf})))_f&&gf&&Re(If,"name","ArrayBuffer");else{(mf=function(e){return ba(this,xf),new If(tf(e))}).prototype=xf;for(var Lf,Df=hf(If),Jf=0;Df.length>Jf;)(Lf=Df[Jf++])in mf||Re(mf,Lf,If[Lf]);xf.constructor=mf}Li&&ji(wf)!==yf&&Li(wf,yf);var Ff=new kf(new mf(2)),Gf=w(wf.setInt8);Ff.setInt8(0,2147483648),Ff.setInt8(1,2147483649),!Ff.getInt8(0)&&Ff.getInt8(1)||la(wf,{setInt8:function(e,t){Gf(this,e,t<<24>>24)},setUint8:function(e,t){Gf(this,e,t<<24>>24)}},{unsafe:!0})}else xf=(mf=function(e){ba(this,xf);var t=tf(e);vf(this,{bytes:Of(Cf(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,wf=(kf=function(e,t,r){ba(this,wf),ba(e,xf);var n=bf(e).byteLength,i=ot(t);if(i<0||i>n)throw zf("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw zf("Wrong length");vf(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Af(mf,"byteLength"),Af(kf,"buffer"),Af(kf,"byteLength"),Af(kf,"byteOffset")),la(wf,{getInt8:function(e){return Bf(this,1,e)[0]<<24>>24},getUint8:function(e){return Bf(this,1,e)[0]},getInt16:function(e){var t=Bf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Bf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Tf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Tf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Pf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Pf(Bf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Nf(this,1,e,Sf,t)},setUint8:function(e,t){Nf(this,1,e,Sf,t)},setInt16:function(e,t){Nf(this,2,e,jf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Nf(this,2,e,jf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Nf(this,4,e,Mf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Nf(this,4,e,Mf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Nf(this,4,e,Rf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Nf(this,8,e,Uf,t,arguments.length>2?arguments[2]:void 0)}});vr(mf,"ArrayBuffer"),vr(kf,"DataView");var Hf={ArrayBuffer:mf,DataView:kf},Yf=Math.floor,Vf=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&Yf(e)===e},Wf=c.RangeError,$f=c.RangeError,Kf=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw Wf("The argument can't be less than 0");return t}(e);if(r%t)throw $f("Wrong offset");return r},Qf=$u.aTypedArrayConstructor,Xf=function(e){var t,r,n,i,a,o,s=Eo(this),c=ie(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,h=Ia(c);if(h&&!$s(h))for(o=(a=xa(c,h)).next,c=[];!(i=p(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=mr(u,arguments[2])),r=ht(c),n=new(Qf(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},Zf=ge("species"),eh=function(e){var t=U(e),r=Te.f;u&&t&&!t[Zf]&&r(t,Zf,{configurable:!0,get:function(){return this}})};i((function(e){var t=xt.f,r=Rr.forEach,n=Xe.get,i=Xe.set,a=Te.f,o=ze.f,s=Math.round,d=c.RangeError,f=Hf.ArrayBuffer,h=f.prototype,l=Hf.DataView,g=$u.NATIVE_ARRAY_BUFFER_VIEWS,b=$u.TYPED_ARRAY_CONSTRUCTOR,I=$u.TYPED_ARRAY_TAG,m=$u.TypedArray,x=$u.TypedArrayPrototype,k=$u.aTypedArrayConstructor,w=$u.isTypedArray,y=function(e,t){k(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){a(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(h,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!Y(t)&&t in e&&Vf(+t)&&t>=0},E=function(e,t){return t=me(t),O(e,t)?v(2,e[t]):o(e,t)},q=function(e,t,r){return t=me(t),!(O(e,t)&&T(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?a(e,t,r):(e[t]=r.value,e)};u?(g||(ze.f=E,Te.f=q,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Tt({target:"Object",stat:!0,forced:!g},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,o,u){var h=e.match(/\d+$/)[0]/8,v=e+(u?"Clamped":"")+"Array",k="get"+e,C="set"+e,O=c[v],E=O,q=E&&E.prototype,P={},S=function(e,t){a(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*h+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=s(r))<0?0:r>255?255:255&r),i.view[C](t*h+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};g?Zu&&(E=o((function(e,t,r,n){return ba(e,q),function(e,t,r){var n,i;return Li&&M(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&Li(e,i),e}(T(t)?z(t)?void 0!==n?new O(t,Kf(r,h),n):void 0!==r?new O(t,Kf(r,h)):new O(t):w(t)?y(E,t):p(Xf,E,t):new O(tf(t)),e,E)})),Li&&Li(E,m),r(t(O),(function(e){e in E||Re(E,e,O[e])})),E.prototype=q):(E=o((function(e,t,r,n){ba(e,q);var a,o,s,c=0,u=0;if(T(t)){if(!z(t))return w(t)?y(E,t):p(Xf,E,t);a=t,u=Kf(r,h);var g=t.byteLength;if(void 0===n){if(g%h)throw d("Wrong length");if((o=g-u)<0)throw d("Wrong length")}else if((o=ft(n)*h)+u>g)throw d("Wrong length");s=o/h}else s=tf(t),a=new f(o=s*h);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new l(a)});c<s;)S(e,c++)})),Li&&Li(E,m),q=E.prototype=nr(x)),q.constructor!==E&&Re(q,"constructor",E),Re(q,b,E),I&&Re(q,I,v),P[v]=E,Tt({global:!0,forced:E!=O,sham:!g},P),"BYTES_PER_ELEMENT"in E||Re(E,"BYTES_PER_ELEMENT",h),"BYTES_PER_ELEMENT"in q||Re(q,"BYTES_PER_ELEMENT",h),eh(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var th=Math.min,rh=w([].copyWithin||function(e,t){var r=ie(this),n=ht(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=th((void 0===o?n:dt(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:delete r[i],i+=c,a+=c;return r}),nh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("copyWithin",(function(e,t){return rh(nh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var ih=Rr.every,ah=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("every",(function(e){return ih(ah(this),e,arguments.length>1?arguments[1]:void 0)}));var oh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return p(ff,oh(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var sh=ge("species"),ch=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[sh])?t:Eo(r)},dh=$u.TYPED_ARRAY_CONSTRUCTOR,uh=$u.aTypedArrayConstructor,fh=function(e){return uh(ch(e,e[dh]))},hh=function(e,t){return function(e,t){for(var r=0,n=ht(t),i=new e(n);n>r;)i[r]=t[r++];return i}(fh(e),t)},ph=Rr.filter,lh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("filter",(function(e){var t=ph(lh(this),e,arguments.length>1?arguments[1]:void 0);return hh(this,t)}));var gh=Rr.find,bh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("find",(function(e){return gh(bh(this),e,arguments.length>1?arguments[1]:void 0)}));var vh=Rr.findIndex,Ih=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("findIndex",(function(e){return vh(Ih(this),e,arguments.length>1?arguments[1]:void 0)}));var mh=Rr.forEach,xh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("forEach",(function(e){mh(xh(this),e,arguments.length>1?arguments[1]:void 0)}));var kh=lt.includes,wh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("includes",(function(e){return kh(wh(this),e,arguments.length>1?arguments[1]:void 0)}));var yh=lt.indexOf,Ch=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("indexOf",(function(e){return yh(Ch(this),e,arguments.length>1?arguments[1]:void 0)}));var zh=ge("iterator"),Oh=c.Uint8Array,Eh=w(Qi.values),qh=w(Qi.keys),Ph=w(Qi.entries),Sh=$u.aTypedArray,jh=$u.exportTypedArrayMethod,Mh=Oh&&Oh.prototype,Th=!d((function(){Mh[zh].call([1])})),Rh=!!Mh&&Mh.values&&Mh[zh]===Mh.values&&"values"===Mh.values.name,Uh=function(){return Eh(Sh(this))};jh("entries",(function(){return Ph(Sh(this))}),Th),jh("keys",(function(){return qh(Sh(this))}),Th),jh("values",Uh,Th||!Rh,{name:"values"}),jh(zh,Uh,Th||!Rh,{name:"values"});var Ah=$u.aTypedArray,Bh=$u.exportTypedArrayMethod,Nh=w([].join);Bh("join",(function(e){return Nh(Ah(this),e)}));var _h=Math.min,Lh=[].lastIndexOf,Dh=!!Lh&&1/[1].lastIndexOf(1,-0)<0,Jh=zn("lastIndexOf"),Fh=Dh||!Jh?function(e){if(Dh)return _t(Lh,this,arguments)||0;var t=j(this),r=ht(t),n=r-1;for(arguments.length>1&&(n=_h(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Lh,Gh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return _t(Fh,Gh(this),t>1?[e,arguments[1]]:[e])}));var Hh=Rr.map,Yh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("map",(function(e){return Hh(Yh(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(fh(e))(t)}))}));var Vh=c.TypeError,Wh=function(e){return function(t,r,n,i){K(r);var a=ie(t),o=q(a),s=ht(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Vh("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},$h={left:Wh(!1),right:Wh(!0)},Kh=$h.left,Qh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Kh(Qh(this),e,t,t>1?arguments[1]:void 0)}));var Xh=$h.right,Zh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Xh(Zh(this),e,t,t>1?arguments[1]:void 0)}));var ep=$u.aTypedArray,tp=$u.exportTypedArrayMethod,rp=Math.floor;tp("reverse",(function(){for(var e,t=ep(this).length,r=rp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var np=c.RangeError,ip=c.Int8Array,ap=ip&&ip.prototype,op=ap&&ap.set,sp=$u.aTypedArray,cp=$u.exportTypedArrayMethod,dp=!d((function(){var e=new Uint8ClampedArray(2);return p(op,e,{length:1,0:3},1),3!==e[1]})),up=dp&&$u.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new ip(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));cp("set",(function(e){sp(this);var t=Kf(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(dp)return p(op,this,r,t);var n=this.length,i=ht(r),a=0;if(i+t>n)throw np("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!dp||up);var fp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fr(fp(this),e,t),n=fh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var hp=Rr.some,pp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("some",(function(e){return hp(pp(this),e,arguments.length>1?arguments[1]:void 0)}));var lp=c.Array,gp=$u.aTypedArray,bp=$u.exportTypedArrayMethod,vp=c.Uint16Array,Ip=vp&&w(vp.prototype.sort),mp=!(!Ip||d((function(){Ip(new vp(2),null)}))&&d((function(){Ip(new vp(2),{})}))),xp=!!Ip&&!d((function(){if(J)return J<74;if(cu)return cu<67;if(du)return!0;if(fu)return fu<602;var e,t,r=new vp(516),n=lp(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(Ip(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));bp("sort",(function(e){return void 0!==e&&K(e),xp?Ip(this,e):Ea(gp(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))}),!xp||mp);var kp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("subarray",(function(e,t){var r=kp(this),n=r.length,i=dt(e,n);return new(fh(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,ft((void 0===t?n:dt(t,n))-i))}));var wp=c.Int8Array,yp=$u.aTypedArray,Cp=$u.exportTypedArrayMethod,zp=[].toLocaleString,Op=!!wp&&d((function(){zp.call(new wp(1))}));Cp("toLocaleString",(function(){return _t(zp,Op?fr(yp(this)):yp(this),fr(arguments))}),d((function(){return[1,2].toLocaleString()!=new wp([1,2]).toLocaleString()}))||!d((function(){wp.prototype.toLocaleString.call([1,2])})));var Ep=$u.exportTypedArrayMethod,qp=c.Uint8Array,Pp=qp&&qp.prototype||{},Sp=[].toString,jp=w([].join);d((function(){Sp.call({})}))&&(Sp=function(){return jp(this)});var Mp=Pp.toString!=Sp;Ep("toString",Sp,Mp);var Tp,Rp,Up,Ap,Bp=c.Promise,Np=c.TypeError,_p=function(e,t){this.stopped=e,this.result=t},Lp=_p.prototype,Dp=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),l=!(!r||!r.INTERRUPTED),g=mr(t,u),b=function(e){return n&&Hs(n,"normal",e),new _p(!0,e)},v=function(e){return f?(Pe(e),l?g(e[0],e[1],b):g(e[0],e[1])):l?g(e,b):g(e)};if(h)n=e;else{if(!(i=Ia(e)))throw Np(W(e)+" is not iterable");if($s(i)){for(a=0,o=ht(e);o>a;a++)if((s=v(e[a]))&&A(Lp,s))return s;return new _p(!1)}n=xa(e,i)}for(c=n.next;!(d=p(c,n)).done;){try{s=v(d.value)}catch(e){Hs(n,"throw",e)}if("object"==typeof s&&s&&A(Lp,s))return s}return new _p(!1)},Jp=/(?:ipad|iphone|ipod).*applewebkit/i.test(B),Fp="process"==z(c.process),Gp=c.setImmediate,Hp=c.clearImmediate,Yp=c.process,Vp=c.Dispatch,Wp=c.Function,$p=c.MessageChannel,Kp=c.String,Qp=0,Xp={};try{Tp=c.location}catch(e){}var Zp=function(e){if(oe(Xp,e)){var t=Xp[e];delete Xp[e],t()}},el=function(e){return function(){Zp(e)}},tl=function(e){Zp(e.data)},rl=function(e){c.postMessage(Kp(e),Tp.protocol+"//"+Tp.host)};Gp&&Hp||(Gp=function(e){var t=fr(arguments,1);return Xp[++Qp]=function(){_t(M(e)?e:Wp(e),void 0,t)},Rp(Qp),Qp},Hp=function(e){delete Xp[e]},Fp?Rp=function(e){Yp.nextTick(el(e))}:Vp&&Vp.now?Rp=function(e){Vp.now(el(e))}:$p&&!Jp?(Ap=(Up=new $p).port2,Up.port1.onmessage=tl,Rp=mr(Ap.postMessage,Ap)):c.addEventListener&&M(c.postMessage)&&!c.importScripts&&Tp&&"file:"!==Tp.protocol&&!d(rl)?(Rp=rl,c.addEventListener("message",tl,!1)):Rp="onreadystatechange"in we("script")?function(e){Qt.appendChild(we("script")).onreadystatechange=function(){Qt.removeChild(this),Zp(e)}}:function(e){setTimeout(el(e),0)});var nl,il,al,ol,sl,cl,dl,ul,fl={set:Gp,clear:Hp},hl=/ipad|iphone|ipod/i.test(B)&&void 0!==c.Pebble,pl=/web0s(?!.*chrome)/i.test(B),ll=ze.f,gl=fl.set,bl=c.MutationObserver||c.WebKitMutationObserver,vl=c.document,Il=c.process,ml=c.Promise,xl=ll(c,"queueMicrotask"),kl=xl&&xl.value;kl||(nl=function(){var e,t;for(Fp&&(e=Il.domain)&&e.exit();il;){t=il.fn,il=il.next;try{t()}catch(e){throw il?ol():al=void 0,e}}al=void 0,e&&e.enter()},Jp||Fp||pl||!bl||!vl?!hl&&ml&&ml.resolve?((dl=ml.resolve(void 0)).constructor=ml,ul=mr(dl.then,dl),ol=function(){ul(nl)}):Fp?ol=function(){Il.nextTick(nl)}:(gl=mr(gl,c),ol=function(){gl(nl)}):(sl=!0,cl=vl.createTextNode(""),new bl(nl).observe(cl,{characterData:!0}),ol=function(){cl.data=sl=!sl}));var wl=kl||function(e){var t={fn:e,next:void 0};al&&(al.next=t),il||(il=t,ol()),al=t},yl=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=K(t),this.reject=K(r)},Cl={f:function(e){return new yl(e)}},zl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ol=function(){this.head=null,this.tail=null};Ol.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 El,ql,Pl,Sl,jl=Ol,Ml="object"==typeof window,Tl=fl.set,Rl=ge("species"),Ul="Promise",Al=Xe.getterFor(Ul),Bl=Xe.set,Nl=Xe.getterFor(Ul),_l=Bp&&Bp.prototype,Ll=Bp,Dl=_l,Jl=c.TypeError,Fl=c.document,Gl=c.process,Hl=Cl.f,Yl=Hl,Vl=!!(Fl&&Fl.createEvent&&c.dispatchEvent),Wl=M(c.PromiseRejectionEvent),$l=!1,Kl=jt(Ul,(function(){var e=_e(Ll),t=e!==String(Ll);if(!t&&66===J)return!0;if(J>=51&&/native code/.test(e))return!1;var r=new Ll((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Rl]=n,!($l=r.then((function(){}))instanceof n)||!t&&Ml&&!Wl})),Ql=Kl||!Su((function(e){Ll.all(e).catch((function(){}))})),Xl=function(e){var t;return!(!T(e)||!M(t=e.then))&&t},Zl=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&ig(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Jl("Promise-chain cycle")):(n=Xl(r))?p(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},eg=function(e,t){e.notified||(e.notified=!0,wl((function(){for(var r,n=e.reactions;r=n.get();)Zl(r,e);e.notified=!1,t&&!e.rejection&&rg(e)})))},tg=function(e,t,r){var n,i;Vl?((n=Fl.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!Wl&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},rg=function(e){p(Tl,c,(function(){var t,r=e.facade,n=e.value;if(ng(e)&&(t=zl((function(){Fp?Gl.emit("unhandledRejection",n,r):tg("unhandledrejection",r,n)})),e.rejection=Fp||ng(e)?2:1,t.error))throw t.value}))},ng=function(e){return 1!==e.rejection&&!e.parent},ig=function(e){p(Tl,c,(function(){var t=e.facade;Fp?Gl.emit("rejectionHandled",t):tg("rejectionhandled",t,e.value)}))},ag=function(e,t,r){return function(n){e(t,n,r)}},og=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,eg(e,!0))},sg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Jl("Promise can't be resolved itself");var n=Xl(t);n?wl((function(){var r={done:!1};try{p(n,t,ag(sg,r,e),ag(og,r,e))}catch(t){og(r,t,e)}})):(e.value=t,e.state=1,eg(e,!1))}catch(t){og({done:!1},t,e)}}};if(Kl&&(Dl=(Ll=function(e){ba(this,Dl),K(e),p(El,this);var t=Al(this);try{e(ag(sg,t),ag(og,t))}catch(e){og(t,e)}}).prototype,(El=function(e){Bl(this,{type:Ul,done:!1,notified:!1,parent:!1,reactions:new jl,rejection:!1,state:0,value:void 0})}).prototype=la(Dl,{then:function(e,t){var r=Nl(this),n=Hl(ch(this,Ll));return r.parent=!0,n.ok=!M(e)||e,n.fail=M(t)&&t,n.domain=Fp?Gl.domain:void 0,0==r.state?r.reactions.add(n):wl((function(){Zl(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),ql=function(){var e=new El,t=Al(e);this.promise=e,this.resolve=ag(sg,t),this.reject=ag(og,t)},Cl.f=Hl=function(e){return e===Ll||e===Pl?new ql(e):Yl(e)},M(Bp)&&_l!==Object.prototype)){Sl=_l.then,$l||(nt(_l,"then",(function(e,t){var r=this;return new Ll((function(e,t){p(Sl,r,e,t)})).then(e,t)}),{unsafe:!0}),nt(_l,"catch",Dl.catch,{unsafe:!0}));try{delete _l.constructor}catch(e){}Li&&Li(_l,Dl)}function cg(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 dg(e){return function(e){if(Array.isArray(e))return cg(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 cg(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)?cg(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 ug(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 fg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ug(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Tt({global:!0,wrap:!0,forced:Kl},{Promise:Ll}),vr(Ll,Ul,!1),eh(Ul),Pl=U(Ul),Tt({target:Ul,stat:!0,forced:Kl},{reject:function(e){var t=Hl(this);return p(t.reject,void 0,e),t.promise}}),Tt({target:Ul,stat:!0,forced:Kl},{resolve:function(e){return function(e,t){if(Pe(e),T(t)&&t.constructor===e)return t;var r=Cl.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Tt({target:Ul,stat:!0,forced:Ql},{all:function(e){var t=this,r=Hl(t),n=r.resolve,i=r.reject,a=zl((function(){var r=K(t.resolve),a=[],o=0,s=1;Dp(e,(function(e){var c=o++,d=!1;s++,p(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise},race:function(e){var t=this,r=Hl(t),n=r.reject,i=zl((function(){var i=K(t.resolve);Dp(e,(function(e){p(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var hg=Io?btoa:function(e){return Buffer.from(e).toString("base64")},pg=function(e){var t,r,n=new URL(e),i=new URLSearchParams(n.search),a=null!==(t=i.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=i.get("code"))&&void 0!==r?r:"",usid:a}},lg=function(){return r(128)},gg=function(){var e=Fn(mi.mark((function e(t){var r,n,i,a,o,s,c;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Io||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,dg(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 bg(e,t,r){return vg.apply(this,arguments)}function vg(){return(vg=Fn(mi.mark((function e(t,r,n){var i,a,o,s,c,d;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gg(r);case 2:return a=e.sent,(o=new Qd(t.clientConfig)).clientConfig.fetchOptions=fg(fg({},t.clientConfig.fetchOptions),{},{redirect:Io?"follow":"manual"}),s={parameters:fg(fg({client_id:t.clientConfig.parameters.clientId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url){e.next=12;break}throw new Error("Authorization failed");case 12:return e.abrupt("return",fg({url:d},pg(d)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ig(){return(Ig=Fn(mi.mark((function e(t,r){var n,i,a;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=lg(),e.next=3,bg(t,n,fg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mg(){return(mg=Fn(mi.mark((function e(t,r,n){var i,a,o,s,c,d,u;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=lg(),e.next=3,gg(i);case 3:return a=e.sent,o="Basic ".concat(hg("".concat(r.username,":").concat(r.password))),s={headers:{Authorization:o},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:fg({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:a,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=8,t.authenticateCustomer(s,!0);case 8:return c=e.sent,d=pg(c.url),u={client_id:t.clientConfig.parameters.clientId,code:d.code,code_verifier:i,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:d.usid},e.abrupt("return",t.getAccessToken({body:u}));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xg=Object.freeze({__proto__:null,isBrowser:Io,isNode:mo,stringToBase64:hg,getCodeAndUsidFromUrl:pg,createCodeVerifier:lg,generateCodeChallenge:gg,authorize:bg,loginGuestUser:function(e,t){return Ig.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return mg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId};return e.getAccessToken({body:r})},logout:function(e,t){return e.logoutCustomer({parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});export{bo as ClientConfig,Ad as ShopperBaskets,_d as ShopperContexts,Jd as ShopperCustomers,Hd as ShopperDiscoverySearch,Wd as ShopperGiftCertificates,Qd as ShopperLogin,eu as ShopperOrders,nu as ShopperProducts,ou as ShopperPromotions,ku as ShopperSearch,Md as TemplateURL,xg as helpers};
|