@gradientedge/commercetools-utils 5.5.1 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ge-commercetools-utils-browser.cjs.js +1 -1
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-node.esm.js +1 -1
- package/dist/typings/api/CommercetoolsApi.d.ts +7 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={9818:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsApi=void 0;var i=o(2915),a=o(3028),c=o(7111),u=o(893),p=o(7034),d=function(){function e(t){e.validateConfig(t),this.config=t,this.auth=new i.CommercetoolsAuth(t),this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,p.getRequestExecutor)({timeoutMs:t.timeoutMs,httpsAgent:t.httpsAgent,systemIdentifier:t.systemIdentifier,onBeforeRequest:t.onBeforeRequest,onAfterResponse:t.onAfterResponse,retry:t.retry})}return e.prototype.getStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStoreByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStores=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores",method:"GET"}))},e.prototype.createStore=function(e){return this.request({path:"/stores",method:"POST",data:e.data})},e.prototype.updateStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateStoreByKey=function(e){return this.request({path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.deleteStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteStoreByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.getCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCategoryByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryChannels=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels",method:"GET"}))},e.prototype.importOrder=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/orders/import",method:"POST",data:e.data}))]}))}))},e.prototype.getChannelById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getChannelByKey=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels",method:"GET",params:{where:'key="'.concat(encodeURIComponent(e.key),'"'),limit:1}}))];case 1:if(!(null==(t=o.sent())?void 0:t.count))throw new a.CommercetoolsError("No channel found with key [".concat(e.key,"]"),null,404);return[2,t.results[0]]}}))}))},e.prototype.getCategory=function(e){var t;if(!e.id&&!e.key)throw new a.CommercetoolsError("Either an id, key or slug must be provided");return e.id?((0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"GET"}))):this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(null!==(t=e.key)&&void 0!==t?t:"")),method:"GET"}))},e.prototype.getCategoryBySlug=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!e.languageCode&&!e.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return t=[],e.languageCodes?t.push.apply(t,e.languageCodes):e.languageCode&&t.push(e.languageCode),[4,this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{where:"slug(".concat(t.map((function(t){return"".concat(t,'="').concat(e.slug,'"')})).join(" or "),")")})}))),{path:"/categories",method:"GET"}))];case 1:if(!(o=r.sent()).count)throw new a.CommercetoolsError("No category found with slug [".concat(e.slug,"] and language code [").concat(e.languageCode,"]"),{options:e},404);return[2,o.results[0]]}}))}))},e.prototype.queryCategories=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories",method:"GET"}))},e.prototype.getCategoryParents=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return[4,this.getCategory(n(n({},e),{params:n(n({},e.params),{expand:"ancestors[*]"})}))];case 1:return t=r.sent(),(o=t.ancestors.map((function(e){return e.obj}))).push(n(n({},t),{ancestors:t.ancestors.map((function(e){return{id:e.id,typeId:e.typeId}}))})),[2,o]}}))}))},e.prototype.getProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getProductProjectionById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-projections/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getProductProjectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-projections/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.getProductProjectionBySlug=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!e.languageCode&&!e.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return t=[],e.languageCodes?t.push.apply(t,e.languageCodes):e.languageCode&&t.push(e.languageCode),[4,this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{where:"slug(".concat(t.map((function(t){return"".concat(t,'="').concat(e.slug,'"')})).join(" or "),")")})}))),{path:"/product-projections",method:"GET"}))];case 1:if(!(o=r.sent()).count)throw new a.CommercetoolsError("No product projection found with slug [".concat(e.slug,"] and language code [").concat(e.languageCode,"]"),{options:e},404);return[2,o.results[0]]}}))}))},e.prototype.queryProductProjections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-projections",method:"GET"}))},e.prototype.searchProductProjections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-projections/search",method:"GET"}))},e.prototype.getProductSelectionById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-selections/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-selections/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.queryProductSelections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections",method:"GET"}))},e.prototype.createProductSelection=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections",method:"POST",data:e.data}))},e.prototype.updateProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections/key=".concat(encodeURIComponent(e.key)),method:"POST",data:{version:e.version,actions:e.actions}}))},e.prototype.deleteProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections/key=".concat(encodeURIComponent(e.key),"&version=").concat(encodeURIComponent(e.version)),method:"DELETE"}))},e.prototype.queryProductsInStore=function(e){var t;return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/in-store/key=".concat(encodeURIComponent(null!==(t=e.storeKey)&&void 0!==t?t:""),"/product-selection-assignments"),method:"GET"}))},e.prototype.getCartById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.queryCarts=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts",null==e?void 0:e.storeKey),method:"GET"}))]}))}))},e.prototype.queryMyCarts=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts",e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.createCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts",e.storeKey),method:"POST",data:e.data}))]}))}))},e.prototype.updateCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"POST",data:{version:e.version,actions:e.actions}}))]}))}))},e.prototype.getMyActiveCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/active-cart",e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.getMyCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.createMyCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))]}))}))},e.prototype.updateMyCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"POST",data:{version:e.cartVersion,actions:e.actions},accessToken:e.accessToken}))]}))}))},e.prototype.deleteMyActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(t.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:t.version}),accessToken:e.accessToken}))];case 2:return[2,o.sent()]}}))}))},e.prototype.deleteMyCartById=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[4,this.getMyCartById(e)];case 1:return t=o.sent(),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:t.version}),accessToken:e.accessToken}))];case 2:return[2,o.sent()]}}))}))},e.prototype.updateMyActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(t.id)),e.storeKey),method:"POST",data:{version:t.version,actions:e.actions},accessToken:e.accessToken}))]}}))}))},e.prototype.createMyOrderFromActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders",e.storeKey),method:"POST",data:{version:t.version,id:t.id},accessToken:e.accessToken}))]}}))}))},e.prototype.createOrderFromCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getCartById(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders",e.storeKey),method:"POST",data:{version:t.version,id:t.id}}))]}}))}))},e.prototype.deleteCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version})}))];case 1:return[2,t.sent()]}}))}))},e.prototype.createPayment=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments",method:"POST",data:e.data}))},e.prototype.deletePaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.updatePaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.getPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.queryPayments=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments",method:"GET"}))},e.prototype.createMyPayment=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments",method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.updateMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.getMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"GET",accessToken:e.accessToken}))},e.prototype.queryMyPayments=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments",method:"GET",accessToken:e.accessToken}))},e.prototype.deleteMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"DELETE",params:{version:e.version},accessToken:e.accessToken}))},e.prototype.getMyOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.queryMyOrders=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders",e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.updateOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"POST",data:e.data}))},e.prototype.updateOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNumber)),e.storeKey),method:"POST",data:e.data}))},e.prototype.getOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNumber)),e.storeKey),method:"GET"}))},e.prototype.deleteOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.deleteOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNo)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.queryOrders=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders",e.storeKey),method:"GET"}))},e.prototype.createProduct=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products",method:"POST",data:e.data}))},e.prototype.updateProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.updateProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteProductById=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),t=e.version,e.unpublish?[4,this.unpublishProductById({id:e.id,version:e.version})]:[3,2];case 1:o=r.sent(),t=o.version,r.label=2;case 2:return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:t})}))]}}))}))},e.prototype.deleteProductByKey=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return t=e.version,e.unpublish?[4,this.unpublishProductByKey({key:e.key,version:e.version})]:[3,2];case 1:o=r.sent(),t=o.version,r.label=2;case 2:return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:t})}))]}}))}))},e.prototype.unpublishProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"POST",params:e.params,data:{version:e.version,actions:[{action:"unpublish"}]}}))},e.prototype.unpublishProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"POST",params:e.params,data:{version:e.version,actions:[{action:"unpublish"}]}}))},e.prototype.createCategory=function(e){return this.request({path:"/categories",method:"POST",data:e.data})},e.prototype.updateCategoryByKey=function(e){return this.request({path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.updateCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteCategoryByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.createAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers",e.storeKey),method:"POST",data:e.data}))},e.prototype.deleteCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.deleteCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.createMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/signup",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.loginMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/login",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.login=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/login",e.storeKey),method:"POST",data:e.data}))},e.prototype.getMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me",e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.updateMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.changeMyPassword=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/password",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.resetMyPassword=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/password/reset",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.getPasswordResetToken=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/password-token",e.storeKey),method:"POST",data:e.data}))},e.prototype.getCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.getCustomerByPasswordToken=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/password-token=".concat(encodeURIComponent(e.token)),e.storeKey),method:"GET"}))},e.prototype.queryCustomers=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers",e.storeKey),method:"GET"}))},e.prototype.updateCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customers/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customers/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.getProductTypeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getProductTypeByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryProductTypes=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types",method:"GET"}))},e.prototype.getTypeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getTypeByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryTypes=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types",method:"GET"}))},e.prototype.getDiscountCodeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/discount-codes/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCartDiscountById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCartDiscountByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryCartDiscounts=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts",method:"GET"}))},e.prototype.getCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.container),"/").concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getCustomObjectById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.saveCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects",method:"POST",data:e.data}))},e.prototype.deleteCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.container),"/").concat(encodeURIComponent(e.key)),method:"DELETE"}))},e.prototype.getShippingMethodById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getShippingMethodByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getShippingMethodsForLocation=function(e){return this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{country:e.country,state:e.state,currency:e.currency})}))),{path:"/shipping-methods/matching-location",method:"GET",accessToken:e.accessToken}))},e.prototype.getShippingMethodsForCart=function(e){return this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{cartId:e.cartId})}))),{path:"/shipping-methods/matching-cart",method:"GET",accessToken:e.accessToken}))},e.prototype.queryShippingMethods=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods",method:"GET"}))},e.prototype.getCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCustomerGroupByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryCustomerGroups=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups",method:"GET"}))},e.prototype.createCustomerGroup=function(e){return this.request({path:"/customer-groups",method:"POST",data:e.data})},e.prototype.updateCustomerGroupByKey=function(e){return this.request({path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.updateCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteCustomerGroupByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.getStateById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStateByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStates=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states",method:"GET"}))},e.prototype.getStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStandalonePrices=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices",method:"GET"}))},e.prototype.createStandalonePrice=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices",method:"POST",data:e.data}))},e.prototype.updateStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.deleteStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.graphql=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/graphql",method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.request=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getRequestOptions(e)];case 1:return t=o.sent(),[4,this.requestExecutor(t)];case 2:return[2,o.sent()]}}))}))},e.prototype.getRequestOptions=function(e){return r(this,void 0,void 0,(function(){var t,o,r,i,a;return s(this,(function(s){switch(s.label){case 0:return o=e.accessToken,r="".concat(this.endpoints.api,"/").concat(this.config.projectKey).concat(e.path),o?[3,2]:[4,this.auth.getClientGrant()];case 1:i=s.sent(),o=i.accessToken,s.label=2;case 2:return a=n(n({},e.headers),{Authorization:"Bearer ".concat(o)}),"string"==typeof e.correlationId&&""!==e.correlationId&&(a["X-Correlation-ID"]=e.correlationId,delete e.correlationId),e.params&&Object.keys(e.params).length&&(t=e.params),[2,{method:e.method,data:e.data,url:r,headers:a,params:t}]}}))}))},e.prototype.extractCommonRequestOptions=function(e){return e?{correlationId:e.correlationId,params:e.params,retry:e.retry}:{}},e.prototype.applyStore=function(e,t){return"string"==typeof t&&""!==t?"/in-store/key=".concat(t).concat(e):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(e):e},e.validateConfig=function(e){var t=[];if(e?(e.projectKey?"string"!=typeof e.projectKey&&t.push("The `projectKey` property must be a string"):t.push("The `projectKey` property is empty"),e.clientId?"string"!=typeof e.clientId&&t.push("The `clientId` property must be a string"):t.push("The `clientId` property is empty"),e.clientSecret?"string"!=typeof e.clientSecret&&t.push("The `clientSecret` property must be a string"):t.push("The `clientSecret` property is empty"),Array.isArray(e.clientScopes)?0===e.clientScopes.length&&t.push("The `clientScopes` property must have at least 1 scope defined"):t.push("The `clientScopes` property must be an array"),e.region?"string"!=typeof e.region?t.push("The `region` property must be a string"):Object.prototype.hasOwnProperty.call(c.REGION_URLS,e.region)||t.push("The `region` property value is not valid: ".concat(e.region,". Must be one of: ").concat(Object.keys(c.REGION_URLS).join(", "))):t.push("The `region` property is empty")):t.push("The config object missing or empty"),t.length)throw new a.CommercetoolsError("The configuration object passed in to the `CommercetoolsApi` constructor is not valid: \n"+t.map((function(e){return"• ".concat(e)})).join("\n"))},e}();t.CommercetoolsApi=d},3713:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(9818),t),r(o(7013),t)},7013:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2442:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsAuth=void 0;var i=o(2915),a=o(8003),c=o(3032),u={refreshIfWithinSecs:1800,timeoutMs:5e3},p=function(){function e(e){if(this.grantPromise=null,this.config=n(n({},u),e),!this.config.clientScopes.length)throw new i.CommercetoolsError("`config.clientScopes` must contain at least one scope");this.api=new c.CommercetoolsAuthApi(e)}return e.prototype.getClientGrant=function(){return r(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){return this.grantPromise?[2,this.grantPromise]:this.grant&&!this.grant.expiresWithin(this.config.refreshIfWithinSecs)?[2,this.grant]:(this.grantPromise=this.api.getClientGrant(this.config.clientScopes).then((function(t){return e.grant=new a.CommercetoolsGrant(t),e.grant})).finally((function(){e.grantPromise=null})),[2,this.grantPromise])}))}))},e.prototype.refreshCustomerGrant=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.api.refreshGrant(e)];case 1:return t=o.sent(),[2,new a.CommercetoolsGrant(n(n({},t),{refresh_token:e}))]}}))}))},e.prototype.login=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!(t=e.scopes||this.config.customerScopes))throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return r.sent(),[4,this.api.login(n(n({},e),{scopes:t}))];case 2:return o=r.sent(),[2,new a.CommercetoolsGrant(o)]}}))}))},e.prototype.getAnonymousGrant=function(e){return r(this,void 0,void 0,(function(){var t,o,n;return s(this,(function(r){switch(r.label){case 0:if(t=(null==e?void 0:e.scopes)||this.config.customerScopes,o=null==e?void 0:e.anonymousId,!t)throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return r.sent(),[4,this.api.getAnonymousGrant({scopes:t,anonymousId:o})];case 2:return n=r.sent(),[2,new a.CommercetoolsGrant(n)]}}))}))},e.prototype.logout=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.api.logout(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.revokeToken=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.api.revokeToken(e)];case 1:return t.sent(),[2]}}))}))},e}();t.CommercetoolsAuth=p},3032:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsAuthApi=void 0;var s=o(2849),i=o(2915),a=o(7530),c=o(7111),u=o(9017),p=o(7034),d=function(){function e(e){this.config=e,this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,p.getRequestExecutor)({timeoutMs:e.timeoutMs,httpsAgent:e.httpsAgent,systemIdentifier:e.systemIdentifier,onBeforeRequest:e.onBeforeRequest,onAfterResponse:e.onAfterResponse,retry:e.retry})}return e.prototype.getClientGrant=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.post("/token",{grant_type:s.GrantType.CLIENT_CREDENTIALS,scope:(0,a.scopeArrayToRequestString)(e,this.config.projectKey)})]}))}))},e.prototype.refreshGrant=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.post("/token",{grant_type:s.GrantType.REFRESH_TOKEN,refresh_token:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.login=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.post("/".concat(this.config.projectKey).concat(this.applyStore("/customers/token",e.storeKey)),{username:e.username,password:e.password,grant_type:s.GrantType.PASSWORD,scope:(0,a.scopeArrayToRequestString)(e.scopes,this.config.projectKey)})]}))}))},e.prototype.revokeToken=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.post("/token/revoke",{token:e.tokenValue,token_type_hint:e.tokenType})];case 1:return t.sent(),[2]}}))}))},e.prototype.logout=function(e){return n(this,void 0,void 0,(function(){var t,o;return r(this,(function(n){switch(n.label){case 0:return[4,Promise.allSettled([this.revokeToken({tokenType:"access_token",tokenValue:e.accessToken}),this.revokeToken({tokenType:"refresh_token",tokenValue:e.refreshToken})])];case 1:if(t=n.sent(),(o=t.reduce((function(e,t){return"rejected"===t.status&&e.push(t.reason),e}),[])).length)throw new i.CommercetoolsError("Logout failed in one or more calls to the token revocation endpoint",o);return[2]}}))}))},e.prototype.getAnonymousGrant=function(e){var t;return n(this,void 0,void 0,(function(){var o;return r(this,(function(n){return o={grant_type:s.GrantType.CLIENT_CREDENTIALS},(null===(t=null==e?void 0:e.scopes)||void 0===t?void 0:t.length)&&(o.scope=(0,a.scopeArrayToRequestString)(e.scopes,this.config.projectKey)),(null==e?void 0:e.anonymousId)&&(o.anonymous_id=e.anonymousId),[2,this.post("/".concat(this.config.projectKey,"/anonymous/token"),o)]}))}))},e.prototype.post=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(o){switch(o.label){case 0:return[4,this.requestExecutor(this.getRequestOptions({path:e,body:t}))];case 1:return[2,o.sent()]}}))}))},e.prototype.getRequestOptions=function(e){var t,o="".concat(this.endpoints.auth,"/oauth").concat(e.path),n={Authorization:"Basic ".concat((0,u.base64EncodeForBasicAuth)(this.config.clientId,this.config.clientSecret)),"Content-Type":"application/x-www-form-urlencoded"};return e.correlationId&&""!==e.correlationId&&(n["X-Correlation-ID"]=e.correlationId,delete e.correlationId),e.body&&(t=new URLSearchParams(e.body).toString()),{method:"POST",data:t,url:o,headers:n}},e.prototype.applyStore=function(e,t){return"string"==typeof t&&""!==t?"/in-store/key=".concat(t).concat(e):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(e):e},e}();t.CommercetoolsAuthApi=d},8003:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsGrant=void 0;var n=o(7530),r=function(){function e(e){this.accessToken="",this.expiresIn=0,this.expiresAt=new Date,this.scopes=[],this.accessToken=e.access_token,this.expiresIn=e.expires_in,this.scopes=(0,n.scopeRequestStringToArray)(e.scope),this.anonymousId=this.extractKeyFromScope("anonymous_id",e.scope),this.customerId=this.extractKeyFromScope("customer_id",e.scope),this.expiresAt=new Date((new Date).getTime()+1e3*e.expires_in),"refresh_token"in e&&e.refresh_token&&(this.refreshToken=e.refresh_token)}return e.prototype.expiresWithin=function(e){var t=(new Date).getTime()+1e3*e;return this.expiresAt.getTime()<t},e.prototype.extractKeyFromScope=function(e,t){if(t&&e){var o=null==t?void 0:t.split(" ");if(Array.isArray(o)&&0!==o.length){var n=o.find((function(t){return t.slice(0,e.length+1)==="".concat(e,":")}));return n?n.slice(e.length+1):void 0}}},e}();t.CommercetoolsGrant=r},7111:(e,t,o)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SCOPES=t.REGION_URLS=void 0;var r=o(9291);t.REGION_URLS=((n={})[r.Region.EUROPE_GCP]={auth:"https://auth.europe-west1.gcp.commercetools.com",api:"https://api.europe-west1.gcp.commercetools.com"},n[r.Region.EUROPE_AWS]={auth:"https://auth.eu-central-1.aws.commercetools.com",api:"https://api.eu-central-1.aws.commercetools.com"},n[r.Region.NORTH_AMERICA_GCP]={auth:"https://auth.us-central1.gcp.commercetools.com",api:"https://api.us-central1.gcp.commercetools.com"},n[r.Region.NORTH_AMERICA_AWS]={auth:"https://auth.us-east-2.aws.commercetools.com",api:"https://api.us-east-2.aws.commercetools.com"},n[r.Region.AUSTRALIA_GCP]={auth:"https://auth.australia-southeast1.gcp.commercetools.com",api:"https://api.australia-southeast1.gcp.commercetools.com"},n),t.INVALID_SCOPES=["anonymous_id","customer_id"]},7443:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(2442),t),r(o(8003),t)},7530:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scopeRequestStringToArray=t.scopeArrayToRequestString=void 0;var n=o(7111);t.scopeArrayToRequestString=function(e,t){return e.length?e.map((function(e){return"".concat(e,":").concat(t)})).join(" "):""},t.scopeRequestStringToArray=function(e){return e?e.split(" ").map((function(e){return e.split(":")[0]})).filter((function(e){return!n.INVALID_SCOPES.includes(e)})):[]}},2849:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GrantType=void 0,function(e){e.CLIENT_CREDENTIALS="client_credentials",e.REFRESH_TOKEN="refresh_token",e.PASSWORD="password"}(o||(t.GrantType=o={}))},9017:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.base64EncodeForBasicAuth=void 0,t.base64EncodeForBasicAuth=function(e,t){var o="".concat(e,":").concat(t);return btoa(o)}},4060:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HTTPS_AGENT_CONFIG=t.RETRYABLE_STATUS_CODES=t.DEFAULT_RETRY_CONFIG=t.MAX_ITEMS_PER_QUERY=t.DEFAULT_REQUEST_TIMEOUT_MS=t.USER_AGENT_PREFIX=void 0;var n=o(8842);t.USER_AGENT_PREFIX="@gradientedge/commercetools-utils",t.DEFAULT_REQUEST_TIMEOUT_MS=5e3,t.MAX_ITEMS_PER_QUERY=500,t.DEFAULT_RETRY_CONFIG={maxRetries:3,delayMs:50,jitter:!0},t.RETRYABLE_STATUS_CODES=[n.Status.InternalServerError,n.Status.NotImplemented,n.Status.BadGateway,n.Status.ServiceUnavailable,n.Status.GatewayTimeout],t.DEFAULT_HTTPS_AGENT_CONFIG={keepAlive:!0,maxSockets:32,maxFreeSockets:10,timeout:t.DEFAULT_REQUEST_TIMEOUT_MS}},6781:function(e,t,o){var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsError=void 0;var i=s(o(4530)),a=o(893),c=function(e){function t(o,n,r){var s=e.call(this,o)||this;return s.isCommercetoolsError=!0,s.data=n,s.status=r,Object.setPrototypeOf(s,t.prototype),s}return r(t,e),t.fromAxiosError=function(e){var o,n,r,s,i,c,u,p;return new t(e.message,{code:e.code,request:{url:null===(o=e.config)||void 0===o?void 0:o.url,method:null===(n=e.config)||void 0===n?void 0:n.method,headers:(0,a.maskSensitiveHeaders)((0,a.extractAxiosHeaders)(null===(r=e.config)||void 0===r?void 0:r.headers)),params:(0,a.maskSensitiveInput)(null===(s=e.config)||void 0===s?void 0:s.params),data:(0,a.maskSensitiveInput)(this.parseRequestData(e.config))},response:{status:null===(i=e.response)||void 0===i?void 0:i.status,data:(0,a.maskSensitiveInput)(null===(c=e.response)||void 0===c?void 0:c.data),headers:(0,a.extractAxiosHeaders)(null===(u=e.response)||void 0===u?void 0:u.headers)}},null===(p=e.response)||void 0===p?void 0:p.status)},t.parseRequestData=function(e){var t,o;if(!e)return null;var n=null==e?void 0:e.data;if("string"==typeof n&&n){var r="";if("string"==typeof(null===(t=null==e?void 0:e.headers)||void 0===t?void 0:t["Content-Type"])&&(r=null===(o=null==e?void 0:e.headers)||void 0===o?void 0:o["Content-Type"]),"application/json"===r.substring(0,16))try{n=JSON.parse(e.data)}catch(e){}else if("application/x-www-form-urlencoded"===r.substring(0,33))try{var s=new URLSearchParams(e.data),i={};s.forEach((function(e,t,o){var n=o.getAll(t);0===n.length?i[t]="":1===n.length?i[t]=n[0]:i[t]=n})),n=i}catch(e){}}return n},t.prototype.toJSON=function(){return{status:this.status,message:this.message,data:this.data,isCommercetoolsError:!0}},t.prototype.toString=function(){return(0,i.default)(this.toJSON())},t}(Error);t.CommercetoolsError=c},3028:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(6781),t)},2915:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_ITEMS_PER_QUERY=t.Region=void 0,r(o(3028),t),r(o(7443),t),r(o(3713),t);var s=o(9291);Object.defineProperty(t,"Region",{enumerable:!0,get:function(){return s.Region}}),r(o(893),t),r(o(6249),t);var i=o(4060);Object.defineProperty(t,"MAX_ITEMS_PER_QUERY",{enumerable:!0,get:function(){return i.MAX_ITEMS_PER_QUERY}})},1250:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},506:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5645:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},625:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9605:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5554:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4294:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5991:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5714:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7942:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9906:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4241:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},146:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5167:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4236:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6249:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(1250),t),r(o(506),t),r(o(5645),t),r(o(625),t),r(o(9605),t),r(o(5554),t),r(o(4294),t),r(o(5991),t),r(o(7942),t),r(o(9906),t),r(o(5714),t),r(o(4241),t),r(o(146),t),r(o(5167),t),r(o(4236),t),r(o(2949),t),r(o(6871),t),r(o(492),t),r(o(8386),t),r(o(6487),t),r(o(4946),t),r(o(5285),t),r(o(5283),t),r(o(6313),t),r(o(3708),t),r(o(6883),t),r(o(1197),t),r(o(8704),t),r(o(2246),t),r(o(4089),t),r(o(6614),t),r(o(7607),t),r(o(4602),t),r(o(310),t),r(o(7183),t),r(o(806),t),r(o(2569),t),r(o(1027),t),r(o(6080),t),r(o(1613),t),r(o(721),t)},2949:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8386:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6487:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5285:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5283:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6313:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6883:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2246:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4089:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7607:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4602:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7183:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},806:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2569:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6080:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1613:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},721:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4474:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(7261),t),r(o(884),t)},884:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isRetryableError=void 0;var n=o(4060);t.isRetryableError=function(e){return!e.isAxiosError||!e.request||!e.response||n.RETRYABLE_STATUS_CODES.includes(e.response.status)}},7034:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestExecutor=void 0;var r=o(4474),s=o(893),i=o(4060);t.getRequestExecutor=function(e){var t=(0,s.createAxiosInstance)({httpsAgent:e.httpsAgent}),o={"User-Agent":(0,s.buildUserAgent)(e.systemIdentifier)};return function(s){var a=n(n({},o),s.headers);return(0,r.request)({axiosInstance:t,onBeforeRequest:e.onBeforeRequest,onAfterResponse:e.onAfterResponse,request:n(n({},s),{headers:a}),retry:n(n({},i.DEFAULT_RETRY_CONFIG),e.retry),timeoutMs:e.timeoutMs})}}},7261:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0;var i=o(893),a=o(884),c=o(1100),u=o(4060),p=o(2003);t.request=function(e){var t,o,d;return r(this,void 0,void 0,(function(){var r,l,h,f,m,y,v,g,O,b,E,S,R,C;return s(this,(function(_){switch(_.label){case 0:r=e.retry,l=e.onBeforeRequest,h=e.onAfterResponse,f=e.axiosInstance,m=null!==(t=e.timeoutMs)&&void 0!==t?t:u.DEFAULT_REQUEST_TIMEOUT_MS,y={},v=(0,p.plainClone)(e.request),g=0,Object.keys(null!==(o=v.headers)&&void 0!==o?o:{}).map((function(e){return e.toLowerCase()})).includes("user-agent")||(null!==(d=v.headers)&&void 0!==d||(v.headers={}),v.headers["User-Agent"]=(0,i.buildUserAgent)()),b=0,R=function(){var e,t,o,u,p;return s(this,(function(s){switch(s.label){case 0:return E=null,S=null,g>0?(y["X-Retry-Count"]="".concat(g),e=(0,i.calculateDelay)(g,r),[4,new Promise((function(t){return setTimeout(t,e)}))]):[3,2];case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,6,,7]),l?[4,l(v)]:[3,4];case 3:(t=s.sent())&&(v=t),s.label=4;case 4:return E=Date.now(),[4,f(n(n({},v),{headers:n(n({},v.headers),y),timeout:m}))];case 5:return o=s.sent(),S=Date.now(),b+=S-E,h&&h((0,i.convertAxiosResponse)(o,{accumulativeDurationMs:b,durationMs:S-E,retries:g})),[2,{value:o.data}];case 6:if(u=s.sent(),S=Date.now(),b+=E?S-E:0,h&&(p=(0,i.convertAxiosError)(u,{accumulativeDurationMs:b,durationMs:E?S-E:0,retries:g}))&&h(p),!(0,a.isRetryableError)(u))throw(0,c.transformError)(u);return O=u,[3,7];case 7:return g++,[2]}}))},_.label=1;case 1:return[5,R()];case 2:if("object"==typeof(C=_.sent()))return[2,C.value];_.label=3;case 3:if(g<=r.maxRetries)return[3,1];_.label=4;case 4:throw(0,c.transformError)(O)}}))}))}},1100:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.transformError=void 0;var n=o(3028);t.transformError=function(e){return e.isAxiosError?n.CommercetoolsError.fromAxiosError(e):e}},9291:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Region=void 0,function(e){e.NORTH_AMERICA_GCP="north_america_gcp",e.NORTH_AMERICA_AWS="north_america_aws",e.EUROPE_GCP="europe_gcp",e.EUROPE_AWS="europe_aws",e.AUSTRALIA_GCP="australia_gcp"}(o||(t.Region=o={}))},2519:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertAxiosError=void 0;var n=o(7271);t.convertAxiosError=function(e,t){var o,r,s,i,a,c,u,p,d,l;return"isAxiosError"in e?{request:{url:null!==(r=null===(o=e.config)||void 0===o?void 0:o.url)&&void 0!==r?r:"",method:null===(s=e.config)||void 0===s?void 0:s.method,params:null===(i=e.config)||void 0===i?void 0:i.params,headers:(0,n.extractAxiosHeaders)(null===(a=e.config)||void 0===a?void 0:a.headers),data:null===(c=e.config)||void 0===c?void 0:c.data},response:{code:e.code,message:(null===(u=e.response)||void 0===u?void 0:u.status)?void 0:e.message,status:null===(p=e.response)||void 0===p?void 0:p.status,headers:(0,n.extractAxiosHeaders)(null===(d=e.response)||void 0===d?void 0:d.headers),data:null===(l=e.response)||void 0===l?void 0:l.data},stats:t}:null}},4059:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertAxiosResponse=void 0;var n=o(7271);t.convertAxiosResponse=function(e,t){var o,r,s,i,a,c;return{request:{url:null!==(r=null===(o=e.config)||void 0===o?void 0:o.url)&&void 0!==r?r:"",method:null===(s=e.config)||void 0===s?void 0:s.method,params:null===(i=e.config)||void 0===i?void 0:i.params,headers:(0,n.extractAxiosHeaders)(null===(a=e.config)||void 0===a?void 0:a.headers),data:null===(c=e.config)||void 0===c?void 0:c.data},response:{status:e.status,headers:(0,n.extractAxiosHeaders)(e.headers),data:e.data},stats:t}}},4070:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createAxiosInstance=void 0,o(4060);var r=n(o(7218));t.createAxiosInstance=function(e){return r.default.create({httpsAgent:void 0})}},7271:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractAxiosHeaders=void 0;var n=o(7218);t.extractAxiosHeaders=function(e){var t={};if(e instanceof n.AxiosHeaders){var o=e.toJSON();t={},Object.entries(o).forEach((function(e){var o=e[0],n=e[1],r=o.toLowerCase();"boolean"==typeof n||"number"==typeof n||"string"==typeof n?t[r]=n.toString():Array.isArray(n)&&(t[r]=n.join(", "))}))}return Object.keys(t).length?t:void 0}},4747:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(2519),t),r(o(4059),t),r(o(4070),t),r(o(7271),t)},3720:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDelay=void 0,t.calculateDelay=function(e,t){if(!t||0===e)return 0;var o=t.delayMs*Math.pow(2,e-1);if(t.jitter){var n=o*(1+1/(e+1));return Math.floor(Math.random()*n)}return o}},1834:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNonEmptyString=void 0;var n=o(3028);t.ensureNonEmptyString=function(e){if(!e.value.trim())throw new n.CommercetoolsError("The string parameter '".concat(e.name,"' cannot be empty"))}},3930:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatAsKey=void 0;var n=o(3028);t.formatAsKey=function(e){var t="";if("string"!=typeof e)throw new n.CommercetoolsError("The [input] parameter must be a string");if((t=(t=(t=(t=(t=(t=e.trim().toLowerCase()).replace(/ {2,}/g,"")).replace(/&/g,"and")).replace(/[ _]/g,"-")).replace(/[^0-9a-z-]+/g,"")).replace(/-{2,}/g,"-")).length&&"-"===t[0]&&(t=t.slice(1)),t.length&&"-"===t[t.length-1]&&(t=t.slice(0,-1)),t.length<2)throw new n.CommercetoolsError("Formatted key did not meet minimum length of 2 characters: ".concat(t));if(t.length>256)throw new n.CommercetoolsError("Formatted key exceeds the maximum length of 256 characters: ".concat(t));return t}},6640:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributeValue=void 0,t.getAttributeValue=function(e){var t,o;if(null===(t=null==e?void 0:e.attributes)||void 0===t?void 0:t.length){var n=null===(o=e.attributes)||void 0===o?void 0:o.find((function(t){return t.name===e.name}));if(n)return n.value}return null}},893:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(4747),t),r(o(3720),t),r(o(1834),t),r(o(3930),t),r(o(6640),t),r(o(9998),t),r(o(9989),t),r(o(3190),t)},9998:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.maskSensitiveData=t.maskSensitiveHeaders=t.maskSensitiveInput=t.DEFAULT_MASKING_STRING=t.SENSITIVE_HEADER_NAMES=t.SENSITIVE_PROPERTY_NAMES=void 0;var r=n(o(3692)),s=o(7218),i=o(2003);function a(e,o,n){if(void 0===n&&(n=t.DEFAULT_MASKING_STRING),"object"==typeof e&&null!=e){var a;return a=e instanceof s.AxiosHeaders?(0,i.plainClone)(e.toJSON()):(0,i.plainClone)(e),(0,r.default)(a).forEach((function(){var e,t;o.includes(null!==(t=null===(e=this.key)||void 0===e?void 0:e.toLowerCase())&&void 0!==t?t:"")&&this.update(n)})),a}return e}t.SENSITIVE_PROPERTY_NAMES=["password","refresh_token"],t.SENSITIVE_HEADER_NAMES=["authorization"],t.DEFAULT_MASKING_STRING="********",t.maskSensitiveInput=function(e){return a(e,t.SENSITIVE_PROPERTY_NAMES)},t.maskSensitiveHeaders=function(e){return a(e,t.SENSITIVE_HEADER_NAMES)},t.maskSensitiveData=a},2003:(e,t)=>{function o(e,t){if(t&&e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]?(Array.isArray(e[n])?t[n]=[]:t[n]={},t[n]=o(e[n],t[n])):t[n]=e[n]);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.plainClone=void 0,t.plainClone=function(e){return o(e,{})}},9989:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.retryOnConflict=void 0;var s=o(3720),i=o(8842);t.retryOnConflict=function(e){return n(this,void 0,void 0,(function(){var t,o,n,a,c,u;return r(this,(function(p){switch(p.label){case 0:t=((null==e?void 0:e.maxRetries)||3)+1,o=(null==e?void 0:e.delayMs)||100,n=!!(null==e?void 0:e.jitter),a=function(a){var c,u,p;return r(this,(function(r){switch(r.label){case 0:return a>1?(c=(0,s.calculateDelay)(a-1,{delayMs:o,jitter:n}),[4,new Promise((function(e){return setTimeout(e,c)}))]):[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),u={},[4,e.executeFn(a)];case 3:return[2,(u.value=r.sent(),u)];case 4:if(!(p=r.sent()).isCommercetoolsError||p.status!==i.Status.Conflict||a===t)throw p;return[3,5];case 5:return[2]}}))},c=1,p.label=1;case 1:return c<=t?[5,a(c)]:[3,4];case 2:if("object"==typeof(u=p.sent()))return[2,u.value];p.label=3;case 3:return c++,[3,1];case 4:return[2,void 0]}}))}))}},3190:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildUserAgent=void 0;var n=o(4060);t.buildUserAgent=function(e){var t=n.USER_AGENT_PREFIX;return e&&(t="".concat(t," (").concat(e,")")),t}},8842:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reason=t.ErrorStatus=t.RedirectionStatus=t.SuccessStatus=t.InformationStatus=t.Status=void 0;var n=o(7536);Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return n.Status}}),Object.defineProperty(t,"InformationStatus",{enumerable:!0,get:function(){return n.InformationStatus}}),Object.defineProperty(t,"SuccessStatus",{enumerable:!0,get:function(){return n.SuccessStatus}}),Object.defineProperty(t,"RedirectionStatus",{enumerable:!0,get:function(){return n.RedirectionStatus}}),Object.defineProperty(t,"ErrorStatus",{enumerable:!0,get:function(){return n.ErrorStatus}});var r=o(7890);Object.defineProperty(t,"reason",{enumerable:!0,get:function(){return r.reason}})},7890:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reason=void 0;const n=o(7536);t.reason=function(e){switch(e){case 200:return"OK";case 203:return"Non-Authoritative Information";case 207:return"Multi-Status";case 226:return"IM Used";case 414:return"URI Too Long";case 418:return"I'm a teapot";case 505:return"HTTP Version Not Supported";default:return(Object.keys(n.Status).find((t=>n.Status[t]===e))||"").replace(/(?!^)([A-Z])/gm," $1")}}},7536:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Status=t.ErrorStatus=t.RedirectionStatus=t.SuccessStatus=t.InformationStatus=void 0,t.InformationStatus={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103},t.SuccessStatus={Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226},t.RedirectionStatus={MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308},t.ErrorStatus={BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RequestedRangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},t.Status=Object.assign(Object.assign(Object.assign(Object.assign({},t.InformationStatus),t.SuccessStatus),t.RedirectionStatus),t.ErrorStatus)},4530:(e,t)=>{function o(e,t){var o=[],n=[];return null==t&&(t=function(e,t){return o[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o.indexOf(t)).join(".")+"]"}),function(r,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?n.splice(i,1/0,r):n.push(r),~o.indexOf(s)&&(s=t.call(this,r,s))}else o.push(s);return null==e?s:e.call(this,r,s)}}(e.exports=function(e,t,n,r){return JSON.stringify(e,o(t,r),n)}).getSerialize=o},3692:e=>{function t(e){return Object.prototype.toString.call(e)}var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.forEach)return e.forEach(t);for(var o=0;o<e.length;o++)t(e[o],o,e)}var r=Object.keys||function(e){var t=[];for(var o in e)t.push(o);return t},s=Object.prototype.hasOwnProperty||function(e,t){return t in e};function i(e){if("object"==typeof e&&null!==e){var s;if(o(e))s=[];else if("[object Date]"===t(e))s=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===t(e))s=new RegExp(e);else if(function(e){return"[object Error]"===t(e)}(e))s={message:e.message};else if(function(e){return"[object Boolean]"===t(e)}(e)||function(e){return"[object Number]"===t(e)}(e)||function(e){return"[object String]"===t(e)}(e))s=Object(e);else if(Object.create&&Object.getPrototypeOf)s=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)s={};else{var i=e.constructor&&e.constructor.prototype||e.__proto__||{},a=function(){};a.prototype=i,s=new a}return n(r(e),(function(t){s[t]=e[t]})),s}return e}function a(e,t,a){var c=[],u=[],p=!0;return function e(d){var l=a?i(d):d,h={},f=!0,m={node:l,node_:d,path:[].concat(c),parent:u[u.length-1],parents:u,key:c[c.length-1],isRoot:0===c.length,level:c.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(f=!1)},delete:function(e){delete m.parent.node[m.key],e&&(f=!1)},remove:function(e){o(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(f=!1)},keys:null,before:function(e){h.before=e},after:function(e){h.after=e},pre:function(e){h.pre=e},post:function(e){h.post=e},stop:function(){p=!1},block:function(){f=!1}};if(!p)return m;function y(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=r(m.node)),m.isLeaf=0===m.keys.length;for(var e=0;e<u.length;e++)if(u[e].node_===d){m.circular=u[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}y();var v=t.call(m,m.node);return void 0!==v&&m.update&&m.update(v),h.before&&h.before.call(m,m.node),f?("object"!=typeof m.node||null===m.node||m.circular||(u.push(m),y(),n(m.keys,(function(t,o){c.push(t),h.pre&&h.pre.call(m,m.node[t],t);var n=e(m.node[t]);a&&s.call(m.node,t)&&(m.node[t]=n.node),n.isLast=o===m.keys.length-1,n.isFirst=0===o,h.post&&h.post.call(m,n),c.pop()})),u.pop()),h.after&&h.after.call(m,m.node),m):m}(e).node}function c(e){this.value=e}function u(e){return new c(e)}c.prototype.get=function(e){for(var t=this.value,o=0;o<e.length;o++){var n=e[o];if(!t||!s.call(t,n))return;t=t[n]}return t},c.prototype.has=function(e){for(var t=this.value,o=0;o<e.length;o++){var n=e[o];if(!t||!s.call(t,n))return!1;t=t[n]}return!0},c.prototype.set=function(e,t){for(var o=this.value,n=0;n<e.length-1;n++){var r=e[n];s.call(o,r)||(o[r]={}),o=o[r]}return o[e[n]]=t,t},c.prototype.map=function(e){return a(this.value,e,!0)},c.prototype.forEach=function(e){return this.value=a(this.value,e,!1),this.value},c.prototype.reduce=function(e,t){var o=1===arguments.length,n=o?this.value:t;return this.forEach((function(t){this.isRoot&&o||(n=e.call(this,n,t))})),n},c.prototype.paths=function(){var e=[];return this.forEach((function(){e.push(this.path)})),e},c.prototype.nodes=function(){var e=[];return this.forEach((function(){e.push(this.node)})),e},c.prototype.clone=function(){var e=[],t=[];return function o(s){for(var a=0;a<e.length;a++)if(e[a]===s)return t[a];if("object"==typeof s&&null!==s){var c=i(s);return e.push(s),t.push(c),n(r(s),(function(e){c[e]=o(s[e])})),e.pop(),t.pop(),c}return s}(this.value)},n(r(c.prototype),(function(e){u[e]=function(t){var o=[].slice.call(arguments,1),n=new c(t);return n[e].apply(n,o)}})),e.exports=u},7218:(e,t,o)=>{function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),e=>{const t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),u=e=>t=>typeof t===e,{isArray:p}=Array,d=u("undefined"),l=c("ArrayBuffer"),h=u("string"),f=u("function"),m=u("number"),y=e=>null!==e&&"object"==typeof e,v=e=>{if("object"!==i(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=c("Date"),O=c("File"),b=c("Blob"),E=c("FileList"),S=c("URLSearchParams");function R(e,t,{allOwnKeys:o=!1}={}){if(null==e)return;let n,r;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{const r=o?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let i;for(n=0;n<s;n++)i=r[n],t.call(null,e[i],i,e)}}function C(e,t){t=t.toLowerCase();const o=Object.keys(e);let n,r=o.length;for(;r-- >0;)if(n=o[r],t===n.toLowerCase())return n;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:o.g,T=e=>!d(e)&&e!==_,w=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>q&&e instanceof q);var q;const P=c("HTMLFormElement"),x=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),j=c("RegExp"),I=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};R(o,((o,r)=>{!1!==t(o,r,e)&&(n[r]=o)})),Object.defineProperties(e,n)},A="abcdefghijklmnopqrstuvwxyz",k="0123456789",U={DIGIT:k,ALPHA:A,ALPHA_DIGIT:A+A.toUpperCase()+k},N=c("AsyncFunction");var M={isArray:p,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=i(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t},isString:h,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:v,isUndefined:d,isDate:g,isFile:O,isBlob:b,isRegExp:j,isFunction:f,isStream:e=>y(e)&&f(e.pipe),isURLSearchParams:S,isTypedArray:w,isFileList:E,forEach:R,merge:function e(){const{caseless:t}=T(this)&&this||{},o={},n=(n,r)=>{const s=t&&C(o,r)||r;v(o[s])&&v(n)?o[s]=e(o[s],n):v(n)?o[s]=e({},n):p(n)?o[s]=n.slice():o[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&R(arguments[e],n);return o},extend:(e,t,o,{allOwnKeys:r}={})=>(R(t,((t,r)=>{o&&f(t)?e[r]=n(t,o):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},toFlatObject:(e,t,o,n)=>{let r,i,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)a=r[i],n&&!n(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==o&&s(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,o)=>{e=String(e),(void 0===o||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return-1!==n&&n===o},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!m(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},forEachEntry:(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=o.next())&&!n.done;){const o=n.value;t.call(e,o[0],o[1])}},matchAll:(e,t)=>{let o;const n=[];for(;null!==(o=e.exec(t));)n.push(o);return n},isHTMLForm:P,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,o)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(o))return!1;const n=e[o];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")}))}))},toObjectSet:(e,t)=>{const o={},n=e=>{e.forEach((e=>{o[e]=!0}))};return p(e)?n(e):n(String(e).split(t)),o},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,o){return t.toUpperCase()+o})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C,global:_,isContextDefined:T,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let o="";const{length:n}=t;for(;e--;)o+=t[Math.random()*n|0];return o},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),o=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const r=p(e)?[]:{};return R(e,((e,t)=>{const s=o(e,n+1);!d(s)&&(r[t]=s)})),t[n]=void 0,r}}return e};return o(e,0)},isAsyncFn:N,isThenable:e=>e&&(y(e)||f(e))&&f(e.then)&&f(e.catch)};function B(e,t,o,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),n&&(this.request=n),r&&(this.response=r)}M.inherits(B,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const G=B.prototype,D={};function L(e){return M.isPlainObject(e)||M.isArray(e)}function K(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function F(e,t,o){return e?e.concat(t).map((function(e,t){return e=K(e),!o&&t?"["+e+"]":e})).join(o?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{D[e]={value:e}})),Object.defineProperties(B,D),Object.defineProperty(G,"isAxiosError",{value:!0}),B.from=(e,t,o,n,r,s)=>{const i=Object.create(G);return M.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),B.call(i,e.message,t,o,n,r),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const H=M.toFlatObject(M,{},null,(function(e){return/^is[A-Z]/.test(e)}));function z(e,t,o){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(o=M.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!M.isUndefined(t[e])}))).metaTokens,r=o.visitor||u,s=o.dots,i=o.indexes,a=(o.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(!a&&M.isBlob(e))throw new B("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,o,r){let a=e;if(e&&!r&&"object"==typeof e)if(M.endsWith(o,"{}"))o=n?o:o.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function(e){return M.isArray(e)&&!e.some(L)}(e)||(M.isFileList(e)||M.endsWith(o,"[]"))&&(a=M.toArray(e)))return o=K(o),a.forEach((function(e,n){!M.isUndefined(e)&&null!==e&&t.append(!0===i?F([o],n,s):null===i?o:o+"[]",c(e))})),!1;return!!L(e)||(t.append(F(r,o,s),c(e)),!1)}const p=[],d=Object.assign(H,{defaultVisitor:u,convertValue:c,isVisitable:L});if(!M.isObject(e))throw new TypeError("data must be an object");return function e(o,n){if(!M.isUndefined(o)){if(-1!==p.indexOf(o))throw Error("Circular reference detected in "+n.join("."));p.push(o),M.forEach(o,(function(o,s){!0===(!(M.isUndefined(o)||null===o)&&r.call(t,o,M.isString(s)?s.trim():s,n,d))&&e(o,n?n.concat(s):[s])})),p.pop()}}(e),t}function V(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function J(e,t){this._pairs=[],e&&z(e,this,t)}const W=J.prototype;function X(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y(e,t,o){if(!t)return e;const n=o&&o.encode||X,r=o&&o.serialize;let s;if(s=r?r(t,o):M.isURLSearchParams(t)?t.toString():new J(t,o).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}W.append=function(e,t){this._pairs.push([e,t])},W.toString=function(e){const t=e?function(t){return e.call(this,t,V)}:V;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Q=class{constructor(){this.handlers=[]}use(e,t,o){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!o&&o.synchronous,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function ee(e){function t(e,o,n,r){let s=e[r++];const i=Number.isFinite(+s),a=r>=e.length;return s=!s&&M.isArray(n)?n.length:s,a?(M.hasOwnProp(n,s)?n[s]=[n[s],o]:n[s]=o,!i):(n[s]&&M.isObject(n[s])||(n[s]=[]),t(e,o,n[s],r)&&M.isArray(n[s])&&(n[s]=function(e){const t={},o=Object.keys(e);let n;const r=o.length;let s;for(n=0;n<r;n++)s=o[n],t[s]=e[s];return t}(n[s])),!i)}if(M.isFormData(e)&&M.isFunction(e.entries)){const o={};return M.forEachEntry(e,((e,n)=>{t(function(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,o,0)})),o}return null}const te={"Content-Type":void 0},oe={transitional:$,adapter:["xhr","http"],transformRequest:[function(e,t){const o=t.getContentType()||"",n=o.indexOf("application/json")>-1,r=M.isObject(e);if(r&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return n&&n?JSON.stringify(ee(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(r){if(o.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return z(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,o,n){return Z.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=M.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return z(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||n?(t.setContentType("application/json",!1),function(e,t,o){if(M.isString(e))try{return(0,JSON.parse)(e),M.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||oe.transitional,o=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&M.isString(e)&&(o&&!this.responseType||n)){const o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw B.from(e,B.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};M.forEach(["delete","get","head"],(function(e){oe.headers[e]={}})),M.forEach(["post","put","patch"],(function(e){oe.headers[e]=M.merge(te)}));var ne=oe;const re=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:M.isArray(e)?e.map(ae):String(e)}function ce(e,t,o,n,r){return M.isFunction(n)?n.call(this,t,o):(r&&(t=o),M.isString(t)?M.isString(n)?-1!==t.indexOf(n):M.isRegExp(n)?n.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,o){const n=this;function r(e,t,o){const r=ie(t);if(!r)throw new Error("header name must be a non-empty string");const s=M.findKey(n,r);(!s||void 0===n[s]||!0===o||void 0===o&&!1!==n[s])&&(n[s||t]=ae(e))}const s=(e,t)=>M.forEach(e,((e,o)=>r(e,o,t)));return M.isPlainObject(e)||e instanceof this.constructor?s(e,t):M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let o,n,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),o=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!o||t[o]&&re[o]||("set-cookie"===o?t[o]?t[o].push(n):t[o]=[n]:t[o]=t[o]?t[o]+", "+n:n)})),t})(e),t):null!=e&&r(t,e,o),this}get(e,t){if(e=ie(e)){const o=M.findKey(this,e);if(o){const e=this[o];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)t[n[1]]=n[2];return t}(e);if(M.isFunction(t))return t.call(this,e,o);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ie(e)){const o=M.findKey(this,e);return!(!o||void 0===this[o]||t&&!ce(0,this[o],o,t))}return!1}delete(e,t){const o=this;let n=!1;function r(e){if(e=ie(e)){const r=M.findKey(o,e);!r||t&&!ce(0,o[r],r,t)||(delete o[r],n=!0)}}return M.isArray(e)?e.forEach(r):r(e),n}clear(e){const t=Object.keys(this);let o=t.length,n=!1;for(;o--;){const r=t[o];e&&!ce(0,this[r],r,e,!0)||(delete this[r],n=!0)}return n}normalize(e){const t=this,o={};return M.forEach(this,((n,r)=>{const s=M.findKey(o,r);if(s)return t[s]=ae(n),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,o)=>t.toUpperCase()+o))}(r):String(r).trim();i!==r&&delete t[r],t[i]=ae(n),o[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return M.forEach(this,((o,n)=>{null!=o&&!1!==o&&(t[n]=e&&M.isArray(o)?o.join(", "):o)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const o=new this(e);return t.forEach((e=>o.set(e))),o}static accessor(e){const t=(this[se]=this[se]={accessors:{}}).accessors,o=this.prototype;function n(e){const n=ie(e);t[n]||(function(e,t){const o=M.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+o,{value:function(e,o,r){return this[n].call(this,t,e,o,r)},configurable:!0})}))}(o,e),t[n]=!0)}return M.isArray(e)?e.forEach(n):n(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.freezeMethods(ue.prototype),M.freezeMethods(ue);var pe=ue;function de(e,t){const o=this||ne,n=t||o,r=pe.from(n.headers);let s=n.data;return M.forEach(e,(function(e){s=e.call(o,s,r.normalize(),t?t.status:void 0)})),r.normalize(),s}function le(e){return!(!e||!e.__CANCEL__)}function he(e,t,o){B.call(this,null==e?"canceled":e,B.ERR_CANCELED,t,o),this.name="CanceledError"}M.inherits(he,B,{__CANCEL__:!0});var fe=Z.isStandardBrowserEnv?{write:function(e,t,o,n,r,s){const i=[];i.push(e+"="+encodeURIComponent(t)),M.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),M.isString(n)&&i.push("path="+n),M.isString(r)&&i.push("domain="+r),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function me(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ye=Z.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let o;function n(o){let n=o;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return o=n(window.location.href),function(e){const t=M.isString(e)?n(e):e;return t.protocol===o.protocol&&t.host===o.host}}():function(){return!0};function ve(e,t){let o=0;const n=function(e,t){e=e||10;const o=new Array(e),n=new Array(e);let r,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[i];r||(r=c),o[s]=a,n[s]=c;let p=i,d=0;for(;p!==s;)d+=o[p++],p%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-r<t)return;const l=u&&c-u;return l?Math.round(1e3*d/l):void 0}}(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-o,c=n(a);o=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r};u[t?"download":"upload"]=!0,e(u)}}const ge={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,o){let n=e.data;const r=pe.from(e.headers).normalize(),s=e.responseType;let i;function a(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}M.isFormData(n)&&(Z.isStandardBrowserEnv||Z.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",o=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(t+":"+o))}const u=me(e.baseURL,e.url);function p(){if(!c)return;const n=pe.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,o){const n=o.config.validateStatus;o.status&&n&&!n(o.status)?t(new B("Request failed with status code "+o.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o)):e(o)}((function(e){t(e),a()}),(function(e){o(e),a()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),Y(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(o(new B("Request aborted",B.ECONNABORTED,e,c)),c=null)},c.onerror=function(){o(new B("Network Error",B.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),o(new B(t,n.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,e,c)),c=null},Z.isStandardBrowserEnv){const t=(e.withCredentials||ye(u))&&e.xsrfCookieName&&fe.read(e.xsrfCookieName);t&&r.set(e.xsrfHeaderName,t)}void 0===n&&r.setContentType(null),"setRequestHeader"in c&&M.forEach(r.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),M.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{c&&(o(!t||t.type?new he(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);d&&-1===Z.protocols.indexOf(d)?o(new B("Unsupported protocol "+d+":",B.ERR_BAD_REQUEST,e)):c.send(n||null)}))}};M.forEach(ge,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new he(null,e)}function be(e){return Oe(e),e.headers=pe.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=M.isArray(e)?e:[e];const{length:t}=e;let o,n;for(let r=0;r<t&&(o=e[r],!(n=M.isString(o)?ge[o.toLowerCase()]:o));r++);if(!n){if(!1===n)throw new B(`Adapter ${o} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(M.hasOwnProp(ge,o)?`Adapter '${o}' is not available in the build`:`Unknown adapter '${o}'`)}if(!M.isFunction(n))throw new TypeError("adapter is not a function");return n})(e.adapter||ne.adapter)(e).then((function(t){return Oe(e),t.data=de.call(e,e.transformResponse,t),t.headers=pe.from(t.headers),t}),(function(t){return le(t)||(Oe(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=pe.from(t.response.headers))),Promise.reject(t)}))}const Ee=e=>e instanceof pe?e.toJSON():e;function Se(e,t){t=t||{};const o={};function n(e,t,o){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:o},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function r(e,t,o){return M.isUndefined(t)?M.isUndefined(e)?void 0:n(void 0,e,o):n(e,t,o)}function s(e,t){if(!M.isUndefined(t))return n(void 0,t)}function i(e,t){return M.isUndefined(t)?M.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(o,r,s){return s in t?n(o,r):s in e?n(void 0,o):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>r(Ee(e),Ee(t),!0)};return M.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=c[n]||r,i=s(e[n],t[n],n);M.isUndefined(i)&&s!==a||(o[n]=i)})),o}const Re={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Re[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};Re.transitional=function(e,t,o){function n(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(o?". "+o:"")}return(o,r,s)=>{if(!1===e)throw new B(n(r," has been removed"+(t?" in "+t:"")),B.ERR_DEPRECATED);return t&&!Ce[r]&&(Ce[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(o,r,s)}};var _e={assertOptions:function(e,t,o){if("object"!=typeof e)throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let r=n.length;for(;r-- >0;){const s=n[r],i=t[s];if(i){const t=e[s],o=void 0===t||i(t,s,e);if(!0!==o)throw new B("option "+s+" must be "+o,B.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}},validators:Re};const Te=_e.validators;class we{constructor(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:o,paramsSerializer:n,headers:r}=t;let s;void 0!==o&&_e.assertOptions(o,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),null!=n&&(M.isFunction(n)?t.paramsSerializer={serialize:n}:_e.assertOptions(n,{encode:Te.function,serialize:Te.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),s=r&&M.merge(r.common,r[t.method]),s&&M.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=pe.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let p,d=0;if(!a){const e=[be.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),p=e.length,u=Promise.resolve(t);d<p;)u=u.then(e[d++],e[d++]);return u}p=i.length;let l=t;for(d=0;d<p;){const e=i[d++],t=i[d++];try{l=e(l)}catch(e){t.call(this,e);break}}try{u=be.call(this,l)}catch(e){return Promise.reject(e)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(e){return Y(me((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}M.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,o){return this.request(Se(o||{},{method:e,url:t,data:(o||{}).data}))}})),M.forEach(["post","put","patch"],(function(e){function t(t){return function(o,n,r){return this.request(Se(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:n}))}}we.prototype[e]=t(),we.prototype[e+"Form"]=t(!0)}));var qe=we;class Pe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const o=this;this.promise.then((e=>{if(!o._listeners)return;let t=o._listeners.length;for(;t-- >0;)o._listeners[t](e);o._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{o.subscribe(e),t=e})).then(e);return n.cancel=function(){o.unsubscribe(t)},n},e((function(e,n,r){o.reason||(o.reason=new he(e,n,r),t(o.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pe((function(t){e=t})),cancel:e}}}var xe=Pe;const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(je).forEach((([e,t])=>{je[t]=e}));var Ie=je;const Ae=function e(t){const o=new qe(t),r=n(qe.prototype.request,o);return M.extend(r,qe.prototype,o,{allOwnKeys:!0}),M.extend(r,o,null,{allOwnKeys:!0}),r.create=function(o){return e(Se(t,o))},r}(ne);Ae.Axios=qe,Ae.CanceledError=he,Ae.CancelToken=xe,Ae.isCancel=le,Ae.VERSION="1.4.0",Ae.toFormData=z,Ae.AxiosError=B,Ae.Cancel=Ae.CanceledError,Ae.all=function(e){return Promise.all(e)},Ae.spread=function(e){return function(t){return e.apply(null,t)}},Ae.isAxiosError=function(e){return M.isObject(e)&&!0===e.isAxiosError},Ae.mergeConfig=Se,Ae.AxiosHeaders=pe,Ae.formToJSON=e=>ee(M.isHTMLForm(e)?new FormData(e):e),Ae.HttpStatusCode=Ie,Ae.default=Ae,e.exports=Ae}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n=o(2915),r=exports;for(var s in n)r[s]=n[s];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0});
|
|
1
|
+
var e={9818:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsApi=void 0;var i=o(2915),a=o(3028),c=o(7111),u=o(893),p=o(7034),d=function(){function e(t){e.validateConfig(t),this.config=t,this.auth=new i.CommercetoolsAuth(t),this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,p.getRequestExecutor)({timeoutMs:t.timeoutMs,httpsAgent:t.httpsAgent,systemIdentifier:t.systemIdentifier,onBeforeRequest:t.onBeforeRequest,onAfterResponse:t.onAfterResponse,retry:t.retry})}return e.prototype.getStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStoreByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStores=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores",method:"GET"}))},e.prototype.createStore=function(e){return this.request({path:"/stores",method:"POST",data:e.data})},e.prototype.updateStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateStoreByKey=function(e){return this.request({path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.deleteStoreById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteStoreByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/stores/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.getCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCategoryByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryChannels=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels",method:"GET"}))},e.prototype.importOrder=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/orders/import",method:"POST",data:e.data}))]}))}))},e.prototype.getChannelById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getChannelByKey=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/channels",method:"GET",params:{where:'key="'.concat(encodeURIComponent(e.key),'"'),limit:1}}))];case 1:if(!(null==(t=o.sent())?void 0:t.count))throw new a.CommercetoolsError("No channel found with key [".concat(e.key,"]"),null,404);return[2,t.results[0]]}}))}))},e.prototype.getCategory=function(e){var t;if(!e.id&&!e.key)throw new a.CommercetoolsError("Either an id, key or slug must be provided");return e.id?((0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"GET"}))):this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(null!==(t=e.key)&&void 0!==t?t:"")),method:"GET"}))},e.prototype.getCategoryBySlug=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!e.languageCode&&!e.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return t=[],e.languageCodes?t.push.apply(t,e.languageCodes):e.languageCode&&t.push(e.languageCode),[4,this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{where:"slug(".concat(t.map((function(t){return"".concat(t,'="').concat(e.slug,'"')})).join(" or "),")")})}))),{path:"/categories",method:"GET"}))];case 1:if(!(o=r.sent()).count)throw new a.CommercetoolsError("No category found with slug [".concat(e.slug,"] and language code [").concat(e.languageCode,"]"),{options:e},404);return[2,o.results[0]]}}))}))},e.prototype.queryCategories=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories",method:"GET"}))},e.prototype.getCategoryParents=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return[4,this.getCategory(n(n({},e),{params:n(n({},e.params),{expand:"ancestors[*]"})}))];case 1:return t=r.sent(),(o=t.ancestors.map((function(e){return e.obj}))).push(n(n({},t),{ancestors:t.ancestors.map((function(e){return{id:e.id,typeId:e.typeId}}))})),[2,o]}}))}))},e.prototype.getProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getProductProjectionById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-projections/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getProductProjectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-projections/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.getProductProjectionBySlug=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!e.languageCode&&!e.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return t=[],e.languageCodes?t.push.apply(t,e.languageCodes):e.languageCode&&t.push(e.languageCode),[4,this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{where:"slug(".concat(t.map((function(t){return"".concat(t,'="').concat(e.slug,'"')})).join(" or "),")")})}))),{path:"/product-projections",method:"GET"}))];case 1:if(!(o=r.sent()).count)throw new a.CommercetoolsError("No product projection found with slug [".concat(e.slug,"] and language code [").concat(e.languageCode,"]"),{options:e},404);return[2,o.results[0]]}}))}))},e.prototype.queryProductProjections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-projections",method:"GET"}))},e.prototype.searchProductProjections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-projections/search",method:"GET"}))},e.prototype.getProductSelectionById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-selections/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/product-selections/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.queryProductSelections=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections",method:"GET"}))},e.prototype.createProductSelection=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections",method:"POST",data:e.data}))},e.prototype.updateProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections/key=".concat(encodeURIComponent(e.key)),method:"POST",data:{version:e.version,actions:e.actions}}))},e.prototype.deleteProductSelectionByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-selections/key=".concat(encodeURIComponent(e.key),"&version=").concat(encodeURIComponent(e.version)),method:"DELETE"}))},e.prototype.queryProductsInStore=function(e){var t;return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/in-store/key=".concat(encodeURIComponent(null!==(t=e.storeKey)&&void 0!==t?t:""),"/product-selection-assignments"),method:"GET"}))},e.prototype.queryInventory=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/inventory",method:"GET"}))},e.prototype.getCartById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.queryCarts=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts",null==e?void 0:e.storeKey),method:"GET"}))]}))}))},e.prototype.queryMyCarts=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts",e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.createCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts",e.storeKey),method:"POST",data:e.data}))]}))}))},e.prototype.updateCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"POST",data:{version:e.version,actions:e.actions}}))]}))}))},e.prototype.getMyActiveCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/active-cart",e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.getMyCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"GET",accessToken:e.accessToken}))]}))}))},e.prototype.createMyCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))]}))}))},e.prototype.updateMyCart=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"POST",data:{version:e.cartVersion,actions:e.actions},accessToken:e.accessToken}))]}))}))},e.prototype.deleteMyActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(t.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:t.version}),accessToken:e.accessToken}))];case 2:return[2,o.sent()]}}))}))},e.prototype.deleteMyCartById=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return(0,u.ensureNonEmptyString)({value:e.cartId,name:"cartId"}),[4,this.getMyCartById(e)];case 1:return t=o.sent(),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(e.cartId)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:t.version}),accessToken:e.accessToken}))];case 2:return[2,o.sent()]}}))}))},e.prototype.updateMyActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/carts/".concat(encodeURIComponent(t.id)),e.storeKey),method:"POST",data:{version:t.version,actions:e.actions},accessToken:e.accessToken}))]}}))}))},e.prototype.createMyOrderFromActiveCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders",e.storeKey),method:"POST",data:{version:t.version,id:t.id},accessToken:e.accessToken}))]}}))}))},e.prototype.createOrderFromCart=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getCartById(e)];case 1:return t=o.sent(),[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders",e.storeKey),method:"POST",data:{version:t.version,id:t.id}}))]}}))}))},e.prototype.deleteCartById=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),[4,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/carts/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version})}))];case 1:return[2,t.sent()]}}))}))},e.prototype.createPayment=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments",method:"POST",data:e.data}))},e.prototype.deletePaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.updatePaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.getPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.queryPayments=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/payments",method:"GET"}))},e.prototype.createMyPayment=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments",method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.updateMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.getMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"GET",accessToken:e.accessToken}))},e.prototype.queryMyPayments=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments",method:"GET",accessToken:e.accessToken}))},e.prototype.deleteMyPaymentById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/me/payments/".concat(encodeURIComponent(e.id)),method:"DELETE",params:{version:e.version},accessToken:e.accessToken}))},e.prototype.getMyOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.queryMyOrders=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/orders",e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.updateOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"POST",data:e.data}))},e.prototype.updateOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNumber)),e.storeKey),method:"POST",data:e.data}))},e.prototype.getOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNumber)),e.storeKey),method:"GET"}))},e.prototype.deleteOrderById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.deleteOrderByOrderNumber=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders/order-number=".concat(encodeURIComponent(e.orderNo)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.queryOrders=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/orders",e.storeKey),method:"GET"}))},e.prototype.createProduct=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products",method:"POST",data:e.data}))},e.prototype.updateProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.updateProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteProductById=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),t=e.version,e.unpublish?[4,this.unpublishProductById({id:e.id,version:e.version})]:[3,2];case 1:o=r.sent(),t=o.version,r.label=2;case 2:return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:t})}))]}}))}))},e.prototype.deleteProductByKey=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:return t=e.version,e.unpublish?[4,this.unpublishProductByKey({key:e.key,version:e.version})]:[3,2];case 1:o=r.sent(),t=o.version,r.label=2;case 2:return[2,this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:t})}))]}}))}))},e.prototype.unpublishProductByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/key=".concat(encodeURIComponent(e.key)),method:"POST",params:e.params,data:{version:e.version,actions:[{action:"unpublish"}]}}))},e.prototype.unpublishProductById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/products/".concat(encodeURIComponent(e.id)),method:"POST",params:e.params,data:{version:e.version,actions:[{action:"unpublish"}]}}))},e.prototype.createCategory=function(e){return this.request({path:"/categories",method:"POST",data:e.data})},e.prototype.updateCategoryByKey=function(e){return this.request({path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.updateCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteCategoryById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteCategoryByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/categories/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.createAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers",e.storeKey),method:"POST",data:e.data}))},e.prototype.deleteCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/".concat(encodeURIComponent(e.id)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.deleteCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"DELETE",params:n(n({},e.params),{version:e.version,dataErasure:e.dataErasure})}))},e.prototype.createMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/signup",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.loginMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/login",e.storeKey),method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.login=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/login",e.storeKey),method:"POST",data:e.data}))},e.prototype.getMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me",e.storeKey),method:"GET",accessToken:e.accessToken}))},e.prototype.updateMyAccount=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.changeMyPassword=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/password",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.resetMyPassword=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/me/password/reset",e.storeKey),method:"POST",accessToken:e.accessToken,data:e.data}))},e.prototype.getPasswordResetToken=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/password-token",e.storeKey),method:"POST",data:e.data}))},e.prototype.getCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/".concat(encodeURIComponent(e.id)),e.storeKey),method:"GET"}))},e.prototype.getCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/key=".concat(encodeURIComponent(e.key)),e.storeKey),method:"GET"}))},e.prototype.getCustomerByPasswordToken=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers/password-token=".concat(encodeURIComponent(e.token)),e.storeKey),method:"GET"}))},e.prototype.queryCustomers=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:this.applyStore("/customers",e.storeKey),method:"GET"}))},e.prototype.updateCustomerById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customers/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateCustomerByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customers/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.getProductTypeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getProductTypeByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryProductTypes=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/product-types",method:"GET"}))},e.prototype.getTypeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getTypeByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryTypes=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/types",method:"GET"}))},e.prototype.getDiscountCodeById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/discount-codes/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCartDiscountById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCartDiscountByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryCartDiscounts=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/cart-discounts",method:"GET"}))},e.prototype.getCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.container),"/").concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getCustomObjectById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.saveCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects",method:"POST",data:e.data}))},e.prototype.deleteCustomObject=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/custom-objects/".concat(encodeURIComponent(e.container),"/").concat(encodeURIComponent(e.key)),method:"DELETE"}))},e.prototype.getShippingMethodById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getShippingMethodByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.getShippingMethodsForLocation=function(e){return this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{country:e.country,state:e.state,currency:e.currency})}))),{path:"/shipping-methods/matching-location",method:"GET"}))},e.prototype.getShippingMethodsForCart=function(e){return this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{cartId:e.cartId})}))),{path:"/shipping-methods/matching-cart",method:"GET"}))},e.prototype.getShippingMethodsForCartAndLocation=function(e){return this.request(n(n({},this.extractCommonRequestOptions(n(n({},e),{params:n(n({},null==e?void 0:e.params),{cartId:e.cartId,country:e.country,state:e.state})}))),{path:"/shipping-methods/matching-cart-location",method:"GET"}))},e.prototype.queryShippingMethods=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/shipping-methods",method:"GET"}))},e.prototype.getCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getCustomerGroupByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryCustomerGroups=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups",method:"GET"}))},e.prototype.createCustomerGroup=function(e){return this.request({path:"/customer-groups",method:"POST",data:e.data})},e.prototype.updateCustomerGroupByKey=function(e){return this.request({path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data})},e.prototype.updateCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.deleteCustomerGroupById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteCustomerGroupByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/customer-groups/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.getStateById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStateByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStates=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/states",method:"GET"}))},e.prototype.getStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"GET"}))},e.prototype.getStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"GET"}))},e.prototype.queryStandalonePrices=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices",method:"GET"}))},e.prototype.createStandalonePrice=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices",method:"POST",data:e.data}))},e.prototype.updateStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"POST",data:e.data}))},e.prototype.updateStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"POST",data:e.data}))},e.prototype.deleteStandalonePriceById=function(e){return(0,u.ensureNonEmptyString)({value:e.id,name:"id"}),this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/".concat(encodeURIComponent(e.id)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.deleteStandalonePriceByKey=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/standalone-prices/key=".concat(encodeURIComponent(e.key)),method:"DELETE",params:n(n({},e.params),{version:e.version})}))},e.prototype.graphql=function(e){return this.request(n(n({},this.extractCommonRequestOptions(e)),{path:"/graphql",method:"POST",data:e.data,accessToken:e.accessToken}))},e.prototype.request=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.getRequestOptions(e)];case 1:return t=o.sent(),[4,this.requestExecutor(t)];case 2:return[2,o.sent()]}}))}))},e.prototype.getRequestOptions=function(e){return r(this,void 0,void 0,(function(){var t,o,r,i,a;return s(this,(function(s){switch(s.label){case 0:return o=e.accessToken,r="".concat(this.endpoints.api,"/").concat(this.config.projectKey).concat(e.path),o?[3,2]:[4,this.auth.getClientGrant()];case 1:i=s.sent(),o=i.accessToken,s.label=2;case 2:return a=n(n({},e.headers),{Authorization:"Bearer ".concat(o)}),"string"==typeof e.correlationId&&""!==e.correlationId&&(a["X-Correlation-ID"]=e.correlationId,delete e.correlationId),e.params&&Object.keys(e.params).length&&(t=e.params),[2,{method:e.method,data:e.data,url:r,headers:a,params:t}]}}))}))},e.prototype.extractCommonRequestOptions=function(e){return e?{correlationId:e.correlationId,params:e.params,retry:e.retry}:{}},e.prototype.applyStore=function(e,t){return"string"==typeof t&&""!==t?"/in-store/key=".concat(t).concat(e):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(e):e},e.validateConfig=function(e){var t=[];if(e?(e.projectKey?"string"!=typeof e.projectKey&&t.push("The `projectKey` property must be a string"):t.push("The `projectKey` property is empty"),e.clientId?"string"!=typeof e.clientId&&t.push("The `clientId` property must be a string"):t.push("The `clientId` property is empty"),e.clientSecret?"string"!=typeof e.clientSecret&&t.push("The `clientSecret` property must be a string"):t.push("The `clientSecret` property is empty"),Array.isArray(e.clientScopes)?0===e.clientScopes.length&&t.push("The `clientScopes` property must have at least 1 scope defined"):t.push("The `clientScopes` property must be an array"),e.region?"string"!=typeof e.region?t.push("The `region` property must be a string"):Object.prototype.hasOwnProperty.call(c.REGION_URLS,e.region)||t.push("The `region` property value is not valid: ".concat(e.region,". Must be one of: ").concat(Object.keys(c.REGION_URLS).join(", "))):t.push("The `region` property is empty")):t.push("The config object missing or empty"),t.length)throw new a.CommercetoolsError("The configuration object passed in to the `CommercetoolsApi` constructor is not valid: \n"+t.map((function(e){return"• ".concat(e)})).join("\n"))},e}();t.CommercetoolsApi=d},3713:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(9818),t),r(o(7013),t)},7013:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2442:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsAuth=void 0;var i=o(2915),a=o(8003),c=o(3032),u={refreshIfWithinSecs:1800,timeoutMs:5e3},p=function(){function e(e){if(this.grantPromise=null,this.config=n(n({},u),e),!this.config.clientScopes.length)throw new i.CommercetoolsError("`config.clientScopes` must contain at least one scope");this.api=new c.CommercetoolsAuthApi(e)}return e.prototype.getClientGrant=function(){return r(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){return this.grantPromise?[2,this.grantPromise]:this.grant&&!this.grant.expiresWithin(this.config.refreshIfWithinSecs)?[2,this.grant]:(this.grantPromise=this.api.getClientGrant(this.config.clientScopes).then((function(t){return e.grant=new a.CommercetoolsGrant(t),e.grant})).finally((function(){e.grantPromise=null})),[2,this.grantPromise])}))}))},e.prototype.refreshCustomerGrant=function(e){return r(this,void 0,void 0,(function(){var t;return s(this,(function(o){switch(o.label){case 0:return[4,this.api.refreshGrant(e)];case 1:return t=o.sent(),[2,new a.CommercetoolsGrant(n(n({},t),{refresh_token:e}))]}}))}))},e.prototype.login=function(e){return r(this,void 0,void 0,(function(){var t,o;return s(this,(function(r){switch(r.label){case 0:if(!(t=e.scopes||this.config.customerScopes))throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return r.sent(),[4,this.api.login(n(n({},e),{scopes:t}))];case 2:return o=r.sent(),[2,new a.CommercetoolsGrant(o)]}}))}))},e.prototype.getAnonymousGrant=function(e){return r(this,void 0,void 0,(function(){var t,o,n;return s(this,(function(r){switch(r.label){case 0:if(t=(null==e?void 0:e.scopes)||this.config.customerScopes,o=null==e?void 0:e.anonymousId,!t)throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return r.sent(),[4,this.api.getAnonymousGrant({scopes:t,anonymousId:o})];case 2:return n=r.sent(),[2,new a.CommercetoolsGrant(n)]}}))}))},e.prototype.logout=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.api.logout(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.revokeToken=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.api.revokeToken(e)];case 1:return t.sent(),[2]}}))}))},e}();t.CommercetoolsAuth=p},3032:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsAuthApi=void 0;var s=o(2849),i=o(2915),a=o(7530),c=o(7111),u=o(9017),p=o(7034),d=function(){function e(e){this.config=e,this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,p.getRequestExecutor)({timeoutMs:e.timeoutMs,httpsAgent:e.httpsAgent,systemIdentifier:e.systemIdentifier,onBeforeRequest:e.onBeforeRequest,onAfterResponse:e.onAfterResponse,retry:e.retry})}return e.prototype.getClientGrant=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.post("/token",{grant_type:s.GrantType.CLIENT_CREDENTIALS,scope:(0,a.scopeArrayToRequestString)(e,this.config.projectKey)})]}))}))},e.prototype.refreshGrant=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.post("/token",{grant_type:s.GrantType.REFRESH_TOKEN,refresh_token:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.login=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.post("/".concat(this.config.projectKey).concat(this.applyStore("/customers/token",e.storeKey)),{username:e.username,password:e.password,grant_type:s.GrantType.PASSWORD,scope:(0,a.scopeArrayToRequestString)(e.scopes,this.config.projectKey)})]}))}))},e.prototype.revokeToken=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.post("/token/revoke",{token:e.tokenValue,token_type_hint:e.tokenType})];case 1:return t.sent(),[2]}}))}))},e.prototype.logout=function(e){return n(this,void 0,void 0,(function(){var t,o;return r(this,(function(n){switch(n.label){case 0:return[4,Promise.allSettled([this.revokeToken({tokenType:"access_token",tokenValue:e.accessToken}),this.revokeToken({tokenType:"refresh_token",tokenValue:e.refreshToken})])];case 1:if(t=n.sent(),(o=t.reduce((function(e,t){return"rejected"===t.status&&e.push(t.reason),e}),[])).length)throw new i.CommercetoolsError("Logout failed in one or more calls to the token revocation endpoint",o);return[2]}}))}))},e.prototype.getAnonymousGrant=function(e){var t;return n(this,void 0,void 0,(function(){var o;return r(this,(function(n){return o={grant_type:s.GrantType.CLIENT_CREDENTIALS},(null===(t=null==e?void 0:e.scopes)||void 0===t?void 0:t.length)&&(o.scope=(0,a.scopeArrayToRequestString)(e.scopes,this.config.projectKey)),(null==e?void 0:e.anonymousId)&&(o.anonymous_id=e.anonymousId),[2,this.post("/".concat(this.config.projectKey,"/anonymous/token"),o)]}))}))},e.prototype.post=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(o){switch(o.label){case 0:return[4,this.requestExecutor(this.getRequestOptions({path:e,body:t}))];case 1:return[2,o.sent()]}}))}))},e.prototype.getRequestOptions=function(e){var t,o="".concat(this.endpoints.auth,"/oauth").concat(e.path),n={Authorization:"Basic ".concat((0,u.base64EncodeForBasicAuth)(this.config.clientId,this.config.clientSecret)),"Content-Type":"application/x-www-form-urlencoded"};return e.correlationId&&""!==e.correlationId&&(n["X-Correlation-ID"]=e.correlationId,delete e.correlationId),e.body&&(t=new URLSearchParams(e.body).toString()),{method:"POST",data:t,url:o,headers:n}},e.prototype.applyStore=function(e,t){return"string"==typeof t&&""!==t?"/in-store/key=".concat(t).concat(e):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(e):e},e}();t.CommercetoolsAuthApi=d},8003:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsGrant=void 0;var n=o(7530),r=function(){function e(e){this.accessToken="",this.expiresIn=0,this.expiresAt=new Date,this.scopes=[],this.accessToken=e.access_token,this.expiresIn=e.expires_in,this.scopes=(0,n.scopeRequestStringToArray)(e.scope),this.anonymousId=this.extractKeyFromScope("anonymous_id",e.scope),this.customerId=this.extractKeyFromScope("customer_id",e.scope),this.expiresAt=new Date((new Date).getTime()+1e3*e.expires_in),"refresh_token"in e&&e.refresh_token&&(this.refreshToken=e.refresh_token)}return e.prototype.expiresWithin=function(e){var t=(new Date).getTime()+1e3*e;return this.expiresAt.getTime()<t},e.prototype.extractKeyFromScope=function(e,t){if(t&&e){var o=null==t?void 0:t.split(" ");if(Array.isArray(o)&&0!==o.length){var n=o.find((function(t){return t.slice(0,e.length+1)==="".concat(e,":")}));return n?n.slice(e.length+1):void 0}}},e}();t.CommercetoolsGrant=r},7111:(e,t,o)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SCOPES=t.REGION_URLS=void 0;var r=o(9291);t.REGION_URLS=((n={})[r.Region.EUROPE_GCP]={auth:"https://auth.europe-west1.gcp.commercetools.com",api:"https://api.europe-west1.gcp.commercetools.com"},n[r.Region.EUROPE_AWS]={auth:"https://auth.eu-central-1.aws.commercetools.com",api:"https://api.eu-central-1.aws.commercetools.com"},n[r.Region.NORTH_AMERICA_GCP]={auth:"https://auth.us-central1.gcp.commercetools.com",api:"https://api.us-central1.gcp.commercetools.com"},n[r.Region.NORTH_AMERICA_AWS]={auth:"https://auth.us-east-2.aws.commercetools.com",api:"https://api.us-east-2.aws.commercetools.com"},n[r.Region.AUSTRALIA_GCP]={auth:"https://auth.australia-southeast1.gcp.commercetools.com",api:"https://api.australia-southeast1.gcp.commercetools.com"},n),t.INVALID_SCOPES=["anonymous_id","customer_id"]},7443:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(2442),t),r(o(8003),t)},7530:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scopeRequestStringToArray=t.scopeArrayToRequestString=void 0;var n=o(7111);t.scopeArrayToRequestString=function(e,t){return e.length?e.map((function(e){return"".concat(e,":").concat(t)})).join(" "):""},t.scopeRequestStringToArray=function(e){return e?e.split(" ").map((function(e){return e.split(":")[0]})).filter((function(e){return!n.INVALID_SCOPES.includes(e)})):[]}},2849:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GrantType=void 0,function(e){e.CLIENT_CREDENTIALS="client_credentials",e.REFRESH_TOKEN="refresh_token",e.PASSWORD="password"}(o||(t.GrantType=o={}))},9017:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.base64EncodeForBasicAuth=void 0,t.base64EncodeForBasicAuth=function(e,t){var o="".concat(e,":").concat(t);return btoa(o)}},4060:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HTTPS_AGENT_CONFIG=t.RETRYABLE_STATUS_CODES=t.DEFAULT_RETRY_CONFIG=t.MAX_ITEMS_PER_QUERY=t.DEFAULT_REQUEST_TIMEOUT_MS=t.USER_AGENT_PREFIX=void 0;var n=o(8842);t.USER_AGENT_PREFIX="@gradientedge/commercetools-utils",t.DEFAULT_REQUEST_TIMEOUT_MS=5e3,t.MAX_ITEMS_PER_QUERY=500,t.DEFAULT_RETRY_CONFIG={maxRetries:3,delayMs:50,jitter:!0},t.RETRYABLE_STATUS_CODES=[n.Status.InternalServerError,n.Status.NotImplemented,n.Status.BadGateway,n.Status.ServiceUnavailable,n.Status.GatewayTimeout],t.DEFAULT_HTTPS_AGENT_CONFIG={keepAlive:!0,maxSockets:32,maxFreeSockets:10,timeout:t.DEFAULT_REQUEST_TIMEOUT_MS}},6781:function(e,t,o){var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommercetoolsError=void 0;var i=s(o(4530)),a=o(893),c=function(e){function t(o,n,r){var s=e.call(this,o)||this;return s.isCommercetoolsError=!0,s.data=n,s.status=r,Object.setPrototypeOf(s,t.prototype),s}return r(t,e),t.fromAxiosError=function(e){var o,n,r,s,i,c,u,p;return new t(e.message,{code:e.code,request:{url:null===(o=e.config)||void 0===o?void 0:o.url,method:null===(n=e.config)||void 0===n?void 0:n.method,headers:(0,a.maskSensitiveHeaders)((0,a.extractAxiosHeaders)(null===(r=e.config)||void 0===r?void 0:r.headers)),params:(0,a.maskSensitiveInput)(null===(s=e.config)||void 0===s?void 0:s.params),data:(0,a.maskSensitiveInput)(this.parseRequestData(e.config))},response:{status:null===(i=e.response)||void 0===i?void 0:i.status,data:(0,a.maskSensitiveInput)(null===(c=e.response)||void 0===c?void 0:c.data),headers:(0,a.extractAxiosHeaders)(null===(u=e.response)||void 0===u?void 0:u.headers)}},null===(p=e.response)||void 0===p?void 0:p.status)},t.parseRequestData=function(e){var t,o;if(!e)return null;var n=null==e?void 0:e.data;if("string"==typeof n&&n){var r="";if("string"==typeof(null===(t=null==e?void 0:e.headers)||void 0===t?void 0:t["Content-Type"])&&(r=null===(o=null==e?void 0:e.headers)||void 0===o?void 0:o["Content-Type"]),"application/json"===r.substring(0,16))try{n=JSON.parse(e.data)}catch(e){}else if("application/x-www-form-urlencoded"===r.substring(0,33))try{var s=new URLSearchParams(e.data),i={};s.forEach((function(e,t,o){var n=o.getAll(t);0===n.length?i[t]="":1===n.length?i[t]=n[0]:i[t]=n})),n=i}catch(e){}}return n},t.prototype.toJSON=function(){return{status:this.status,message:this.message,data:this.data,isCommercetoolsError:!0}},t.prototype.toString=function(){return(0,i.default)(this.toJSON())},t}(Error);t.CommercetoolsError=c},3028:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(6781),t)},2915:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_ITEMS_PER_QUERY=t.Region=void 0,r(o(3028),t),r(o(7443),t),r(o(3713),t);var s=o(9291);Object.defineProperty(t,"Region",{enumerable:!0,get:function(){return s.Region}}),r(o(893),t),r(o(6249),t);var i=o(4060);Object.defineProperty(t,"MAX_ITEMS_PER_QUERY",{enumerable:!0,get:function(){return i.MAX_ITEMS_PER_QUERY}})},1250:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},506:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5645:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},625:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9605:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5554:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4294:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5991:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5714:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7942:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9906:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4241:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},146:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5167:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4236:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6249:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(1250),t),r(o(506),t),r(o(5645),t),r(o(625),t),r(o(9605),t),r(o(5554),t),r(o(4294),t),r(o(5991),t),r(o(7942),t),r(o(9906),t),r(o(5714),t),r(o(4241),t),r(o(146),t),r(o(5167),t),r(o(4236),t),r(o(2949),t),r(o(6871),t),r(o(492),t),r(o(8386),t),r(o(6487),t),r(o(4946),t),r(o(5285),t),r(o(5283),t),r(o(6313),t),r(o(3708),t),r(o(6883),t),r(o(1197),t),r(o(8704),t),r(o(2246),t),r(o(4089),t),r(o(6614),t),r(o(7607),t),r(o(4602),t),r(o(310),t),r(o(7183),t),r(o(806),t),r(o(2569),t),r(o(1027),t),r(o(6080),t),r(o(1613),t),r(o(721),t)},2949:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8386:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6487:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5285:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5283:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6313:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6883:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2246:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4089:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7607:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4602:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7183:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},806:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2569:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6080:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1613:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},721:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4474:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(7261),t),r(o(884),t)},884:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isRetryableError=void 0;var n=o(4060);t.isRetryableError=function(e){return!e.isAxiosError||!e.request||!e.response||n.RETRYABLE_STATUS_CODES.includes(e.response.status)}},7034:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestExecutor=void 0;var r=o(4474),s=o(893),i=o(4060);t.getRequestExecutor=function(e){var t=(0,s.createAxiosInstance)({httpsAgent:e.httpsAgent}),o={"User-Agent":(0,s.buildUserAgent)(e.systemIdentifier)};return function(s){var a=n(n({},o),s.headers);return(0,r.request)({axiosInstance:t,onBeforeRequest:e.onBeforeRequest,onAfterResponse:e.onAfterResponse,request:n(n({},s),{headers:a}),retry:n(n({},i.DEFAULT_RETRY_CONFIG),e.retry),timeoutMs:e.timeoutMs})}}},7261:function(e,t,o){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0;var i=o(893),a=o(884),c=o(1100),u=o(4060),p=o(2003);t.request=function(e){var t,o,d;return r(this,void 0,void 0,(function(){var r,l,h,f,m,y,v,g,O,b,E,S,R,C;return s(this,(function(_){switch(_.label){case 0:r=e.retry,l=e.onBeforeRequest,h=e.onAfterResponse,f=e.axiosInstance,m=null!==(t=e.timeoutMs)&&void 0!==t?t:u.DEFAULT_REQUEST_TIMEOUT_MS,y={},v=(0,p.plainClone)(e.request),g=0,Object.keys(null!==(o=v.headers)&&void 0!==o?o:{}).map((function(e){return e.toLowerCase()})).includes("user-agent")||(null!==(d=v.headers)&&void 0!==d||(v.headers={}),v.headers["User-Agent"]=(0,i.buildUserAgent)()),b=0,R=function(){var e,t,o,u,p;return s(this,(function(s){switch(s.label){case 0:return E=null,S=null,g>0?(y["X-Retry-Count"]="".concat(g),e=(0,i.calculateDelay)(g,r),[4,new Promise((function(t){return setTimeout(t,e)}))]):[3,2];case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,6,,7]),l?[4,l(v)]:[3,4];case 3:(t=s.sent())&&(v=t),s.label=4;case 4:return E=Date.now(),[4,f(n(n({},v),{headers:n(n({},v.headers),y),timeout:m}))];case 5:return o=s.sent(),S=Date.now(),b+=S-E,h&&h((0,i.convertAxiosResponse)(o,{accumulativeDurationMs:b,durationMs:S-E,retries:g})),[2,{value:o.data}];case 6:if(u=s.sent(),S=Date.now(),b+=E?S-E:0,h&&(p=(0,i.convertAxiosError)(u,{accumulativeDurationMs:b,durationMs:E?S-E:0,retries:g}))&&h(p),!(0,a.isRetryableError)(u))throw(0,c.transformError)(u);return O=u,[3,7];case 7:return g++,[2]}}))},_.label=1;case 1:return[5,R()];case 2:if("object"==typeof(C=_.sent()))return[2,C.value];_.label=3;case 3:if(g<=r.maxRetries)return[3,1];_.label=4;case 4:throw(0,c.transformError)(O)}}))}))}},1100:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.transformError=void 0;var n=o(3028);t.transformError=function(e){return e.isAxiosError?n.CommercetoolsError.fromAxiosError(e):e}},9291:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Region=void 0,function(e){e.NORTH_AMERICA_GCP="north_america_gcp",e.NORTH_AMERICA_AWS="north_america_aws",e.EUROPE_GCP="europe_gcp",e.EUROPE_AWS="europe_aws",e.AUSTRALIA_GCP="australia_gcp"}(o||(t.Region=o={}))},2519:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertAxiosError=void 0;var n=o(7271);t.convertAxiosError=function(e,t){var o,r,s,i,a,c,u,p,d,l;return"isAxiosError"in e?{request:{url:null!==(r=null===(o=e.config)||void 0===o?void 0:o.url)&&void 0!==r?r:"",method:null===(s=e.config)||void 0===s?void 0:s.method,params:null===(i=e.config)||void 0===i?void 0:i.params,headers:(0,n.extractAxiosHeaders)(null===(a=e.config)||void 0===a?void 0:a.headers),data:null===(c=e.config)||void 0===c?void 0:c.data},response:{code:e.code,message:(null===(u=e.response)||void 0===u?void 0:u.status)?void 0:e.message,status:null===(p=e.response)||void 0===p?void 0:p.status,headers:(0,n.extractAxiosHeaders)(null===(d=e.response)||void 0===d?void 0:d.headers),data:null===(l=e.response)||void 0===l?void 0:l.data},stats:t}:null}},4059:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertAxiosResponse=void 0;var n=o(7271);t.convertAxiosResponse=function(e,t){var o,r,s,i,a,c;return{request:{url:null!==(r=null===(o=e.config)||void 0===o?void 0:o.url)&&void 0!==r?r:"",method:null===(s=e.config)||void 0===s?void 0:s.method,params:null===(i=e.config)||void 0===i?void 0:i.params,headers:(0,n.extractAxiosHeaders)(null===(a=e.config)||void 0===a?void 0:a.headers),data:null===(c=e.config)||void 0===c?void 0:c.data},response:{status:e.status,headers:(0,n.extractAxiosHeaders)(e.headers),data:e.data},stats:t}}},4070:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createAxiosInstance=void 0,o(4060);var r=n(o(7218));t.createAxiosInstance=function(e){return r.default.create({httpsAgent:void 0})}},7271:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractAxiosHeaders=void 0;var n=o(7218);t.extractAxiosHeaders=function(e){var t={};if(e instanceof n.AxiosHeaders){var o=e.toJSON();t={},Object.entries(o).forEach((function(e){var o=e[0],n=e[1],r=o.toLowerCase();"boolean"==typeof n||"number"==typeof n||"string"==typeof n?t[r]=n.toString():Array.isArray(n)&&(t[r]=n.join(", "))}))}return Object.keys(t).length?t:void 0}},4747:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(2519),t),r(o(4059),t),r(o(4070),t),r(o(7271),t)},3720:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDelay=void 0,t.calculateDelay=function(e,t){if(!t||0===e)return 0;var o=t.delayMs*Math.pow(2,e-1);if(t.jitter){var n=o*(1+1/(e+1));return Math.floor(Math.random()*n)}return o}},1834:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNonEmptyString=void 0;var n=o(3028);t.ensureNonEmptyString=function(e){if(!e.value.trim())throw new n.CommercetoolsError("The string parameter '".concat(e.name,"' cannot be empty"))}},3930:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatAsKey=void 0;var n=o(3028);t.formatAsKey=function(e){var t="";if("string"!=typeof e)throw new n.CommercetoolsError("The [input] parameter must be a string");if((t=(t=(t=(t=(t=(t=e.trim().toLowerCase()).replace(/ {2,}/g,"")).replace(/&/g,"and")).replace(/[ _]/g,"-")).replace(/[^0-9a-z-]+/g,"")).replace(/-{2,}/g,"-")).length&&"-"===t[0]&&(t=t.slice(1)),t.length&&"-"===t[t.length-1]&&(t=t.slice(0,-1)),t.length<2)throw new n.CommercetoolsError("Formatted key did not meet minimum length of 2 characters: ".concat(t));if(t.length>256)throw new n.CommercetoolsError("Formatted key exceeds the maximum length of 256 characters: ".concat(t));return t}},6640:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributeValue=void 0,t.getAttributeValue=function(e){var t,o;if(null===(t=null==e?void 0:e.attributes)||void 0===t?void 0:t.length){var n=null===(o=e.attributes)||void 0===o?void 0:o.find((function(t){return t.name===e.name}));if(n)return n.value}return null}},893:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(4747),t),r(o(3720),t),r(o(1834),t),r(o(3930),t),r(o(6640),t),r(o(9998),t),r(o(9989),t),r(o(3190),t)},9998:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.maskSensitiveData=t.maskSensitiveHeaders=t.maskSensitiveInput=t.DEFAULT_MASKING_STRING=t.SENSITIVE_HEADER_NAMES=t.SENSITIVE_PROPERTY_NAMES=void 0;var r=n(o(3692)),s=o(7218),i=o(2003);function a(e,o,n){if(void 0===n&&(n=t.DEFAULT_MASKING_STRING),"object"==typeof e&&null!=e){var a;return a=e instanceof s.AxiosHeaders?(0,i.plainClone)(e.toJSON()):(0,i.plainClone)(e),(0,r.default)(a).forEach((function(){var e,t;o.includes(null!==(t=null===(e=this.key)||void 0===e?void 0:e.toLowerCase())&&void 0!==t?t:"")&&this.update(n)})),a}return e}t.SENSITIVE_PROPERTY_NAMES=["password","refresh_token"],t.SENSITIVE_HEADER_NAMES=["authorization"],t.DEFAULT_MASKING_STRING="********",t.maskSensitiveInput=function(e){return a(e,t.SENSITIVE_PROPERTY_NAMES)},t.maskSensitiveHeaders=function(e){return a(e,t.SENSITIVE_HEADER_NAMES)},t.maskSensitiveData=a},2003:(e,t)=>{function o(e,t){if(t&&e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]?(Array.isArray(e[n])?t[n]=[]:t[n]={},t[n]=o(e[n],t[n])):t[n]=e[n]);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.plainClone=void 0,t.plainClone=function(e){return o(e,{})}},9989:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var o,n,r,s,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.retryOnConflict=void 0;var s=o(3720),i=o(8842);t.retryOnConflict=function(e){return n(this,void 0,void 0,(function(){var t,o,n,a,c,u;return r(this,(function(p){switch(p.label){case 0:t=((null==e?void 0:e.maxRetries)||3)+1,o=(null==e?void 0:e.delayMs)||100,n=!!(null==e?void 0:e.jitter),a=function(a){var c,u,p;return r(this,(function(r){switch(r.label){case 0:return a>1?(c=(0,s.calculateDelay)(a-1,{delayMs:o,jitter:n}),[4,new Promise((function(e){return setTimeout(e,c)}))]):[3,2];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),u={},[4,e.executeFn(a)];case 3:return[2,(u.value=r.sent(),u)];case 4:if(!(p=r.sent()).isCommercetoolsError||p.status!==i.Status.Conflict||a===t)throw p;return[3,5];case 5:return[2]}}))},c=1,p.label=1;case 1:return c<=t?[5,a(c)]:[3,4];case 2:if("object"==typeof(u=p.sent()))return[2,u.value];p.label=3;case 3:return c++,[3,1];case 4:return[2,void 0]}}))}))}},3190:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildUserAgent=void 0;var n=o(4060);t.buildUserAgent=function(e){var t=n.USER_AGENT_PREFIX;return e&&(t="".concat(t," (").concat(e,")")),t}},8842:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reason=t.ErrorStatus=t.RedirectionStatus=t.SuccessStatus=t.InformationStatus=t.Status=void 0;var n=o(7536);Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return n.Status}}),Object.defineProperty(t,"InformationStatus",{enumerable:!0,get:function(){return n.InformationStatus}}),Object.defineProperty(t,"SuccessStatus",{enumerable:!0,get:function(){return n.SuccessStatus}}),Object.defineProperty(t,"RedirectionStatus",{enumerable:!0,get:function(){return n.RedirectionStatus}}),Object.defineProperty(t,"ErrorStatus",{enumerable:!0,get:function(){return n.ErrorStatus}});var r=o(7890);Object.defineProperty(t,"reason",{enumerable:!0,get:function(){return r.reason}})},7890:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reason=void 0;const n=o(7536);t.reason=function(e){switch(e){case 200:return"OK";case 203:return"Non-Authoritative Information";case 207:return"Multi-Status";case 226:return"IM Used";case 414:return"URI Too Long";case 418:return"I'm a teapot";case 505:return"HTTP Version Not Supported";default:return(Object.keys(n.Status).find((t=>n.Status[t]===e))||"").replace(/(?!^)([A-Z])/gm," $1")}}},7536:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Status=t.ErrorStatus=t.RedirectionStatus=t.SuccessStatus=t.InformationStatus=void 0,t.InformationStatus={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103},t.SuccessStatus={Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226},t.RedirectionStatus={MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308},t.ErrorStatus={BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RequestedRangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},t.Status=Object.assign(Object.assign(Object.assign(Object.assign({},t.InformationStatus),t.SuccessStatus),t.RedirectionStatus),t.ErrorStatus)},4530:(e,t)=>{function o(e,t){var o=[],n=[];return null==t&&(t=function(e,t){return o[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o.indexOf(t)).join(".")+"]"}),function(r,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?n.splice(i,1/0,r):n.push(r),~o.indexOf(s)&&(s=t.call(this,r,s))}else o.push(s);return null==e?s:e.call(this,r,s)}}(e.exports=function(e,t,n,r){return JSON.stringify(e,o(t,r),n)}).getSerialize=o},3692:e=>{function t(e){return Object.prototype.toString.call(e)}var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.forEach)return e.forEach(t);for(var o=0;o<e.length;o++)t(e[o],o,e)}var r=Object.keys||function(e){var t=[];for(var o in e)t.push(o);return t},s=Object.prototype.hasOwnProperty||function(e,t){return t in e};function i(e){if("object"==typeof e&&null!==e){var s;if(o(e))s=[];else if("[object Date]"===t(e))s=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===t(e))s=new RegExp(e);else if(function(e){return"[object Error]"===t(e)}(e))s={message:e.message};else if(function(e){return"[object Boolean]"===t(e)}(e)||function(e){return"[object Number]"===t(e)}(e)||function(e){return"[object String]"===t(e)}(e))s=Object(e);else if(Object.create&&Object.getPrototypeOf)s=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)s={};else{var i=e.constructor&&e.constructor.prototype||e.__proto__||{},a=function(){};a.prototype=i,s=new a}return n(r(e),(function(t){s[t]=e[t]})),s}return e}function a(e,t,a){var c=[],u=[],p=!0;return function e(d){var l=a?i(d):d,h={},f=!0,m={node:l,node_:d,path:[].concat(c),parent:u[u.length-1],parents:u,key:c[c.length-1],isRoot:0===c.length,level:c.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(f=!1)},delete:function(e){delete m.parent.node[m.key],e&&(f=!1)},remove:function(e){o(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(f=!1)},keys:null,before:function(e){h.before=e},after:function(e){h.after=e},pre:function(e){h.pre=e},post:function(e){h.post=e},stop:function(){p=!1},block:function(){f=!1}};if(!p)return m;function y(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=r(m.node)),m.isLeaf=0===m.keys.length;for(var e=0;e<u.length;e++)if(u[e].node_===d){m.circular=u[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}y();var v=t.call(m,m.node);return void 0!==v&&m.update&&m.update(v),h.before&&h.before.call(m,m.node),f?("object"!=typeof m.node||null===m.node||m.circular||(u.push(m),y(),n(m.keys,(function(t,o){c.push(t),h.pre&&h.pre.call(m,m.node[t],t);var n=e(m.node[t]);a&&s.call(m.node,t)&&(m.node[t]=n.node),n.isLast=o===m.keys.length-1,n.isFirst=0===o,h.post&&h.post.call(m,n),c.pop()})),u.pop()),h.after&&h.after.call(m,m.node),m):m}(e).node}function c(e){this.value=e}function u(e){return new c(e)}c.prototype.get=function(e){for(var t=this.value,o=0;o<e.length;o++){var n=e[o];if(!t||!s.call(t,n))return;t=t[n]}return t},c.prototype.has=function(e){for(var t=this.value,o=0;o<e.length;o++){var n=e[o];if(!t||!s.call(t,n))return!1;t=t[n]}return!0},c.prototype.set=function(e,t){for(var o=this.value,n=0;n<e.length-1;n++){var r=e[n];s.call(o,r)||(o[r]={}),o=o[r]}return o[e[n]]=t,t},c.prototype.map=function(e){return a(this.value,e,!0)},c.prototype.forEach=function(e){return this.value=a(this.value,e,!1),this.value},c.prototype.reduce=function(e,t){var o=1===arguments.length,n=o?this.value:t;return this.forEach((function(t){this.isRoot&&o||(n=e.call(this,n,t))})),n},c.prototype.paths=function(){var e=[];return this.forEach((function(){e.push(this.path)})),e},c.prototype.nodes=function(){var e=[];return this.forEach((function(){e.push(this.node)})),e},c.prototype.clone=function(){var e=[],t=[];return function o(s){for(var a=0;a<e.length;a++)if(e[a]===s)return t[a];if("object"==typeof s&&null!==s){var c=i(s);return e.push(s),t.push(c),n(r(s),(function(e){c[e]=o(s[e])})),e.pop(),t.pop(),c}return s}(this.value)},n(r(c.prototype),(function(e){u[e]=function(t){var o=[].slice.call(arguments,1),n=new c(t);return n[e].apply(n,o)}})),e.exports=u},7218:(e,t,o)=>{function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),e=>{const t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),u=e=>t=>typeof t===e,{isArray:p}=Array,d=u("undefined"),l=c("ArrayBuffer"),h=u("string"),f=u("function"),m=u("number"),y=e=>null!==e&&"object"==typeof e,v=e=>{if("object"!==i(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=c("Date"),O=c("File"),b=c("Blob"),E=c("FileList"),S=c("URLSearchParams");function R(e,t,{allOwnKeys:o=!1}={}){if(null==e)return;let n,r;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{const r=o?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let i;for(n=0;n<s;n++)i=r[n],t.call(null,e[i],i,e)}}function C(e,t){t=t.toLowerCase();const o=Object.keys(e);let n,r=o.length;for(;r-- >0;)if(n=o[r],t===n.toLowerCase())return n;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:o.g,T=e=>!d(e)&&e!==_,w=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>q&&e instanceof q);var q;const P=c("HTMLFormElement"),x=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),j=c("RegExp"),I=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};R(o,((o,r)=>{!1!==t(o,r,e)&&(n[r]=o)})),Object.defineProperties(e,n)},A="abcdefghijklmnopqrstuvwxyz",k="0123456789",U={DIGIT:k,ALPHA:A,ALPHA_DIGIT:A+A.toUpperCase()+k},M=c("AsyncFunction");var N={isArray:p,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=i(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t},isString:h,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:v,isUndefined:d,isDate:g,isFile:O,isBlob:b,isRegExp:j,isFunction:f,isStream:e=>y(e)&&f(e.pipe),isURLSearchParams:S,isTypedArray:w,isFileList:E,forEach:R,merge:function e(){const{caseless:t}=T(this)&&this||{},o={},n=(n,r)=>{const s=t&&C(o,r)||r;v(o[s])&&v(n)?o[s]=e(o[s],n):v(n)?o[s]=e({},n):p(n)?o[s]=n.slice():o[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&R(arguments[e],n);return o},extend:(e,t,o,{allOwnKeys:r}={})=>(R(t,((t,r)=>{o&&f(t)?e[r]=n(t,o):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},toFlatObject:(e,t,o,n)=>{let r,i,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)a=r[i],n&&!n(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==o&&s(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,o)=>{e=String(e),(void 0===o||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return-1!==n&&n===o},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!m(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},forEachEntry:(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=o.next())&&!n.done;){const o=n.value;t.call(e,o[0],o[1])}},matchAll:(e,t)=>{let o;const n=[];for(;null!==(o=e.exec(t));)n.push(o);return n},isHTMLForm:P,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,o)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(o))return!1;const n=e[o];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")}))}))},toObjectSet:(e,t)=>{const o={},n=e=>{e.forEach((e=>{o[e]=!0}))};return p(e)?n(e):n(String(e).split(t)),o},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,o){return t.toUpperCase()+o})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C,global:_,isContextDefined:T,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let o="";const{length:n}=t;for(;e--;)o+=t[Math.random()*n|0];return o},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),o=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const r=p(e)?[]:{};return R(e,((e,t)=>{const s=o(e,n+1);!d(s)&&(r[t]=s)})),t[n]=void 0,r}}return e};return o(e,0)},isAsyncFn:M,isThenable:e=>e&&(y(e)||f(e))&&f(e.then)&&f(e.catch)};function B(e,t,o,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),n&&(this.request=n),r&&(this.response=r)}N.inherits(B,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const G=B.prototype,D={};function L(e){return N.isPlainObject(e)||N.isArray(e)}function K(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function F(e,t,o){return e?e.concat(t).map((function(e,t){return e=K(e),!o&&t?"["+e+"]":e})).join(o?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{D[e]={value:e}})),Object.defineProperties(B,D),Object.defineProperty(G,"isAxiosError",{value:!0}),B.from=(e,t,o,n,r,s)=>{const i=Object.create(G);return N.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),B.call(i,e.message,t,o,n,r),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const H=N.toFlatObject(N,{},null,(function(e){return/^is[A-Z]/.test(e)}));function z(e,t,o){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(o=N.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!N.isUndefined(t[e])}))).metaTokens,r=o.visitor||u,s=o.dots,i=o.indexes,a=(o.Blob||"undefined"!=typeof Blob&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(N.isDate(e))return e.toISOString();if(!a&&N.isBlob(e))throw new B("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(e)||N.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,o,r){let a=e;if(e&&!r&&"object"==typeof e)if(N.endsWith(o,"{}"))o=n?o:o.slice(0,-2),e=JSON.stringify(e);else if(N.isArray(e)&&function(e){return N.isArray(e)&&!e.some(L)}(e)||(N.isFileList(e)||N.endsWith(o,"[]"))&&(a=N.toArray(e)))return o=K(o),a.forEach((function(e,n){!N.isUndefined(e)&&null!==e&&t.append(!0===i?F([o],n,s):null===i?o:o+"[]",c(e))})),!1;return!!L(e)||(t.append(F(r,o,s),c(e)),!1)}const p=[],d=Object.assign(H,{defaultVisitor:u,convertValue:c,isVisitable:L});if(!N.isObject(e))throw new TypeError("data must be an object");return function e(o,n){if(!N.isUndefined(o)){if(-1!==p.indexOf(o))throw Error("Circular reference detected in "+n.join("."));p.push(o),N.forEach(o,(function(o,s){!0===(!(N.isUndefined(o)||null===o)&&r.call(t,o,N.isString(s)?s.trim():s,n,d))&&e(o,n?n.concat(s):[s])})),p.pop()}}(e),t}function V(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function J(e,t){this._pairs=[],e&&z(e,this,t)}const W=J.prototype;function X(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y(e,t,o){if(!t)return e;const n=o&&o.encode||X,r=o&&o.serialize;let s;if(s=r?r(t,o):N.isURLSearchParams(t)?t.toString():new J(t,o).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}W.append=function(e,t){this._pairs.push([e,t])},W.toString=function(e){const t=e?function(t){return e.call(this,t,V)}:V;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Q=class{constructor(){this.handlers=[]}use(e,t,o){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!o&&o.synchronous,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function ee(e){function t(e,o,n,r){let s=e[r++];const i=Number.isFinite(+s),a=r>=e.length;return s=!s&&N.isArray(n)?n.length:s,a?(N.hasOwnProp(n,s)?n[s]=[n[s],o]:n[s]=o,!i):(n[s]&&N.isObject(n[s])||(n[s]=[]),t(e,o,n[s],r)&&N.isArray(n[s])&&(n[s]=function(e){const t={},o=Object.keys(e);let n;const r=o.length;let s;for(n=0;n<r;n++)s=o[n],t[s]=e[s];return t}(n[s])),!i)}if(N.isFormData(e)&&N.isFunction(e.entries)){const o={};return N.forEachEntry(e,((e,n)=>{t(function(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,o,0)})),o}return null}const te={"Content-Type":void 0},oe={transitional:$,adapter:["xhr","http"],transformRequest:[function(e,t){const o=t.getContentType()||"",n=o.indexOf("application/json")>-1,r=N.isObject(e);if(r&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return n&&n?JSON.stringify(ee(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(r){if(o.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return z(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,o,n){return Z.isNode&&N.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=N.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return z(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||n?(t.setContentType("application/json",!1),function(e,t,o){if(N.isString(e))try{return(0,JSON.parse)(e),N.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||oe.transitional,o=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&N.isString(e)&&(o&&!this.responseType||n)){const o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw B.from(e,B.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};N.forEach(["delete","get","head"],(function(e){oe.headers[e]={}})),N.forEach(["post","put","patch"],(function(e){oe.headers[e]=N.merge(te)}));var ne=oe;const re=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:N.isArray(e)?e.map(ae):String(e)}function ce(e,t,o,n,r){return N.isFunction(n)?n.call(this,t,o):(r&&(t=o),N.isString(t)?N.isString(n)?-1!==t.indexOf(n):N.isRegExp(n)?n.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,o){const n=this;function r(e,t,o){const r=ie(t);if(!r)throw new Error("header name must be a non-empty string");const s=N.findKey(n,r);(!s||void 0===n[s]||!0===o||void 0===o&&!1!==n[s])&&(n[s||t]=ae(e))}const s=(e,t)=>N.forEach(e,((e,o)=>r(e,o,t)));return N.isPlainObject(e)||e instanceof this.constructor?s(e,t):N.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let o,n,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),o=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!o||t[o]&&re[o]||("set-cookie"===o?t[o]?t[o].push(n):t[o]=[n]:t[o]=t[o]?t[o]+", "+n:n)})),t})(e),t):null!=e&&r(t,e,o),this}get(e,t){if(e=ie(e)){const o=N.findKey(this,e);if(o){const e=this[o];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)t[n[1]]=n[2];return t}(e);if(N.isFunction(t))return t.call(this,e,o);if(N.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ie(e)){const o=N.findKey(this,e);return!(!o||void 0===this[o]||t&&!ce(0,this[o],o,t))}return!1}delete(e,t){const o=this;let n=!1;function r(e){if(e=ie(e)){const r=N.findKey(o,e);!r||t&&!ce(0,o[r],r,t)||(delete o[r],n=!0)}}return N.isArray(e)?e.forEach(r):r(e),n}clear(e){const t=Object.keys(this);let o=t.length,n=!1;for(;o--;){const r=t[o];e&&!ce(0,this[r],r,e,!0)||(delete this[r],n=!0)}return n}normalize(e){const t=this,o={};return N.forEach(this,((n,r)=>{const s=N.findKey(o,r);if(s)return t[s]=ae(n),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,o)=>t.toUpperCase()+o))}(r):String(r).trim();i!==r&&delete t[r],t[i]=ae(n),o[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return N.forEach(this,((o,n)=>{null!=o&&!1!==o&&(t[n]=e&&N.isArray(o)?o.join(", "):o)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const o=new this(e);return t.forEach((e=>o.set(e))),o}static accessor(e){const t=(this[se]=this[se]={accessors:{}}).accessors,o=this.prototype;function n(e){const n=ie(e);t[n]||(function(e,t){const o=N.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+o,{value:function(e,o,r){return this[n].call(this,t,e,o,r)},configurable:!0})}))}(o,e),t[n]=!0)}return N.isArray(e)?e.forEach(n):n(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.freezeMethods(ue.prototype),N.freezeMethods(ue);var pe=ue;function de(e,t){const o=this||ne,n=t||o,r=pe.from(n.headers);let s=n.data;return N.forEach(e,(function(e){s=e.call(o,s,r.normalize(),t?t.status:void 0)})),r.normalize(),s}function le(e){return!(!e||!e.__CANCEL__)}function he(e,t,o){B.call(this,null==e?"canceled":e,B.ERR_CANCELED,t,o),this.name="CanceledError"}N.inherits(he,B,{__CANCEL__:!0});var fe=Z.isStandardBrowserEnv?{write:function(e,t,o,n,r,s){const i=[];i.push(e+"="+encodeURIComponent(t)),N.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),N.isString(n)&&i.push("path="+n),N.isString(r)&&i.push("domain="+r),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function me(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ye=Z.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let o;function n(o){let n=o;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return o=n(window.location.href),function(e){const t=N.isString(e)?n(e):e;return t.protocol===o.protocol&&t.host===o.host}}():function(){return!0};function ve(e,t){let o=0;const n=function(e,t){e=e||10;const o=new Array(e),n=new Array(e);let r,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[i];r||(r=c),o[s]=a,n[s]=c;let p=i,d=0;for(;p!==s;)d+=o[p++],p%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-r<t)return;const l=u&&c-u;return l?Math.round(1e3*d/l):void 0}}(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-o,c=n(a);o=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r};u[t?"download":"upload"]=!0,e(u)}}const ge={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,o){let n=e.data;const r=pe.from(e.headers).normalize(),s=e.responseType;let i;function a(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}N.isFormData(n)&&(Z.isStandardBrowserEnv||Z.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",o=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(t+":"+o))}const u=me(e.baseURL,e.url);function p(){if(!c)return;const n=pe.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,o){const n=o.config.validateStatus;o.status&&n&&!n(o.status)?t(new B("Request failed with status code "+o.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o)):e(o)}((function(e){t(e),a()}),(function(e){o(e),a()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),Y(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(o(new B("Request aborted",B.ECONNABORTED,e,c)),c=null)},c.onerror=function(){o(new B("Network Error",B.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),o(new B(t,n.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,e,c)),c=null},Z.isStandardBrowserEnv){const t=(e.withCredentials||ye(u))&&e.xsrfCookieName&&fe.read(e.xsrfCookieName);t&&r.set(e.xsrfHeaderName,t)}void 0===n&&r.setContentType(null),"setRequestHeader"in c&&N.forEach(r.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),N.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{c&&(o(!t||t.type?new he(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);d&&-1===Z.protocols.indexOf(d)?o(new B("Unsupported protocol "+d+":",B.ERR_BAD_REQUEST,e)):c.send(n||null)}))}};N.forEach(ge,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new he(null,e)}function be(e){return Oe(e),e.headers=pe.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=N.isArray(e)?e:[e];const{length:t}=e;let o,n;for(let r=0;r<t&&(o=e[r],!(n=N.isString(o)?ge[o.toLowerCase()]:o));r++);if(!n){if(!1===n)throw new B(`Adapter ${o} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(N.hasOwnProp(ge,o)?`Adapter '${o}' is not available in the build`:`Unknown adapter '${o}'`)}if(!N.isFunction(n))throw new TypeError("adapter is not a function");return n})(e.adapter||ne.adapter)(e).then((function(t){return Oe(e),t.data=de.call(e,e.transformResponse,t),t.headers=pe.from(t.headers),t}),(function(t){return le(t)||(Oe(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=pe.from(t.response.headers))),Promise.reject(t)}))}const Ee=e=>e instanceof pe?e.toJSON():e;function Se(e,t){t=t||{};const o={};function n(e,t,o){return N.isPlainObject(e)&&N.isPlainObject(t)?N.merge.call({caseless:o},e,t):N.isPlainObject(t)?N.merge({},t):N.isArray(t)?t.slice():t}function r(e,t,o){return N.isUndefined(t)?N.isUndefined(e)?void 0:n(void 0,e,o):n(e,t,o)}function s(e,t){if(!N.isUndefined(t))return n(void 0,t)}function i(e,t){return N.isUndefined(t)?N.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(o,r,s){return s in t?n(o,r):s in e?n(void 0,o):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>r(Ee(e),Ee(t),!0)};return N.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=c[n]||r,i=s(e[n],t[n],n);N.isUndefined(i)&&s!==a||(o[n]=i)})),o}const Re={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Re[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};Re.transitional=function(e,t,o){function n(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(o?". "+o:"")}return(o,r,s)=>{if(!1===e)throw new B(n(r," has been removed"+(t?" in "+t:"")),B.ERR_DEPRECATED);return t&&!Ce[r]&&(Ce[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(o,r,s)}};var _e={assertOptions:function(e,t,o){if("object"!=typeof e)throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let r=n.length;for(;r-- >0;){const s=n[r],i=t[s];if(i){const t=e[s],o=void 0===t||i(t,s,e);if(!0!==o)throw new B("option "+s+" must be "+o,B.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}},validators:Re};const Te=_e.validators;class we{constructor(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:o,paramsSerializer:n,headers:r}=t;let s;void 0!==o&&_e.assertOptions(o,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),null!=n&&(N.isFunction(n)?t.paramsSerializer={serialize:n}:_e.assertOptions(n,{encode:Te.function,serialize:Te.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),s=r&&N.merge(r.common,r[t.method]),s&&N.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=pe.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let p,d=0;if(!a){const e=[be.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),p=e.length,u=Promise.resolve(t);d<p;)u=u.then(e[d++],e[d++]);return u}p=i.length;let l=t;for(d=0;d<p;){const e=i[d++],t=i[d++];try{l=e(l)}catch(e){t.call(this,e);break}}try{u=be.call(this,l)}catch(e){return Promise.reject(e)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(e){return Y(me((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,o){return this.request(Se(o||{},{method:e,url:t,data:(o||{}).data}))}})),N.forEach(["post","put","patch"],(function(e){function t(t){return function(o,n,r){return this.request(Se(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:n}))}}we.prototype[e]=t(),we.prototype[e+"Form"]=t(!0)}));var qe=we;class Pe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const o=this;this.promise.then((e=>{if(!o._listeners)return;let t=o._listeners.length;for(;t-- >0;)o._listeners[t](e);o._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{o.subscribe(e),t=e})).then(e);return n.cancel=function(){o.unsubscribe(t)},n},e((function(e,n,r){o.reason||(o.reason=new he(e,n,r),t(o.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pe((function(t){e=t})),cancel:e}}}var xe=Pe;const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(je).forEach((([e,t])=>{je[t]=e}));var Ie=je;const Ae=function e(t){const o=new qe(t),r=n(qe.prototype.request,o);return N.extend(r,qe.prototype,o,{allOwnKeys:!0}),N.extend(r,o,null,{allOwnKeys:!0}),r.create=function(o){return e(Se(t,o))},r}(ne);Ae.Axios=qe,Ae.CanceledError=he,Ae.CancelToken=xe,Ae.isCancel=le,Ae.VERSION="1.4.0",Ae.toFormData=z,Ae.AxiosError=B,Ae.Cancel=Ae.CanceledError,Ae.all=function(e){return Promise.all(e)},Ae.spread=function(e){return function(t){return e.apply(null,t)}},Ae.isAxiosError=function(e){return N.isObject(e)&&!0===e.isAxiosError},Ae.mergeConfig=Se,Ae.AxiosHeaders=pe,Ae.formToJSON=e=>ee(N.isHTMLForm(e)?new FormData(e):e),Ae.HttpStatusCode=Ie,Ae.default=Ae,e.exports=Ae}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n=o(2915),r=exports;for(var s in n)r[s]=n[s];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0});
|
|
2
2
|
//# sourceMappingURL=ge-commercetools-utils-browser.cjs.js.map
|