@spree/storefront-api-v2-sdk
Version:
Node module to easily integrate your JavaScript or TypeScript application with Spree Storefront API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on.
2 lines • 44.6 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SpreeSDK=t():e.SpreeSDK=t()}(this,(()=>{return e={987:function(e){var t;t=()=>(()=>{"use strict";var e={130:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){const r={host:globalThis.process&&globalThis.process.env.SPREE_HOST||"http://localhost:3000/"},n=Object.assign(Object.assign({},r),e),o={host:n.host};this.fetcher=n.createFetcher(o);for(const e in t)this[e]=new t[e]({fetcher:this.fetcher})}}},374:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=r(216);r(247);const u=s(r(325));t.default=class{constructor({fetcher:e}){this.fetcher=e}spreeResponse(e,t,r={},n={},o="automatic"){return i(this,void 0,void 0,(function*(){try{const s=this.spreeOrderHeaders(r),i={url:t,params:n,method:e,headers:s,responseParsing:o},a=yield this.fetcher.fetch(i);return u.makeSuccess(a.data)}catch(e){return u.makeFail(this.processError(e))}}))}classifySpreeError(e){const{error:t,errors:r}=e.data;return"string"==typeof t?"object"==typeof r?"full":"basic":"limited"}processError(e){if(e.response||e.request){const t=e;return t.response?this.processSpreeError(e):t.request?new a.NoResponseError:new a.MisconfigurationError(e.message)}return new a.SpreeSDKError(e.message)}processSpreeError(e){const{error:t,errors:r}=e.data,n=this.classifySpreeError(e);return"full"===n?new a.ExpandedSpreeError(e.response,t,r):"basic"===n?new a.BasicSpreeError(e.response,t):new a.SpreeError(e.response)}spreeOrderHeaders(e){const t={};return e.orderToken&&(t["X-Spree-Order-Token"]=e.orderToken),e.bearerToken&&(t.Authorization=`Bearer ${e.bearerToken}`),t}}},444:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(227));class s extends o.default{constructor(e,t){super(e),Object.setPrototypeOf(this,s.prototype),this.name="BasicSpreeError",this.summary=t}}t.default=s},582:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e){super(e),Object.setPrototypeOf(this,s.prototype),this.name="CastError"}}t.default=s},424:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e){super(e),Object.setPrototypeOf(this,s.prototype),this.name="DeserializeError"}}t.default=s},980:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e){super(e),Object.setPrototypeOf(this,s.prototype),this.name="DocumentRelationshipError"}}t.default=s},776:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),r(453);const o=n(r(444));class s extends o.default{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,s.prototype),this.name="ExpandedSpreeError",this.errors=Object.keys(r).reduce(((e,t)=>{const n=t.split(".");let o=n.shift(),s=e;for(;o;)s[o]||(0===n.length?s[o]=r[t]:s[o]={}),s=s[o],o=n.shift();return e}),{})}getErrors(e){let t=0,r=this.errors,n=!0;for(;t<e.length&&n;){const o=e[t];o in Object(r)?(r=r[o],t+=1):n=!1}return n?r:null}}t.default=s},247:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e,t,r,n){super(n),Object.setPrototypeOf(this,s.prototype),this.name="FetchError",this.response=e,this.request=t,this.data=r}}t.default=s},300:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e){super(`Incorrect request setup: ${e}`),Object.setPrototypeOf(this,s.prototype),this.name="MisconfigurationError"}}t.default=s},308:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(){super("No response received from Spree"),Object.setPrototypeOf(this,s.prototype),this.name="NoResponseError"}}t.default=s},227:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(311));class s extends o.default{constructor(e){super(`Spree returned a HTTP ${e.status} error code`),Object.setPrototypeOf(this,s.prototype),this.name="SpreeError",this.serverResponse=e}}t.default=s},311:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype),this.name="SpreeSDKError"}}t.default=r},216:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentRelationshipError=t.FetchError=t.SpreeSDKError=t.SpreeError=t.NoResponseError=t.MisconfigurationError=t.ExpandedSpreeError=t.BasicSpreeError=void 0;const o=n(r(444));t.BasicSpreeError=o.default;const s=n(r(776));t.ExpandedSpreeError=s.default;const i=n(r(300));t.MisconfigurationError=i.default;const a=n(r(308));t.NoResponseError=a.default;const u=n(r(227));t.SpreeError=u.default;const c=n(r(311));t.SpreeSDKError=c.default;const d=n(r(247));t.FetchError=d.default;const h=n(r(980));t.DocumentRelationshipError=h.default},619:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(887),t),o(r(246),t),o(r(325),t),o(r(289),t)},887:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findSingleRelationshipDocument=t.findRelationshipDocuments=t.findDocument=void 0;const n=r(216),o=(e,t)=>e.included&&e.included.find((e=>e.type===t.type&&e.id===t.id))||null;t.findDocument=o;const s=(e,t,r)=>{if(!e.included)return[];const s=(t.relationships[r]||{}).data;if(!s)throw new n.DocumentRelationshipError(`Incorrect relationship ${r}.`);let i;return i=Array.isArray(s)?s:[s],i.map((t=>o(e,t))).filter(Boolean)};t.findRelationshipDocuments=s,t.findSingleRelationshipDocument=(e,t,r)=>{const n=s(e,t,r);return 0===n.length?null:n[0]}},246:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.objectToQuerystring=void 0;const r=(()=>{const e=[];for(let t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e})(),n=(e,t)=>{if(0===e.length)return e;let n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===t)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));let o="";for(let e=0;e<n.length;++e){let t=n.charCodeAt(e);45===t||46===t||95===t||126===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?o+=n.charAt(e):t<128?o+=r[t]:t<2048?o+=r[192|t>>6]+r[128|63&t]:t<55296||t>=57344?o+=r[224|t>>12]+r[128|t>>6&63]+r[128|63&t]:(e+=1,t=65536+((1023&t)<<10|1023&n.charCodeAt(e)),o+=r[240|t>>18]+r[128|t>>12&63]+r[128|t>>6&63]+r[128|63&t])}return o},o=Array.isArray,s=Array.prototype.push,i=(e,t)=>{s.apply(e,o(t)?t:[t])},a=e=>String(e),u=(e,t)=>e+"[]",c="utf-8",d=(e,t)=>{var r,s;if(e instanceof Date&&(e=e.toISOString()),null===e&&(e=""),"string"==typeof(s=e)||"number"==typeof s||"boolean"==typeof s||"symbol"==typeof s||"bigint"==typeof s||(r=e)&&"object"==typeof r&&r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r)){const r=n(t,c);return[a(r)+"="+a(n(e,c))]}const h=[];if(void 0===e)return h;const l=Object.keys(e);for(let r=0;r<l.length;++r){const n=l[r],s=e[n],a=o(e)?u(t):t+"["+n+"]";i(h,d(s,a))}return h};t.objectToQuerystring=e=>{const t=[],r=Object.keys(e);for(let n=0;n<r.length;++n){const o=r[n];i(t,d(e[o],o))}return t.join("&")}},325:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.extractSuccess=t.fromJson=t.toJson=t.makeFail=t.makeSuccess=void 0;const a=s(r(216)),u=i(r(582)),c=i(r(424)),d=e=>({isSuccess:()=>!0,isFail:()=>!1,success:()=>e,fail:()=>{throw new Error("Cannot call fail() on success.")}});t.makeSuccess=d;const h=e=>({isSuccess:()=>!1,isFail:()=>!0,success:()=>{throw new Error("Cannot call success() on fail.")},fail:()=>e});t.makeFail=h,t.toJson=e=>e.isSuccess()?{type:"SpreeSDKResult",subtype:"success",value:e.success()}:{type:"SpreeSDKResult",subtype:"fail",value:Object.assign({},e.fail())},t.fromJson=e=>{if("SpreeSDKResult"===e.type){if("success"===e.subtype)return d(e.value);if("fail"===e.subtype)return h((e=>{if(!(e.name in a))throw new u.default("Error not recognized");return Object.assign(Object.create(a[e.name].prototype),e)})(e.value));throw new c.default("Expected success or fail subtype.")}throw new c.default("Unknown signature.")},t.extractSuccess=e=>e.then((e=>{if(e.isFail())throw e.fail();return e.success()}))},289:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.squashAndPreparePositionalArguments=t.split=void 0,t.split=(e,t)=>{const r=[{},{}];for(const n in e)t.includes(n)?r[1][n]=e[n]:r[0][n]=e[n];return r},t.squashAndPreparePositionalArguments=(e,r)=>{const n=Object.assign({},...[...e].filter(Boolean).map((e=>Object.keys(e).filter((t=>e[t])).reduce(((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]})),{}))).filter((e=>Object.keys(e).length)).reverse()),[o,s]=(0,t.split)(n,["order_token","bearer_token","orderToken","bearerToken"]),[i,a]=(0,t.split)(o,r);let u;return("order_token"in s&&"bearer_token"in s||"orderToken"in s&&"bearerToken"in s)&&console.warn("Avoid providing both token types (order token and bearer token) in a request to prevent unexpected results."),u="bearer_token"in s||"bearerToken"in s?{bearerToken:s.bearer_token||s.bearerToken}:"order_token"in s||"orderToken"in s?{orderToken:s.order_token||s.orderToken}:{},Object.assign(Object.assign({token:u},a),{params:i})}},97:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Http=t.Client=void 0;const i=s(r(130));t.Client=i.default;const a=s(r(374));t.Http=a.default,o(r(216),t),o(r(619),t)},453:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(97)})(),e.exports=t()},871:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{create(...e){return n(this,void 0,void 0,(function*(){const[t={}]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("post",i.default.accountPath(),r,n)}))}confirm(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{confirmation_token:r,token:n,params:o}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{confirmation_token:t}],["confirmation_token"]);return yield this.spreeResponse("get",i.default.accountConfirmPath(r),n,o)}))}forgotPassword(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("post",i.default.forgotPasswordPath(),r,n)}))}resetPassword(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{reset_password_token:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{resetPasswordToken:t},r],["reset_password_token"]);return yield this.spreeResponse("patch",i.default.resetPasswordPath(n),o,a)}))}update(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.accountPath(),n,o)}))}accountInfo(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.accountPath(),n,o)}))}creditCardsList(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.accountCreditCardsPath(),n,o)}))}defaultCreditCard(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.accountDefaultCreditCardPath(),n,o)}))}removeCreditCard(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{id:r},t,n],["id"]);return yield this.spreeResponse("delete",i.default.accountCreditCardRemovePath(o),a,u)}))}completedOrdersList(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.accountCompletedOrdersPath(),n,o)}))}completedOrder(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{order_number:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{order_number:r},t,n],["order_number"]);return yield this.spreeResponse("get",i.default.accountCompletedOrderPath(o),a,u)}))}addressesList(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.accountAddressesPath(),r,n)}))}showAddress(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{id:r},t,n],["id"]);return yield this.spreeResponse("get",i.default.accountAddressPath(o),a,u)}))}createAddress(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.accountAddressesPath(),n,o)}))}removeAddress(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{id:r},t,n],["id"]);return yield this.spreeResponse("delete",i.default.accountAddressRemovePath(o),a,u)}))}updateAddress(...e){return n(this,void 0,void 0,(function*(){const[t,r,n]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{id:r},t,n],["id"]);return yield this.spreeResponse("patch",i.default.accountAddressPath(o),a,u)}))}}t.default=a},583:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=r(598),a=o(r(211));class u extends s.Http{getToken(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("post",a.default.oauthTokenPath(),r,(0,i.authParams)(n))}))}refreshToken(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("post",a.default.oauthTokenPath(),r,(0,i.refreshParams)(n))}))}revokeToken(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("post",a.default.oauthRevokePath(),r,(0,i.revokeParams)(n))}))}}t.default=u},14:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{create(...e){return n(this,void 0,void 0,(function*(){const[t={},r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.cartPath(),n,o)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.cartPath(),n,o)}))}addItem(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.cartAddItemPath(),n,o)}))}setQuantity(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.cartSetItemQuantity(),n,o)}))}removeItem(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{id:r},t,n],["id"]);return yield this.spreeResponse("delete",i.default.cartRemoveItemPath(o),a,u)}))}emptyCart(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.cartEmptyPath(),n,o)}))}remove(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("delete",i.default.cartPath(),r,n)}))}applyCouponCode(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.cartApplyCodePath(),n,o)}))}removeCouponCode(...e){return n(this,void 0,void 0,(function*(){const[t,r=null,n={}]=e,{code:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([{code:r},t,n],["code"]);let c;return c=o?i.default.cartRemoveCodePath(o):i.default.cartRemoveAllCoupons(),yield this.spreeResponse("delete",c,a,u)}))}removeAllCoupons(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("delete",i.default.cartRemoveAllCoupons(),n,o)}))}estimateShippingMethods(e,t){return n(this,void 0,void 0,(function*(){return yield this.spreeResponse("get",i.default.cartEstimateShippingMethodsPath(),e,t)}))}estimateShippingRates(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.cartEstimateShippingRatesPath(),n,o)}))}associateGuestCart(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.cartAssociatePath(),n,o)}))}changeCurrency(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.cartChangeCurrencyPath(),n,o)}))}}t.default=a},549:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987);r(656);const i=o(r(211));class a extends s.Http{orderUpdate(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.checkoutPath(),n,o)}))}orderNext(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.checkoutNextPath(),n,o)}))}advance(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.checkoutAdvancePath(),n,o)}))}complete(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.checkoutCompletePath(),n,o)}))}addStoreCredits(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.checkoutAddStoreCreditsPath(),n,o)}))}removeStoreCredits(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.checkoutRemoveStoreCreditsPath(),n,o)}))}paymentMethods(...e){return n(this,void 0,void 0,(function*(){const[t]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.checkoutPaymentMethodsPath(),r,n)}))}shippingMethods(e,t={}){return n(this,void 0,void 0,(function*(){return yield this.spreeResponse("get",i.default.checkoutShippingMethodsPath(),e,t)}))}shippingRates(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.checkoutShippingRatesPath(),n,o)}))}selectShippingMethod(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("patch",i.default.checkoutSelectShippingMethodPath(),n,o)}))}addPayment(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.checkoutAddPaymentPath(),n,o)}))}createStripeSession(e){return n(this,void 0,void 0,(function*(){const{token:t,params:r}=(0,s.squashAndPreparePositionalArguments)([e],[]);return yield this.spreeResponse("patch",i.default.checkoutCreateStripeSessionPath(),t,r)}))}}t.default=a},722:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(e){return n(this,void 0,void 0,(function*(){const{token:t,params:r}=(0,s.squashAndPreparePositionalArguments)([e||{}],[]);return yield this.spreeResponse("get",i.default.countriesPath(),t,r)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{iso:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{iso:t},r],["iso"]);return yield this.spreeResponse("get",i.default.countryPath(n),o,a)}))}default(...e){return n(this,void 0,void 0,(function*(){const[t={}]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.defaultCountryPath(),r,n)}))}}t.default=a},342:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{download(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{asset_token:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([t,{asset_token:r},n],["asset_token"]);return yield this.spreeResponse("get",i.default.digitalAssetsDownloadPath(o),a,u,"stream")}))}}t.default=a},606:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(...e){return n(this,void 0,void 0,(function*(){const[t={}]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.menusPath(),r,n)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{id:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{id:t},r],["id"]);return yield this.spreeResponse("get",i.default.menuPath(n),o,a)}))}}t.default=a},908:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{status(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{order_number:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([t,{order_number:r},n],["order_number"]);return yield this.spreeResponse("get",i.default.orderStatusPath(o),a,u)}))}}t.default=a},923:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(...e){return n(this,void 0,void 0,(function*(){const[t={}]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.pagesPath(),r,n)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{id:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{id:t},r],["id"]);return yield this.spreeResponse("get",i.default.pagePath(n),o,a)}))}}t.default=a},981:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(...e){return n(this,void 0,void 0,(function*(){const[t={},r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.productsPath(),n,o)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={},n={}]=e,{id:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{id:t},r,n],["id"]);return yield this.spreeResponse("get",i.default.productPath(o),a,u)}))}}t.default=a},830:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(...e){return n(this,void 0,void 0,(function*(){const[t={}]=e,{token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([t],[]);return yield this.spreeResponse("get",i.default.taxonsPath(),r,n)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{id:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)(["object"==typeof t?t:{id:t},r],["id"]);return yield this.spreeResponse("get",i.default.taxonPath(n),o,a)}))}}t.default=a},192:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(e={}){return n(this,void 0,void 0,(function*(){const{token:t,params:r}=(0,s.squashAndPreparePositionalArguments)([e],[]);return yield this.spreeResponse("get",i.default.vendorsPath(),t,r)}))}show(e){return n(this,void 0,void 0,(function*(){const{id:t,token:r,params:n}=(0,s.squashAndPreparePositionalArguments)([e],["id"]);return yield this.spreeResponse("get",i.default.vendorPath(t),r,n)}))}}t.default=a},899:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(987),i=o(r(211));class a extends s.Http{list(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.wishlistsPath(),n,o)}))}show(...e){return n(this,void 0,void 0,(function*(){const[t,r,n={}]=e,{wishlist_token:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r},n],["wishlist_token"]);return yield this.spreeResponse("get",i.default.wishlistPath(o),a,u)}))}default(...e){return n(this,void 0,void 0,(function*(){const[t,r={}]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("get",i.default.defaultWishlistPath(),n,o)}))}create(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{token:n,params:o}=(0,s.squashAndPreparePositionalArguments)([t,r],[]);return yield this.spreeResponse("post",i.default.wishlistsPath(),n,o)}))}update(...e){return n(this,void 0,void 0,(function*(){const[t,r,n]=e,{wishlist_token:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r},n],["wishlist_token"]);return yield this.spreeResponse("patch",i.default.wishlistPath(o),a,u)}))}remove(...e){return n(this,void 0,void 0,(function*(){const[t,r]=e,{wishlist_token:n,token:o,params:a}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r}],["wishlist_token"]);return yield this.spreeResponse("delete",i.default.wishlistPath(n),o,a)}))}addWishedItem(...e){return n(this,void 0,void 0,(function*(){const[t,r,n]=e,{wishlist_token:o,token:a,params:u}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r},n],["wishlist_token"]);return yield this.spreeResponse("post",i.default.wishlistsAddWishedItemPath(o),a,u)}))}updateWishedItem(...e){return n(this,void 0,void 0,(function*(){const[t,r,n,o]=e,{wishlist_token:a,id:u,token:c,params:d}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r},{id:n},o],["wishlist_token","id"]);return yield this.spreeResponse("patch",i.default.wishlistsUpdateWishedItemQuantityPath(a,u),c,d)}))}removeWishedItem(...e){return n(this,void 0,void 0,(function*(){const[t,r,n]=e,{wishlist_token:o,id:a,token:u,params:c}=(0,s.squashAndPreparePositionalArguments)([t,{wishlist_token:r},{id:n}],["wishlist_token","id"]);return yield this.spreeResponse("delete",i.default.wishlistsRemoveWishedItemPath(o,a),u,c)}))}}t.default=a},106:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Wishlists=t.Vendors=t.Taxons=t.Products=t.Pages=t.Order=t.Menus=t.DigitalAssets=t.Countries=t.Checkout=t.Cart=t.Authentication=t.Account=void 0;const o=n(r(871));t.Account=o.default;const s=n(r(583));t.Authentication=s.default;const i=n(r(14));t.Cart=i.default;const a=n(r(549));t.Checkout=a.default;const u=n(r(722));t.Countries=u.default;const c=n(r(342));t.DigitalAssets=c.default;const d=n(r(606));t.Menus=d.default;const h=n(r(908));t.Order=h.default;const l=n(r(923));t.Pages=l.default;const p=n(r(981));t.Products=p.default;const f=n(r(830));t.Taxons=f.default;const P=n(r(192));t.Vendors=P.default;const m=n(r(899));t.Wishlists=m.default},598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revokeParams=t.refreshParams=t.authParams=void 0,r(967),t.authParams=({username:e,password:t})=>({username:e,password:t,grant_type:"password"}),t.refreshParams=({refresh_token:e})=>({refresh_token:e,grant_type:"refresh_token"}),t.revokeParams=({token:e})=>({token:e})},97:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.storefrontPath=t.routes=t.endpoints=t.makeClient=void 0,s(r(987),t);const u=i(r(211));t.routes=u.default,Object.defineProperty(t,"storefrontPath",{enumerable:!0,get:function(){return u.storefrontPath}});const c=i(r(106));t.endpoints=c;const d=a(r(630));t.makeClient=d.default,s(r(939),t),s(r(447),t),s(r(791),t),s(r(269),t),s(r(382),t),s(r(33),t),s(r(967),t)},967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(987)},656:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(987)},33:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(939),r(447),r(791),r(269),r(987)},630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(987),o=r(106),s={account:o.Account,authentication:o.Authentication,cart:o.Cart,checkout:o.Checkout,countries:o.Countries,digitalAssets:o.DigitalAssets,menus:o.Menus,order:o.Order,pages:o.Pages,products:o.Products,taxons:o.Taxons,vendors:o.Vendors,wishlists:o.Wishlists};t.default=e=>new n.Client(e,s)},211:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storefrontPath=void 0,t.storefrontPath="api/v2/storefront";const r={productsPath:()=>`${t.storefrontPath}/products`,productPath:e=>`${t.storefrontPath}/products/${encodeURIComponent(e)}`,taxonsPath:()=>`${t.storefrontPath}/taxons`,taxonPath:e=>`${t.storefrontPath}/taxons/${encodeURIComponent(e)}`,countriesPath:()=>`${t.storefrontPath}/countries`,countryPath:e=>`${t.storefrontPath}/countries/${encodeURIComponent(e)}`,cartPath:()=>`${t.storefrontPath}/cart`,cartAddItemPath:()=>`${t.storefrontPath}/cart/add_item`,cartRemoveItemPath:e=>`${t.storefrontPath}/cart/remove_line_item/${encodeURIComponent(e)}`,cartEmptyPath:()=>`${t.storefrontPath}/cart/empty`,cartSetItemQuantity:()=>`${t.storefrontPath}/cart/set_quantity`,cartApplyCodePath:()=>`${t.storefrontPath}/cart/apply_coupon_code`,cartRemoveCodePath:e=>`${t.storefrontPath}/cart/remove_coupon_code/${encodeURIComponent(e)}`,cartRemoveAllCoupons:()=>`${t.storefrontPath}/cart/remove_coupon_code`,cartEstimateShippingMethodsPath:()=>`${t.storefrontPath}/cart/estimate_shipping_rates`,cartEstimateShippingRatesPath:()=>`${t.storefrontPath}/cart/estimate_shipping_rates`,cartAssociatePath:()=>`${t.storefrontPath}/cart/associate`,cartChangeCurrencyPath:()=>`${t.storefrontPath}/cart/change_currency`,checkoutPath:()=>`${t.storefrontPath}/checkout`,checkoutNextPath:()=>`${t.storefrontPath}/checkout/next`,checkoutAdvancePath:()=>`${t.storefrontPath}/checkout/advance`,checkoutCompletePath:()=>`${t.storefrontPath}/checkout/complete`,checkoutAddStoreCreditsPath:()=>`${t.storefrontPath}/checkout/add_store_credit`,checkoutRemoveStoreCreditsPath:()=>`${t.storefrontPath}/checkout/remove_store_credit`,checkoutPaymentMethodsPath:()=>`${t.storefrontPath}/checkout/payment_methods`,checkoutShippingMethodsPath:()=>`${t.storefrontPath}/checkout/shipping_rates`,checkoutShippingRatesPath:()=>`${t.storefrontPath}/checkout/shipping_rates`,checkoutSelectShippingMethodPath:()=>`${t.storefrontPath}/checkout/select_shipping_method`,checkoutAddPaymentPath:()=>`${t.storefrontPath}/checkout/create_payment`,checkoutCreateStripeSessionPath:()=>`${t.storefrontPath}/checkout/create_stripe_session`,oauthTokenPath:()=>"spree_oauth/token",oauthRevokePath:()=>"spree_oauth/revoke",accountPath:()=>`${t.storefrontPath}/account`,accountAddressPath:e=>`${t.storefrontPath}/account/addresses/${encodeURIComponent(e)}`,accountAddressesPath:()=>`${t.storefrontPath}/account/addresses`,accountAddressRemovePath:e=>`${t.storefrontPath}/account/addresses/${encodeURIComponent(e)}`,accountConfirmPath:e=>`${t.storefrontPath}/account_confirmations/${encodeURIComponent(e)}`,accountCreditCardsPath:()=>`${t.storefrontPath}/account/credit_cards`,accountDefaultCreditCardPath:()=>`${t.storefrontPath}/account/credit_cards/default`,accountCreditCardRemovePath:e=>`${t.storefrontPath}/account/credit_cards/${encodeURIComponent(e)}`,accountCompletedOrdersPath:()=>`${t.storefrontPath}/account/orders`,accountCompletedOrderPath:e=>`${t.storefrontPath}/account/orders/${encodeURIComponent(e)}`,forgotPasswordPath:()=>`${t.storefrontPath}/passwords`,resetPasswordPath:e=>`${t.storefrontPath}/passwords/${encodeURIComponent(e)}`,orderStatusPath:e=>`${t.storefrontPath}/order_status/${encodeURIComponent(e)}`,pagesPath:()=>`${t.storefrontPath}/cms_pages`,pagePath:e=>`${t.storefrontPath}/cms_pages/${encodeURIComponent(e)}`,defaultCountryPath:()=>`${t.storefrontPath}/countries/default`,digitalAssetsDownloadPath:e=>`${t.storefrontPath}/digitals/${encodeURIComponent(e)}`,menusPath:()=>`${t.storefrontPath}/menus`,menuPath:e=>`${t.storefrontPath}/menus/${encodeURIComponent(e)}`,wishlistsPath:()=>`${t.storefrontPath}/wishlists`,wishlistPath:e=>`${t.storefrontPath}/wishlists/${encodeURIComponent(e)}`,defaultWishlistPath:()=>`${t.storefrontPath}/wishlists/default`,wishlistsAddWishedItemPath:e=>`${t.storefrontPath}/wishlists/${encodeURIComponent(e)}/add_item`,wishlistsUpdateWishedItemQuantityPath:(e,r)=>`${t.storefrontPath}/wishlists/${encodeURIComponent(e)}/set_item_quantity/${encodeURIComponent(r)}`,wishlistsRemoveWishedItemPath:(e,r)=>`${t.storefrontPath}/wishlists/${encodeURIComponent(e)}/remove_item/${encodeURIComponent(r)}`,vendorsPath:()=>`${t.storefrontPath}/vendors`,vendorPath:e=>`${t.storefrontPath}/vendors/${encodeURIComponent(e)}`};t.default=r}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(97);var e,t}));
//# sourceMappingURL=index.js.map