{"version":3,"file":"topi_elements.umd.js","sources":["../node_modules/preact/dist/preact.module.js","../node_modules/preact-custom-element/dist/preact-custom-element.esm.js","../src/fonts/font-loader.tsx","../src/i18n/utils/locale.constants.ts","../node_modules/immer/dist/immer.esm.mjs","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/redux/es/redux.js","../node_modules/@reduxjs/toolkit/node_modules/redux-thunk/es/index.js","../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js","../src/common/models.ts","../clients/seller-api/dist/esm/runtime.js","../clients/seller-api/dist/esm/models/MoneyAmountWithOptionalGross.js","../clients/seller-api/dist/esm/models/ProductStandardIdentifier.js","../clients/seller-api/dist/esm/models/CategorisationIdentifiers.js","../clients/seller-api/dist/esm/models/CustomProduct.js","../clients/seller-api/dist/esm/models/AddCustomProductRequestBody.js","../clients/seller-api/dist/esm/models/SellerProductReference.js","../clients/seller-api/dist/esm/models/ProductSellerCategory.js","../clients/seller-api/dist/esm/models/ProductImage.js","../clients/seller-api/dist/esm/models/ExtraProductDetails.js","../clients/seller-api/dist/esm/models/MoneyAmountWithOptionalTax.js","../clients/seller-api/dist/esm/models/MoneyAmount.js","../clients/seller-api/dist/esm/models/AddProduct.js","../clients/seller-api/dist/esm/models/MoneyAmountWithRequiredTax.js","../clients/seller-api/dist/esm/models/PayNowContractTerm.js","../clients/seller-api/dist/esm/models/RentContractTerm.js","../clients/seller-api/dist/esm/models/BaseBasketPriceSummary.js","../clients/seller-api/dist/esm/models/BaseCalculatePriceSummary.js","../clients/seller-api/dist/esm/models/BasketPriceSummary.js","../clients/seller-api/dist/esm/models/PricingRequest.js","../clients/seller-api/dist/esm/models/BasketPricingRequest.js","../clients/seller-api/dist/esm/models/CalculateBasketPricingRequestBody.js","../clients/seller-api/dist/esm/models/CalculateBasketPricingResponseBody.js","../clients/seller-api/dist/esm/models/CalculatePriceSummary.js","../clients/seller-api/dist/esm/models/CalculatePricingRequestBody.js","../clients/seller-api/dist/esm/models/CartProductRentalOverview.js","../clients/seller-api/dist/esm/models/RentalOverviewRequest.js","../clients/seller-api/dist/esm/models/CartRentalOverviewRequestBody.js","../clients/seller-api/dist/esm/models/CartRentalOverviewResult.js","../clients/seller-api/dist/esm/models/CatalogImportCategorization.js","../clients/seller-api/dist/esm/models/CatalogImportJob.js","../clients/seller-api/dist/esm/models/CategorisationNode.js","../clients/seller-api/dist/esm/models/CheckSupportedRequestBody.js","../clients/seller-api/dist/esm/models/ProductRentContract.js","../clients/seller-api/dist/esm/models/ContractTermsSummary.js","../clients/seller-api/dist/esm/models/CreateImportRequestBody.js","../clients/seller-api/dist/esm/models/CreateImportResult.js","../clients/seller-api/dist/esm/models/FilteringOption.js","../clients/seller-api/dist/esm/models/ImportCatalogRequestBody.js","../clients/seller-api/dist/esm/models/SummaryProductRejected.js","../clients/seller-api/dist/esm/models/SummaryInfo.js","../clients/seller-api/dist/esm/models/ImportResult.js","../clients/seller-api/dist/esm/models/ListRecommendedRentalPricesRequestBody.js","../clients/seller-api/dist/esm/models/OfferParsingUnproccesedItem.js","../clients/seller-api/dist/esm/models/SearchProductResult.js","../clients/seller-api/dist/esm/models/OfferParsinglineItem.js","../clients/seller-api/dist/esm/models/OfferParsingResult.js","../clients/seller-api/dist/esm/models/ParseOfferTextRequestBody.js","../clients/seller-api/dist/esm/models/ProductDetails.js","../clients/seller-api/dist/esm/models/ProductPaginationResult.js","../clients/seller-api/dist/esm/models/ProductRentalPricingDetails.js","../clients/seller-api/dist/esm/models/ProductSummary.js","../clients/seller-api/dist/esm/models/ProductsSummary.js","../clients/seller-api/dist/esm/models/SearchAndFilterProductsPaginatedRequestBody.js","../clients/seller-api/dist/esm/models/WidgetsCartRentalOverviewRequestBody.js","../clients/seller-api/dist/esm/models/WidgetsListRecommendedRentalPricesRequestBody.js","../clients/seller-api/dist/esm/apis/CatalogApi.js","../src/api.ts","../src/slices/config-slice.ts","../src/slices/common/list-recommended-prices-thunk.ts","../src/slices/common/rental-overview-thunk.ts","../node_modules/preact/hooks/dist/hooks.module.js","../node_modules/preact/compat/dist/compat.module.js","../node_modules/react-redux/es/components/Context.js","../node_modules/react-redux/es/utils/batch.js","../node_modules/react-redux/es/utils/Subscription.js","../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","../node_modules/react-redux/es/components/Provider.js","../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-redux/es/hooks/useReduxContext.js","../node_modules/react-redux/es/hooks/useSelector.js","../node_modules/react-redux/es/index.js","../src/slices/common/events-handler.ts","../src/slices/cart-slice.ts","../src/slices/pdp-slice.ts","../src/slices/listing-slice.ts","../src/store.ts","../src/utils/sanitize-color.ts","../src/topi-elements.ts","../node_modules/dlv/dist/dlv.es.js","../node_modules/preact-markup/dist/preact-markup.module.js","../node_modules/preact-i18n/dist/preact-i18n.esm.js","../src/common/error-boundary/error-boundary.tsx","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/@emotion/stylis/dist/stylis.browser.esm.js","../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../node_modules/styled-components/dist/styled-components.browser.esm.js","../src/ui/assets/svgs/brand/topi-logo-on-black.svg","../src/ui/utils/px-scaled.ts","../src/ui/styles/tokens/tokens.ts","../src/ui/styles/media-queries.tsx","../src/ui/styles/mixins.tsx","../src/common/logo-badge/logo-badge.styles.tsx","../node_modules/preact/jsx-runtime/dist/jsxRuntime.js","../preact/jsx-runtime","../src/common/logo-badge/logo-badge.tsx","../src/i18n/utils/locale.tsx","../src/i18n/i18n-provider.tsx","../src/widgets/cart-rental-summary-label/hooks/use-price-decimals.ts","../src/widgets/hooks/use-money-amount.tsx","../src/ui/assets/svgs/icons/caret-down.svg","../src/ui/assets/svgs/icons/caret-up.svg","../src/ui/assets/svgs/icons/check-circle.svg","../src/ui/assets/svgs/icons/clock.svg","../src/ui/assets/svgs/icons/cross.svg","../src/ui/assets/svgs/icons/device-mobile.svg","../src/ui/assets/svgs/icons/number-circle-five.svg","../src/ui/assets/svgs/icons/number-circle-four.svg","../src/ui/assets/svgs/icons/number-circle-one.svg","../src/ui/assets/svgs/icons/number-circle-three.svg","../src/ui/assets/svgs/icons/number-circle-two.svg","../src/ui/assets/svgs/icons/receipt.svg","../src/ui/components/icon/icon.styles.ts","../src/ui/components/icon/icon.tsx","../src/ui/components/card/card.styles.tsx","../src/ui/components/card/card.tsx","../src/common/modal/modal-width-context.ts","../src/common/modal/modal.styles.tsx","../src/common/modal/modal.tsx","../src/assets/svgs/trustpilot-logo.svg","../src/assets/svgs/trustpilot-rating.svg","../src/common/trustpilot/trustpilot.styles.tsx","../src/common/trustpilot/trustpilot.tsx","../src/widgets/hooks/use-aggregated-prices.ts","../src/widgets/rental-overview/use-cart-has-rental-terms.ts","../src/widgets/rental-overview/use-tenure-toggles.ts","../src/widgets/rental-overview/tenure-overview/tenure-overview.styles.ts","../src/widgets/rental-overview/tenure-overview/tenure-prices/tenure-prices.styles.ts","../src/widgets/rental-overview/tenure-overview/tenure-prices/tenure-prices.tsx","../src/widgets/rental-overview/tenure-overview/tenure-toggle-group/tenure-toggle-group.styles.ts","../src/widgets/rental-overview/tenure-overview/tenure-toggle-group/tenure-toggle-group.tsx","../src/widgets/rental-overview/tenure-overview/tenure-overview.tsx","../src/ui/assets/svgs/brand/topi-logo-on-white.svg","../src/ui/components/logo/logo.styles.ts","../src/ui/components/logo/logo.tsx","../src/widgets/learn-more-info/learn-more-info.styles.tsx","../src/use-cleanup-nested-fonts.tsx","../src/widgets/learn-more-info/learn-more-info.tsx","../src/widgets/common/learn-more-modal/learn-more-modal.tsx","../src/widgets/cart-rental-summary-label/cart-rental-summary-label.styles.tsx","../src/widgets/cart-rental-summary-label/hooks/use-debug-messages.ts","../src/widgets/cart-rental-summary-label/hooks/use-product-mode-rental-amount.ts","../src/widgets/cart-rental-summary-label/cart-rental-summary-label.tsx","../src/widgets/checkout-button/checkout-button.styles.tsx","../src/widgets/checkout-button/checkout-button.tsx","../src/widgets/listing-rental-summary-label/hooks/use-recommended-price-for-reference.ts","../src/widgets/product-rental-summary-label/product-rental-summary-label.styles.tsx","../src/widgets/listing-rental-summary-label/listing-rental-summary-label.tsx","../src/widgets/hooks/use-lowest-rental-price.ts","../src/widgets/product-rental-summary-label/product-rental-summary-label.tsx","../src/widgets/rental-overview/rental-overview.styles.tsx","../src/widgets/rental-overview/rental-overview.tsx","../src/main.tsx"],"sourcesContent":["var n,l,u,t,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;ls&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N(f,t,c),r.__e=r.__=null,t.__e!=o&&C(t)));$.__r=0}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:if?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r(s?1:0))for(i=u-1,r=u+1;i>=0||r=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function T(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||y.test(l)?u:u+\"px\"}function j(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(f,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t0?n:w(n)?n.map(V):d({},n)}function q(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;export{x as Component,k as Fragment,K as cloneElement,Q as createContext,_ as createElement,b as createRef,_ as h,J as hydrate,t as isValidElement,l as options,G as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{h as t,hydrate as e,render as n,cloneElement as o,Fragment as r}from\"preact\";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(r[n]=t[n]);return r}var a=[\"context\",\"children\"],l=[\"useFragment\"];function c(t,e,n,o){function r(){var e,n=Reflect.construct(HTMLElement,[],r);return n._vdomComponent=t,o&&o.shadow?(n._root=n.attachShadow({mode:o.mode||\"open\",serializable:null!=(e=o.serializable)&&e}),o.adoptedStyleSheets&&(n._root.adoptedStyleSheets=o.adoptedStyleSheets)):n._root=n,n}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=function(){d.call(this,o)},r.prototype.attributeChangedCallback=h,r.prototype.disconnectedCallback=f,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,t.formAssociated&&(r.formAssociated=!0),n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom?this._vdom.props[t]:this._props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e);var n=typeof e;null!=e&&\"string\"!==n&&\"boolean\"!==n&&\"number\"!==n||this.setAttribute(t,e)}})}),customElements.define(e||t.tagName||t.displayName||t.name,r),r}function u(t){this.getChildContext=function(){return t.context};var e=t.children,n=s(t,a);return o(e,n)}function d(o){var r=new CustomEvent(\"_preact\",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(r),this._vdom=t(u,i({},this._props,{context:r.detail.context}),v(this,this._vdomComponent,o)),(this.hasAttribute(\"hydrate\")?e:n)(this._vdom,this._root)}function p(t){return t.replace(/-(\\w)/g,function(t,e){return e?e.toUpperCase():\"\"})}function h(t,e,r){if(this._vdom){var i={};i[t]=r=null==r?void 0:r,i[p(t)]=r,this._vdom=o(this._vdom,i),n(this._vdom,this._root)}}function f(){n(this._vdom=null,this._root)}function m(e,n){var o=this,a=e.useFragment,c=s(e,l);return t(a?r:\"slot\",i({},c,{ref:function(t){t?(o.ref=t,o._listener||(o._listener=function(t){t.stopPropagation(),t.detail.context=n},t.addEventListener(\"_preact\",o._listener))):o.ref.removeEventListener(\"_preact\",o._listener)}}))}function v(e,n,o){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var r=[],i={},s=0,a=e.attributes,l=e.childNodes;for(s=a.length;s--;)\"slot\"!==a[s].name&&(i[a[s].name]=a[s].value,i[p(a[s].name)]=a[s].value);for(s=l.length;s--;){var c=v(l[s],null,o),u=l[s].slot;u?i[u]=t(m,{name:u},c):r[s]=c}var d=!(!o||!o.shadow),h=n?t(m,{useFragment:!d},r):r;return!d&&n&&(e.innerHTML=\"\"),t(n||e.nodeName.toLowerCase(),i,h)}export{c as default};\n//# sourceMappingURL=preact-custom-element.esm.js.map\n","const FONT_PATH_NEXT_TO_SCRIPT = \"fonts/readex-pro.woff2\";\nconst FALLBACK_FONT_URL = \"https://widgets.topi.eu/fonts/readex-pro.woff2\";\n\nexport function fontUrlRelativeToScript(scriptSource?: string): string {\n if (!scriptSource) {\n return FALLBACK_FONT_URL;\n }\n return new URL(FONT_PATH_NEXT_TO_SCRIPT, scriptSource).href;\n}\n\nfunction currentScriptSource(): string | undefined {\n const { currentScript } = document;\n return currentScript instanceof HTMLScriptElement\n ? currentScript.src\n : undefined;\n}\n\nexport function loadFont() {\n const fontUrl = fontUrlRelativeToScript(currentScriptSource());\n const head = document.querySelectorAll(\"head\")[0];\n const preloadFontLink = document.createElement(\"link\");\n preloadFontLink.setAttribute(\"href\", fontUrl);\n preloadFontLink.setAttribute(\"rel\", \"preload\");\n preloadFontLink.setAttribute(\"as\", \"font\");\n preloadFontLink.setAttribute(\"crossorigin\", \"\");\n head.append(preloadFontLink);\n\n const fontReadexPro = new FontFace(\n \"Readex Pro\",\n `url(\"${fontUrl}\") format(\"woff2-variations\")`,\n { weight: \"1 999\" }\n );\n fontReadexPro.load().then(\n () => document.fonts.add(fontReadexPro),\n (error) => {\n // eslint-disable-next-line no-console\n console.error(`error loading Readex Pro font face`, error);\n }\n );\n}\n","export const DEFAULT_LOCALE = \"en\";\nexport const SUPPORTED_LOCALES = [\"en\", \"de\", \"nl\"];\n","function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2)}function y(n){return null==n||\"object\"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return\"production\"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b(\"Patches\"),n.u=[],n.s=[],n.v=r)}function g(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b(\"ES5\").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b(\"Patches\").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b(\"Patches\").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if(\"production\"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function N(n,r,t){var e=s(r)?b(\"MapSet\").F(r,t):v(r)?b(\"MapSet\").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b(\"ES5\").J(r,t);return(t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b(\"ES5\").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return\"production\"!==process.env.NODE_ENV&&f(r),en.get(r,n)},set:function(r){var t=this[Q];\"production\"!==process.env.NODE_ENV&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e1?t-1:0),o=1;o1?t-1:0),o=1;o=0;e--){var i=t[e];if(0===i.path.length&&\"replace\"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b(\"Patches\").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);export default fn;export{un as Immer,pn as applyPatches,K as castDraft,$ as castImmutable,ln as createDraft,R as current,J as enableAllPlugins,F as enableES5,C as enableMapSet,T as enablePatches,dn as finishDraft,d as freeze,L as immerable,r as isDraft,t as isDraftable,H as nothing,e as original,fn as produce,cn as produceWithPatches,sn as setAutoFreeze,vn as setUseProxies};\n//# sourceMappingURL=immer.esm.js.map\n","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };","import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';\n\n/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nfunction formatProdErrorMessage(code) {\n return \"Minified Redux error #\" + code + \"; visit https://redux.js.org/Errors?code=\" + code + \" for the full message or \" + 'use the non-minified dev environment for full errors. ';\n}\n\n// Inlined version of the `symbol-observable` polyfill\nvar $$observable = (function () {\n return typeof Symbol === 'function' && Symbol.observable || '@@observable';\n})();\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of\nfunction miniKindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n var type = typeof val;\n\n switch (type) {\n case 'boolean':\n case 'string':\n case 'number':\n case 'symbol':\n case 'function':\n {\n return type;\n }\n }\n\n if (Array.isArray(val)) return 'array';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n var constructorName = ctorName(val);\n\n switch (constructorName) {\n case 'Symbol':\n case 'Promise':\n case 'WeakMap':\n case 'WeakSet':\n case 'Map':\n case 'Set':\n return constructorName;\n } // other\n\n\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n}\n\nfunction ctorName(val) {\n return typeof val.constructor === 'function' ? val.constructor.name : null;\n}\n\nfunction isError(val) {\n return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';\n}\n\nfunction kindOf(val) {\n var typeOfVal = typeof val;\n\n if (process.env.NODE_ENV !== 'production') {\n typeOfVal = miniKindOf(val);\n }\n\n return typeOfVal;\n}\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from 'redux'`\n *\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : \"Expected the enhancer to be a function. Instead, received: '\" + kindOf(enhancer) + \"'\");\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : \"Expected the root reducer to be a function. Instead, received: '\" + kindOf(reducer) + \"'\");\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : \"Expected the listener to be a function. Instead, received: '\" + kindOf(listener) + \"'\");\n }\n\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : \"Actions must be plain objects. Instead, the actual type was: '\" + kindOf(action) + \"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.\");\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n }\n\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(9) : 'Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(10) : \"Expected the nextReducer to be a function. Instead, received: '\" + kindOf(nextReducer));\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : \"Expected the observer to be an object. Instead, received: '\" + kindOf(observer) + \"'\");\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nvar legacy_createStore = createStore;\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + kindOf(inputState) + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : \"The slice reducer for key \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : \"The slice reducer for key \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle '\" + ActionTypes.INIT + \"' or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var actionType = action && action.type;\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : \"When called with an action of type \" + (actionType ? \"\\\"\" + String(actionType) + \"\\\"\" : '(unknown type)') + \", the slice reducer for key \\\"\" + _key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\");\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : \"bindActionCreators expected an object or a function, but instead received: '\" + kindOf(actionCreators) + \"'. \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread(_objectSpread({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\nexport { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, legacy_createStore };\n","/** A function that accepts a potential \"extra argument\" value to be injected later,\r\n * and returns an instance of the thunk middleware that uses that value\r\n */\nfunction createThunkMiddleware(extraArgument) {\n // Standard Redux middleware definition pattern:\n // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware\n var middleware = function middleware(_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n // The thunk middleware looks for any functions that were passed to `store.dispatch`.\n // If this \"action\" is really a function, call it and return the result.\n if (typeof action === 'function') {\n // Inject the store's `dispatch` and `getState` methods, as well as any \"extra arg\"\n return action(dispatch, getState, extraArgument);\n } // Otherwise, pass the action down the middleware chain as usual\n\n\n return next(action);\n };\n };\n };\n\n return middleware;\n}\n\nvar thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version\n// with whatever \"extra arg\" they want to inject into their thunks\n\nthunk.withExtraArgument = createThunkMiddleware;\nexport default thunk;","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a, b) {\r\n for (var prop in b || (b = {}))\r\n if (__hasOwnProp.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {\r\n var prop = _c[_i];\r\n if (__propIsEnum.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n }\r\n return a;\r\n};\r\nvar __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };\r\nvar __async = function (__this, __arguments, generator) {\r\n return new Promise(function (resolve, reject) {\r\n var fulfilled = function (value) {\r\n try {\r\n step(generator.next(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var rejected = function (value) {\r\n try {\r\n step(generator.throw(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };\r\n step((generator = generator.apply(__this, __arguments)).next());\r\n });\r\n};\r\n// src/index.ts\r\nimport { enableES5 } from \"immer\";\r\nexport * from \"redux\";\r\nimport { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from \"immer\";\r\nimport { createSelector as createSelector2 } from \"reselect\";\r\n// src/createDraftSafeSelector.ts\r\nimport { current, isDraft } from \"immer\";\r\nimport { createSelector } from \"reselect\";\r\nvar createDraftSafeSelector = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var selector = createSelector.apply(void 0, args);\r\n var wrappedSelector = function (value) {\r\n var rest = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n rest[_i - 1] = arguments[_i];\r\n }\r\n return selector.apply(void 0, __spreadArray([isDraft(value) ? current(value) : value], rest));\r\n };\r\n return wrappedSelector;\r\n};\r\n// src/configureStore.ts\r\nimport { createStore, compose as compose2, applyMiddleware, combineReducers } from \"redux\";\r\n// src/devtoolsExtension.ts\r\nimport { compose } from \"redux\";\r\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {\r\n if (arguments.length === 0)\r\n return void 0;\r\n if (typeof arguments[0] === \"object\")\r\n return compose;\r\n return compose.apply(null, arguments);\r\n};\r\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {\r\n return function (noop2) {\r\n return noop2;\r\n };\r\n};\r\n// src/isPlainObject.ts\r\nfunction isPlainObject(value) {\r\n if (typeof value !== \"object\" || value === null)\r\n return false;\r\n var proto = Object.getPrototypeOf(value);\r\n if (proto === null)\r\n return true;\r\n var baseProto = proto;\r\n while (Object.getPrototypeOf(baseProto) !== null) {\r\n baseProto = Object.getPrototypeOf(baseProto);\r\n }\r\n return proto === baseProto;\r\n}\r\n// src/getDefaultMiddleware.ts\r\nimport thunkMiddleware from \"redux-thunk\";\r\n// src/tsHelpers.ts\r\nvar hasMatchFunction = function (v) {\r\n return v && typeof v.match === \"function\";\r\n};\r\n// src/createAction.ts\r\nfunction createAction(type, prepareAction) {\r\n function actionCreator() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (prepareAction) {\r\n var prepared = prepareAction.apply(void 0, args);\r\n if (!prepared) {\r\n throw new Error(\"prepareAction did not return an object\");\r\n }\r\n return __spreadValues(__spreadValues({\r\n type: type,\r\n payload: prepared.payload\r\n }, \"meta\" in prepared && { meta: prepared.meta }), \"error\" in prepared && { error: prepared.error });\r\n }\r\n return { type: type, payload: args[0] };\r\n }\r\n actionCreator.toString = function () { return \"\" + type; };\r\n actionCreator.type = type;\r\n actionCreator.match = function (action) { return action.type === type; };\r\n return actionCreator;\r\n}\r\nfunction isAction(action) {\r\n return isPlainObject(action) && \"type\" in action;\r\n}\r\nfunction isActionCreator(action) {\r\n return typeof action === \"function\" && \"type\" in action && hasMatchFunction(action);\r\n}\r\nfunction isFSA(action) {\r\n return isAction(action) && typeof action.type === \"string\" && Object.keys(action).every(isValidKey);\r\n}\r\nfunction isValidKey(key) {\r\n return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\r\n}\r\nfunction getType(actionCreator) {\r\n return \"\" + actionCreator;\r\n}\r\n// src/actionCreatorInvariantMiddleware.ts\r\nfunction getMessage(type) {\r\n var splitType = type ? (\"\" + type).split(\"/\") : [];\r\n var actionName = splitType[splitType.length - 1] || \"actionCreator\";\r\n return \"Detected an action creator with type \\\"\" + (type || \"unknown\") + \"\\\" being dispatched. \\nMake sure you're calling the action creator before dispatching, i.e. `dispatch(\" + actionName + \"())` instead of `dispatch(\" + actionName + \")`. This is necessary even if the action has no payload.\";\r\n}\r\nfunction createActionCreatorInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c;\r\n return function () { return function (next) { return function (action) {\r\n if (isActionCreator2(action)) {\r\n console.warn(getMessage(action.type));\r\n }\r\n return next(action);\r\n }; }; };\r\n}\r\n// src/utils.ts\r\nimport createNextState, { isDraftable } from \"immer\";\r\nfunction getTimeMeasureUtils(maxDelay, fnName) {\r\n var elapsed = 0;\r\n return {\r\n measureTime: function (fn) {\r\n var started = Date.now();\r\n try {\r\n return fn();\r\n }\r\n finally {\r\n var finished = Date.now();\r\n elapsed += finished - started;\r\n }\r\n },\r\n warnIfExceeded: function () {\r\n if (elapsed > maxDelay) {\r\n console.warn(fnName + \" took \" + elapsed + \"ms, which is more than the warning threshold of \" + maxDelay + \"ms. \\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\\nIt is disabled in production builds, so you don't need to worry about that.\");\r\n }\r\n }\r\n };\r\n}\r\nvar MiddlewareArray = /** @class */ (function (_super) {\r\n __extends(MiddlewareArray, _super);\r\n function MiddlewareArray() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, MiddlewareArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(MiddlewareArray, Symbol.species, {\r\n get: function () {\r\n return MiddlewareArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n MiddlewareArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n MiddlewareArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return MiddlewareArray;\r\n}(Array));\r\nvar EnhancerArray = /** @class */ (function (_super) {\r\n __extends(EnhancerArray, _super);\r\n function EnhancerArray() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, EnhancerArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(EnhancerArray, Symbol.species, {\r\n get: function () {\r\n return EnhancerArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n EnhancerArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n EnhancerArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return EnhancerArray;\r\n}(Array));\r\nfunction freezeDraftable(val) {\r\n return isDraftable(val) ? createNextState(val, function () {\r\n }) : val;\r\n}\r\n// src/immutableStateInvariantMiddleware.ts\r\nvar isProduction = process.env.NODE_ENV === \"production\";\r\nvar prefix = \"Invariant failed\";\r\nfunction invariant(condition, message) {\r\n if (condition) {\r\n return;\r\n }\r\n if (isProduction) {\r\n throw new Error(prefix);\r\n }\r\n throw new Error(prefix + \": \" + (message || \"\"));\r\n}\r\nfunction stringify(obj, serializer, indent, decycler) {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent);\r\n}\r\nfunction getSerialize(serializer, decycler) {\r\n var stack = [], keys = [];\r\n if (!decycler)\r\n decycler = function (_, value) {\r\n if (stack[0] === value)\r\n return \"[Circular ~]\";\r\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\r\n };\r\n return function (key, value) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this);\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\r\n if (~stack.indexOf(value))\r\n value = decycler.call(this, key, value);\r\n }\r\n else\r\n stack.push(value);\r\n return serializer == null ? value : serializer.call(this, key, value);\r\n };\r\n}\r\nfunction isImmutableDefault(value) {\r\n return typeof value !== \"object\" || value == null || Object.isFrozen(value);\r\n}\r\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\r\n var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\r\n return {\r\n detectMutations: function () {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\r\n }\r\n };\r\n}\r\nfunction trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (path === void 0) { path = \"\"; }\r\n if (checkedObjects === void 0) { checkedObjects = new Set(); }\r\n var tracked = { value: obj };\r\n if (!isImmutable(obj) && !checkedObjects.has(obj)) {\r\n checkedObjects.add(obj);\r\n tracked.children = {};\r\n for (var key in obj) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\r\n }\r\n }\r\n return tracked;\r\n}\r\nfunction detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) {\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n if (sameParentRef === void 0) { sameParentRef = false; }\r\n if (path === void 0) { path = \"\"; }\r\n var prevObj = trackedProperty ? trackedProperty.value : void 0;\r\n var sameRef = prevObj === obj;\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path: path };\r\n }\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false };\r\n }\r\n var keysToDetect = {};\r\n for (var key in trackedProperty.children) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in obj) {\r\n keysToDetect[key] = true;\r\n }\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n var _loop_1 = function (key) {\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths) {\r\n var hasMatches = ignoredPaths.some(function (ignored) {\r\n if (ignored instanceof RegExp) {\r\n return ignored.test(nestedPath);\r\n }\r\n return nestedPath === ignored;\r\n });\r\n if (hasMatches) {\r\n return \"continue\";\r\n }\r\n }\r\n var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);\r\n if (result.wasMutated) {\r\n return { value: result };\r\n }\r\n };\r\n for (var key in keysToDetect) {\r\n var state_1 = _loop_1(key);\r\n if (typeof state_1 === \"object\")\r\n return state_1.value;\r\n }\r\n return { wasMutated: false };\r\n}\r\nfunction createImmutableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore;\r\n ignoredPaths = ignoredPaths || ignore;\r\n var track = trackForMutations.bind(null, isImmutable, ignoredPaths);\r\n return function (_c) {\r\n var getState = _c.getState;\r\n var state = getState();\r\n var tracker = track(state);\r\n var result;\r\n return function (next) { return function (action) {\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n invariant(!result.wasMutated, \"A state mutation was detected between dispatches, in the path '\" + (result.path || \"\") + \"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n var dispatchedAction = next(action);\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n result.wasMutated && invariant(!result.wasMutated, \"A state mutation was detected inside a dispatch, in the path: \" + (result.path || \"\") + \". Take a look at the reducer(s) handling the action \" + stringify(action) + \". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n measureUtils.warnIfExceeded();\r\n return dispatchedAction;\r\n }; };\r\n };\r\n}\r\n// src/serializableStateInvariantMiddleware.ts\r\nfunction isPlain(val) {\r\n var type = typeof val;\r\n return val == null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject(val);\r\n}\r\nfunction findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) {\r\n if (path === void 0) { path = \"\"; }\r\n if (isSerializable === void 0) { isSerializable = isPlain; }\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n var foundNestedSerializable;\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || \"\",\r\n value: value\r\n };\r\n }\r\n if (typeof value !== \"object\" || value === null) {\r\n return false;\r\n }\r\n if (cache == null ? void 0 : cache.has(value))\r\n return false;\r\n var entries = getEntries != null ? getEntries(value) : Object.entries(value);\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n var _loop_2 = function (key, nestedValue) {\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths) {\r\n var hasMatches = ignoredPaths.some(function (ignored) {\r\n if (ignored instanceof RegExp) {\r\n return ignored.test(nestedPath);\r\n }\r\n return nestedPath === ignored;\r\n });\r\n if (hasMatches) {\r\n return \"continue\";\r\n }\r\n }\r\n if (!isSerializable(nestedValue)) {\r\n return { value: {\r\n keyPath: nestedPath,\r\n value: nestedValue\r\n } };\r\n }\r\n if (typeof nestedValue === \"object\") {\r\n foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);\r\n if (foundNestedSerializable) {\r\n return { value: foundNestedSerializable };\r\n }\r\n }\r\n };\r\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\r\n var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];\r\n var state_2 = _loop_2(key, nestedValue);\r\n if (typeof state_2 === \"object\")\r\n return state_2.value;\r\n }\r\n if (cache && isNestedFrozen(value))\r\n cache.add(value);\r\n return false;\r\n}\r\nfunction isNestedFrozen(value) {\r\n if (!Object.isFrozen(value))\r\n return false;\r\n for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) {\r\n var nestedValue = _c[_i];\r\n if (typeof nestedValue !== \"object\" || nestedValue === null)\r\n continue;\r\n if (!isNestedFrozen(nestedValue))\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction createSerializableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? [\"meta.arg\", \"meta.baseQueryMeta\"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k;\r\n var cache = !disableCache && WeakSet ? new WeakSet() : void 0;\r\n return function (storeAPI) { return function (next) { return function (action) {\r\n var result = next(action);\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\r\n if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {\r\n measureUtils.measureTime(function () {\r\n var foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths, cache);\r\n if (foundActionNonSerializableValue) {\r\n var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in an action, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\r\n }\r\n });\r\n }\r\n if (!ignoreState) {\r\n measureUtils.measureTime(function () {\r\n var state = storeAPI.getState();\r\n var foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths, cache);\r\n if (foundStateNonSerializableValue) {\r\n var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in the state, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the reducer(s) handling this action type: \" + action.type + \".\\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)\");\r\n }\r\n });\r\n measureUtils.warnIfExceeded();\r\n }\r\n return result;\r\n }; }; };\r\n}\r\n// src/getDefaultMiddleware.ts\r\nfunction isBoolean(x) {\r\n return typeof x === \"boolean\";\r\n}\r\nfunction curryGetDefaultMiddleware() {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options);\r\n };\r\n}\r\nfunction getDefaultMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f;\r\n var middlewareArray = new MiddlewareArray();\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware);\r\n }\r\n else {\r\n middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));\r\n }\r\n }\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (immutableCheck) {\r\n var immutableOptions = {};\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck;\r\n }\r\n middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\r\n }\r\n if (serializableCheck) {\r\n var serializableOptions = {};\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck;\r\n }\r\n middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\r\n }\r\n if (actionCreatorCheck) {\r\n var actionCreatorOptions = {};\r\n if (!isBoolean(actionCreatorCheck)) {\r\n actionCreatorOptions = actionCreatorCheck;\r\n }\r\n middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));\r\n }\r\n }\r\n return middlewareArray;\r\n}\r\n// src/configureStore.ts\r\nvar IS_PRODUCTION = process.env.NODE_ENV === \"production\";\r\nfunction configureStore(options) {\r\n var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();\r\n var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h;\r\n var rootReducer;\r\n if (typeof reducer === \"function\") {\r\n rootReducer = reducer;\r\n }\r\n else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer);\r\n }\r\n else {\r\n throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');\r\n }\r\n var finalMiddleware = middleware;\r\n if (typeof finalMiddleware === \"function\") {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\"when using a middleware builder function, an array of middleware must be returned\");\r\n }\r\n }\r\n if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== \"function\"; })) {\r\n throw new Error(\"each middleware provided to configureStore must be a function\");\r\n }\r\n var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);\r\n var finalCompose = compose2;\r\n if (devTools) {\r\n finalCompose = composeWithDevTools(__spreadValues({\r\n trace: !IS_PRODUCTION\r\n }, typeof devTools === \"object\" && devTools));\r\n }\r\n var defaultEnhancers = new EnhancerArray(middlewareEnhancer);\r\n var storeEnhancers = defaultEnhancers;\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);\r\n }\r\n else if (typeof enhancers === \"function\") {\r\n storeEnhancers = enhancers(defaultEnhancers);\r\n }\r\n var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);\r\n return createStore(rootReducer, preloadedState, composedEnhancer);\r\n}\r\n// src/createReducer.ts\r\nimport createNextState2, { isDraft as isDraft2, isDraftable as isDraftable2 } from \"immer\";\r\n// src/mapBuilders.ts\r\nfunction executeReducerBuilderCallback(builderCallback) {\r\n var actionsMap = {};\r\n var actionMatchers = [];\r\n var defaultCaseReducer;\r\n var builder = {\r\n addCase: function (typeOrActionCreator, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addMatcher`\");\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n var type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\r\n if (!type) {\r\n throw new Error(\"`builder.addCase` cannot be called with an empty action type\");\r\n }\r\n if (type in actionsMap) {\r\n throw new Error(\"`builder.addCase` cannot be called with two reducers for the same action type\");\r\n }\r\n actionsMap[type] = reducer;\r\n return builder;\r\n },\r\n addMatcher: function (matcher, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n actionMatchers.push({ matcher: matcher, reducer: reducer });\r\n return builder;\r\n },\r\n addDefaultCase: function (reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addDefaultCase` can only be called once\");\r\n }\r\n }\r\n defaultCaseReducer = reducer;\r\n return builder;\r\n }\r\n };\r\n builderCallback(builder);\r\n return [actionsMap, actionMatchers, defaultCaseReducer];\r\n}\r\n// src/createReducer.ts\r\nfunction isStateFunction(x) {\r\n return typeof x === \"function\";\r\n}\r\nvar hasWarnedAboutObjectNotation = false;\r\nfunction createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {\r\n if (actionMatchers === void 0) { actionMatchers = []; }\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (typeof mapOrBuilderCallback === \"object\") {\r\n if (!hasWarnedAboutObjectNotation) {\r\n hasWarnedAboutObjectNotation = true;\r\n console.warn(\"The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\");\r\n }\r\n }\r\n }\r\n var _c = typeof mapOrBuilderCallback === \"function\" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];\r\n var getInitialState;\r\n if (isStateFunction(initialState)) {\r\n getInitialState = function () { return freezeDraftable(initialState()); };\r\n }\r\n else {\r\n var frozenInitialState_1 = freezeDraftable(initialState);\r\n getInitialState = function () { return frozenInitialState_1; };\r\n }\r\n function reducer(state, action) {\r\n if (state === void 0) { state = getInitialState(); }\r\n var caseReducers = __spreadArray([\r\n actionsMap[action.type]\r\n ], finalActionMatchers.filter(function (_c) {\r\n var matcher = _c.matcher;\r\n return matcher(action);\r\n }).map(function (_c) {\r\n var reducer2 = _c.reducer;\r\n return reducer2;\r\n }));\r\n if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer];\r\n }\r\n return caseReducers.reduce(function (previousState, caseReducer) {\r\n if (caseReducer) {\r\n if (isDraft2(previousState)) {\r\n var draft = previousState;\r\n var result = caseReducer(draft, action);\r\n if (result === void 0) {\r\n return previousState;\r\n }\r\n return result;\r\n }\r\n else if (!isDraftable2(previousState)) {\r\n var result = caseReducer(previousState, action);\r\n if (result === void 0) {\r\n if (previousState === null) {\r\n return previousState;\r\n }\r\n throw Error(\"A case reducer on a non-draftable value must not return undefined\");\r\n }\r\n return result;\r\n }\r\n else {\r\n return createNextState2(previousState, function (draft) {\r\n return caseReducer(draft, action);\r\n });\r\n }\r\n }\r\n return previousState;\r\n }, state);\r\n }\r\n reducer.getInitialState = getInitialState;\r\n return reducer;\r\n}\r\n// src/createSlice.ts\r\nvar hasWarnedAboutObjectNotation2 = false;\r\nfunction getType2(slice, actionKey) {\r\n return slice + \"/\" + actionKey;\r\n}\r\nfunction createSlice(options) {\r\n var name = options.name;\r\n if (!name) {\r\n throw new Error(\"`name` is a required option for createSlice\");\r\n }\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n if (options.initialState === void 0) {\r\n console.error(\"You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`\");\r\n }\r\n }\r\n var initialState = typeof options.initialState == \"function\" ? options.initialState : freezeDraftable(options.initialState);\r\n var reducers = options.reducers || {};\r\n var reducerNames = Object.keys(reducers);\r\n var sliceCaseReducersByName = {};\r\n var sliceCaseReducersByType = {};\r\n var actionCreators = {};\r\n reducerNames.forEach(function (reducerName) {\r\n var maybeReducerWithPrepare = reducers[reducerName];\r\n var type = getType2(name, reducerName);\r\n var caseReducer;\r\n var prepareCallback;\r\n if (\"reducer\" in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer;\r\n prepareCallback = maybeReducerWithPrepare.prepare;\r\n }\r\n else {\r\n caseReducer = maybeReducerWithPrepare;\r\n }\r\n sliceCaseReducersByName[reducerName] = caseReducer;\r\n sliceCaseReducersByType[type] = caseReducer;\r\n actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);\r\n });\r\n function buildReducer() {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (typeof options.extraReducers === \"object\") {\r\n if (!hasWarnedAboutObjectNotation2) {\r\n hasWarnedAboutObjectNotation2 = true;\r\n console.warn(\"The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\");\r\n }\r\n }\r\n }\r\n var _c = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f;\r\n var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);\r\n return createReducer(initialState, function (builder) {\r\n for (var key in finalCaseReducers) {\r\n builder.addCase(key, finalCaseReducers[key]);\r\n }\r\n for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) {\r\n var m = actionMatchers_1[_i];\r\n builder.addMatcher(m.matcher, m.reducer);\r\n }\r\n if (defaultCaseReducer) {\r\n builder.addDefaultCase(defaultCaseReducer);\r\n }\r\n });\r\n }\r\n var _reducer;\r\n return {\r\n name: name,\r\n reducer: function (state, action) {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer(state, action);\r\n },\r\n actions: actionCreators,\r\n caseReducers: sliceCaseReducersByName,\r\n getInitialState: function () {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer.getInitialState();\r\n }\r\n };\r\n}\r\n// src/entities/entity_state.ts\r\nfunction getInitialEntityState() {\r\n return {\r\n ids: [],\r\n entities: {}\r\n };\r\n}\r\nfunction createInitialStateFactory() {\r\n function getInitialState(additionalState) {\r\n if (additionalState === void 0) { additionalState = {}; }\r\n return Object.assign(getInitialEntityState(), additionalState);\r\n }\r\n return { getInitialState: getInitialState };\r\n}\r\n// src/entities/state_selectors.ts\r\nfunction createSelectorsFactory() {\r\n function getSelectors(selectState) {\r\n var selectIds = function (state) { return state.ids; };\r\n var selectEntities = function (state) { return state.entities; };\r\n var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });\r\n var selectId = function (_, id) { return id; };\r\n var selectById = function (entities, id) { return entities[id]; };\r\n var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });\r\n if (!selectState) {\r\n return {\r\n selectIds: selectIds,\r\n selectEntities: selectEntities,\r\n selectAll: selectAll,\r\n selectTotal: selectTotal,\r\n selectById: createDraftSafeSelector(selectEntities, selectId, selectById)\r\n };\r\n }\r\n var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)\r\n };\r\n }\r\n return { getSelectors: getSelectors };\r\n}\r\n// src/entities/state_adapter.ts\r\nimport createNextState3, { isDraft as isDraft3 } from \"immer\";\r\nfunction createSingleArgumentStateOperator(mutator) {\r\n var operator = createStateOperator(function (_, state) { return mutator(state); });\r\n return function operation(state) {\r\n return operator(state, void 0);\r\n };\r\n}\r\nfunction createStateOperator(mutator) {\r\n return function operation(state, arg) {\r\n function isPayloadActionArgument(arg2) {\r\n return isFSA(arg2);\r\n }\r\n var runMutator = function (draft) {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft);\r\n }\r\n else {\r\n mutator(arg, draft);\r\n }\r\n };\r\n if (isDraft3(state)) {\r\n runMutator(state);\r\n return state;\r\n }\r\n else {\r\n return createNextState3(state, runMutator);\r\n }\r\n };\r\n}\r\n// src/entities/utils.ts\r\nfunction selectIdValue(entity, selectId) {\r\n var key = selectId(entity);\r\n if (process.env.NODE_ENV !== \"production\" && key === void 0) {\r\n console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\r\n }\r\n return key;\r\n}\r\nfunction ensureEntitiesArray(entities) {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities);\r\n }\r\n return entities;\r\n}\r\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var added = [];\r\n var updated = [];\r\n for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {\r\n var entity = newEntities_1[_i];\r\n var id = selectIdValue(entity, selectId);\r\n if (id in state.entities) {\r\n updated.push({ id: id, changes: entity });\r\n }\r\n else {\r\n added.push(entity);\r\n }\r\n }\r\n return [added, updated];\r\n}\r\n// src/entities/unsorted_state_adapter.ts\r\nfunction createUnsortedStateAdapter(selectId) {\r\n function addOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (key in state.entities) {\r\n return;\r\n }\r\n state.ids.push(key);\r\n state.entities[key] = entity;\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {\r\n var entity = newEntities_2[_i];\r\n addOneMutably(entity, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (!(key in state.entities)) {\r\n state.ids.push(key);\r\n }\r\n state.entities[key] = entity;\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {\r\n var entity = newEntities_3[_i];\r\n setOneMutably(entity, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.ids = [];\r\n state.entities = {};\r\n addManyMutably(newEntities, state);\r\n }\r\n function removeOneMutably(key, state) {\r\n return removeManyMutably([key], state);\r\n }\r\n function removeManyMutably(keys, state) {\r\n var didMutate = false;\r\n keys.forEach(function (key) {\r\n if (key in state.entities) {\r\n delete state.entities[key];\r\n didMutate = true;\r\n }\r\n });\r\n if (didMutate) {\r\n state.ids = state.ids.filter(function (id) { return id in state.entities; });\r\n }\r\n }\r\n function removeAllMutably(state) {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {}\r\n });\r\n }\r\n function takeNewKey(keys, update, state) {\r\n var original2 = state.entities[update.id];\r\n var updated = Object.assign({}, original2, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n var hasNewKey = newKey !== update.id;\r\n if (hasNewKey) {\r\n keys[update.id] = newKey;\r\n delete state.entities[update.id];\r\n }\r\n state.entities[newKey] = updated;\r\n return hasNewKey;\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var newKeys = {};\r\n var updatesPerEntity = {};\r\n updates.forEach(function (update) {\r\n if (update.id in state.entities) {\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)\r\n };\r\n }\r\n });\r\n updates = Object.values(updatesPerEntity);\r\n var didMutateEntities = updates.length > 0;\r\n if (didMutateEntities) {\r\n var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;\r\n if (didMutateIds) {\r\n state.ids = Object.keys(state.entities);\r\n }\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably)\r\n };\r\n}\r\n// src/entities/sorted_state_adapter.ts\r\nfunction createSortedStateAdapter(selectId, sort) {\r\n var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;\r\n function addOneMutably(entity, state) {\r\n return addManyMutably([entity], state);\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n return setManyMutably([entity], state);\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.entities = {};\r\n state.ids = [];\r\n addManyMutably(newEntities, state);\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var appliedUpdates = false;\r\n for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) {\r\n var update = updates_1[_i];\r\n var entity = state.entities[update.id];\r\n if (!entity) {\r\n continue;\r\n }\r\n appliedUpdates = true;\r\n Object.assign(entity, update.changes);\r\n var newId = selectId(entity);\r\n if (update.id !== newId) {\r\n delete state.entities[update.id];\r\n state.entities[newId] = entity;\r\n }\r\n }\r\n if (appliedUpdates) {\r\n resortEntities(state);\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n function areArraysEqual(a, b) {\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n function merge(models, state) {\r\n models.forEach(function (model) {\r\n state.entities[selectId(model)] = model;\r\n });\r\n resortEntities(state);\r\n }\r\n function resortEntities(state) {\r\n var allEntities = Object.values(state.entities);\r\n allEntities.sort(sort);\r\n var newSortedIds = allEntities.map(selectId);\r\n var ids = state.ids;\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds;\r\n }\r\n }\r\n return {\r\n removeOne: removeOne,\r\n removeMany: removeMany,\r\n removeAll: removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably)\r\n };\r\n}\r\n// src/entities/create_adapter.ts\r\nfunction createEntityAdapter(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = __spreadValues({\r\n sortComparer: false,\r\n selectId: function (instance) { return instance.id; }\r\n }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;\r\n var stateFactory = createInitialStateFactory();\r\n var selectorsFactory = createSelectorsFactory();\r\n var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\r\n return __spreadValues(__spreadValues(__spreadValues({\r\n selectId: selectId,\r\n sortComparer: sortComparer\r\n }, stateFactory), selectorsFactory), stateAdapter);\r\n}\r\n// src/nanoid.ts\r\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\r\nvar nanoid = function (size) {\r\n if (size === void 0) { size = 21; }\r\n var id = \"\";\r\n var i = size;\r\n while (i--) {\r\n id += urlAlphabet[Math.random() * 64 | 0];\r\n }\r\n return id;\r\n};\r\n// src/createAsyncThunk.ts\r\nvar commonProperties = [\r\n \"name\",\r\n \"message\",\r\n \"stack\",\r\n \"code\"\r\n];\r\nvar RejectWithValue = /** @class */ (function () {\r\n function RejectWithValue(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return RejectWithValue;\r\n}());\r\nvar FulfillWithMeta = /** @class */ (function () {\r\n function FulfillWithMeta(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return FulfillWithMeta;\r\n}());\r\nvar miniSerializeError = function (value) {\r\n if (typeof value === \"object\" && value !== null) {\r\n var simpleError = {};\r\n for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {\r\n var property = commonProperties_1[_i];\r\n if (typeof value[property] === \"string\") {\r\n simpleError[property] = value[property];\r\n }\r\n }\r\n return simpleError;\r\n }\r\n return { message: String(value) };\r\n};\r\nvar createAsyncThunk = (function () {\r\n function createAsyncThunk2(typePrefix, payloadCreator, options) {\r\n var fulfilled = createAction(typePrefix + \"/fulfilled\", function (payload, requestId, arg, meta) { return ({\r\n payload: payload,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"fulfilled\"\r\n })\r\n }); });\r\n var pending = createAction(typePrefix + \"/pending\", function (requestId, arg, meta) { return ({\r\n payload: void 0,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"pending\"\r\n })\r\n }); });\r\n var rejected = createAction(typePrefix + \"/rejected\", function (error, requestId, arg, payload, meta) { return ({\r\n payload: payload,\r\n error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: \"rejected\",\r\n aborted: (error == null ? void 0 : error.name) === \"AbortError\",\r\n condition: (error == null ? void 0 : error.name) === \"ConditionError\"\r\n })\r\n }); });\r\n var displayedWarning = false;\r\n var AC = typeof AbortController !== \"undefined\" ? AbortController : /** @class */ (function () {\r\n function class_1() {\r\n this.signal = {\r\n aborted: false,\r\n addEventListener: function () {\r\n },\r\n dispatchEvent: function () {\r\n return false;\r\n },\r\n onabort: function () {\r\n },\r\n removeEventListener: function () {\r\n },\r\n reason: void 0,\r\n throwIfAborted: function () {\r\n }\r\n };\r\n }\r\n class_1.prototype.abort = function () {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (!displayedWarning) {\r\n displayedWarning = true;\r\n console.info(\"This platform does not implement AbortController. \\nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.\");\r\n }\r\n }\r\n };\r\n return class_1;\r\n }());\r\n function actionCreator(arg) {\r\n return function (dispatch, getState, extra) {\r\n var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();\r\n var abortController = new AC();\r\n var abortReason;\r\n var started = false;\r\n function abort(reason) {\r\n abortReason = reason;\r\n abortController.abort();\r\n }\r\n var promise2 = function () {\r\n return __async(this, null, function () {\r\n var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 4, , 5]);\r\n conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });\r\n if (!isThenable(conditionResult)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, conditionResult];\r\n case 1:\r\n conditionResult = _c.sent();\r\n _c.label = 2;\r\n case 2:\r\n if (conditionResult === false || abortController.signal.aborted) {\r\n throw {\r\n name: \"ConditionError\",\r\n message: \"Aborted due to condition callback returning false.\"\r\n };\r\n }\r\n started = true;\r\n abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener(\"abort\", function () { return reject({\r\n name: \"AbortError\",\r\n message: abortReason || \"Aborted\"\r\n }); }); });\r\n dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));\r\n return [4 /*yield*/, Promise.race([\r\n abortedPromise,\r\n Promise.resolve(payloadCreator(arg, {\r\n dispatch: dispatch,\r\n getState: getState,\r\n extra: extra,\r\n requestId: requestId,\r\n signal: abortController.signal,\r\n abort: abort,\r\n rejectWithValue: function (value, meta) {\r\n return new RejectWithValue(value, meta);\r\n },\r\n fulfillWithValue: function (value, meta) {\r\n return new FulfillWithMeta(value, meta);\r\n }\r\n })).then(function (result) {\r\n if (result instanceof RejectWithValue) {\r\n throw result;\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta);\r\n }\r\n return fulfilled(result, requestId, arg);\r\n })\r\n ])];\r\n case 3:\r\n finalAction = _c.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n err_1 = _c.sent();\r\n finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);\r\n return [3 /*break*/, 5];\r\n case 5:\r\n skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\r\n if (!skipDispatch) {\r\n dispatch(finalAction);\r\n }\r\n return [2 /*return*/, finalAction];\r\n }\r\n });\r\n });\r\n }();\r\n return Object.assign(promise2, {\r\n abort: abort,\r\n requestId: requestId,\r\n arg: arg,\r\n unwrap: function () {\r\n return promise2.then(unwrapResult);\r\n }\r\n });\r\n };\r\n }\r\n return Object.assign(actionCreator, {\r\n pending: pending,\r\n rejected: rejected,\r\n fulfilled: fulfilled,\r\n typePrefix: typePrefix\r\n });\r\n }\r\n createAsyncThunk2.withTypes = function () { return createAsyncThunk2; };\r\n return createAsyncThunk2;\r\n})();\r\nfunction unwrapResult(action) {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload;\r\n }\r\n if (action.error) {\r\n throw action.error;\r\n }\r\n return action.payload;\r\n}\r\nfunction isThenable(value) {\r\n return value !== null && typeof value === \"object\" && typeof value.then === \"function\";\r\n}\r\n// src/matchers.ts\r\nvar matches = function (matcher, action) {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action);\r\n }\r\n else {\r\n return matcher(action);\r\n }\r\n};\r\nfunction isAnyOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.some(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction isAllOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.every(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction hasExpectedRequestMetadata(action, validStatus) {\r\n if (!action || !action.meta)\r\n return false;\r\n var hasValidRequestId = typeof action.meta.requestId === \"string\";\r\n var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\r\n return hasValidRequestId && hasValidRequestStatus;\r\n}\r\nfunction isAsyncThunkArray(a) {\r\n return typeof a[0] === \"function\" && \"pending\" in a[0] && \"fulfilled\" in a[0] && \"rejected\" in a[0];\r\n}\r\nfunction isPending() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejected() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejectedWithValue() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n var hasFlag = function (action) {\r\n return action && action.meta && action.meta.rejectedWithValue;\r\n };\r\n if (asyncThunks.length === 0) {\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isFulfilled() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"fulfilled\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isAsyncThunkAction() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = [];\r\n for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {\r\n var asyncThunk = asyncThunks_1[_i];\r\n matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);\r\n }\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\n// src/listenerMiddleware/utils.ts\r\nvar assertFunction = function (func, expected) {\r\n if (typeof func !== \"function\") {\r\n throw new TypeError(expected + \" is not a function\");\r\n }\r\n};\r\nvar noop = function () {\r\n};\r\nvar catchRejection = function (promise2, onError) {\r\n if (onError === void 0) { onError = noop; }\r\n promise2.catch(onError);\r\n return promise2;\r\n};\r\nvar addAbortSignalListener = function (abortSignal, callback) {\r\n abortSignal.addEventListener(\"abort\", callback, { once: true });\r\n return function () { return abortSignal.removeEventListener(\"abort\", callback); };\r\n};\r\nvar abortControllerWithReason = function (abortController, reason) {\r\n var signal = abortController.signal;\r\n if (signal.aborted) {\r\n return;\r\n }\r\n if (!(\"reason\" in signal)) {\r\n Object.defineProperty(signal, \"reason\", {\r\n enumerable: true,\r\n value: reason,\r\n configurable: true,\r\n writable: true\r\n });\r\n }\r\n ;\r\n abortController.abort(reason);\r\n};\r\n// src/listenerMiddleware/exceptions.ts\r\nvar task = \"task\";\r\nvar listener = \"listener\";\r\nvar completed = \"completed\";\r\nvar cancelled = \"cancelled\";\r\nvar taskCancelled = \"task-\" + cancelled;\r\nvar taskCompleted = \"task-\" + completed;\r\nvar listenerCancelled = listener + \"-\" + cancelled;\r\nvar listenerCompleted = listener + \"-\" + completed;\r\nvar TaskAbortError = /** @class */ (function () {\r\n function TaskAbortError(code) {\r\n this.code = code;\r\n this.name = \"TaskAbortError\";\r\n this.message = task + \" \" + cancelled + \" (reason: \" + code + \")\";\r\n }\r\n return TaskAbortError;\r\n}());\r\n// src/listenerMiddleware/task.ts\r\nvar validateActive = function (signal) {\r\n if (signal.aborted) {\r\n throw new TaskAbortError(signal.reason);\r\n }\r\n};\r\nfunction raceWithSignal(signal, promise2) {\r\n var cleanup = noop;\r\n return new Promise(function (resolve, reject) {\r\n var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };\r\n if (signal.aborted) {\r\n notifyRejection();\r\n return;\r\n }\r\n cleanup = addAbortSignalListener(signal, notifyRejection);\r\n promise2.finally(function () { return cleanup(); }).then(resolve, reject);\r\n }).finally(function () {\r\n cleanup = noop;\r\n });\r\n}\r\nvar runTask = function (task2, cleanUp) { return __async(void 0, null, function () {\r\n var value, error_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 3, 4, 5]);\r\n return [4 /*yield*/, Promise.resolve()];\r\n case 1:\r\n _c.sent();\r\n return [4 /*yield*/, task2()];\r\n case 2:\r\n value = _c.sent();\r\n return [2 /*return*/, {\r\n status: \"ok\",\r\n value: value\r\n }];\r\n case 3:\r\n error_1 = _c.sent();\r\n return [2 /*return*/, {\r\n status: error_1 instanceof TaskAbortError ? \"cancelled\" : \"rejected\",\r\n error: error_1\r\n }];\r\n case 4:\r\n cleanUp == null ? void 0 : cleanUp();\r\n return [7 /*endfinally*/];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n}); };\r\nvar createPause = function (signal) {\r\n return function (promise2) {\r\n return catchRejection(raceWithSignal(signal, promise2).then(function (output) {\r\n validateActive(signal);\r\n return output;\r\n }));\r\n };\r\n};\r\nvar createDelay = function (signal) {\r\n var pause = createPause(signal);\r\n return function (timeoutMs) {\r\n return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));\r\n };\r\n};\r\n// src/listenerMiddleware/index.ts\r\nvar assign = Object.assign;\r\nvar INTERNAL_NIL_TOKEN = {};\r\nvar alm = \"listenerMiddleware\";\r\nvar createFork = function (parentAbortSignal, parentBlockingPromises) {\r\n var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };\r\n return function (taskExecutor, opts) {\r\n assertFunction(taskExecutor, \"taskExecutor\");\r\n var childAbortController = new AbortController();\r\n linkControllers(childAbortController);\r\n var result = runTask(function () { return __async(void 0, null, function () {\r\n var result2;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(parentAbortSignal);\r\n validateActive(childAbortController.signal);\r\n return [4 /*yield*/, taskExecutor({\r\n pause: createPause(childAbortController.signal),\r\n delay: createDelay(childAbortController.signal),\r\n signal: childAbortController.signal\r\n })];\r\n case 1:\r\n result2 = _c.sent();\r\n validateActive(childAbortController.signal);\r\n return [2 /*return*/, result2];\r\n }\r\n });\r\n }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });\r\n if (opts == null ? void 0 : opts.autoJoin) {\r\n parentBlockingPromises.push(result);\r\n }\r\n return {\r\n result: createPause(parentAbortSignal)(result),\r\n cancel: function () {\r\n abortControllerWithReason(childAbortController, taskCancelled);\r\n }\r\n };\r\n };\r\n};\r\nvar createTakePattern = function (startListening, signal) {\r\n var take = function (predicate, timeout) { return __async(void 0, null, function () {\r\n var unsubscribe, tuplePromise, promises, output;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(signal);\r\n unsubscribe = function () {\r\n };\r\n tuplePromise = new Promise(function (resolve, reject) {\r\n var stopListening = startListening({\r\n predicate: predicate,\r\n effect: function (action, listenerApi) {\r\n listenerApi.unsubscribe();\r\n resolve([\r\n action,\r\n listenerApi.getState(),\r\n listenerApi.getOriginalState()\r\n ]);\r\n }\r\n });\r\n unsubscribe = function () {\r\n stopListening();\r\n reject();\r\n };\r\n });\r\n promises = [\r\n tuplePromise\r\n ];\r\n if (timeout != null) {\r\n promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));\r\n }\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, , 3, 4]);\r\n return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))];\r\n case 2:\r\n output = _c.sent();\r\n validateActive(signal);\r\n return [2 /*return*/, output];\r\n case 3:\r\n unsubscribe();\r\n return [7 /*endfinally*/];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };\r\n};\r\nvar getListenerEntryPropsFrom = function (options) {\r\n var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;\r\n if (type) {\r\n predicate = createAction(type).match;\r\n }\r\n else if (actionCreator) {\r\n type = actionCreator.type;\r\n predicate = actionCreator.match;\r\n }\r\n else if (matcher) {\r\n predicate = matcher;\r\n }\r\n else if (predicate) {\r\n }\r\n else {\r\n throw new Error(\"Creating or removing a listener requires one of the known fields for matching an action\");\r\n }\r\n assertFunction(effect, \"options.listener\");\r\n return { predicate: predicate, type: type, effect: effect };\r\n};\r\nvar createListenerEntry = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;\r\n var id = nanoid();\r\n var entry = {\r\n id: id,\r\n effect: effect,\r\n type: type,\r\n predicate: predicate,\r\n pending: new Set(),\r\n unsubscribe: function () {\r\n throw new Error(\"Unsubscribe not initialized\");\r\n }\r\n };\r\n return entry;\r\n};\r\nvar cancelActiveListeners = function (entry) {\r\n entry.pending.forEach(function (controller) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n });\r\n};\r\nvar createClearListenerMiddleware = function (listenerMap) {\r\n return function () {\r\n listenerMap.forEach(cancelActiveListeners);\r\n listenerMap.clear();\r\n };\r\n};\r\nvar safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {\r\n try {\r\n errorHandler(errorToNotify, errorInfo);\r\n }\r\n catch (errorHandlerError) {\r\n setTimeout(function () {\r\n throw errorHandlerError;\r\n }, 0);\r\n }\r\n};\r\nvar addListener = createAction(alm + \"/add\");\r\nvar clearAllListeners = createAction(alm + \"/removeAll\");\r\nvar removeListener = createAction(alm + \"/remove\");\r\nvar defaultErrorHandler = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n console.error.apply(console, __spreadArray([alm + \"/error\"], args));\r\n};\r\nfunction createListenerMiddleware(middlewareOptions) {\r\n var _this = this;\r\n if (middlewareOptions === void 0) { middlewareOptions = {}; }\r\n var listenerMap = new Map();\r\n var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;\r\n assertFunction(onError, \"onError\");\r\n var insertEntry = function (entry) {\r\n entry.unsubscribe = function () { return listenerMap.delete(entry.id); };\r\n listenerMap.set(entry.id, entry);\r\n return function (cancelOptions) {\r\n entry.unsubscribe();\r\n if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n };\r\n };\r\n var findListenerEntry = function (comparator) {\r\n for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {\r\n var entry = _c[_i];\r\n if (comparator(entry)) {\r\n return entry;\r\n }\r\n }\r\n return void 0;\r\n };\r\n var startListening = function (options) {\r\n var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });\r\n if (!entry) {\r\n entry = createListenerEntry(options);\r\n }\r\n return insertEntry(entry);\r\n };\r\n var stopListening = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;\r\n var entry = findListenerEntry(function (entry2) {\r\n var matchPredicateOrType = typeof type === \"string\" ? entry2.type === type : entry2.predicate === predicate;\r\n return matchPredicateOrType && entry2.effect === effect;\r\n });\r\n if (entry) {\r\n entry.unsubscribe();\r\n if (options.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n }\r\n return !!entry;\r\n };\r\n var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {\r\n var internalTaskController, take, autoJoinPromises, listenerError_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n internalTaskController = new AbortController();\r\n take = createTakePattern(startListening, internalTaskController.signal);\r\n autoJoinPromises = [];\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, 3, 4, 6]);\r\n entry.pending.add(internalTaskController);\r\n return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {\r\n getOriginalState: getOriginalState,\r\n condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },\r\n take: take,\r\n delay: createDelay(internalTaskController.signal),\r\n pause: createPause(internalTaskController.signal),\r\n extra: extra,\r\n signal: internalTaskController.signal,\r\n fork: createFork(internalTaskController.signal, autoJoinPromises),\r\n unsubscribe: entry.unsubscribe,\r\n subscribe: function () {\r\n listenerMap.set(entry.id, entry);\r\n },\r\n cancelActiveListeners: function () {\r\n entry.pending.forEach(function (controller, _, set) {\r\n if (controller !== internalTaskController) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n set.delete(controller);\r\n }\r\n });\r\n }\r\n })))];\r\n case 2:\r\n _c.sent();\r\n return [3 /*break*/, 6];\r\n case 3:\r\n listenerError_1 = _c.sent();\r\n if (!(listenerError_1 instanceof TaskAbortError)) {\r\n safelyNotifyError(onError, listenerError_1, {\r\n raisedBy: \"effect\"\r\n });\r\n }\r\n return [3 /*break*/, 6];\r\n case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)];\r\n case 5:\r\n _c.sent();\r\n abortControllerWithReason(internalTaskController, listenerCompleted);\r\n entry.pending.delete(internalTaskController);\r\n return [7 /*endfinally*/];\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);\r\n var middleware = function (api) { return function (next) { return function (action) {\r\n if (!isAction(action)) {\r\n return next(action);\r\n }\r\n if (addListener.match(action)) {\r\n return startListening(action.payload);\r\n }\r\n if (clearAllListeners.match(action)) {\r\n clearListenerMiddleware();\r\n return;\r\n }\r\n if (removeListener.match(action)) {\r\n return stopListening(action.payload);\r\n }\r\n var originalState = api.getState();\r\n var getOriginalState = function () {\r\n if (originalState === INTERNAL_NIL_TOKEN) {\r\n throw new Error(alm + \": getOriginalState can only be called synchronously\");\r\n }\r\n return originalState;\r\n };\r\n var result;\r\n try {\r\n result = next(action);\r\n if (listenerMap.size > 0) {\r\n var currentState = api.getState();\r\n var listenerEntries = Array.from(listenerMap.values());\r\n for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {\r\n var entry = listenerEntries_1[_i];\r\n var runListener = false;\r\n try {\r\n runListener = entry.predicate(action, currentState, originalState);\r\n }\r\n catch (predicateError) {\r\n runListener = false;\r\n safelyNotifyError(onError, predicateError, {\r\n raisedBy: \"predicate\"\r\n });\r\n }\r\n if (!runListener) {\r\n continue;\r\n }\r\n notifyListener(entry, action, api, getOriginalState);\r\n }\r\n }\r\n }\r\n finally {\r\n originalState = INTERNAL_NIL_TOKEN;\r\n }\r\n return result;\r\n }; }; };\r\n return {\r\n middleware: middleware,\r\n startListening: startListening,\r\n stopListening: stopListening,\r\n clearListeners: clearListenerMiddleware\r\n };\r\n}\r\n// src/autoBatchEnhancer.ts\r\nvar SHOULD_AUTOBATCH = \"RTK_autoBatch\";\r\nvar prepareAutoBatched = function () { return function (payload) {\r\n var _c;\r\n return ({\r\n payload: payload,\r\n meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c)\r\n });\r\n}; };\r\nvar promise;\r\nvar queueMicrotaskShim = typeof queueMicrotask === \"function\" ? queueMicrotask.bind(typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () {\r\n throw err;\r\n}, 0); }); };\r\nvar createQueueWithTimer = function (timeout) {\r\n return function (notify) {\r\n setTimeout(notify, timeout);\r\n };\r\n};\r\nvar rAF = typeof window !== \"undefined\" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10);\r\nvar autoBatchEnhancer = function (options) {\r\n if (options === void 0) { options = { type: \"raf\" }; }\r\n return function (next) { return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var store = next.apply(void 0, args);\r\n var notifying = true;\r\n var shouldNotifyAtEndOfTick = false;\r\n var notificationQueued = false;\r\n var listeners = new Set();\r\n var queueCallback = options.type === \"tick\" ? queueMicrotaskShim : options.type === \"raf\" ? rAF : options.type === \"callback\" ? options.queueNotification : createQueueWithTimer(options.timeout);\r\n var notifyListeners = function () {\r\n notificationQueued = false;\r\n if (shouldNotifyAtEndOfTick) {\r\n shouldNotifyAtEndOfTick = false;\r\n listeners.forEach(function (l) { return l(); });\r\n }\r\n };\r\n return Object.assign({}, store, {\r\n subscribe: function (listener2) {\r\n var wrappedListener = function () { return notifying && listener2(); };\r\n var unsubscribe = store.subscribe(wrappedListener);\r\n listeners.add(listener2);\r\n return function () {\r\n unsubscribe();\r\n listeners.delete(listener2);\r\n };\r\n },\r\n dispatch: function (action) {\r\n var _a;\r\n try {\r\n notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]);\r\n shouldNotifyAtEndOfTick = !notifying;\r\n if (shouldNotifyAtEndOfTick) {\r\n if (!notificationQueued) {\r\n notificationQueued = true;\r\n queueCallback(notifyListeners);\r\n }\r\n }\r\n return store.dispatch(action);\r\n }\r\n finally {\r\n notifying = true;\r\n }\r\n }\r\n });\r\n }; };\r\n};\r\n// src/index.ts\r\nenableES5();\r\nexport { EnhancerArray, MiddlewareArray, SHOULD_AUTOBATCH, TaskAbortError, addListener, autoBatchEnhancer, clearAllListeners, configureStore, createAction, createActionCreatorInvariantMiddleware, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, createListenerMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAction, isActionCreator, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFSA as isFluxStandardAction, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, prepareAutoBatched, removeListener, unwrapResult };\r\n//# sourceMappingURL=redux-toolkit.esm.js.map","export enum ApiResourceStatus {\n Stopped,\n Pending,\n Found,\n NotFound,\n ServerError,\n ClientError,\n}\n\nexport interface ApiError {\n code: number;\n message: string;\n errorName?: string;\n}\n\nexport const mapApiErrorToApiResourceStatus = (\n apiError?: ApiError\n): ApiResourceStatus => {\n if (!apiError?.code) {\n return ApiResourceStatus.ClientError;\n }\n if (apiError.code >= 500) {\n return ApiResourceStatus.ServerError;\n }\n if (apiError.code === 404) {\n return ApiResourceStatus.NotFound;\n }\n return ApiResourceStatus.ClientError;\n};\n\nexport type Slice = \"cart\" | \"pdp\";\nexport type Mode = \"cart\" | \"product\";\n\nexport type TopiEvent = \"cartCannotCheckout\";\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nexport const BASE_PATH = \"https://seller-api-sandbox.topi-sandbox.eu\".replace(/\\/+$/, \"\");\nexport class Configuration {\n constructor(configuration = {}) {\n this.configuration = configuration;\n }\n set config(configuration) {\n this.configuration = configuration;\n }\n get basePath() {\n return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;\n }\n get fetchApi() {\n return this.configuration.fetchApi;\n }\n get middleware() {\n return this.configuration.middleware || [];\n }\n get queryParamsStringify() {\n return this.configuration.queryParamsStringify || querystring;\n }\n get username() {\n return this.configuration.username;\n }\n get password() {\n return this.configuration.password;\n }\n get apiKey() {\n const apiKey = this.configuration.apiKey;\n if (apiKey) {\n return typeof apiKey === 'function' ? apiKey : () => apiKey;\n }\n return undefined;\n }\n get accessToken() {\n const accessToken = this.configuration.accessToken;\n if (accessToken) {\n return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });\n }\n return undefined;\n }\n get headers() {\n return this.configuration.headers;\n }\n get credentials() {\n return this.configuration.credentials;\n }\n}\nexport const DefaultConfig = new Configuration();\n/**\n * This is the base class for all generated API classes.\n */\nexport class BaseAPI {\n constructor(configuration = DefaultConfig) {\n this.configuration = configuration;\n this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {\n let fetchParams = { url, init };\n for (const middleware of this.middleware) {\n if (middleware.pre) {\n fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;\n }\n }\n let response = undefined;\n try {\n response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);\n }\n catch (e) {\n for (const middleware of this.middleware) {\n if (middleware.onError) {\n response = (yield middleware.onError({\n fetch: this.fetchApi,\n url: fetchParams.url,\n init: fetchParams.init,\n error: e,\n response: response ? response.clone() : undefined,\n })) || response;\n }\n }\n if (response === undefined) {\n if (e instanceof Error) {\n throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');\n }\n else {\n throw e;\n }\n }\n }\n for (const middleware of this.middleware) {\n if (middleware.post) {\n response = (yield middleware.post({\n fetch: this.fetchApi,\n url: fetchParams.url,\n init: fetchParams.init,\n response: response.clone(),\n })) || response;\n }\n }\n return response;\n });\n this.middleware = configuration.middleware;\n }\n withMiddleware(...middlewares) {\n const next = this.clone();\n next.middleware = next.middleware.concat(...middlewares);\n return next;\n }\n withPreMiddleware(...preMiddlewares) {\n const middlewares = preMiddlewares.map((pre) => ({ pre }));\n return this.withMiddleware(...middlewares);\n }\n withPostMiddleware(...postMiddlewares) {\n const middlewares = postMiddlewares.map((post) => ({ post }));\n return this.withMiddleware(...middlewares);\n }\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n isJsonMime(mime) {\n if (!mime) {\n return false;\n }\n return BaseAPI.jsonRegex.test(mime);\n }\n request(context, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const { url, init } = yield this.createFetchParams(context, initOverrides);\n const response = yield this.fetchApi(url, init);\n if (response && (response.status >= 200 && response.status < 300)) {\n return response;\n }\n throw new ResponseError(response, 'Response returned an error code');\n });\n }\n createFetchParams(context, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n let url = this.configuration.basePath + context.path;\n if (context.query !== undefined && Object.keys(context.query).length !== 0) {\n // only add the querystring to the URL if there are query parameters.\n // this is done to avoid urls ending with a \"?\" character which buggy webservers\n // do not handle correctly sometimes.\n url += '?' + this.configuration.queryParamsStringify(context.query);\n }\n const headers = Object.assign({}, this.configuration.headers, context.headers);\n Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});\n const initOverrideFn = typeof initOverrides === \"function\"\n ? initOverrides\n : () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });\n const initParams = {\n method: context.method,\n headers,\n body: context.body,\n credentials: this.configuration.credentials,\n };\n const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({\n init: initParams,\n context,\n })));\n let body;\n if (isFormData(overriddenInit.body)\n || (overriddenInit.body instanceof URLSearchParams)\n || isBlob(overriddenInit.body)) {\n body = overriddenInit.body;\n }\n else if (this.isJsonMime(headers['Content-Type'])) {\n body = JSON.stringify(overriddenInit.body);\n }\n else {\n body = overriddenInit.body;\n }\n const init = Object.assign(Object.assign({}, overriddenInit), { body });\n return { url, init };\n });\n }\n /**\n * Create a shallow clone of `this` by constructing a new instance\n * and then shallow cloning data members.\n */\n clone() {\n const constructor = this.constructor;\n const next = new constructor(this.configuration);\n next.middleware = this.middleware.slice();\n return next;\n }\n}\nBaseAPI.jsonRegex = new RegExp('^(:?application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(:?;.*)?$', 'i');\n;\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\nfunction isFormData(value) {\n return typeof FormData !== \"undefined\" && value instanceof FormData;\n}\nexport class ResponseError extends Error {\n constructor(response, msg) {\n super(msg);\n this.response = response;\n this.name = \"ResponseError\";\n }\n}\nexport class FetchError extends Error {\n constructor(cause, msg) {\n super(msg);\n this.cause = cause;\n this.name = \"FetchError\";\n }\n}\nexport class RequiredError extends Error {\n constructor(field, msg) {\n super(msg);\n this.field = field;\n this.name = \"RequiredError\";\n }\n}\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\nexport function querystring(params, prefix = '') {\n return Object.keys(params)\n .map(key => querystringSingleKey(key, params[key], prefix))\n .filter(part => part.length > 0)\n .join('&');\n}\nfunction querystringSingleKey(key, value, keyPrefix = '') {\n const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);\n if (value instanceof Array) {\n const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))\n .join(`&${encodeURIComponent(fullKey)}=`);\n return `${encodeURIComponent(fullKey)}=${multiValue}`;\n }\n if (value instanceof Set) {\n const valueAsArray = Array.from(value);\n return querystringSingleKey(key, valueAsArray, keyPrefix);\n }\n if (value instanceof Date) {\n return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;\n }\n if (value instanceof Object) {\n return querystring(value, fullKey);\n }\n return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;\n}\nexport function exists(json, key) {\n const value = json[key];\n return value !== null && value !== undefined;\n}\nexport function mapValues(data, fn) {\n const result = {};\n for (const key of Object.keys(data)) {\n result[key] = fn(data[key]);\n }\n return result;\n}\nexport function canConsumeForm(consumes) {\n for (const consume of consumes) {\n if ('multipart/form-data' === consume.contentType) {\n return true;\n }\n }\n return false;\n}\nexport class JSONApiResponse {\n constructor(raw, transformer = (jsonValue) => jsonValue) {\n this.raw = raw;\n this.transformer = transformer;\n }\n value() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.transformer(yield this.raw.json());\n });\n }\n}\nexport class VoidApiResponse {\n constructor(raw) {\n this.raw = raw;\n }\n value() {\n return __awaiter(this, void 0, void 0, function* () {\n return undefined;\n });\n }\n}\nexport class BlobApiResponse {\n constructor(raw) {\n this.raw = raw;\n }\n value() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.raw.blob();\n });\n }\n ;\n}\nexport class TextApiResponse {\n constructor(raw) {\n this.raw = raw;\n }\n value() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.raw.text();\n });\n }\n ;\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the MoneyAmountWithOptionalGross interface.\n */\nexport function instanceOfMoneyAmountWithOptionalGross(value) {\n if (!('currency' in value) || value['currency'] === undefined)\n return false;\n if (!('net' in value) || value['net'] === undefined)\n return false;\n return true;\n}\nexport function MoneyAmountWithOptionalGrossFromJSON(json) {\n return MoneyAmountWithOptionalGrossFromJSONTyped(json, false);\n}\nexport function MoneyAmountWithOptionalGrossFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'currency': json['currency'],\n 'gross': json['gross'] == null ? undefined : json['gross'],\n 'net': json['net'],\n };\n}\nexport function MoneyAmountWithOptionalGrossToJSON(json) {\n return MoneyAmountWithOptionalGrossToJSONTyped(json, false);\n}\nexport function MoneyAmountWithOptionalGrossToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'currency': value['currency'],\n 'gross': value['gross'],\n 'net': value['net'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ProductStandardIdentifier interface.\n */\nexport function instanceOfProductStandardIdentifier(value) {\n return true;\n}\nexport function ProductStandardIdentifierFromJSON(json) {\n return ProductStandardIdentifierFromJSONTyped(json, false);\n}\nexport function ProductStandardIdentifierFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'id': json['id'] == null ? undefined : json['id'],\n 'identifierType': json['identifier_type'] == null ? undefined : json['identifier_type'],\n };\n}\nexport function ProductStandardIdentifierToJSON(json) {\n return ProductStandardIdentifierToJSONTyped(json, false);\n}\nexport function ProductStandardIdentifierToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'id': value['id'],\n 'identifier_type': value['identifierType'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithOptionalGrossFromJSON, MoneyAmountWithOptionalGrossToJSON, } from './MoneyAmountWithOptionalGross';\n/**\n * Check if a given object implements the CategorisationIdentifiers interface.\n */\nexport function instanceOfCategorisationIdentifiers(value) {\n if (!('category' in value) || value['category'] === undefined)\n return false;\n if (!('manufacturer' in value) || value['manufacturer'] === undefined)\n return false;\n if (!('price' in value) || value['price'] === undefined)\n return false;\n return true;\n}\nexport function CategorisationIdentifiersFromJSON(json) {\n return CategorisationIdentifiersFromJSONTyped(json, false);\n}\nexport function CategorisationIdentifiersFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'category': json['category'],\n 'device': json['device'] == null ? undefined : json['device'],\n 'manufacturer': json['manufacturer'],\n 'price': MoneyAmountWithOptionalGrossFromJSON(json['price']),\n };\n}\nexport function CategorisationIdentifiersToJSON(json) {\n return CategorisationIdentifiersToJSONTyped(json, false);\n}\nexport function CategorisationIdentifiersToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'category': value['category'],\n 'device': value['device'],\n 'manufacturer': value['manufacturer'],\n 'price': MoneyAmountWithOptionalGrossToJSON(value['price']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithOptionalGrossFromJSON, MoneyAmountWithOptionalGrossToJSON, } from './MoneyAmountWithOptionalGross';\nimport { ProductStandardIdentifierFromJSON, ProductStandardIdentifierToJSON, } from './ProductStandardIdentifier';\nimport { CategorisationIdentifiersFromJSON, CategorisationIdentifiersToJSON, } from './CategorisationIdentifiers';\n/**\n * Check if a given object implements the CustomProduct interface.\n */\nexport function instanceOfCustomProduct(value) {\n if (!('categorisationIdentifiers' in value) || value['categorisationIdentifiers'] === undefined)\n return false;\n if (!('description' in value) || value['description'] === undefined)\n return false;\n if (!('manufacturer' in value) || value['manufacturer'] === undefined)\n return false;\n if (!('price' in value) || value['price'] === undefined)\n return false;\n if (!('reference' in value) || value['reference'] === undefined)\n return false;\n if (!('title' in value) || value['title'] === undefined)\n return false;\n return true;\n}\nexport function CustomProductFromJSON(json) {\n return CustomProductFromJSONTyped(json, false);\n}\nexport function CustomProductFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'categorisationIdentifiers': CategorisationIdentifiersFromJSON(json['CategorisationIdentifiers']),\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountWithOptionalGrossFromJSON(json['base_rental_price']),\n 'description': json['description'],\n 'manufacturer': json['manufacturer'],\n 'price': MoneyAmountWithOptionalGrossFromJSON(json['price']),\n 'productStandardIdentifiers': json['product_standard_identifiers'] == null ? undefined : (json['product_standard_identifiers'].map(ProductStandardIdentifierFromJSON)),\n 'reference': json['reference'],\n 'title': json['title'],\n };\n}\nexport function CustomProductToJSON(json) {\n return CustomProductToJSONTyped(json, false);\n}\nexport function CustomProductToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'CategorisationIdentifiers': CategorisationIdentifiersToJSON(value['categorisationIdentifiers']),\n 'base_rental_price': MoneyAmountWithOptionalGrossToJSON(value['baseRentalPrice']),\n 'description': value['description'],\n 'manufacturer': value['manufacturer'],\n 'price': MoneyAmountWithOptionalGrossToJSON(value['price']),\n 'product_standard_identifiers': value['productStandardIdentifiers'] == null ? undefined : (value['productStandardIdentifiers'].map(ProductStandardIdentifierToJSON)),\n 'reference': value['reference'],\n 'title': value['title'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { CustomProductFromJSON, CustomProductToJSON, } from './CustomProduct';\n/**\n * Check if a given object implements the AddCustomProductRequestBody interface.\n */\nexport function instanceOfAddCustomProductRequestBody(value) {\n if (!('product' in value) || value['product'] === undefined)\n return false;\n return true;\n}\nexport function AddCustomProductRequestBodyFromJSON(json) {\n return AddCustomProductRequestBodyFromJSONTyped(json, false);\n}\nexport function AddCustomProductRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'product': CustomProductFromJSON(json['product']),\n };\n}\nexport function AddCustomProductRequestBodyToJSON(json) {\n return AddCustomProductRequestBodyToJSONTyped(json, false);\n}\nexport function AddCustomProductRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'product': CustomProductToJSON(value['product']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the SellerProductReference interface.\n */\nexport function instanceOfSellerProductReference(value) {\n if (!('reference' in value) || value['reference'] === undefined)\n return false;\n if (!('source' in value) || value['source'] === undefined)\n return false;\n return true;\n}\nexport function SellerProductReferenceFromJSON(json) {\n return SellerProductReferenceFromJSONTyped(json, false);\n}\nexport function SellerProductReferenceFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'reference': json['reference'],\n 'source': json['source'],\n };\n}\nexport function SellerProductReferenceToJSON(json) {\n return SellerProductReferenceToJSONTyped(json, false);\n}\nexport function SellerProductReferenceToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'reference': value['reference'],\n 'source': value['source'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ProductSellerCategory interface.\n */\nexport function instanceOfProductSellerCategory(value) {\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('name' in value) || value['name'] === undefined)\n return false;\n return true;\n}\nexport function ProductSellerCategoryFromJSON(json) {\n return ProductSellerCategoryFromJSONTyped(json, false);\n}\nexport function ProductSellerCategoryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'id': json['id'],\n 'name': json['name'],\n 'parentCategoryId': json['parent_category_id'] == null ? undefined : json['parent_category_id'],\n };\n}\nexport function ProductSellerCategoryToJSON(json) {\n return ProductSellerCategoryToJSONTyped(json, false);\n}\nexport function ProductSellerCategoryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'id': value['id'],\n 'name': value['name'],\n 'parent_category_id': value['parentCategoryId'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ProductImage interface.\n */\nexport function instanceOfProductImage(value) {\n return true;\n}\nexport function ProductImageFromJSON(json) {\n return ProductImageFromJSONTyped(json, false);\n}\nexport function ProductImageFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'url': json['url'] == null ? undefined : json['url'],\n };\n}\nexport function ProductImageToJSON(json) {\n return ProductImageToJSONTyped(json, false);\n}\nexport function ProductImageToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'url': value['url'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ExtraProductDetails interface.\n */\nexport function instanceOfExtraProductDetails(value) {\n if (!('property' in value) || value['property'] === undefined)\n return false;\n if (!('value' in value) || value['value'] === undefined)\n return false;\n return true;\n}\nexport function ExtraProductDetailsFromJSON(json) {\n return ExtraProductDetailsFromJSONTyped(json, false);\n}\nexport function ExtraProductDetailsFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'property': json['property'],\n 'value': json['value'],\n };\n}\nexport function ExtraProductDetailsToJSON(json) {\n return ExtraProductDetailsToJSONTyped(json, false);\n}\nexport function ExtraProductDetailsToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'property': value['property'],\n 'value': value['value'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the MoneyAmountWithOptionalTax interface.\n */\nexport function instanceOfMoneyAmountWithOptionalTax(value) {\n if (!('currency' in value) || value['currency'] === undefined)\n return false;\n if (!('gross' in value) || value['gross'] === undefined)\n return false;\n if (!('net' in value) || value['net'] === undefined)\n return false;\n return true;\n}\nexport function MoneyAmountWithOptionalTaxFromJSON(json) {\n return MoneyAmountWithOptionalTaxFromJSONTyped(json, false);\n}\nexport function MoneyAmountWithOptionalTaxFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'currency': json['currency'],\n 'gross': json['gross'],\n 'net': json['net'],\n 'taxRate': json['tax_rate'] == null ? undefined : json['tax_rate'],\n };\n}\nexport function MoneyAmountWithOptionalTaxToJSON(json) {\n return MoneyAmountWithOptionalTaxToJSONTyped(json, false);\n}\nexport function MoneyAmountWithOptionalTaxToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'currency': value['currency'],\n 'gross': value['gross'],\n 'net': value['net'],\n 'tax_rate': value['taxRate'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the MoneyAmount interface.\n */\nexport function instanceOfMoneyAmount(value) {\n if (!('currency' in value) || value['currency'] === undefined)\n return false;\n if (!('gross' in value) || value['gross'] === undefined)\n return false;\n if (!('net' in value) || value['net'] === undefined)\n return false;\n return true;\n}\nexport function MoneyAmountFromJSON(json) {\n return MoneyAmountFromJSONTyped(json, false);\n}\nexport function MoneyAmountFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'currency': json['currency'],\n 'gross': json['gross'],\n 'net': json['net'],\n };\n}\nexport function MoneyAmountToJSON(json) {\n return MoneyAmountToJSONTyped(json, false);\n}\nexport function MoneyAmountToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'currency': value['currency'],\n 'gross': value['gross'],\n 'net': value['net'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { ProductSellerCategoryFromJSON, ProductSellerCategoryToJSON, } from './ProductSellerCategory';\nimport { ProductStandardIdentifierFromJSON, ProductStandardIdentifierToJSON, } from './ProductStandardIdentifier';\nimport { ProductImageFromJSON, ProductImageToJSON, } from './ProductImage';\nimport { ExtraProductDetailsFromJSON, ExtraProductDetailsToJSON, } from './ExtraProductDetails';\nimport { MoneyAmountWithOptionalTaxFromJSON, MoneyAmountWithOptionalTaxToJSON, } from './MoneyAmountWithOptionalTax';\nimport { MoneyAmountFromJSON, MoneyAmountToJSON, } from './MoneyAmount';\n/**\n * @export\n */\nexport const AddProductSellerProductTypeEnum = {\n Hardware: 'hardware',\n Software: 'software',\n Service: 'service',\n HardwareBuiltToOrder: 'hardware_built_to_order'\n};\n/**\n * Check if a given object implements the AddProduct interface.\n */\nexport function instanceOfAddProduct(value) {\n if (!('isActive' in value) || value['isActive'] === undefined)\n return false;\n if (!('price' in value) || value['price'] === undefined)\n return false;\n if (!('sellerProductReferences' in value) || value['sellerProductReferences'] === undefined)\n return false;\n if (!('title' in value) || value['title'] === undefined)\n return false;\n return true;\n}\nexport function AddProductFromJSON(json) {\n return AddProductFromJSONTyped(json, false);\n}\nexport function AddProductFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountFromJSON(json['base_rental_price']),\n 'description': json['description'] == null ? undefined : json['description'],\n 'extraDetails': json['extra_details'] == null ? undefined : (json['extra_details'].map(ExtraProductDetailsFromJSON)),\n 'image': json['image'] == null ? undefined : ProductImageFromJSON(json['image']),\n 'isActive': json['is_active'],\n 'manufacturer': json['manufacturer'] == null ? undefined : json['manufacturer'],\n 'price': MoneyAmountWithOptionalTaxFromJSON(json['price']),\n 'productStandardIdentifiers': json['product_standard_identifiers'] == null ? undefined : (json['product_standard_identifiers'].map(ProductStandardIdentifierFromJSON)),\n 'sellerCategories': json['seller_categories'] == null ? undefined : (json['seller_categories'].map(ProductSellerCategoryFromJSON)),\n 'sellerProductReferences': (json['seller_product_references'].map(SellerProductReferenceFromJSON)),\n 'sellerProductType': json['seller_product_type'] == null ? undefined : json['seller_product_type'],\n 'shopProductDescriptionUrl': json['shop_product_description_url'] == null ? undefined : json['shop_product_description_url'],\n 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'],\n 'title': json['title'],\n };\n}\nexport function AddProductToJSON(json) {\n return AddProductToJSONTyped(json, false);\n}\nexport function AddProductToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'base_rental_price': MoneyAmountToJSON(value['baseRentalPrice']),\n 'description': value['description'],\n 'extra_details': value['extraDetails'] == null ? undefined : (value['extraDetails'].map(ExtraProductDetailsToJSON)),\n 'image': ProductImageToJSON(value['image']),\n 'is_active': value['isActive'],\n 'manufacturer': value['manufacturer'],\n 'price': MoneyAmountWithOptionalTaxToJSON(value['price']),\n 'product_standard_identifiers': value['productStandardIdentifiers'] == null ? undefined : (value['productStandardIdentifiers'].map(ProductStandardIdentifierToJSON)),\n 'seller_categories': value['sellerCategories'] == null ? undefined : (value['sellerCategories'].map(ProductSellerCategoryToJSON)),\n 'seller_product_references': (value['sellerProductReferences'].map(SellerProductReferenceToJSON)),\n 'seller_product_type': value['sellerProductType'],\n 'shop_product_description_url': value['shopProductDescriptionUrl'],\n 'subtitle': value['subtitle'],\n 'title': value['title'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the MoneyAmountWithRequiredTax interface.\n */\nexport function instanceOfMoneyAmountWithRequiredTax(value) {\n if (!('currency' in value) || value['currency'] === undefined)\n return false;\n if (!('gross' in value) || value['gross'] === undefined)\n return false;\n if (!('net' in value) || value['net'] === undefined)\n return false;\n if (!('taxRate' in value) || value['taxRate'] === undefined)\n return false;\n return true;\n}\nexport function MoneyAmountWithRequiredTaxFromJSON(json) {\n return MoneyAmountWithRequiredTaxFromJSONTyped(json, false);\n}\nexport function MoneyAmountWithRequiredTaxFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'currency': json['currency'],\n 'gross': json['gross'],\n 'net': json['net'],\n 'taxRate': json['tax_rate'],\n };\n}\nexport function MoneyAmountWithRequiredTaxToJSON(json) {\n return MoneyAmountWithRequiredTaxToJSONTyped(json, false);\n}\nexport function MoneyAmountWithRequiredTaxToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'currency': value['currency'],\n 'gross': value['gross'],\n 'net': value['net'],\n 'tax_rate': value['taxRate'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithRequiredTaxFromJSON, MoneyAmountWithRequiredTaxToJSON, } from './MoneyAmountWithRequiredTax';\n/**\n * Check if a given object implements the PayNowContractTerm interface.\n */\nexport function instanceOfPayNowContractTerm(value) {\n if (!('amount' in value) || value['amount'] === undefined)\n return false;\n return true;\n}\nexport function PayNowContractTermFromJSON(json) {\n return PayNowContractTermFromJSONTyped(json, false);\n}\nexport function PayNowContractTermFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'amount': MoneyAmountWithRequiredTaxFromJSON(json['amount']),\n 'id': json['id'] == null ? undefined : json['id'],\n };\n}\nexport function PayNowContractTermToJSON(json) {\n return PayNowContractTermToJSONTyped(json, false);\n}\nexport function PayNowContractTermToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'amount': MoneyAmountWithRequiredTaxToJSON(value['amount']),\n 'id': value['id'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithRequiredTaxFromJSON, MoneyAmountWithRequiredTaxToJSON, } from './MoneyAmountWithRequiredTax';\n/**\n * @export\n */\nexport const RentContractTermDurationEnum = {\n NUMBER_6: 6,\n NUMBER_12: 12,\n NUMBER_24: 24,\n NUMBER_36: 36,\n NUMBER_48: 48\n};\n/**\n * Check if a given object implements the RentContractTerm interface.\n */\nexport function instanceOfRentContractTerm(value) {\n if (!('duration' in value) || value['duration'] === undefined)\n return false;\n if (!('monthlyAmount' in value) || value['monthlyAmount'] === undefined)\n return false;\n return true;\n}\nexport function RentContractTermFromJSON(json) {\n return RentContractTermFromJSONTyped(json, false);\n}\nexport function RentContractTermFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'duration': json['duration'],\n 'id': json['id'] == null ? undefined : json['id'],\n 'monthlyAmount': MoneyAmountWithRequiredTaxFromJSON(json['monthly_amount']),\n };\n}\nexport function RentContractTermToJSON(json) {\n return RentContractTermToJSONTyped(json, false);\n}\nexport function RentContractTermToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'duration': value['duration'],\n 'id': value['id'],\n 'monthly_amount': MoneyAmountWithRequiredTaxToJSON(value['monthlyAmount']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { PayNowContractTermFromJSON, PayNowContractTermToJSON, } from './PayNowContractTerm';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * @export\n */\nexport const BaseBasketPriceSummaryAvailableContractTypesEnum = {\n PayNow: 'pay_now',\n Rent: 'rent'\n};\n/**\n * Check if a given object implements the BaseBasketPriceSummary interface.\n */\nexport function instanceOfBaseBasketPriceSummary(value) {\n if (!('availableContractTypes' in value) || value['availableContractTypes'] === undefined)\n return false;\n if (!('defaultTenure' in value) || value['defaultTenure'] === undefined)\n return false;\n if (!('isSupported' in value) || value['isSupported'] === undefined)\n return false;\n if (!('summary' in value) || value['summary'] === undefined)\n return false;\n return true;\n}\nexport function BaseBasketPriceSummaryFromJSON(json) {\n return BaseBasketPriceSummaryFromJSONTyped(json, false);\n}\nexport function BaseBasketPriceSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableContractTypes': json['available_contract_types'],\n 'defaultTenure': json['default_tenure'],\n 'identifier': json['identifier'] == null ? undefined : json['identifier'],\n 'isSupported': json['is_supported'],\n 'payNow': json['pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['pay_now']),\n 'rent': json['rent'] == null ? undefined : (json['rent'].map(RentContractTermFromJSON)),\n 'summary': json['summary'],\n 'totalPayNow': json['total_pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['total_pay_now']),\n 'totalRent': json['total_rent'] == null ? undefined : (json['total_rent'].map(RentContractTermFromJSON)),\n };\n}\nexport function BaseBasketPriceSummaryToJSON(json) {\n return BaseBasketPriceSummaryToJSONTyped(json, false);\n}\nexport function BaseBasketPriceSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_contract_types': value['availableContractTypes'],\n 'default_tenure': value['defaultTenure'],\n 'identifier': value['identifier'],\n 'is_supported': value['isSupported'],\n 'pay_now': PayNowContractTermToJSON(value['payNow']),\n 'rent': value['rent'] == null ? undefined : (value['rent'].map(RentContractTermToJSON)),\n 'summary': value['summary'],\n 'total_pay_now': PayNowContractTermToJSON(value['totalPayNow']),\n 'total_rent': value['totalRent'] == null ? undefined : (value['totalRent'].map(RentContractTermToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { PayNowContractTermFromJSON, PayNowContractTermToJSON, } from './PayNowContractTerm';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * @export\n */\nexport const BaseCalculatePriceSummaryAvailableContractTypesEnum = {\n PayNow: 'pay_now',\n Rent: 'rent'\n};\n/**\n * Check if a given object implements the BaseCalculatePriceSummary interface.\n */\nexport function instanceOfBaseCalculatePriceSummary(value) {\n if (!('availableContractTypes' in value) || value['availableContractTypes'] === undefined)\n return false;\n if (!('isSupported' in value) || value['isSupported'] === undefined)\n return false;\n if (!('summary' in value) || value['summary'] === undefined)\n return false;\n return true;\n}\nexport function BaseCalculatePriceSummaryFromJSON(json) {\n return BaseCalculatePriceSummaryFromJSONTyped(json, false);\n}\nexport function BaseCalculatePriceSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableContractTypes': json['available_contract_types'],\n 'isSupported': json['is_supported'],\n 'payNow': json['pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['pay_now']),\n 'rent': json['rent'] == null ? undefined : (json['rent'].map(RentContractTermFromJSON)),\n 'summary': json['summary'],\n };\n}\nexport function BaseCalculatePriceSummaryToJSON(json) {\n return BaseCalculatePriceSummaryToJSONTyped(json, false);\n}\nexport function BaseCalculatePriceSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_contract_types': value['availableContractTypes'],\n 'is_supported': value['isSupported'],\n 'pay_now': PayNowContractTermToJSON(value['payNow']),\n 'rent': value['rent'] == null ? undefined : (value['rent'].map(RentContractTermToJSON)),\n 'summary': value['summary'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { BaseBasketPriceSummaryFromJSON, BaseBasketPriceSummaryToJSON, } from './BaseBasketPriceSummary';\nimport { PayNowContractTermFromJSON, PayNowContractTermToJSON, } from './PayNowContractTerm';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * @export\n */\nexport const BasketPriceSummaryAvailableContractTypesEnum = {\n PayNow: 'pay_now',\n Rent: 'rent'\n};\n/**\n * Check if a given object implements the BasketPriceSummary interface.\n */\nexport function instanceOfBasketPriceSummary(value) {\n if (!('availableContractTypes' in value) || value['availableContractTypes'] === undefined)\n return false;\n if (!('defaultTenure' in value) || value['defaultTenure'] === undefined)\n return false;\n if (!('isSupported' in value) || value['isSupported'] === undefined)\n return false;\n if (!('summary' in value) || value['summary'] === undefined)\n return false;\n return true;\n}\nexport function BasketPriceSummaryFromJSON(json) {\n return BasketPriceSummaryFromJSONTyped(json, false);\n}\nexport function BasketPriceSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableContractTypes': json['available_contract_types'],\n 'defaultTenure': json['default_tenure'],\n 'identifier': json['identifier'] == null ? undefined : json['identifier'],\n 'isSupported': json['is_supported'],\n 'payNow': json['pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['pay_now']),\n 'payNowExcludingSublines': json['pay_now_excluding_sublines'] == null ? undefined : PayNowContractTermFromJSON(json['pay_now_excluding_sublines']),\n 'rent': json['rent'] == null ? undefined : (json['rent'].map(RentContractTermFromJSON)),\n 'rentExcludingSublines': json['rent_excluding_sublines'] == null ? undefined : (json['rent_excluding_sublines'].map(RentContractTermFromJSON)),\n 'sublines': json['sublines'] == null ? undefined : (json['sublines'].map(BaseBasketPriceSummaryFromJSON)),\n 'summary': json['summary'],\n 'totalPayNow': json['total_pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['total_pay_now']),\n 'totalRent': json['total_rent'] == null ? undefined : (json['total_rent'].map(RentContractTermFromJSON)),\n };\n}\nexport function BasketPriceSummaryToJSON(json) {\n return BasketPriceSummaryToJSONTyped(json, false);\n}\nexport function BasketPriceSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_contract_types': value['availableContractTypes'],\n 'default_tenure': value['defaultTenure'],\n 'identifier': value['identifier'],\n 'is_supported': value['isSupported'],\n 'pay_now': PayNowContractTermToJSON(value['payNow']),\n 'pay_now_excluding_sublines': PayNowContractTermToJSON(value['payNowExcludingSublines']),\n 'rent': value['rent'] == null ? undefined : (value['rent'].map(RentContractTermToJSON)),\n 'rent_excluding_sublines': value['rentExcludingSublines'] == null ? undefined : (value['rentExcludingSublines'].map(RentContractTermToJSON)),\n 'sublines': value['sublines'] == null ? undefined : (value['sublines'].map(BaseBasketPriceSummaryToJSON)),\n 'summary': value['summary'],\n 'total_pay_now': PayNowContractTermToJSON(value['totalPayNow']),\n 'total_rent': value['totalRent'] == null ? undefined : (value['totalRent'].map(RentContractTermToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { MoneyAmountWithOptionalTaxFromJSON, MoneyAmountWithOptionalTaxToJSON, } from './MoneyAmountWithOptionalTax';\n/**\n * Check if a given object implements the PricingRequest interface.\n */\nexport function instanceOfPricingRequest(value) {\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function PricingRequestFromJSON(json) {\n return PricingRequestFromJSONTyped(json, false);\n}\nexport function PricingRequestFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['base_rental_price']),\n 'price': json['price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['price']),\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n };\n}\nexport function PricingRequestToJSON(json) {\n return PricingRequestToJSONTyped(json, false);\n}\nexport function PricingRequestToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'base_rental_price': MoneyAmountWithOptionalTaxToJSON(value['baseRentalPrice']),\n 'price': MoneyAmountWithOptionalTaxToJSON(value['price']),\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { PricingRequestFromJSON, PricingRequestToJSON, } from './PricingRequest';\nimport { MoneyAmountWithOptionalTaxFromJSON, MoneyAmountWithOptionalTaxToJSON, } from './MoneyAmountWithOptionalTax';\n/**\n * Check if a given object implements the BasketPricingRequest interface.\n */\nexport function instanceOfBasketPricingRequest(value) {\n if (!('quantity' in value) || value['quantity'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function BasketPricingRequestFromJSON(json) {\n return BasketPricingRequestFromJSONTyped(json, false);\n}\nexport function BasketPricingRequestFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['base_rental_price']),\n 'identifier': json['identifier'] == null ? undefined : json['identifier'],\n 'price': json['price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['price']),\n 'quantity': json['quantity'],\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n 'sublines': json['sublines'] == null ? undefined : (json['sublines'].map(PricingRequestFromJSON)),\n };\n}\nexport function BasketPricingRequestToJSON(json) {\n return BasketPricingRequestToJSONTyped(json, false);\n}\nexport function BasketPricingRequestToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'base_rental_price': MoneyAmountWithOptionalTaxToJSON(value['baseRentalPrice']),\n 'identifier': value['identifier'],\n 'price': MoneyAmountWithOptionalTaxToJSON(value['price']),\n 'quantity': value['quantity'],\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n 'sublines': value['sublines'] == null ? undefined : (value['sublines'].map(PricingRequestToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { BasketPricingRequestFromJSON, BasketPricingRequestToJSON, } from './BasketPricingRequest';\n/**\n * Check if a given object implements the CalculateBasketPricingRequestBody interface.\n */\nexport function instanceOfCalculateBasketPricingRequestBody(value) {\n if (!('pricingRequests' in value) || value['pricingRequests'] === undefined)\n return false;\n return true;\n}\nexport function CalculateBasketPricingRequestBodyFromJSON(json) {\n return CalculateBasketPricingRequestBodyFromJSONTyped(json, false);\n}\nexport function CalculateBasketPricingRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'pricingRequests': (json['pricing_requests'].map(BasketPricingRequestFromJSON)),\n };\n}\nexport function CalculateBasketPricingRequestBodyToJSON(json) {\n return CalculateBasketPricingRequestBodyToJSONTyped(json, false);\n}\nexport function CalculateBasketPricingRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'pricing_requests': (value['pricingRequests'].map(BasketPricingRequestToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithRequiredTaxFromJSON, MoneyAmountWithRequiredTaxToJSON, } from './MoneyAmountWithRequiredTax';\nimport { BasketPriceSummaryFromJSON, BasketPriceSummaryToJSON, } from './BasketPriceSummary';\n/**\n * Check if a given object implements the CalculateBasketPricingResponseBody interface.\n */\nexport function instanceOfCalculateBasketPricingResponseBody(value) {\n return true;\n}\nexport function CalculateBasketPricingResponseBodyFromJSON(json) {\n return CalculateBasketPricingResponseBodyFromJSONTyped(json, false);\n}\nexport function CalculateBasketPricingResponseBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'basketTotalPayNow': json['basket_total_pay_now'] == null ? undefined : MoneyAmountWithRequiredTaxFromJSON(json['basket_total_pay_now']),\n 'basketTotalRent': json['basket_total_rent'] == null ? undefined : MoneyAmountWithRequiredTaxFromJSON(json['basket_total_rent']),\n 'summaries': json['summaries'] == null ? undefined : (json['summaries'].map(BasketPriceSummaryFromJSON)),\n };\n}\nexport function CalculateBasketPricingResponseBodyToJSON(json) {\n return CalculateBasketPricingResponseBodyToJSONTyped(json, false);\n}\nexport function CalculateBasketPricingResponseBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'basket_total_pay_now': MoneyAmountWithRequiredTaxToJSON(value['basketTotalPayNow']),\n 'basket_total_rent': MoneyAmountWithRequiredTaxToJSON(value['basketTotalRent']),\n 'summaries': value['summaries'] == null ? undefined : (value['summaries'].map(BasketPriceSummaryToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { BaseCalculatePriceSummaryFromJSON, BaseCalculatePriceSummaryToJSON, } from './BaseCalculatePriceSummary';\nimport { PayNowContractTermFromJSON, PayNowContractTermToJSON, } from './PayNowContractTerm';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * @export\n */\nexport const CalculatePriceSummaryAvailableContractTypesEnum = {\n PayNow: 'pay_now',\n Rent: 'rent'\n};\n/**\n * Check if a given object implements the CalculatePriceSummary interface.\n */\nexport function instanceOfCalculatePriceSummary(value) {\n if (!('availableContractTypes' in value) || value['availableContractTypes'] === undefined)\n return false;\n if (!('isSupported' in value) || value['isSupported'] === undefined)\n return false;\n if (!('summary' in value) || value['summary'] === undefined)\n return false;\n return true;\n}\nexport function CalculatePriceSummaryFromJSON(json) {\n return CalculatePriceSummaryFromJSONTyped(json, false);\n}\nexport function CalculatePriceSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableContractTypes': json['available_contract_types'],\n 'isSupported': json['is_supported'],\n 'payNow': json['pay_now'] == null ? undefined : PayNowContractTermFromJSON(json['pay_now']),\n 'rent': json['rent'] == null ? undefined : (json['rent'].map(RentContractTermFromJSON)),\n 'sublines': json['sublines'] == null ? undefined : (json['sublines'].map(BaseCalculatePriceSummaryFromJSON)),\n 'summary': json['summary'],\n };\n}\nexport function CalculatePriceSummaryToJSON(json) {\n return CalculatePriceSummaryToJSONTyped(json, false);\n}\nexport function CalculatePriceSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_contract_types': value['availableContractTypes'],\n 'is_supported': value['isSupported'],\n 'pay_now': PayNowContractTermToJSON(value['payNow']),\n 'rent': value['rent'] == null ? undefined : (value['rent'].map(RentContractTermToJSON)),\n 'sublines': value['sublines'] == null ? undefined : (value['sublines'].map(BaseCalculatePriceSummaryToJSON)),\n 'summary': value['summary'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { PricingRequestFromJSON, PricingRequestToJSON, } from './PricingRequest';\n/**\n * Check if a given object implements the CalculatePricingRequestBody interface.\n */\nexport function instanceOfCalculatePricingRequestBody(value) {\n if (!('pricingRequest' in value) || value['pricingRequest'] === undefined)\n return false;\n return true;\n}\nexport function CalculatePricingRequestBodyFromJSON(json) {\n return CalculatePricingRequestBodyFromJSONTyped(json, false);\n}\nexport function CalculatePricingRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'pricingRequest': PricingRequestFromJSON(json['pricing_request']),\n };\n}\nexport function CalculatePricingRequestBodyToJSON(json) {\n return CalculatePricingRequestBodyToJSONTyped(json, false);\n}\nexport function CalculatePricingRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'pricing_request': PricingRequestToJSON(value['pricingRequest']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * Check if a given object implements the CartProductRentalOverview interface.\n */\nexport function instanceOfCartProductRentalOverview(value) {\n if (!('hasRentalTerms' in value) || value['hasRentalTerms'] === undefined)\n return false;\n if (!('quantity' in value) || value['quantity'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function CartProductRentalOverviewFromJSON(json) {\n return CartProductRentalOverviewFromJSONTyped(json, false);\n}\nexport function CartProductRentalOverviewFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableRentalTerms': json['available_rental_terms'] == null ? undefined : (json['available_rental_terms'].map(RentContractTermFromJSON)),\n 'canCheckout': json['can_checkout'] == null ? undefined : json['can_checkout'],\n 'currency': json['currency'] == null ? undefined : json['currency'],\n 'hasRentalTerms': json['has_rental_terms'],\n 'quantity': json['quantity'],\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n 'summary': json['summary'] == null ? undefined : json['summary'],\n 'totalRentalAmount': json['total_rental_amount'] == null ? undefined : json['total_rental_amount'],\n };\n}\nexport function CartProductRentalOverviewToJSON(json) {\n return CartProductRentalOverviewToJSONTyped(json, false);\n}\nexport function CartProductRentalOverviewToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_rental_terms': value['availableRentalTerms'] == null ? undefined : (value['availableRentalTerms'].map(RentContractTermToJSON)),\n 'can_checkout': value['canCheckout'],\n 'currency': value['currency'],\n 'has_rental_terms': value['hasRentalTerms'],\n 'quantity': value['quantity'],\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n 'summary': value['summary'],\n 'total_rental_amount': value['totalRentalAmount'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { MoneyAmountWithOptionalTaxFromJSON, MoneyAmountWithOptionalTaxToJSON, } from './MoneyAmountWithOptionalTax';\n/**\n * Check if a given object implements the RentalOverviewRequest interface.\n */\nexport function instanceOfRentalOverviewRequest(value) {\n if (!('quantity' in value) || value['quantity'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function RentalOverviewRequestFromJSON(json) {\n return RentalOverviewRequestFromJSONTyped(json, false);\n}\nexport function RentalOverviewRequestFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['base_rental_price']),\n 'price': json['price'] == null ? undefined : MoneyAmountWithOptionalTaxFromJSON(json['price']),\n 'quantity': json['quantity'],\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n };\n}\nexport function RentalOverviewRequestToJSON(json) {\n return RentalOverviewRequestToJSONTyped(json, false);\n}\nexport function RentalOverviewRequestToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'base_rental_price': MoneyAmountWithOptionalTaxToJSON(value['baseRentalPrice']),\n 'price': MoneyAmountWithOptionalTaxToJSON(value['price']),\n 'quantity': value['quantity'],\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { RentalOverviewRequestFromJSON, RentalOverviewRequestToJSON, } from './RentalOverviewRequest';\n/**\n * Check if a given object implements the CartRentalOverviewRequestBody interface.\n */\nexport function instanceOfCartRentalOverviewRequestBody(value) {\n if (!('products' in value) || value['products'] === undefined)\n return false;\n return true;\n}\nexport function CartRentalOverviewRequestBodyFromJSON(json) {\n return CartRentalOverviewRequestBodyFromJSONTyped(json, false);\n}\nexport function CartRentalOverviewRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'products': (json['products'].map(RentalOverviewRequestFromJSON)),\n };\n}\nexport function CartRentalOverviewRequestBodyToJSON(json) {\n return CartRentalOverviewRequestBodyToJSONTyped(json, false);\n}\nexport function CartRentalOverviewRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'products': (value['products'].map(RentalOverviewRequestToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { CartProductRentalOverviewFromJSON, CartProductRentalOverviewToJSON, } from './CartProductRentalOverview';\n/**\n * Check if a given object implements the CartRentalOverviewResult interface.\n */\nexport function instanceOfCartRentalOverviewResult(value) {\n return true;\n}\nexport function CartRentalOverviewResultFromJSON(json) {\n return CartRentalOverviewResultFromJSONTyped(json, false);\n}\nexport function CartRentalOverviewResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'canCheckout': json['can_checkout'] == null ? undefined : json['can_checkout'],\n 'currency': json['currency'] == null ? undefined : json['currency'],\n 'productPrices': json['product_prices'] == null ? undefined : (json['product_prices'].map(CartProductRentalOverviewFromJSON)),\n 'totalRentalAmount': json['total_rental_amount'] == null ? undefined : json['total_rental_amount'],\n 'totalRentalSummary': json['total_rental_summary'] == null ? undefined : json['total_rental_summary'],\n };\n}\nexport function CartRentalOverviewResultToJSON(json) {\n return CartRentalOverviewResultToJSONTyped(json, false);\n}\nexport function CartRentalOverviewResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'can_checkout': value['canCheckout'],\n 'currency': value['currency'],\n 'product_prices': value['productPrices'] == null ? undefined : (value['productPrices'].map(CartProductRentalOverviewToJSON)),\n 'total_rental_amount': value['totalRentalAmount'],\n 'total_rental_summary': value['totalRentalSummary'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the CatalogImportCategorization interface.\n */\nexport function instanceOfCatalogImportCategorization(value) {\n if (!('done' in value) || value['done'] === undefined)\n return false;\n if (!('pending' in value) || value['pending'] === undefined)\n return false;\n if (!('supported' in value) || value['supported'] === undefined)\n return false;\n if (!('toBeReviewed' in value) || value['toBeReviewed'] === undefined)\n return false;\n if (!('total' in value) || value['total'] === undefined)\n return false;\n if (!('unsupported' in value) || value['unsupported'] === undefined)\n return false;\n return true;\n}\nexport function CatalogImportCategorizationFromJSON(json) {\n return CatalogImportCategorizationFromJSONTyped(json, false);\n}\nexport function CatalogImportCategorizationFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'done': json['done'],\n 'pending': json['pending'],\n 'supported': json['supported'],\n 'toBeReviewed': json['to_be_reviewed'],\n 'total': json['total'],\n 'unsupported': json['unsupported'],\n };\n}\nexport function CatalogImportCategorizationToJSON(json) {\n return CatalogImportCategorizationToJSONTyped(json, false);\n}\nexport function CatalogImportCategorizationToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'done': value['done'],\n 'pending': value['pending'],\n 'supported': value['supported'],\n 'to_be_reviewed': value['toBeReviewed'],\n 'total': value['total'],\n 'unsupported': value['unsupported'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { CatalogImportCategorizationFromJSON, CatalogImportCategorizationToJSON, } from './CatalogImportCategorization';\n/**\n * @export\n */\nexport const CatalogImportJobStatusEnum = {\n Pending: 'pending',\n Queued: 'queued',\n Running: 'running',\n Ingested: 'ingested',\n Completed: 'completed',\n Failed: 'failed',\n Cancelled: 'cancelled'\n};\n/**\n * Check if a given object implements the CatalogImportJob interface.\n */\nexport function instanceOfCatalogImportJob(value) {\n if (!('createdAt' in value) || value['createdAt'] === undefined)\n return false;\n if (!('failed' in value) || value['failed'] === undefined)\n return false;\n if (!('filename' in value) || value['filename'] === undefined)\n return false;\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('objectPath' in value) || value['objectPath'] === undefined)\n return false;\n if (!('processed' in value) || value['processed'] === undefined)\n return false;\n if (!('status' in value) || value['status'] === undefined)\n return false;\n if (!('succeeded' in value) || value['succeeded'] === undefined)\n return false;\n if (!('updatedAt' in value) || value['updatedAt'] === undefined)\n return false;\n return true;\n}\nexport function CatalogImportJobFromJSON(json) {\n return CatalogImportJobFromJSONTyped(json, false);\n}\nexport function CatalogImportJobFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'categorization': json['categorization'] == null ? undefined : CatalogImportCategorizationFromJSON(json['categorization']),\n 'createdAt': (new Date(json['created_at'])),\n 'error': json['error'] == null ? undefined : json['error'],\n 'errorsUrl': json['errors_url'] == null ? undefined : json['errors_url'],\n 'failed': json['failed'],\n 'filename': json['filename'],\n 'id': json['id'],\n 'objectPath': json['object_path'],\n 'processed': json['processed'],\n 'status': json['status'],\n 'succeeded': json['succeeded'],\n 'updatedAt': (new Date(json['updated_at'])),\n };\n}\nexport function CatalogImportJobToJSON(json) {\n return CatalogImportJobToJSONTyped(json, false);\n}\nexport function CatalogImportJobToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'categorization': CatalogImportCategorizationToJSON(value['categorization']),\n 'created_at': ((value['createdAt']).toISOString()),\n 'error': value['error'],\n 'errors_url': value['errorsUrl'],\n 'failed': value['failed'],\n 'filename': value['filename'],\n 'id': value['id'],\n 'object_path': value['objectPath'],\n 'processed': value['processed'],\n 'status': value['status'],\n 'succeeded': value['succeeded'],\n 'updated_at': ((value['updatedAt']).toISOString()),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the CategorisationNode interface.\n */\nexport function instanceOfCategorisationNode(value) {\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('nodeType' in value) || value['nodeType'] === undefined)\n return false;\n return true;\n}\nexport function CategorisationNodeFromJSON(json) {\n return CategorisationNodeFromJSONTyped(json, false);\n}\nexport function CategorisationNodeFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'children': json['children'] == null ? undefined : (json['children'].map(CategorisationNodeFromJSON)),\n 'id': json['id'],\n 'label': json['label'] == null ? undefined : json['label'],\n 'nodeType': json['node_type'],\n 'parameter': json['parameter'] == null ? undefined : json['parameter'],\n 'threshold': json['threshold'] == null ? undefined : json['threshold'],\n 'value': json['value'] == null ? undefined : json['value'],\n };\n}\nexport function CategorisationNodeToJSON(json) {\n return CategorisationNodeToJSONTyped(json, false);\n}\nexport function CategorisationNodeToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'children': value['children'] == null ? undefined : (value['children'].map(CategorisationNodeToJSON)),\n 'id': value['id'],\n 'label': value['label'],\n 'node_type': value['nodeType'],\n 'parameter': value['parameter'],\n 'threshold': value['threshold'],\n 'value': value['value'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\n/**\n * Check if a given object implements the CheckSupportedRequestBody interface.\n */\nexport function instanceOfCheckSupportedRequestBody(value) {\n if (!('sellerProductReferences' in value) || value['sellerProductReferences'] === undefined)\n return false;\n return true;\n}\nexport function CheckSupportedRequestBodyFromJSON(json) {\n return CheckSupportedRequestBodyFromJSONTyped(json, false);\n}\nexport function CheckSupportedRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'sellerProductReferences': (json['seller_product_references'].map(SellerProductReferenceFromJSON)),\n };\n}\nexport function CheckSupportedRequestBodyToJSON(json) {\n return CheckSupportedRequestBodyToJSONTyped(json, false);\n}\nexport function CheckSupportedRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'seller_product_references': (value['sellerProductReferences'].map(SellerProductReferenceToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ProductRentContract interface.\n */\nexport function instanceOfProductRentContract(value) {\n if (!('duration' in value) || value['duration'] === undefined)\n return false;\n return true;\n}\nexport function ProductRentContractFromJSON(json) {\n return ProductRentContractFromJSONTyped(json, false);\n}\nexport function ProductRentContractFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'duration': json['duration'],\n };\n}\nexport function ProductRentContractToJSON(json) {\n return ProductRentContractToJSONTyped(json, false);\n}\nexport function ProductRentContractToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'duration': value['duration'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { ProductRentContractFromJSON, ProductRentContractToJSON, } from './ProductRentContract';\n/**\n * Check if a given object implements the ContractTermsSummary interface.\n */\nexport function instanceOfContractTermsSummary(value) {\n if (!('canPayNow' in value) || value['canPayNow'] === undefined)\n return false;\n if (!('canRent' in value) || value['canRent'] === undefined)\n return false;\n return true;\n}\nexport function ContractTermsSummaryFromJSON(json) {\n return ContractTermsSummaryFromJSONTyped(json, false);\n}\nexport function ContractTermsSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'canPayNow': json['can_pay_now'],\n 'canRent': json['can_rent'],\n 'rent': json['rent'] == null ? undefined : ProductRentContractFromJSON(json['rent']),\n };\n}\nexport function ContractTermsSummaryToJSON(json) {\n return ContractTermsSummaryToJSONTyped(json, false);\n}\nexport function ContractTermsSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'can_pay_now': value['canPayNow'],\n 'can_rent': value['canRent'],\n 'rent': ProductRentContractToJSON(value['rent']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the CreateImportRequestBody interface.\n */\nexport function instanceOfCreateImportRequestBody(value) {\n return true;\n}\nexport function CreateImportRequestBodyFromJSON(json) {\n return CreateImportRequestBodyFromJSONTyped(json, false);\n}\nexport function CreateImportRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'filename': json['filename'] == null ? undefined : json['filename'],\n };\n}\nexport function CreateImportRequestBodyToJSON(json) {\n return CreateImportRequestBodyToJSONTyped(json, false);\n}\nexport function CreateImportRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'filename': value['filename'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the CreateImportResult interface.\n */\nexport function instanceOfCreateImportResult(value) {\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('uploadUrl' in value) || value['uploadUrl'] === undefined)\n return false;\n return true;\n}\nexport function CreateImportResultFromJSON(json) {\n return CreateImportResultFromJSONTyped(json, false);\n}\nexport function CreateImportResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'id': json['id'],\n 'uploadUrl': json['upload_url'],\n };\n}\nexport function CreateImportResultToJSON(json) {\n return CreateImportResultToJSONTyped(json, false);\n}\nexport function CreateImportResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'id': value['id'],\n 'upload_url': value['uploadUrl'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * @export\n */\nexport const FilteringOptionOperationEnum = {\n LessThan: '<',\n GreaterThan: '>',\n Equal: '=',\n NotEqual: '!=',\n LessThanOrEqualTo: '<=',\n GreaterThanOrEqualTo: '>=',\n Contains: 'contains',\n DoesNotContain: 'does not contain'\n};\n/**\n * Check if a given object implements the FilteringOption interface.\n */\nexport function instanceOfFilteringOption(value) {\n if (!('operation' in value) || value['operation'] === undefined)\n return false;\n if (!('property' in value) || value['property'] === undefined)\n return false;\n if (!('value' in value) || value['value'] === undefined)\n return false;\n return true;\n}\nexport function FilteringOptionFromJSON(json) {\n return FilteringOptionFromJSONTyped(json, false);\n}\nexport function FilteringOptionFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'operation': json['operation'],\n 'property': json['property'],\n 'value': json['value'],\n };\n}\nexport function FilteringOptionToJSON(json) {\n return FilteringOptionToJSONTyped(json, false);\n}\nexport function FilteringOptionToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'operation': value['operation'],\n 'property': value['property'],\n 'value': value['value'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { AddProductFromJSON, AddProductToJSON, } from './AddProduct';\n/**\n * Check if a given object implements the ImportCatalogRequestBody interface.\n */\nexport function instanceOfImportCatalogRequestBody(value) {\n if (!('products' in value) || value['products'] === undefined)\n return false;\n return true;\n}\nexport function ImportCatalogRequestBodyFromJSON(json) {\n return ImportCatalogRequestBodyFromJSONTyped(json, false);\n}\nexport function ImportCatalogRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'products': (json['products'].map(AddProductFromJSON)),\n };\n}\nexport function ImportCatalogRequestBodyToJSON(json) {\n return ImportCatalogRequestBodyToJSONTyped(json, false);\n}\nexport function ImportCatalogRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'products': (value['products'].map(AddProductToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\n/**\n * Check if a given object implements the SummaryProductRejected interface.\n */\nexport function instanceOfSummaryProductRejected(value) {\n if (!('errorCode' in value) || value['errorCode'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function SummaryProductRejectedFromJSON(json) {\n return SummaryProductRejectedFromJSONTyped(json, false);\n}\nexport function SummaryProductRejectedFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'errorCode': json['error_code'],\n 'errorDescription': json['error_description'] == null ? undefined : json['error_description'],\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n };\n}\nexport function SummaryProductRejectedToJSON(json) {\n return SummaryProductRejectedToJSONTyped(json, false);\n}\nexport function SummaryProductRejectedToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'error_code': value['errorCode'],\n 'error_description': value['errorDescription'],\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SummaryProductRejectedFromJSON, SummaryProductRejectedToJSON, } from './SummaryProductRejected';\n/**\n * Check if a given object implements the SummaryInfo interface.\n */\nexport function instanceOfSummaryInfo(value) {\n if (!('sampleProductsRejected' in value) || value['sampleProductsRejected'] === undefined)\n return false;\n if (!('totalProducts' in value) || value['totalProducts'] === undefined)\n return false;\n if (!('totalProductsImported' in value) || value['totalProductsImported'] === undefined)\n return false;\n if (!('totalProductsRejected' in value) || value['totalProductsRejected'] === undefined)\n return false;\n return true;\n}\nexport function SummaryInfoFromJSON(json) {\n return SummaryInfoFromJSONTyped(json, false);\n}\nexport function SummaryInfoFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'sampleProductsRejected': (json['sample_products_rejected'].map(SummaryProductRejectedFromJSON)),\n 'totalProducts': json['total_products'],\n 'totalProductsImported': json['total_products_imported'],\n 'totalProductsRejected': json['total_products_rejected'],\n };\n}\nexport function SummaryInfoToJSON(json) {\n return SummaryInfoToJSONTyped(json, false);\n}\nexport function SummaryInfoToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'sample_products_rejected': (value['sampleProductsRejected'].map(SummaryProductRejectedToJSON)),\n 'total_products': value['totalProducts'],\n 'total_products_imported': value['totalProductsImported'],\n 'total_products_rejected': value['totalProductsRejected'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SummaryInfoFromJSON, SummaryInfoToJSON, } from './SummaryInfo';\n/**\n * @export\n */\nexport const ImportResultStatusEnum = {\n Created: 'created',\n Started: 'started',\n Completed: 'completed',\n Failed: 'failed'\n};\n/**\n * Check if a given object implements the ImportResult interface.\n */\nexport function instanceOfImportResult(value) {\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('status' in value) || value['status'] === undefined)\n return false;\n return true;\n}\nexport function ImportResultFromJSON(json) {\n return ImportResultFromJSONTyped(json, false);\n}\nexport function ImportResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'id': json['id'],\n 'status': json['status'],\n 'summary': json['summary'] == null ? undefined : SummaryInfoFromJSON(json['summary']),\n };\n}\nexport function ImportResultToJSON(json) {\n return ImportResultToJSONTyped(json, false);\n}\nexport function ImportResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'id': value['id'],\n 'status': value['status'],\n 'summary': SummaryInfoToJSON(value['summary']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { PricingRequestFromJSON, PricingRequestToJSON, } from './PricingRequest';\n/**\n * Check if a given object implements the ListRecommendedRentalPricesRequestBody interface.\n */\nexport function instanceOfListRecommendedRentalPricesRequestBody(value) {\n if (!('pricingRequests' in value) || value['pricingRequests'] === undefined)\n return false;\n return true;\n}\nexport function ListRecommendedRentalPricesRequestBodyFromJSON(json) {\n return ListRecommendedRentalPricesRequestBodyFromJSONTyped(json, false);\n}\nexport function ListRecommendedRentalPricesRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'pricingRequests': (json['pricing_requests'].map(PricingRequestFromJSON)),\n };\n}\nexport function ListRecommendedRentalPricesRequestBodyToJSON(json) {\n return ListRecommendedRentalPricesRequestBodyToJSONTyped(json, false);\n}\nexport function ListRecommendedRentalPricesRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'pricing_requests': (value['pricingRequests'].map(PricingRequestToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { MoneyAmountWithOptionalGrossFromJSON, MoneyAmountWithOptionalGrossToJSON, } from './MoneyAmountWithOptionalGross';\nimport { CategorisationIdentifiersFromJSON, CategorisationIdentifiersToJSON, } from './CategorisationIdentifiers';\n/**\n * Check if a given object implements the OfferParsingUnproccesedItem interface.\n */\nexport function instanceOfOfferParsingUnproccesedItem(value) {\n return true;\n}\nexport function OfferParsingUnproccesedItemFromJSON(json) {\n return OfferParsingUnproccesedItemFromJSONTyped(json, false);\n}\nexport function OfferParsingUnproccesedItemFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'categorisationIdentifiers': json['CategorisationIdentifiers'] == null ? undefined : CategorisationIdentifiersFromJSON(json['CategorisationIdentifiers']),\n 'inputDescription': json['input_description'] == null ? undefined : json['input_description'],\n 'inputPrice': json['input_price'] == null ? undefined : MoneyAmountWithOptionalGrossFromJSON(json['input_price']),\n 'inputQuantity': json['input_quantity'] == null ? undefined : json['input_quantity'],\n 'inputReference': json['input_reference'] == null ? undefined : json['input_reference'],\n 'inputTitle': json['input_title'] == null ? undefined : json['input_title'],\n 'manufacturer': json['manufacturer'] == null ? undefined : json['manufacturer'],\n };\n}\nexport function OfferParsingUnproccesedItemToJSON(json) {\n return OfferParsingUnproccesedItemToJSONTyped(json, false);\n}\nexport function OfferParsingUnproccesedItemToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'CategorisationIdentifiers': CategorisationIdentifiersToJSON(value['categorisationIdentifiers']),\n 'input_description': value['inputDescription'],\n 'input_price': MoneyAmountWithOptionalGrossToJSON(value['inputPrice']),\n 'input_quantity': value['inputQuantity'],\n 'input_reference': value['inputReference'],\n 'input_title': value['inputTitle'],\n 'manufacturer': value['manufacturer'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { ContractTermsSummaryFromJSON, ContractTermsSummaryToJSON, } from './ContractTermsSummary';\nimport { MoneyAmountFromJSON, MoneyAmountToJSON, } from './MoneyAmount';\n/**\n * Check if a given object implements the SearchProductResult interface.\n */\nexport function instanceOfSearchProductResult(value) {\n if (!('availableContractTerms' in value) || value['availableContractTerms'] === undefined)\n return false;\n if (!('listPrice' in value) || value['listPrice'] === undefined)\n return false;\n if (!('manufacturer' in value) || value['manufacturer'] === undefined)\n return false;\n if (!('origin' in value) || value['origin'] === undefined)\n return false;\n if (!('productId' in value) || value['productId'] === undefined)\n return false;\n if (!('reference' in value) || value['reference'] === undefined)\n return false;\n if (!('sellerProductReferences' in value) || value['sellerProductReferences'] === undefined)\n return false;\n if (!('title' in value) || value['title'] === undefined)\n return false;\n return true;\n}\nexport function SearchProductResultFromJSON(json) {\n return SearchProductResultFromJSONTyped(json, false);\n}\nexport function SearchProductResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'archived': json['archived'] == null ? undefined : json['archived'],\n 'availableContractTerms': ContractTermsSummaryFromJSON(json['available_contract_terms']),\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountFromJSON(json['base_rental_price']),\n 'description': json['description'] == null ? undefined : json['description'],\n 'ean': json['ean'] == null ? undefined : json['ean'],\n 'listPrice': MoneyAmountFromJSON(json['list_price']),\n 'manufacturer': json['manufacturer'],\n 'mpn': json['mpn'] == null ? undefined : json['mpn'],\n 'origin': json['origin'],\n 'prettyId': json['pretty_id'] == null ? undefined : json['pretty_id'],\n 'pricingCategory': json['pricing_category'] == null ? undefined : json['pricing_category'],\n 'productId': json['product_id'],\n 'reference': json['reference'],\n 'sellerProductReferences': (json['seller_product_references'].map(SellerProductReferenceFromJSON)),\n 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'],\n 'title': json['title'],\n };\n}\nexport function SearchProductResultToJSON(json) {\n return SearchProductResultToJSONTyped(json, false);\n}\nexport function SearchProductResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'archived': value['archived'],\n 'available_contract_terms': ContractTermsSummaryToJSON(value['availableContractTerms']),\n 'base_rental_price': MoneyAmountToJSON(value['baseRentalPrice']),\n 'description': value['description'],\n 'ean': value['ean'],\n 'list_price': MoneyAmountToJSON(value['listPrice']),\n 'manufacturer': value['manufacturer'],\n 'mpn': value['mpn'],\n 'origin': value['origin'],\n 'pretty_id': value['prettyId'],\n 'pricing_category': value['pricingCategory'],\n 'product_id': value['productId'],\n 'reference': value['reference'],\n 'seller_product_references': (value['sellerProductReferences'].map(SellerProductReferenceToJSON)),\n 'subtitle': value['subtitle'],\n 'title': value['title'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SearchProductResultFromJSON, SearchProductResultToJSON, } from './SearchProductResult';\nimport { CalculatePriceSummaryFromJSON, CalculatePriceSummaryToJSON, } from './CalculatePriceSummary';\n/**\n * Check if a given object implements the OfferParsinglineItem interface.\n */\nexport function instanceOfOfferParsinglineItem(value) {\n if (!('calculatedPriceSummary' in value) || value['calculatedPriceSummary'] === undefined)\n return false;\n if (!('inputQuantity' in value) || value['inputQuantity'] === undefined)\n return false;\n if (!('product' in value) || value['product'] === undefined)\n return false;\n return true;\n}\nexport function OfferParsinglineItemFromJSON(json) {\n return OfferParsinglineItemFromJSONTyped(json, false);\n}\nexport function OfferParsinglineItemFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'calculatedPriceSummary': CalculatePriceSummaryFromJSON(json['calculated_price_summary']),\n 'inputQuantity': json['input_quantity'],\n 'product': SearchProductResultFromJSON(json['product']),\n };\n}\nexport function OfferParsinglineItemToJSON(json) {\n return OfferParsinglineItemToJSONTyped(json, false);\n}\nexport function OfferParsinglineItemToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'calculated_price_summary': CalculatePriceSummaryToJSON(value['calculatedPriceSummary']),\n 'input_quantity': value['inputQuantity'],\n 'product': SearchProductResultToJSON(value['product']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { OfferParsingUnproccesedItemFromJSON, OfferParsingUnproccesedItemToJSON, } from './OfferParsingUnproccesedItem';\nimport { OfferParsinglineItemFromJSON, OfferParsinglineItemToJSON, } from './OfferParsinglineItem';\n/**\n * Check if a given object implements the OfferParsingResult interface.\n */\nexport function instanceOfOfferParsingResult(value) {\n return true;\n}\nexport function OfferParsingResultFromJSON(json) {\n return OfferParsingResultFromJSONTyped(json, false);\n}\nexport function OfferParsingResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'lineItems': json['line_items'] == null ? undefined : (json['line_items'].map(OfferParsinglineItemFromJSON)),\n 'offerReference': json['offer_reference'] == null ? undefined : json['offer_reference'],\n 'unprocessedItems': json['unprocessed_items'] == null ? undefined : (json['unprocessed_items'].map(OfferParsingUnproccesedItemFromJSON)),\n };\n}\nexport function OfferParsingResultToJSON(json) {\n return OfferParsingResultToJSONTyped(json, false);\n}\nexport function OfferParsingResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'line_items': value['lineItems'] == null ? undefined : (value['lineItems'].map(OfferParsinglineItemToJSON)),\n 'offer_reference': value['offerReference'],\n 'unprocessed_items': value['unprocessedItems'] == null ? undefined : (value['unprocessedItems'].map(OfferParsingUnproccesedItemToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/**\n * Check if a given object implements the ParseOfferTextRequestBody interface.\n */\nexport function instanceOfParseOfferTextRequestBody(value) {\n if (!('sourceText' in value) || value['sourceText'] === undefined)\n return false;\n return true;\n}\nexport function ParseOfferTextRequestBodyFromJSON(json) {\n return ParseOfferTextRequestBodyFromJSONTyped(json, false);\n}\nexport function ParseOfferTextRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'sourceText': json['source_text'],\n };\n}\nexport function ParseOfferTextRequestBodyToJSON(json) {\n return ParseOfferTextRequestBodyToJSONTyped(json, false);\n}\nexport function ParseOfferTextRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'source_text': value['sourceText'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { ContractTermsSummaryFromJSON, ContractTermsSummaryToJSON, } from './ContractTermsSummary';\nimport { MoneyAmountFromJSON, MoneyAmountToJSON, } from './MoneyAmount';\nimport { CategorisationIdentifiersFromJSON, CategorisationIdentifiersToJSON, } from './CategorisationIdentifiers';\n/**\n * Check if a given object implements the ProductDetails interface.\n */\nexport function instanceOfProductDetails(value) {\n if (!('availableContractTerms' in value) || value['availableContractTerms'] === undefined)\n return false;\n if (!('listPrice' in value) || value['listPrice'] === undefined)\n return false;\n if (!('manufacturer' in value) || value['manufacturer'] === undefined)\n return false;\n if (!('origin' in value) || value['origin'] === undefined)\n return false;\n if (!('productId' in value) || value['productId'] === undefined)\n return false;\n if (!('reference' in value) || value['reference'] === undefined)\n return false;\n if (!('sellerProductReferences' in value) || value['sellerProductReferences'] === undefined)\n return false;\n if (!('title' in value) || value['title'] === undefined)\n return false;\n return true;\n}\nexport function ProductDetailsFromJSON(json) {\n return ProductDetailsFromJSONTyped(json, false);\n}\nexport function ProductDetailsFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'archived': json['archived'] == null ? undefined : json['archived'],\n 'availableContractTerms': ContractTermsSummaryFromJSON(json['available_contract_terms']),\n 'baseRentalPrice': json['base_rental_price'] == null ? undefined : MoneyAmountFromJSON(json['base_rental_price']),\n 'categorisationIdentifiers': json['categorisation_identifiers'] == null ? undefined : CategorisationIdentifiersFromJSON(json['categorisation_identifiers']),\n 'description': json['description'] == null ? undefined : json['description'],\n 'ean': json['ean'] == null ? undefined : json['ean'],\n 'listPrice': MoneyAmountFromJSON(json['list_price']),\n 'manufacturer': json['manufacturer'],\n 'mpn': json['mpn'] == null ? undefined : json['mpn'],\n 'origin': json['origin'],\n 'prettyId': json['pretty_id'] == null ? undefined : json['pretty_id'],\n 'pricingCategory': json['pricing_category'] == null ? undefined : json['pricing_category'],\n 'productId': json['product_id'],\n 'reference': json['reference'],\n 'sellerProductReferences': (json['seller_product_references'].map(SellerProductReferenceFromJSON)),\n 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'],\n 'title': json['title'],\n };\n}\nexport function ProductDetailsToJSON(json) {\n return ProductDetailsToJSONTyped(json, false);\n}\nexport function ProductDetailsToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'archived': value['archived'],\n 'available_contract_terms': ContractTermsSummaryToJSON(value['availableContractTerms']),\n 'base_rental_price': MoneyAmountToJSON(value['baseRentalPrice']),\n 'categorisation_identifiers': CategorisationIdentifiersToJSON(value['categorisationIdentifiers']),\n 'description': value['description'],\n 'ean': value['ean'],\n 'list_price': MoneyAmountToJSON(value['listPrice']),\n 'manufacturer': value['manufacturer'],\n 'mpn': value['mpn'],\n 'origin': value['origin'],\n 'pretty_id': value['prettyId'],\n 'pricing_category': value['pricingCategory'],\n 'product_id': value['productId'],\n 'reference': value['reference'],\n 'seller_product_references': (value['sellerProductReferences'].map(SellerProductReferenceToJSON)),\n 'subtitle': value['subtitle'],\n 'title': value['title'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SearchProductResultFromJSON, SearchProductResultToJSON, } from './SearchProductResult';\n/**\n * Check if a given object implements the ProductPaginationResult interface.\n */\nexport function instanceOfProductPaginationResult(value) {\n return true;\n}\nexport function ProductPaginationResultFromJSON(json) {\n return ProductPaginationResultFromJSONTyped(json, false);\n}\nexport function ProductPaginationResultFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'limit': json['limit'] == null ? undefined : json['limit'],\n 'page': json['page'] == null ? undefined : json['page'],\n 'rows': json['rows'] == null ? undefined : (json['rows'].map(SearchProductResultFromJSON)),\n 'totalPages': json['totalPages'] == null ? undefined : json['totalPages'],\n 'totalRows': json['totalRows'] == null ? undefined : json['totalRows'],\n };\n}\nexport function ProductPaginationResultToJSON(json) {\n return ProductPaginationResultToJSONTyped(json, false);\n}\nexport function ProductPaginationResultToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'limit': value['limit'],\n 'page': value['page'],\n 'rows': value['rows'] == null ? undefined : (value['rows'].map(SearchProductResultToJSON)),\n 'totalPages': value['totalPages'],\n 'totalRows': value['totalRows'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { RentContractTermFromJSON, RentContractTermToJSON, } from './RentContractTerm';\n/**\n * Check if a given object implements the ProductRentalPricingDetails interface.\n */\nexport function instanceOfProductRentalPricingDetails(value) {\n if (!('hasRentalTerms' in value) || value['hasRentalTerms'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function ProductRentalPricingDetailsFromJSON(json) {\n return ProductRentalPricingDetailsFromJSONTyped(json, false);\n}\nexport function ProductRentalPricingDetailsFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'currency': json['currency'] == null ? undefined : json['currency'],\n 'hasRentalTerms': json['has_rental_terms'],\n 'monthlyRentalAmount': json['monthly_rental_amount'] == null ? undefined : json['monthly_rental_amount'],\n 'monthlyRentalTerms': json['monthly_rental_terms'] == null ? undefined : RentContractTermFromJSON(json['monthly_rental_terms']),\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n 'summary': json['summary'] == null ? undefined : json['summary'],\n };\n}\nexport function ProductRentalPricingDetailsToJSON(json) {\n return ProductRentalPricingDetailsToJSONTyped(json, false);\n}\nexport function ProductRentalPricingDetailsToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'currency': value['currency'],\n 'has_rental_terms': value['hasRentalTerms'],\n 'monthly_rental_amount': value['monthlyRentalAmount'],\n 'monthly_rental_terms': RentContractTermToJSON(value['monthlyRentalTerms']),\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n 'summary': value['summary'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { SellerProductReferenceFromJSON, SellerProductReferenceToJSON, } from './SellerProductReference';\nimport { ContractTermsSummaryFromJSON, ContractTermsSummaryToJSON, } from './ContractTermsSummary';\n/**\n * Check if a given object implements the ProductSummary interface.\n */\nexport function instanceOfProductSummary(value) {\n if (!('availableContractTerms' in value) || value['availableContractTerms'] === undefined)\n return false;\n if (!('id' in value) || value['id'] === undefined)\n return false;\n if (!('isSupported' in value) || value['isSupported'] === undefined)\n return false;\n if (!('sellerProductReference' in value) || value['sellerProductReference'] === undefined)\n return false;\n return true;\n}\nexport function ProductSummaryFromJSON(json) {\n return ProductSummaryFromJSONTyped(json, false);\n}\nexport function ProductSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'availableContractTerms': ContractTermsSummaryFromJSON(json['available_contract_terms']),\n 'id': json['id'],\n 'isSupported': json['is_supported'],\n 'sellerProductReference': SellerProductReferenceFromJSON(json['seller_product_reference']),\n };\n}\nexport function ProductSummaryToJSON(json) {\n return ProductSummaryToJSONTyped(json, false);\n}\nexport function ProductSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'available_contract_terms': ContractTermsSummaryToJSON(value['availableContractTerms']),\n 'id': value['id'],\n 'is_supported': value['isSupported'],\n 'seller_product_reference': SellerProductReferenceToJSON(value['sellerProductReference']),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { ProductSummaryFromJSON, ProductSummaryToJSON, } from './ProductSummary';\n/**\n * Check if a given object implements the ProductsSummary interface.\n */\nexport function instanceOfProductsSummary(value) {\n if (!('products' in value) || value['products'] === undefined)\n return false;\n return true;\n}\nexport function ProductsSummaryFromJSON(json) {\n return ProductsSummaryFromJSONTyped(json, false);\n}\nexport function ProductsSummaryFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'products': (json['products'].map(ProductSummaryFromJSON)),\n };\n}\nexport function ProductsSummaryToJSON(json) {\n return ProductsSummaryToJSONTyped(json, false);\n}\nexport function ProductsSummaryToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'products': (value['products'].map(ProductSummaryToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { FilteringOptionFromJSON, FilteringOptionToJSON, } from './FilteringOption';\n/**\n * @export\n */\nexport const SearchAndFilterProductsPaginatedRequestBodyFilteringLogicEnum = {\n And: 'AND',\n Or: 'OR'\n};\n/**\n * Check if a given object implements the SearchAndFilterProductsPaginatedRequestBody interface.\n */\nexport function instanceOfSearchAndFilterProductsPaginatedRequestBody(value) {\n return true;\n}\nexport function SearchAndFilterProductsPaginatedRequestBodyFromJSON(json) {\n return SearchAndFilterProductsPaginatedRequestBodyFromJSONTyped(json, false);\n}\nexport function SearchAndFilterProductsPaginatedRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'filteringLogic': json['filtering_logic'] == null ? undefined : json['filtering_logic'],\n 'filteringOptions': json['filtering_options'] == null ? undefined : (json['filtering_options'].map(FilteringOptionFromJSON)),\n };\n}\nexport function SearchAndFilterProductsPaginatedRequestBodyToJSON(json) {\n return SearchAndFilterProductsPaginatedRequestBodyToJSONTyped(json, false);\n}\nexport function SearchAndFilterProductsPaginatedRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'filtering_logic': value['filteringLogic'],\n 'filtering_options': value['filteringOptions'] == null ? undefined : (value['filteringOptions'].map(FilteringOptionToJSON)),\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { RentalOverviewRequestFromJSON, RentalOverviewRequestToJSON, } from './RentalOverviewRequest';\n/**\n * Check if a given object implements the WidgetsCartRentalOverviewRequestBody interface.\n */\nexport function instanceOfWidgetsCartRentalOverviewRequestBody(value) {\n if (!('products' in value) || value['products'] === undefined)\n return false;\n if (!('widgetId' in value) || value['widgetId'] === undefined)\n return false;\n return true;\n}\nexport function WidgetsCartRentalOverviewRequestBodyFromJSON(json) {\n return WidgetsCartRentalOverviewRequestBodyFromJSONTyped(json, false);\n}\nexport function WidgetsCartRentalOverviewRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'products': (json['products'].map(RentalOverviewRequestFromJSON)),\n 'widgetId': json['widget_id'],\n };\n}\nexport function WidgetsCartRentalOverviewRequestBodyToJSON(json) {\n return WidgetsCartRentalOverviewRequestBodyToJSONTyped(json, false);\n}\nexport function WidgetsCartRentalOverviewRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'products': (value['products'].map(RentalOverviewRequestToJSON)),\n 'widget_id': value['widgetId'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { PricingRequestFromJSON, PricingRequestToJSON, } from './PricingRequest';\n/**\n * Check if a given object implements the WidgetsListRecommendedRentalPricesRequestBody interface.\n */\nexport function instanceOfWidgetsListRecommendedRentalPricesRequestBody(value) {\n if (!('pricingRequests' in value) || value['pricingRequests'] === undefined)\n return false;\n if (!('widgetId' in value) || value['widgetId'] === undefined)\n return false;\n return true;\n}\nexport function WidgetsListRecommendedRentalPricesRequestBodyFromJSON(json) {\n return WidgetsListRecommendedRentalPricesRequestBodyFromJSONTyped(json, false);\n}\nexport function WidgetsListRecommendedRentalPricesRequestBodyFromJSONTyped(json, ignoreDiscriminator) {\n if (json == null) {\n return json;\n }\n return {\n 'pricingRequests': (json['pricing_requests'].map(PricingRequestFromJSON)),\n 'widgetId': json['widget_id'],\n };\n}\nexport function WidgetsListRecommendedRentalPricesRequestBodyToJSON(json) {\n return WidgetsListRecommendedRentalPricesRequestBodyToJSONTyped(json, false);\n}\nexport function WidgetsListRecommendedRentalPricesRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {\n if (value == null) {\n return value;\n }\n return {\n 'pricing_requests': (value['pricingRequests'].map(PricingRequestToJSON)),\n 'widget_id': value['widgetId'],\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * topi Seller API\n * # Localization Strings returned can be localized when the _Accept-Language_ header is provided in the request. It should follow the [RFC-2616 convention](http://www.ietf.org/rfc/rfc2616.txt).\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport * as runtime from '../runtime';\nimport { AddCustomProductRequestBodyToJSON, CalculateBasketPricingRequestBodyToJSON, CalculateBasketPricingResponseBodyFromJSON, CalculatePriceSummaryFromJSON, CalculatePricingRequestBodyToJSON, CartRentalOverviewRequestBodyToJSON, CartRentalOverviewResultFromJSON, CatalogImportJobFromJSON, CategorisationNodeFromJSON, CheckSupportedRequestBodyToJSON, CreateImportRequestBodyToJSON, CreateImportResultFromJSON, ImportCatalogRequestBodyToJSON, ImportResultFromJSON, ListRecommendedRentalPricesRequestBodyToJSON, OfferParsingResultFromJSON, ParseOfferTextRequestBodyToJSON, ProductDetailsFromJSON, ProductPaginationResultFromJSON, ProductRentalPricingDetailsFromJSON, ProductsSummaryFromJSON, SearchAndFilterProductsPaginatedRequestBodyToJSON, SearchProductResultFromJSON, WidgetsCartRentalOverviewRequestBodyToJSON, WidgetsListRecommendedRentalPricesRequestBodyToJSON, } from '../models/index';\n/**\n *\n */\nexport class CatalogApi extends runtime.BaseAPI {\n /**\n * Add a single custom product to the catalog\n * Add a custom product\n */\n catalogAddCustomProductRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['addCustomProductRequestBody'] == null) {\n throw new runtime.RequiredError('addCustomProductRequestBody', 'Required parameter \"addCustomProductRequestBody\" was null or undefined when calling catalogAddCustomProduct().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/custom_product`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: AddCustomProductRequestBodyToJSON(requestParameters['addCustomProductRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ImportResultFromJSON(jsonValue));\n });\n }\n /**\n * Add a single custom product to the catalog\n * Add a custom product\n */\n catalogAddCustomProduct(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogAddCustomProductRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * ## *Deprecated* Calculate pricing endpoint is being replaced by two other endpoints: - listRecommendedRentalPrices - cartRentalOverview Please make sure to migrate to one of the above endpoints based on your use case. ### Description calculate the price for a product\n * Calculate pricing for a whole basket\n */\n catalogCalculateBasketPricingRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['calculateBasketPricingRequestBody'] == null) {\n throw new runtime.RequiredError('calculateBasketPricingRequestBody', 'Required parameter \"calculateBasketPricingRequestBody\" was null or undefined when calling catalogCalculateBasketPricing().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/basket/pricing`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: CalculateBasketPricingRequestBodyToJSON(requestParameters['calculateBasketPricingRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CalculateBasketPricingResponseBodyFromJSON(jsonValue));\n });\n }\n /**\n * ## *Deprecated* Calculate pricing endpoint is being replaced by two other endpoints: - listRecommendedRentalPrices - cartRentalOverview Please make sure to migrate to one of the above endpoints based on your use case. ### Description calculate the price for a product\n * Calculate pricing for a whole basket\n */\n catalogCalculateBasketPricing(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogCalculateBasketPricingRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * ## *Deprecated* Calculate pricing endpoint is being replaced by two other endpoints: - listRecommendedRentalPrices - cartRentalOverview Please make sure to migrate to one of the above endpoints based on your use case. ### Description calculate the price for a product\n * Calculate pricing for a single product\n */\n catalogCalculatePricingRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['calculatePricingRequestBody'] == null) {\n throw new runtime.RequiredError('calculatePricingRequestBody', 'Required parameter \"calculatePricingRequestBody\" was null or undefined when calling catalogCalculatePricing().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/pricing`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: CalculatePricingRequestBodyToJSON(requestParameters['calculatePricingRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CalculatePriceSummaryFromJSON(jsonValue));\n });\n }\n /**\n * ## *Deprecated* Calculate pricing endpoint is being replaced by two other endpoints: - listRecommendedRentalPrices - cartRentalOverview Please make sure to migrate to one of the above endpoints based on your use case. ### Description calculate the price for a product\n * Calculate pricing for a single product\n */\n catalogCalculatePricing(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogCalculatePricingRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Cancels a CSV import job. Only imports in `pending`, `queued`, and `running` status can be cancelled. Cancelling a completed or already-cancelled import returns an error.\n * Cancel a CSV import job\n */\n catalogCancelImportRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['id'] == null) {\n throw new runtime.RequiredError('id', 'Required parameter \"id\" was null or undefined when calling catalogCancelImport().');\n }\n const queryParameters = {};\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/imports/{id}`.replace(`{${\"id\"}}`, encodeURIComponent(String(requestParameters['id']))),\n method: 'DELETE',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.VoidApiResponse(response);\n });\n }\n /**\n * Cancels a CSV import job. Only imports in `pending`, `queued`, and `running` status can be cancelled. Cancelling a completed or already-cancelled import returns an error.\n * Cancel a CSV import job\n */\n catalogCancelImport(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.catalogCancelImportRaw(requestParameters, initOverrides);\n });\n }\n /**\n * Get rental overview for products\n */\n catalogCartRentalOverviewRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['cartRentalOverviewRequestBody'] == null) {\n throw new runtime.RequiredError('cartRentalOverviewRequestBody', 'Required parameter \"cartRentalOverviewRequestBody\" was null or undefined when calling catalogCartRentalOverview().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/carts/rental-overview`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: CartRentalOverviewRequestBodyToJSON(requestParameters['cartRentalOverviewRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CartRentalOverviewResultFromJSON(jsonValue));\n });\n }\n /**\n * Get rental overview for products\n */\n catalogCartRentalOverview(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogCartRentalOverviewRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Checks whether the products with the given references are supported or not. ### When using in the Sandbox Returns the requested products with their available contract terms, depending on the combination of the supplied Source and Reference values: - To get a product with `PayNow` contract terms : The supplied `source` should be `SAP` with `reference` specified as `1234-5678`. - To get a product with `Rent` contract terms : There are two ways to get this value either when the supplied `source` is `SAP` and the `reference` is `1111-1111` or with `source` set to `B6` and `reference` specified as `2222-2222`. - To get a product that is not topi supported: Specify the `source` as `SAP` and `reference` should be `8765-4321`. In other cases this method will return an empty array. This method has been defined as POST because the size of the input values could grow fast.\n * Check if products are supported\n */\n catalogCheckSupportedRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['checkSupportedRequestBody'] == null) {\n throw new runtime.RequiredError('checkSupportedRequestBody', 'Required parameter \"checkSupportedRequestBody\" was null or undefined when calling catalogCheckSupported().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/check-supported`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: CheckSupportedRequestBodyToJSON(requestParameters['checkSupportedRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ProductsSummaryFromJSON(jsonValue));\n });\n }\n /**\n * Checks whether the products with the given references are supported or not. ### When using in the Sandbox Returns the requested products with their available contract terms, depending on the combination of the supplied Source and Reference values: - To get a product with `PayNow` contract terms : The supplied `source` should be `SAP` with `reference` specified as `1234-5678`. - To get a product with `Rent` contract terms : There are two ways to get this value either when the supplied `source` is `SAP` and the `reference` is `1111-1111` or with `source` set to `B6` and `reference` specified as `2222-2222`. - To get a product that is not topi supported: Specify the `source` as `SAP` and `reference` should be `8765-4321`. In other cases this method will return an empty array. This method has been defined as POST because the size of the input values could grow fast.\n * Check if products are supported\n */\n catalogCheckSupported(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogCheckSupportedRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Creates a new CSV import job and returns the created import id and a pre-signed upload URL. ## Upload flow 1. Call `POST /imports` with the `filename` of your CSV file. The response contains the import `id` and an `upload_url` — a temporary link to upload the file to. 2. Upload the file with an HTTP `PUT` request to `upload_url`. The request must include two headers: `Content-Type: text/csv` and `x-goog-content-length-range: 0,262144000`. Uploads without them are rejected. The file may be at most **250 MB**. 3. The file is then checked and processed in the background. Call `GET /imports/{id}` to follow progress. When some rows could not be imported, the response links to a downloadable CSV listing each failed row and the reason. If the file fails the initial check (for example a required column is missing), the import status becomes `failed` and the `error` field explains why. A seller can have at most **5 imports running** at the same time. Starting a sixth returns a `TooManyRequests` error — wait for an earlier import to finish and try again. ## CSV format The first line of the file must be a header row with column names. Column names are not case-sensitive and surrounding spaces are ignored; any column not listed below is simply skipped. Re-uploading a product you imported before (same `reference`) updates that product instead of creating a duplicate. Leaving an optional cell empty on re-import keeps the product\\'s existing value for that field. ### Required columns The import is rejected if any of these are missing from the header. | Column | Description | Format | |---|---|---| | `title` | Product name shown to customers | Non-empty text | | `reference` | Your product identifier(s) | One or more values joined by `\\\\|`; count must match `reference_source` | | `reference_source` | Source/type of each reference (e.g. `sku`, `ean`) | `\\\\|`-separated, same count as `reference` | | `is_active` | Whether the product is sellable | `true`/`false`, `1`/`0`, `yes`/`no`, `y`/`n` (case-insensitive) | | `price_gross` | Sale price incl. VAT | Number > 0, must be >= `price_net` | | `price_net` | Sale price excl. VAT | Number > 0 | ### Optional columns | Column | Description | Format | |---|---|---| | `currency` | Currency code, e.g. `EUR` | Defaults to the seller currency if blank | | `manufacturer` | Brand / maker | Text | | `subtitle` | Short tagline under the title | Text | | `description` | Long product description | Text, max 2000 characters | | `base_rental_price_gross` | Monthly rental price incl. VAT | Number > 0, must be >= net if both set | | `base_rental_price_net` | Monthly rental price excl. VAT | Number > 0 | | `ean` | EAN barcode | Text | | `mpn` | Manufacturer part number | Text | | `image_url` | Product image | Valid URL | | `seller_category_id` | Your category ID | Text | | `seller_category_name` | Your category name | Text | | `seller_category_parent_id` | Parent category ID | Text | | `seller_product_type` | Product type | One of `hardware`, `software`, `service`, `hardware_built_to_order`, or blank | | `shop_product_description_url` | Link to the product page on your shop | Valid URL | | `extra_details` | Custom key/value attributes | `key=value` pairs joined by `\\\\|` | ### Prices - Prices are written in whole currency units, not cents: `2499.00` means 2,499 euros. - `price_gross` (with VAT) must be greater than or equal to `price_net` (without VAT). - Both decimal styles are accepted: a point (`1999.99`) or a comma (`1999,99`) before the decimals. Thousands separators are also fine in either style: `1,234.56` and `1.234,56` both mean one thousand two hundred thirty-four euros and 56 cents. - One shape cannot be told apart: a value like `1,234` could mean `1.234` or `1234`, so that row is rejected with an error. To avoid this, always write the cents explicitly — `1234.00` (or `1.234,00`) for one thousand two hundred thirty-four euros, `1.23` (or `1,23`) for one euro and 23 cents. ### Notes - **Multiple references**: a product can carry several identifiers — pipe-separate them in `reference` (e.g. `MBP14-001|0719726100000`) with matching kinds in `reference_source` (e.g. `sku|ean`). The two columns must have an equal number of `|`-separated values. - **Duplicate references** within the same file are rejected per row; the rest of the file still imports. - A row that fails validation does not stop the import: valid rows still import, and every failed row is listed with its reason in the downloadable error CSV. ### Example ```csv title,reference,reference_source,is_active,price_gross,price_net,currency,manufacturer,seller_product_type,extra_details Apple MacBook Pro 14,MBP14-001,sku,true,2499.00,2099.16,EUR,Apple,hardware,color=Space Black|warranty=24 months Dell UltraSharp Monitor,DELL-U2724|0719726100000,sku|ean,1,649.00,545.38,EUR,Dell,hardware,resolution=3840x2160|panel=IPS ```\n * Create a CSV import job\n */\n catalogCreateImportRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['createImportRequestBody'] == null) {\n throw new runtime.RequiredError('createImportRequestBody', 'Required parameter \"createImportRequestBody\" was null or undefined when calling catalogCreateImport().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/imports`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: CreateImportRequestBodyToJSON(requestParameters['createImportRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CreateImportResultFromJSON(jsonValue));\n });\n }\n /**\n * Creates a new CSV import job and returns the created import id and a pre-signed upload URL. ## Upload flow 1. Call `POST /imports` with the `filename` of your CSV file. The response contains the import `id` and an `upload_url` — a temporary link to upload the file to. 2. Upload the file with an HTTP `PUT` request to `upload_url`. The request must include two headers: `Content-Type: text/csv` and `x-goog-content-length-range: 0,262144000`. Uploads without them are rejected. The file may be at most **250 MB**. 3. The file is then checked and processed in the background. Call `GET /imports/{id}` to follow progress. When some rows could not be imported, the response links to a downloadable CSV listing each failed row and the reason. If the file fails the initial check (for example a required column is missing), the import status becomes `failed` and the `error` field explains why. A seller can have at most **5 imports running** at the same time. Starting a sixth returns a `TooManyRequests` error — wait for an earlier import to finish and try again. ## CSV format The first line of the file must be a header row with column names. Column names are not case-sensitive and surrounding spaces are ignored; any column not listed below is simply skipped. Re-uploading a product you imported before (same `reference`) updates that product instead of creating a duplicate. Leaving an optional cell empty on re-import keeps the product\\'s existing value for that field. ### Required columns The import is rejected if any of these are missing from the header. | Column | Description | Format | |---|---|---| | `title` | Product name shown to customers | Non-empty text | | `reference` | Your product identifier(s) | One or more values joined by `\\\\|`; count must match `reference_source` | | `reference_source` | Source/type of each reference (e.g. `sku`, `ean`) | `\\\\|`-separated, same count as `reference` | | `is_active` | Whether the product is sellable | `true`/`false`, `1`/`0`, `yes`/`no`, `y`/`n` (case-insensitive) | | `price_gross` | Sale price incl. VAT | Number > 0, must be >= `price_net` | | `price_net` | Sale price excl. VAT | Number > 0 | ### Optional columns | Column | Description | Format | |---|---|---| | `currency` | Currency code, e.g. `EUR` | Defaults to the seller currency if blank | | `manufacturer` | Brand / maker | Text | | `subtitle` | Short tagline under the title | Text | | `description` | Long product description | Text, max 2000 characters | | `base_rental_price_gross` | Monthly rental price incl. VAT | Number > 0, must be >= net if both set | | `base_rental_price_net` | Monthly rental price excl. VAT | Number > 0 | | `ean` | EAN barcode | Text | | `mpn` | Manufacturer part number | Text | | `image_url` | Product image | Valid URL | | `seller_category_id` | Your category ID | Text | | `seller_category_name` | Your category name | Text | | `seller_category_parent_id` | Parent category ID | Text | | `seller_product_type` | Product type | One of `hardware`, `software`, `service`, `hardware_built_to_order`, or blank | | `shop_product_description_url` | Link to the product page on your shop | Valid URL | | `extra_details` | Custom key/value attributes | `key=value` pairs joined by `\\\\|` | ### Prices - Prices are written in whole currency units, not cents: `2499.00` means 2,499 euros. - `price_gross` (with VAT) must be greater than or equal to `price_net` (without VAT). - Both decimal styles are accepted: a point (`1999.99`) or a comma (`1999,99`) before the decimals. Thousands separators are also fine in either style: `1,234.56` and `1.234,56` both mean one thousand two hundred thirty-four euros and 56 cents. - One shape cannot be told apart: a value like `1,234` could mean `1.234` or `1234`, so that row is rejected with an error. To avoid this, always write the cents explicitly — `1234.00` (or `1.234,00`) for one thousand two hundred thirty-four euros, `1.23` (or `1,23`) for one euro and 23 cents. ### Notes - **Multiple references**: a product can carry several identifiers — pipe-separate them in `reference` (e.g. `MBP14-001|0719726100000`) with matching kinds in `reference_source` (e.g. `sku|ean`). The two columns must have an equal number of `|`-separated values. - **Duplicate references** within the same file are rejected per row; the rest of the file still imports. - A row that fails validation does not stop the import: valid rows still import, and every failed row is listed with its reason in the downloadable error CSV. ### Example ```csv title,reference,reference_source,is_active,price_gross,price_net,currency,manufacturer,seller_product_type,extra_details Apple MacBook Pro 14,MBP14-001,sku,true,2499.00,2099.16,EUR,Apple,hardware,color=Space Black|warranty=24 months Dell UltraSharp Monitor,DELL-U2724|0719726100000,sku|ean,1,649.00,545.38,EUR,Dell,hardware,resolution=3840x2160|panel=IPS ```\n * Create a CSV import job\n */\n catalogCreateImport(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogCreateImportRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Edit an out of catalog product\n * edit an out of catalog product\n */\n catalogEditCustomProductRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['id'] == null) {\n throw new runtime.RequiredError('id', 'Required parameter \"id\" was null or undefined when calling catalogEditCustomProduct().');\n }\n if (requestParameters['addCustomProductRequestBody'] == null) {\n throw new runtime.RequiredError('addCustomProductRequestBody', 'Required parameter \"addCustomProductRequestBody\" was null or undefined when calling catalogEditCustomProduct().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/custom_product/{id}`.replace(`{${\"id\"}}`, encodeURIComponent(String(requestParameters['id']))),\n method: 'PUT',\n headers: headerParameters,\n query: queryParameters,\n body: AddCustomProductRequestBodyToJSON(requestParameters['addCustomProductRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ProductDetailsFromJSON(jsonValue));\n });\n }\n /**\n * Edit an out of catalog product\n * edit an out of catalog product\n */\n catalogEditCustomProduct(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogEditCustomProductRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * get categorisation information for populating frontend dropdowns\n * Retrieve product categorization information\n */\n catalogGetCategorisationInformationRaw(initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const queryParameters = {};\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/categorisation_information`,\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CategorisationNodeFromJSON));\n });\n }\n /**\n * get categorisation information for populating frontend dropdowns\n * Retrieve product categorization information\n */\n catalogGetCategorisationInformation(initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogGetCategorisationInformationRaw(initOverrides);\n return yield response.value();\n });\n }\n /**\n * Retrieves the details of a CSV import job. ## Failure reporting There are two distinct failure surfaces: - **`error`** — set when the import fails before any rows are processed, e.g. a required column is missing from the header, the uploaded file is not a valid CSV, or the upload has the wrong content type. The job status is `failed`, the row counters stay at 0, and no error CSV is produced. Fix the file and create a new import. - **`failed` / `errors_url`** — row-level failures during processing. The import keeps going; rows that failed are counted in `failed` and detailed in the downloadable CSV at `errors_url`. The `error` field stays empty in this case.\n * Get CSV import job details\n */\n catalogGetImportRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['id'] == null) {\n throw new runtime.RequiredError('id', 'Required parameter \"id\" was null or undefined when calling catalogGetImport().');\n }\n const queryParameters = {};\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/imports/{id}`.replace(`{${\"id\"}}`, encodeURIComponent(String(requestParameters['id']))),\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CatalogImportJobFromJSON(jsonValue));\n });\n }\n /**\n * Retrieves the details of a CSV import job. ## Failure reporting There are two distinct failure surfaces: - **`error`** — set when the import fails before any rows are processed, e.g. a required column is missing from the header, the uploaded file is not a valid CSV, or the upload has the wrong content type. The job status is `failed`, the row counters stay at 0, and no error CSV is produced. Fix the file and create a new import. - **`failed` / `errors_url`** — row-level failures during processing. The import keeps going; rows that failed are counted in `failed` and detailed in the downloadable CSV at `errors_url`. The `error` field stays empty in this case.\n * Get CSV import job details\n */\n catalogGetImport(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogGetImportRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * get product details by ID\n * Get product details by ID\n */\n catalogGetProductRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['id'] == null) {\n throw new runtime.RequiredError('id', 'Required parameter \"id\" was null or undefined when calling catalogGetProduct().');\n }\n const queryParameters = {};\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/products/{id}`.replace(`{${\"id\"}}`, encodeURIComponent(String(requestParameters['id']))),\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ProductDetailsFromJSON(jsonValue));\n });\n }\n /**\n * get product details by ID\n * Get product details by ID\n */\n catalogGetProduct(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogGetProductRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * get services for a seller\n * Get services for a seller\n */\n catalogGetServicesRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const queryParameters = {};\n if (requestParameters['limit'] != null) {\n queryParameters['limit'] = requestParameters['limit'];\n }\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/services`,\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SearchProductResultFromJSON));\n });\n }\n /**\n * get services for a seller\n * Get services for a seller\n */\n catalogGetServices(requestParameters = {}, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogGetServicesRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Add a batch of products to the catalog. ### When using in the Sandbox Use the following scenarios to get different fixtures: - Status `\\\"completed\\\"`: `Send a catalog with less than 10 products` - Status `\\\"created\\\"`: `Send a catalog with 10 products or more` - Status `\\\"failed\\\"`: `Send a product inside the catalog with the \\\"source\\\" or the \\\"reference\\\" in the \\\"seller_product_reference\\\" as empty string`\n * Import products into the catalog\n */\n catalogImportCatalogRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['importCatalogRequestBody'] == null) {\n throw new runtime.RequiredError('importCatalogRequestBody', 'Required parameter \"importCatalogRequestBody\" was null or undefined when calling catalogImportCatalog().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/import`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: ImportCatalogRequestBodyToJSON(requestParameters['importCatalogRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ImportResultFromJSON(jsonValue));\n });\n }\n /**\n * Add a batch of products to the catalog. ### When using in the Sandbox Use the following scenarios to get different fixtures: - Status `\\\"completed\\\"`: `Send a catalog with less than 10 products` - Status `\\\"created\\\"`: `Send a catalog with 10 products or more` - Status `\\\"failed\\\"`: `Send a product inside the catalog with the \\\"source\\\" or the \\\"reference\\\" in the \\\"seller_product_reference\\\" as empty string`\n * Import products into the catalog\n */\n catalogImportCatalog(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogImportCatalogRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Given a list of products, retrieve information about the recommended monthly rental price and term, if applicable, for each of the requested products.\n * List recommended rental prices for products\n */\n catalogListRecommendedRentalPricesRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['listRecommendedRentalPricesRequestBody'] == null) {\n throw new runtime.RequiredError('listRecommendedRentalPricesRequestBody', 'Required parameter \"listRecommendedRentalPricesRequestBody\" was null or undefined when calling catalogListRecommendedRentalPrices().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/list-recommended-rental-prices`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: ListRecommendedRentalPricesRequestBodyToJSON(requestParameters['listRecommendedRentalPricesRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProductRentalPricingDetailsFromJSON));\n });\n }\n /**\n * Given a list of products, retrieve information about the recommended monthly rental price and term, if applicable, for each of the requested products.\n * List recommended rental prices for products\n */\n catalogListRecommendedRentalPrices(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogListRecommendedRentalPricesRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * Parse offer content provided as text\n * parseOfferText catalog\n */\n catalogParseOfferTextRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['parseOfferTextRequestBody'] == null) {\n throw new runtime.RequiredError('parseOfferTextRequestBody', 'Required parameter \"parseOfferTextRequestBody\" was null or undefined when calling catalogParseOfferText().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/parse-offer`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: ParseOfferTextRequestBodyToJSON(requestParameters['parseOfferTextRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => OfferParsingResultFromJSON(jsonValue));\n });\n }\n /**\n * Parse offer content provided as text\n * parseOfferText catalog\n */\n catalogParseOfferText(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogParseOfferTextRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * delete a single custom product from the catalog\n * Remove custom product\n */\n catalogRemoveCustomProductRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['id'] == null) {\n throw new runtime.RequiredError('id', 'Required parameter \"id\" was null or undefined when calling catalogRemoveCustomProduct().');\n }\n const queryParameters = {};\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:edit\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/custom_product/{id}`.replace(`{${\"id\"}}`, encodeURIComponent(String(requestParameters['id']))),\n method: 'DELETE',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.VoidApiResponse(response);\n });\n }\n /**\n * delete a single custom product from the catalog\n * Remove custom product\n */\n catalogRemoveCustomProduct(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.catalogRemoveCustomProductRaw(requestParameters, initOverrides);\n });\n }\n /**\n * get paginated products that match a search term and the provided filters\n * Paginated product search by term, filtering by provided options\n */\n catalogSearchAndFilterProductsPaginatedRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['searchAndFilterProductsPaginatedRequestBody'] == null) {\n throw new runtime.RequiredError('searchAndFilterProductsPaginatedRequestBody', 'Required parameter \"searchAndFilterProductsPaginatedRequestBody\" was null or undefined when calling catalogSearchAndFilterProductsPaginated().');\n }\n const queryParameters = {};\n if (requestParameters['term'] != null) {\n queryParameters['term'] = requestParameters['term'];\n }\n if (requestParameters['limit'] != null) {\n queryParameters['limit'] = requestParameters['limit'];\n }\n if (requestParameters['page'] != null) {\n queryParameters['page'] = requestParameters['page'];\n }\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/products_paginated`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: SearchAndFilterProductsPaginatedRequestBodyToJSON(requestParameters['searchAndFilterProductsPaginatedRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ProductPaginationResultFromJSON(jsonValue));\n });\n }\n /**\n * get paginated products that match a search term and the provided filters\n * Paginated product search by term, filtering by provided options\n */\n catalogSearchAndFilterProductsPaginated(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogSearchAndFilterProductsPaginatedRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * get products that match a search term\n * Search products by term\n */\n catalogSearchProductsRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const queryParameters = {};\n if (requestParameters['term'] != null) {\n queryParameters['term'] = requestParameters['term'];\n }\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/products`,\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SearchProductResultFromJSON));\n });\n }\n /**\n * get products that match a search term\n * Search products by term\n */\n catalogSearchProducts(requestParameters = {}, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogSearchProductsRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * get paginated products that match a search term, note: this method will not support any filtering.\n * Paginated product search by term, note: this method will not support any filtering, please refer to the POST endpoint for filtering.\n */\n catalogSearchProductsPaginatedRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const queryParameters = {};\n if (requestParameters['term'] != null) {\n queryParameters['term'] = requestParameters['term'];\n }\n if (requestParameters['limit'] != null) {\n queryParameters['limit'] = requestParameters['limit'];\n }\n if (requestParameters['page'] != null) {\n queryParameters['page'] = requestParameters['page'];\n }\n const headerParameters = {};\n if (this.configuration && this.configuration.accessToken) {\n // oauth required\n headerParameters[\"Authorization\"] = yield this.configuration.accessToken(\"OAuth2Seller_header_Authorization\", [\"seller-catalog:read\"]);\n }\n const response = yield this.request({\n path: `/v1/catalog/products_paginated`,\n method: 'GET',\n headers: headerParameters,\n query: queryParameters,\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => ProductPaginationResultFromJSON(jsonValue));\n });\n }\n /**\n * get paginated products that match a search term, note: this method will not support any filtering.\n * Paginated product search by term, note: this method will not support any filtering, please refer to the POST endpoint for filtering.\n */\n catalogSearchProductsPaginated(requestParameters = {}, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogSearchProductsPaginatedRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * widgetsCartRentalOverview catalog\n */\n catalogWidgetsCartRentalOverviewRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['widgetsCartRentalOverviewRequestBody'] == null) {\n throw new runtime.RequiredError('widgetsCartRentalOverviewRequestBody', 'Required parameter \"widgetsCartRentalOverviewRequestBody\" was null or undefined when calling catalogWidgetsCartRentalOverview().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n const response = yield this.request({\n path: `/v1/catalog/widgets/carts/rental-overview`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: WidgetsCartRentalOverviewRequestBodyToJSON(requestParameters['widgetsCartRentalOverviewRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => CartRentalOverviewResultFromJSON(jsonValue));\n });\n }\n /**\n * widgetsCartRentalOverview catalog\n */\n catalogWidgetsCartRentalOverview(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogWidgetsCartRentalOverviewRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n /**\n * widgetsListRecommendedRentalPrices catalog\n */\n catalogWidgetsListRecommendedRentalPricesRaw(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters['widgetsListRecommendedRentalPricesRequestBody'] == null) {\n throw new runtime.RequiredError('widgetsListRecommendedRentalPricesRequestBody', 'Required parameter \"widgetsListRecommendedRentalPricesRequestBody\" was null or undefined when calling catalogWidgetsListRecommendedRentalPrices().');\n }\n const queryParameters = {};\n const headerParameters = {};\n headerParameters['Content-Type'] = 'application/json';\n const response = yield this.request({\n path: `/v1/catalog/widgets/list-recommended-rental-prices`,\n method: 'POST',\n headers: headerParameters,\n query: queryParameters,\n body: WidgetsListRecommendedRentalPricesRequestBodyToJSON(requestParameters['widgetsListRecommendedRentalPricesRequestBody']),\n }, initOverrides);\n return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProductRentalPricingDetailsFromJSON));\n });\n }\n /**\n * widgetsListRecommendedRentalPrices catalog\n */\n catalogWidgetsListRecommendedRentalPrices(requestParameters, initOverrides) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.catalogWidgetsListRecommendedRentalPricesRaw(requestParameters, initOverrides);\n return yield response.value();\n });\n }\n}\n","// TODO: decouple import of api client from `front` repo by copying over the\n// generated Seller API client to this repo (when widgets has its own repo)\nimport {\n CatalogApi as SellerCatalogApi,\n Configuration,\n} from \"seller-api-client\";\n\n// Note: Widgets API is part of Seller API.\nconst initialWidgetsConfiguration = new Configuration({\n basePath: process.env.WIDGETS_API_URL_ORIGIN,\n});\n\nexport const api = {\n sellerApi: {\n catalog: new SellerCatalogApi(initialWidgetsConfiguration),\n },\n};\n\nexport type ApiType = typeof api;\n\nexport {\n RentalOverviewRequest,\n CartRentalOverviewResult,\n ResponseError,\n RequiredError,\n RentContractTerm,\n RentContractTermDurationEnum,\n CartProductRentalOverview,\n SellerProductReference,\n ProductRentalPricingDetails,\n} from \"seller-api-client\";\n","import type { PayloadAction } from \"@reduxjs/toolkit\";\nimport { createSlice } from \"@reduxjs/toolkit\";\n\nimport { DEFAULT_LOCALE } from \"$/i18n/utils/locale.constants\";\n// circular dependency may need fixing, but disabling linter works for now\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../store\";\n\nexport interface ThemeConfig {\n primaryColor: string;\n}\n\n// Define a type for the slice state\ninterface ConfigState {\n locale?: string;\n widgetId?: string;\n themeConfig?: ThemeConfig;\n}\n\n// Define the initial state using that type\nconst initialState: ConfigState = {\n locale: DEFAULT_LOCALE,\n};\n\n/* eslint-disable no-param-reassign */\nexport const configSlice = createSlice({\n name: \"config\",\n initialState,\n reducers: {\n setLocale: (state, action: PayloadAction) => {\n state.locale = action.payload;\n },\n setWidgetId: (state, action: PayloadAction) => {\n state.widgetId = action.payload;\n },\n setThemeConfig: (state, action: PayloadAction) => {\n state.themeConfig = action.payload;\n },\n },\n});\n\nexport const { setLocale, setWidgetId, setThemeConfig } = configSlice.actions;\n\nexport default configSlice.reducer;\n\nexport const getLocaleConfig = (state: RootStateWidgets): string =>\n state.config.locale;\n\nexport const getWidgetIdConfig = (state: RootStateWidgets): string =>\n state.config.widgetId;\n\nexport const getThemeConfig = (state: RootStateWidgets): ThemeConfig =>\n state.config.themeConfig;\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../../store\";\nimport { ApiResourceStatus } from \"../../common/models\";\nimport { ApiType, RequiredError, ResponseError } from \"../../api\";\nimport { CartItem } from \"../catalog-models\";\n\nimport { getLocaleConfig, getWidgetIdConfig } from \"../config-slice\";\n\nfunction getListingSliceState(state: RootStateWidgets) {\n const sliceState = state.listing;\n return {\n lastFetchTime: sliceState.lastFetchTime,\n lastInputPayload: sliceState.lastInputPayload,\n getRentalPricesStatus: sliceState.getRentalPricesStatus,\n };\n}\n\ntype GetListRecommendedPricesPayload = {\n cartItems: CartItem[];\n};\n\nexport const getListRecommendedPrices = createAsyncThunk(\n \"widget-api/getListRecommendedPrices\",\n async (\n { cartItems }: GetListRecommendedPricesPayload,\n { extra, rejectWithValue, getState }\n ) => {\n const localeConfig = getLocaleConfig(getState() as RootStateWidgets);\n const widgetIdConfig = getWidgetIdConfig(getState() as RootStateWidgets);\n const widgetApi = (extra as ApiType).sellerApi.catalog;\n\n try {\n const recommendedPrices =\n await widgetApi.catalogWidgetsListRecommendedRentalPrices(\n {\n widgetsListRecommendedRentalPricesRequestBody: {\n widgetId: widgetIdConfig,\n pricingRequests: cartItems,\n },\n },\n // Extend the headers with Accept-Language.\n // This is done here instead of the api client because the api client\n // doesn't have access to the locale on first load.\n (requestContext) => {\n const newInit = {\n ...requestContext.init,\n headers: {\n ...requestContext.init.headers,\n \"Accept-Language\": localeConfig,\n },\n };\n return Promise.resolve(newInit);\n }\n );\n return recommendedPrices;\n } catch (error: unknown) {\n if (error instanceof ResponseError) {\n return rejectWithValue({\n code: error.response.status,\n message: error.message,\n });\n }\n if (error instanceof RequiredError) {\n return rejectWithValue({\n code: 400,\n message: error.toString(),\n });\n }\n return rejectWithValue({\n code: 422,\n message: \"Unprocessable Entity\",\n });\n }\n },\n {\n condition: ({ cartItems }, { getState }) => {\n const ONE_MINUTE = 60 * 1000;\n\n const state = getState() as RootStateWidgets;\n\n const { lastFetchTime, lastInputPayload, getRentalPricesStatus } =\n getListingSliceState(state);\n\n const currentTime = Date.now();\n\n const isFetchInFlight =\n getRentalPricesStatus === ApiResourceStatus.Pending;\n\n const inputsChanged =\n JSON.stringify(lastInputPayload) !== JSON.stringify(cartItems);\n const shouldExpireCache = currentTime - lastFetchTime > ONE_MINUTE;\n\n return !isFetchInFlight && (inputsChanged || shouldExpireCache);\n },\n }\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\n// circular dependency may need fixing, but disabling linter works for now\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../../store\";\nimport { ApiResourceStatus, Slice } from \"../../common/models\";\nimport { ApiType, RequiredError, ResponseError } from \"../../api\";\nimport { CartItem } from \"../catalog-models\";\n\nimport { getLocaleConfig, getWidgetIdConfig } from \"../config-slice\";\n\nfunction getSliceState(state: RootStateWidgets, slice: Slice) {\n const sliceState = state[slice];\n return {\n lastFetchTime: sliceState.lastFetchTime,\n lastInputPayload: sliceState.lastInputPayload,\n getRentalOverviewStatus: sliceState.getRentalOverviewStatus,\n };\n}\n\ntype GetRentalOverviewPayload = {\n cartItems: CartItem[];\n slice: Slice;\n};\n\nexport const getRentalOverview = createAsyncThunk(\n \"widget-api/getRentalOverview\",\n async (\n { cartItems }: GetRentalOverviewPayload,\n { extra, rejectWithValue, getState }\n ) => {\n const localeConfig = getLocaleConfig(getState() as RootStateWidgets);\n const widgetIdConfig = getWidgetIdConfig(getState() as RootStateWidgets);\n const widgetApi = (extra as ApiType).sellerApi.catalog;\n\n try {\n const cartRentalOverview =\n await widgetApi.catalogWidgetsCartRentalOverview(\n {\n widgetsCartRentalOverviewRequestBody: {\n widgetId: widgetIdConfig,\n products: cartItems,\n },\n },\n // Extend the headers with Accept-Language.\n // This is done here instead of the api client because the api client\n // doesn't have access to the locale on first load.\n (requestContext) => {\n const newInit = {\n ...requestContext.init,\n headers: {\n ...requestContext.init.headers,\n \"Accept-Language\": localeConfig,\n },\n };\n return Promise.resolve(newInit);\n }\n );\n return cartRentalOverview;\n } catch (error: unknown) {\n if (error instanceof ResponseError) {\n return rejectWithValue({\n code: error.response.status,\n message: error.message,\n });\n }\n if (error instanceof RequiredError) {\n return rejectWithValue({\n code: 400,\n message: error.toString(),\n });\n }\n return rejectWithValue({\n code: 422,\n message: \"Unprocessable Entity\",\n });\n }\n },\n {\n condition: ({ cartItems, slice }, { getState }) => {\n const ONE_MINUTE = 60 * 1000;\n\n const state = getState() as RootStateWidgets;\n\n const { lastFetchTime, lastInputPayload, getRentalOverviewStatus } =\n getSliceState(state, slice);\n\n const currentTime = Date.now();\n\n const isFetchInFlight =\n getRentalOverviewStatus === ApiResourceStatus.Pending;\n\n const inputsChanged =\n JSON.stringify(lastInputPayload) !== JSON.stringify(cartItems);\n const shouldExpireCache = currentTime - lastFetchTime > ONE_MINUTE;\n\n return !isFetchInFlight && (inputsChanged || shouldExpireCache);\n },\n }\n);\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=p(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,h as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from\"preact\";export{Component,Fragment,createContext,createElement,createRef}from\"preact\";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,x(u)&&o({t:u})},[n,e,t]),h(function(){return x(u)&&o({t:u}),n(function(){x(u)&&o({t:u})})},[n]),e}function x(n){var t,e,r=n.u,u=n.__;try{var o=r();return!((t=u)===(e=o)&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}}function R(n){n()}function w(n){return n}function k(){return[!1,R]}var I=s;function N(n,t){this.props=n,this.context=t}function M(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.prototype.isReactComponent=!0,u.__f=!0,u.type=n,u}(N.prototype=new n).isPureReactComponent=!0,N.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var L=function(n,t){return null==n?null:r(r(n).map(t))},O={map:L,forEach:L,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},F=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);F(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return t(r,o)}return o.displayName=\"Lazy\",o.__f=!0,o}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;function rn(){}function un(){return this.cancelBubble}function on(){return this.defaultPrevented}e.event=function(n){return en&&(n=en(n)),n.persist=rn,n.isPropagationStopped=un,n.isDefaultPrevented=on,n.nativeEvent=n};var ln,cn={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1===e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var c=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===c&&\"no\"===l?l=!1:\"o\"===c[0]&&\"n\"===c[1]?\"ondoubleclick\"===c?i=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===c?i=\"onfocusin\":\"onblur\"===c?i=\"onfocusout\":J.test(i)&&(i=c):c=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===c&&u[i=c]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),\"select\"==e&&null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",cn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,fn&&fn(n)};var an=e.__r;e.__r=function(n){an&&an(n),ln=n.__c};var sn=e.diffed;e.diffed=function(n){sn&&sn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),ln=null};var hn={ReactCurrentDispatcher:{current:{readContext:function(n){return ln.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},vn=\"18.3.1\";function dn(n){return t.bind(null,n)}function mn(n){return!!n&&n.$$typeof===q}function pn(n){return mn(n)&&n.type===u}function yn(n){return!!n&&!!n.displayName&&(\"string\"==typeof n.displayName||n.displayName instanceof String)&&n.displayName.startsWith(\"Memo(\")}function _n(n){return mn(n)?f.apply(null,arguments):n}function bn(n){return!!n.__k&&(o(null,n),!0)}function Sn(n){return n&&(n.base||1===n.nodeType&&n)||null}var gn=function(n,t){return n(t)},En=function(n,t){return n(t)},Cn=u,xn=mn,Rn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:R,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:O,render:nn,hydrate:tn,unmountComponentAtNode:bn,createPortal:$,createElement:t,createContext:l,createFactory:dn,cloneElement:_n,createRef:c,Fragment:u,isValidElement:mn,isElement:xn,isFragment:pn,isMemo:yn,findDOMNode:Sn,Component:n,PureComponent:N,memo:M,forwardRef:D,flushSync:En,unstable_batchedUpdates:gn,StrictMode:Cn,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:hn};export{O as Children,N as PureComponent,Cn as StrictMode,P as Suspense,B as SuspenseList,hn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_n as cloneElement,dn as createFactory,$ as createPortal,Rn as default,Sn as findDOMNode,En as flushSync,D as forwardRef,tn as hydrate,xn as isElement,pn as isFragment,yn as isMemo,mn as isValidElement,z as lazy,M as memo,nn as render,R as startTransition,bn as unmountComponentAtNode,gn as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,vn as version};\n//# sourceMappingURL=compat.module.js.map\n","import React from 'react';\nexport var ReactReduxContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ReactReduxContext.displayName = 'ReactRedux';\n}\n\nexport default ReactReduxContext;","// Default to a dummy \"batch\" implementation that just runs the callback\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\nvar batch = defaultNoopBatch; // Allow injecting another batching function later\n\nexport var setBatch = function setBatch(newBatch) {\n return batch = newBatch;\n}; // Supply a getter just to skip dealing with ESM bindings\n\nexport var getBatch = function getBatch() {\n return batch;\n};","import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nfunction createListenerCollection() {\n var batch = getBatch();\n var first = null;\n var last = null;\n return {\n clear: function clear() {\n first = null;\n last = null;\n },\n notify: function notify() {\n batch(function () {\n var listener = first;\n\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get: function get() {\n var listeners = [];\n var listener = first;\n\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n\n return listeners;\n },\n subscribe: function subscribe(callback) {\n var isSubscribed = true;\n var listener = last = {\n callback: callback,\n next: null,\n prev: last\n };\n\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\n\nvar nullListeners = {\n notify: function notify() {},\n get: function get() {\n return [];\n }\n};\nexport function createSubscription(store, parentSub) {\n var unsubscribe;\n var listeners = nullListeners;\n\n function addNestedSub(listener) {\n trySubscribe();\n return listeners.subscribe(listener);\n }\n\n function notifyNestedSubs() {\n listeners.notify();\n }\n\n function handleChangeWrapper() {\n if (subscription.onStateChange) {\n subscription.onStateChange();\n }\n }\n\n function isSubscribed() {\n return Boolean(unsubscribe);\n }\n\n function trySubscribe() {\n if (!unsubscribe) {\n unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n listeners = createListenerCollection();\n }\n }\n\n function tryUnsubscribe() {\n if (unsubscribe) {\n unsubscribe();\n unsubscribe = undefined;\n listeners.clear();\n listeners = nullListeners;\n }\n }\n\n var subscription = {\n addNestedSub: addNestedSub,\n notifyNestedSubs: notifyNestedSubs,\n handleChangeWrapper: handleChangeWrapper,\n isSubscribed: isSubscribed,\n trySubscribe: trySubscribe,\n tryUnsubscribe: tryUnsubscribe,\n getListeners: function getListeners() {\n return listeners;\n }\n };\n return subscription;\n}","import { useEffect, useLayoutEffect } from 'react'; // React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = createSubscription(store);\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useIsomorphicLayoutEffect(function () {\n var subscription = contextValue.subscription;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n };\n}\n\nexport default Provider;","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","import { useContext } from 'react';\nimport { ReactReduxContext } from '../components/Context';\n/**\r\n * A hook to access the value of the `ReactReduxContext`. This is a low-level\r\n * hook that you should usually not need to call directly.\r\n *\r\n * @returns {any} the value of the `ReactReduxContext`\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useReduxContext } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n * const { store } = useReduxContext()\r\n * return
{store.getState()}
\r\n * }\r\n */\n\nexport function useReduxContext() {\n var contextValue = useContext(ReactReduxContext);\n\n if (process.env.NODE_ENV !== 'production' && !contextValue) {\n throw new Error('could not find react-redux context value; please ensure the component is wrapped in a ');\n }\n\n return contextValue;\n}","import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from '../components/Context';\n\nvar refEquality = function refEquality(a, b) {\n return a === b;\n};\n\nfunction useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {\n var _useReducer = useReducer(function (s) {\n return s + 1;\n }, 0),\n forceRender = _useReducer[1];\n\n var subscription = useMemo(function () {\n return createSubscription(store, contextSub);\n }, [store, contextSub]);\n var latestSubscriptionCallbackError = useRef();\n var latestSelector = useRef();\n var latestStoreState = useRef();\n var latestSelectedState = useRef();\n var storeState = store.getState();\n var selectedState;\n\n try {\n if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) {\n var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references\n\n if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) {\n selectedState = newSelectedState;\n } else {\n selectedState = latestSelectedState.current;\n }\n } else {\n selectedState = latestSelectedState.current;\n }\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n err.message += \"\\nThe error may be correlated with this previous error:\\n\" + latestSubscriptionCallbackError.current.stack + \"\\n\\n\";\n }\n\n throw err;\n }\n\n useIsomorphicLayoutEffect(function () {\n latestSelector.current = selector;\n latestStoreState.current = storeState;\n latestSelectedState.current = selectedState;\n latestSubscriptionCallbackError.current = undefined;\n });\n useIsomorphicLayoutEffect(function () {\n function checkForUpdates() {\n try {\n var newStoreState = store.getState(); // Avoid calling selector multiple times if the store's state has not changed\n\n if (newStoreState === latestStoreState.current) {\n return;\n }\n\n var _newSelectedState = latestSelector.current(newStoreState);\n\n if (equalityFn(_newSelectedState, latestSelectedState.current)) {\n return;\n }\n\n latestSelectedState.current = _newSelectedState;\n latestStoreState.current = newStoreState;\n } catch (err) {\n // we ignore all errors here, since when the component\n // is re-rendered, the selectors are called again, and\n // will throw again, if neither props nor store state\n // changed\n latestSubscriptionCallbackError.current = err;\n }\n\n forceRender();\n }\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n return function () {\n return subscription.tryUnsubscribe();\n };\n }, [store, subscription]);\n return selectedState;\n}\n/**\r\n * Hook factory, which creates a `useSelector` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\r\n * @returns {Function} A `useSelector` hook bound to the specified context.\r\n */\n\n\nexport function createSelectorHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {\n return useContext(context);\n };\n return function useSelector(selector, equalityFn) {\n if (equalityFn === void 0) {\n equalityFn = refEquality;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!selector) {\n throw new Error(\"You must pass a selector to useSelector\");\n }\n\n if (typeof selector !== 'function') {\n throw new Error(\"You must pass a function as a selector to useSelector\");\n }\n\n if (typeof equalityFn !== 'function') {\n throw new Error(\"You must pass a function as an equality function to useSelector\");\n }\n }\n\n var _useReduxContext = useReduxContext(),\n store = _useReduxContext.store,\n contextSub = _useReduxContext.subscription;\n\n var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);\n useDebugValue(selectedState);\n return selectedState;\n };\n}\n/**\r\n * A hook to access the redux store's state. This hook takes a selector function\r\n * as an argument. The selector is called with the store state.\r\n *\r\n * This hook takes an optional equality comparison function as the second parameter\r\n * that allows you to customize the way the selected state is compared to determine\r\n * whether the component needs to be re-rendered.\r\n *\r\n * @param {Function} selector the selector function\r\n * @param {Function=} equalityFn the function that will be used to determine equality\r\n *\r\n * @returns {any} the selected state\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useSelector } from 'react-redux'\r\n *\r\n * export const CounterComponent = () => {\r\n * const counter = useSelector(state => state.counter)\r\n * return
{counter}
\r\n * }\r\n */\n\nexport var useSelector = /*#__PURE__*/createSelectorHook();","export * from './exports';\nimport { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates';\nimport { setBatch } from './utils/batch'; // Enable batched updates in our subscriptions for use\n// with standard React renderers (ReactDOM, React Native)\n\nsetBatch(batch);\nexport { batch };","import { CartRentalOverviewResult, SellerProductReference } from \"../../api\";\nimport { Slice, TopiEvent } from \"../../common/models\";\n\ntype HandleEventDispatchingInput = {\n slice: Slice;\n payload: CartRentalOverviewResult;\n};\n\nconst dispatchEvent = (\n eventType: TopiEvent,\n detail: SellerProductReference[]\n) => {\n document.dispatchEvent(new CustomEvent(eventType, { detail }));\n};\n\nconst handleCartCannotCheckout = (payload: CartRentalOverviewResult) => {\n const { canCheckout, productPrices } = payload;\n\n if (canCheckout) {\n return;\n }\n\n const itemsInCartThatCannotCheckout: SellerProductReference[] = productPrices\n .filter((item) => item.canCheckout === false)\n .map((item) => item.sellerProductReference);\n\n dispatchEvent(\"cartCannotCheckout\", itemsInCartThatCannotCheckout);\n};\n\nexport const handleEventDispatching = ({\n slice,\n payload,\n}: HandleEventDispatchingInput) => {\n if (slice === \"cart\") {\n handleCartCannotCheckout(payload);\n }\n};\n","import { createSlice } from \"@reduxjs/toolkit\";\n\n// circular dependency may need fixing, but disabling linter works for now\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../store\";\nimport {\n ApiError,\n ApiResourceStatus,\n mapApiErrorToApiResourceStatus,\n} from \"../common/models\";\nimport { CartRentalOverviewResult } from \"../api\";\nimport { CartItem } from \"./catalog-models\";\nimport { getRentalOverview } from \"./common/rental-overview-thunk\";\nimport { handleEventDispatching } from \"./common/events-handler\";\n\ninterface CartState {\n getRentalOverviewStatus: ApiResourceStatus;\n getRentalOverviewError?: ApiError;\n rentalOverviewForCart?: CartRentalOverviewResult;\n lastFetchTime?: number;\n lastInputPayload?: CartItem[];\n}\n\nconst initialState: CartState = {\n getRentalOverviewStatus: ApiResourceStatus.Stopped,\n getRentalOverviewError: undefined,\n rentalOverviewForCart: undefined,\n};\n\n/* eslint-disable no-param-reassign */\nexport const cartSlice = createSlice({\n name: \"cart\",\n initialState,\n reducers: {\n setLastFetchTime: (state, action) => {\n state.lastFetchTime = action.payload;\n },\n setLastInputPayload: (state, action) => {\n state.lastInputPayload = action.payload;\n },\n },\n extraReducers(builder) {\n builder.addCase(getRentalOverview.pending, (state, { meta }) => {\n if (meta.arg.slice !== \"cart\") {\n return;\n }\n state.getRentalOverviewStatus = ApiResourceStatus.Pending;\n state.getRentalOverviewError = undefined;\n });\n builder.addCase(getRentalOverview.fulfilled, (state, { payload, meta }) => {\n if (meta.arg.slice !== \"cart\") {\n return;\n }\n state.getRentalOverviewStatus = ApiResourceStatus.Found;\n state.rentalOverviewForCart = payload;\n state.getRentalOverviewError = undefined;\n\n state.lastFetchTime = Date.now();\n state.lastInputPayload = meta.arg.cartItems;\n\n handleEventDispatching({\n payload,\n slice: meta.arg.slice,\n });\n });\n builder.addCase(getRentalOverview.rejected, (state, { payload, meta }) => {\n if (meta.arg.slice !== \"cart\") {\n return;\n }\n const apiError = payload as ApiError;\n state.getRentalOverviewStatus = mapApiErrorToApiResourceStatus(apiError);\n state.getRentalOverviewError = apiError;\n });\n },\n});\n\nexport const getFetchedRentalOverviewForCart = (\n state: RootStateWidgets\n): CartRentalOverviewResult | undefined => state.cart.rentalOverviewForCart;\n\nexport default cartSlice.reducer;\n","import { createSlice } from \"@reduxjs/toolkit\";\n\n// circular dependency may need fixing, but disabling linter works for now\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../store\";\nimport {\n ApiError,\n ApiResourceStatus,\n mapApiErrorToApiResourceStatus,\n} from \"../common/models\";\nimport { CartRentalOverviewResult } from \"../api\";\nimport { CartItem } from \"./catalog-models\";\nimport { getRentalOverview } from \"./common/rental-overview-thunk\";\n\ninterface PdpState {\n getRentalOverviewStatus: ApiResourceStatus;\n getRentalOverviewError?: ApiError;\n rentalOverviewForProduct?: CartRentalOverviewResult;\n lastFetchTime?: number;\n lastInputPayload?: CartItem[];\n}\n\nconst initialState: PdpState = {\n getRentalOverviewStatus: ApiResourceStatus.Stopped,\n getRentalOverviewError: undefined,\n rentalOverviewForProduct: undefined,\n};\n\n/* eslint-disable no-param-reassign */\nexport const pdpSlice = createSlice({\n name: \"cart\",\n initialState,\n reducers: {\n setLastFetchTime: (state, action) => {\n state.lastFetchTime = action.payload;\n },\n setLastInputPayload: (state, action) => {\n state.lastInputPayload = action.payload;\n },\n },\n extraReducers(builder) {\n builder.addCase(getRentalOverview.pending, (state, { meta }) => {\n if (meta.arg.slice !== \"pdp\") {\n return;\n }\n state.getRentalOverviewStatus = ApiResourceStatus.Pending;\n state.getRentalOverviewError = undefined;\n });\n builder.addCase(getRentalOverview.fulfilled, (state, { payload, meta }) => {\n if (meta.arg.slice !== \"pdp\") {\n return;\n }\n state.getRentalOverviewStatus = ApiResourceStatus.Found;\n state.rentalOverviewForProduct = payload;\n state.getRentalOverviewError = undefined;\n\n state.lastFetchTime = Date.now();\n state.lastInputPayload = meta.arg.cartItems;\n });\n builder.addCase(getRentalOverview.rejected, (state, { payload, meta }) => {\n if (meta.arg.slice !== \"pdp\") {\n return;\n }\n const apiError = payload as ApiError;\n state.getRentalOverviewStatus = mapApiErrorToApiResourceStatus(apiError);\n state.getRentalOverviewError = apiError;\n });\n },\n});\n\nexport const getFetchedRentalOverviewForProduct = (\n state: RootStateWidgets\n): CartRentalOverviewResult | undefined => state.pdp.rentalOverviewForProduct;\n\nexport default pdpSlice.reducer;\n","import { createSlice } from \"@reduxjs/toolkit\";\n\n// eslint-disable-next-line import/no-cycle\nimport { RootStateWidgets } from \"../store\";\nimport {\n ApiError,\n ApiResourceStatus,\n mapApiErrorToApiResourceStatus,\n} from \"../common/models\";\nimport { ProductRentalPricingDetails } from \"../api\";\nimport { CartItem } from \"./catalog-models\";\nimport { getListRecommendedPrices } from \"./common/list-recommended-prices-thunk\";\n\ninterface ListingState {\n getRentalPricesStatus: ApiResourceStatus;\n getRentalPricesError?: ApiError;\n rentalPricesForProducts?: ProductRentalPricingDetails[];\n lastFetchTime?: number;\n lastInputPayload?: CartItem[];\n}\n\nconst initialState: ListingState = {\n getRentalPricesStatus: ApiResourceStatus.Stopped,\n getRentalPricesError: undefined,\n rentalPricesForProducts: undefined,\n};\n\n/* eslint-disable no-param-reassign */\nexport const listingSlice = createSlice({\n name: \"listing\",\n initialState,\n reducers: {\n setLastFetchTime: (state, action) => {\n state.lastFetchTime = action.payload;\n },\n setLastInputPayload: (state, action) => {\n state.lastInputPayload = action.payload;\n },\n },\n extraReducers(builder) {\n builder.addCase(getListRecommendedPrices.pending, (state) => {\n state.getRentalPricesStatus = ApiResourceStatus.Pending;\n state.getRentalPricesError = undefined;\n });\n builder.addCase(\n getListRecommendedPrices.fulfilled,\n (state, { payload, meta }) => {\n state.getRentalPricesStatus = ApiResourceStatus.Found;\n state.rentalPricesForProducts = payload;\n state.getRentalPricesError = undefined;\n\n state.lastFetchTime = Date.now();\n state.lastInputPayload = meta.arg.cartItems;\n }\n );\n builder.addCase(getListRecommendedPrices.rejected, (state, { payload }) => {\n const apiError = payload as ApiError;\n state.getRentalPricesStatus = mapApiErrorToApiResourceStatus(apiError);\n state.getRentalPricesError = apiError;\n });\n },\n});\n\nexport const getFetchedRentalPricesForProducts = (\n state: RootStateWidgets\n): ProductRentalPricingDetails[] | undefined =>\n state.listing.rentalPricesForProducts;\n\nexport const getListingInputItems = (\n state: RootStateWidgets\n): CartItem[] | undefined => state.listing.lastInputPayload;\n\nexport default listingSlice.reducer;\n","// circular dependency may need fixing, but disabling linter works for now\n/* eslint-disable import/no-cycle */\nimport {\n configureStore,\n combineReducers,\n PreloadedState,\n} from \"@reduxjs/toolkit\";\nimport { useDispatch } from \"react-redux\";\nimport configReducer from \"./slices/config-slice\";\nimport cartReducer from \"./slices/cart-slice\";\nimport pdpReducer from \"./slices/pdp-slice\";\nimport listingReducer from \"./slices/listing-slice\";\nimport { api } from \"./api\";\n\nconst rootReducer = combineReducers({\n config: configReducer,\n cart: cartReducer,\n pdp: pdpReducer,\n listing: listingReducer,\n});\n\nexport type RootStateWidgets = ReturnType;\n\nexport function setupWidgetsRedux(\n preloadedState?: PreloadedState\n) {\n const store = configureStore({\n reducer: rootReducer,\n preloadedState,\n middleware: (getDefaultMiddleware) => {\n return getDefaultMiddleware({\n thunk: {\n extraArgument: api,\n },\n });\n },\n });\n return store;\n}\n\nexport const store = setupWidgetsRedux();\n\n// Infer `RootState` and `AppDispatch` from the store itself\nexport type AppDispatchWidgets = typeof store.dispatch;\nexport type StoreTypeWidgets = typeof store;\nexport const useAppDispatchWidgets = () => useDispatch();\n","export const sanitizeColor = (\n color: string | undefined\n): string | undefined => {\n const hexRegex = /^#([\\da-f]{3}){1,2}$/i;\n if (hexRegex.test(color)) {\n return color;\n }\n\n const rgbRegex =\n /^rgba?\\((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d),\\s*(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d),\\s*(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(,\\s*(1|0|0?\\.\\d+))?\\)$/;\n if (rgbRegex.test(color)) {\n return color;\n }\n\n const hslRegex = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g;\n if (hslRegex.test(color)) {\n return color;\n }\n\n return undefined;\n};\n","/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-console */\nimport { RentalOverviewRequest } from \"./api\";\nimport { SUPPORTED_LOCALES } from \"./i18n/utils/locale.constants\";\nimport { getListRecommendedPrices } from \"./slices/common/list-recommended-prices-thunk\";\nimport { getRentalOverview } from \"./slices/common/rental-overview-thunk\";\nimport {\n setLocale,\n setThemeConfig,\n setWidgetId,\n ThemeConfig,\n} from \"./slices/config-slice\";\nimport { store } from \"./store\";\nimport { sanitizeColor } from \"./utils/sanitize-color\";\n\ntype TopiConfig = {\n locale: string;\n widgetId: string;\n themeConfig: ThemeConfig;\n};\n\nclass TopiElements {\n private _widgetId: string;\n\n private _locale: string;\n\n private _cartItems: RentalOverviewRequest[];\n\n private _pdpItem: RentalOverviewRequest;\n\n private _listingItems: RentalOverviewRequest[];\n\n private _themeConfig: ThemeConfig;\n\n constructor(config: TopiConfig) {\n this.widgetId = config.widgetId;\n this.locale = config.locale;\n this.themeConfig = config.themeConfig;\n }\n\n set locale(localeString: string) {\n try {\n TopiElements.isValidLocale(localeString);\n this._locale = localeString;\n store.dispatch(setLocale(this.locale));\n } catch (error) {\n console.error(error);\n }\n }\n\n get locale() {\n return this._locale;\n }\n\n set widgetId(widgetId: string) {\n this._widgetId = widgetId;\n store.dispatch(setWidgetId(this.widgetId));\n }\n\n get widgetId() {\n return this._widgetId;\n }\n\n set cartItems(items) {\n try {\n TopiElements.isValidCartItemsFormat(items);\n } catch (error) {\n console.error(error);\n }\n\n this._cartItems = items;\n\n try {\n store.dispatch(\n getRentalOverview({ cartItems: this._cartItems, slice: \"cart\" })\n );\n } catch (error) {\n console.error(error);\n }\n }\n\n set pdpItem(item) {\n try {\n TopiElements.isValidCartItemsFormat([item]);\n } catch (error) {\n console.error(error);\n }\n\n this._pdpItem = item;\n\n try {\n store.dispatch(\n getRentalOverview({ cartItems: [this._pdpItem], slice: \"pdp\" })\n );\n } catch (error) {\n console.error(error);\n }\n }\n\n set listingItems(items) {\n try {\n TopiElements.isValidCartItemsFormat(items);\n } catch (error) {\n console.error(error);\n }\n\n this._listingItems = items;\n\n try {\n store.dispatch(\n getListRecommendedPrices({ cartItems: this._listingItems })\n );\n } catch (error) {\n console.error(error);\n }\n }\n\n set themeConfig(themeConfig: ThemeConfig) {\n if (!this._themeConfig) {\n this._themeConfig = { primaryColor: undefined };\n }\n\n this._themeConfig = themeConfig;\n\n if (themeConfig?.primaryColor) {\n this._themeConfig.primaryColor = sanitizeColor(themeConfig.primaryColor);\n }\n\n store.dispatch(setThemeConfig(this.themeConfig));\n }\n\n get themeConfig() {\n return this._themeConfig;\n }\n\n // eslint-disable-next-line class-methods-use-this\n addEventListener(\n eventType: string,\n callback: (event: Event) => void\n ): AbortController {\n const controller = new AbortController();\n\n document.addEventListener(eventType, callback, {\n signal: controller.signal,\n });\n\n // Provided for the user to call controller.abort() to remove the listener for cleanup,\n // which is simpler than calling removeEventListener with the same arguments.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener\n // https://developer.mozilla.org/en-US/docs/Web/API/AbortController\n return controller;\n }\n\n static isValidCartItemsFormat(items): boolean {\n if (!Array.isArray(items)) {\n throw new TypeError(\"items must be an array\");\n }\n\n items.forEach((item) => {\n if (typeof item !== \"object\") {\n throw new TypeError(\"items must be an array of objects\");\n }\n\n if (\n !Object.prototype.hasOwnProperty.call(item, \"sellerProductReference\")\n ) {\n throw new Error(\"items must have a sellerProductReference property\");\n }\n\n if (!Object.prototype.hasOwnProperty.call(item, \"quantity\")) {\n throw new Error(\"items must have a quantity property\");\n }\n\n if (typeof item.quantity !== \"number\") {\n throw new TypeError(\"quantity must be a number\");\n }\n });\n\n return true;\n }\n\n static isValidLocale(localeString: string): boolean {\n if (typeof localeString !== \"string\") {\n throw new TypeError(\"locale must be a string\");\n }\n if (!SUPPORTED_LOCALES.includes(localeString)) {\n throw new Error(\n `locale \"${localeString}\" is not supported. Supported locales: ${SUPPORTED_LOCALES.join(\n \", \"\n )}`\n );\n }\n\n return true;\n }\n}\n\nexport default TopiElements;\n","export default function(t,e,l,n,r){for(e=e.split?e.split(\".\"):e,n=0;n1&&a)return null}return o}if(1!==r.nodeType)return null;var p=String(r.nodeName).toLowerCase();if(\"script\"===p&&!n.options.allowScripts)return null;var l,s,u=n.h(p,function(r){var t=r&&r.length;if(!t)return null;for(var e={},o=0;o\\n\"+r+\"\"):(i=\"xml\",a='\\n'+r+\"\");try{o=(new DOMParser).parseFromString(a,p)}catch(r){n=r}if(o||\"html\"!==t||((o=e||(e=function(){if(document.implementation&&document.implementation.createHTMLDocument)return document.implementation.createHTMLDocument(\"\");var r=document.createElement(\"iframe\");return r.style.cssText=\"position:absolute; left:0; top:-999em; width:1px; height:1px; overflow:hidden;\",r.setAttribute(\"sandbox\",\"allow-forms\"),document.body.appendChild(r),r.contentWindow.document}())).open(),o.write(a),o.close()),o){var l=o.getElementsByTagName(i)[0],s=l.firstChild;return r&&!s&&(l.error=\"Document parse failed.\"),s&&\"parsererror\"===String(s.nodeName).toLowerCase()&&(s.removeChild(s.firstChild),s.removeChild(s.lastChild),l.error=s.textContent||s.nodeValue||n||\"Unknown error\",l.removeChild(s)),l}}(r,t);if(u&&u.error)throw new Error(u.error);var c=u&&u.body||u;l.map=i||p;var m=c&&function(r,t,e,a){return n.visitor=t,n.h=e,n.options=a||o,n(r)}(c,l,a,s);return l.map=null,m&&m.props&&m.props.children||null}(c,u,C,this.map,g)}catch(r){f?f({error:r}):\"undefined\"!=typeof console&&console.error&&console.error(\"preact-markup: \"+r)}if(!1===i)return s||null;var x=w.hasOwnProperty(\"className\")?\"className\":\"class\",b=w[x];return b?b.splice?b.splice(0,0,\"markup\"):\"string\"==typeof b?w[x]+=\" markup\":\"object\"==typeof b&&(b.markup=!0):w[x]=\"markup\",C(\"div\",w,s||null)},i}(t));\n//# sourceMappingURL=preact-markup.module.js.map\n","import { createContext, h, cloneElement } from 'preact';\nimport { useContext } from 'preact/hooks';\nimport delve from 'dlv';\nimport Markup from 'preact-markup';\n\nvar IntlContext = createContext({ intl: {} });\n\n/** Check if an object is not null or undefined\n *\t@private\n */\nfunction defined(obj) {\n\treturn obj!==null && obj!==undefined;\n}\n\n\n/** A simpler Object.assign\n * @private\n */\nfunction assign(obj, props) {\n\tfor (var i in props) {\n\t\tobj[i] = props[i];\n\t}\n\treturn obj;\n}\n\n\n/** Recursively copy keys from `source` to `target`, skipping truthy values already in `target`.\n *\t@private\n */\nfunction deepAssign(target, source) {\n\tvar out = assign({}, target);\n\tfor (var i in source) {\n\t\tif (source.hasOwnProperty(i)) {\n\t\t\tif (target[i] && source[i] && typeof target[i]==='object' && typeof source[i]==='object') {\n\t\t\t\tout[i] = deepAssign(target[i], source[i]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[i] = target[i] || source[i];\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n/** select('foo,bar') creates a mapping: `{ foo, bar }`\n *\t@private\n */\nfunction select(properties) {\n\tproperties = properties || {};\n\tif (typeof properties==='string') {\n\t\tproperties = properties.split(',');\n\t}\n\tif ('join' in properties) {\n\t\tvar selected = {};\n\t\tfor (var i=0; i` is a nestable internationalization definition provider.\n *\tIt exposes an Intl scope & definition into the tree,\n *\tmaking them available to descendant components.\n *\n *\t> **Note:** When nested, gives precedence to keys higher up the tree!\n *\t> This means lower-level components can set their defaults by wrapping themselves\n *\t> in an ``, but still remain localizable by their parent components.\n *\n *\t@name IntlProvider\n *\t@param props\n *\t@param {String} [props.scope]\t\t\tNest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `` keys).\n *\t@param {Boolean} [props.mark=false]\t\tIf `true`, all `` elements will be shown with a red/green background indicating whether they have valid Intl keys.\n *\t@param {Object} [props.definition={}]\tMerge the given definition into the current intl definition, giving the *current* definition precedence (i.e., only adding keys, acting as defaults)\n *\n *\t@example\n *\t// generally imported from a JSON file:\n *\tlet definition = {\n *\t\tfoo: 'Le Feux'\n *\t};\n *\n *\t\n *\t\tThe Foo\n *\t\n *\n *\t// This will render the text:\n *\t\"Le Feux\"\n */\n\nfunction IntlProvider(ref) {\n\tvar scope = ref.scope;\n\tvar mark = ref.mark;\n\tvar definition = ref.definition;\n\tvar rest = objectWithoutProperties( ref, [\"scope\", \"mark\", \"definition\"] );\n\tvar props = rest;\n\n\tvar ref$1 = useContext(IntlContext);\n\tvar parentIntl = ref$1.intl;\n\tvar intl = assign({}, parentIntl || {});\n\n\t// set active scope for the tree if given\n\tif (scope) { intl.scope = scope; }\n\n\t// merge definition into current with lower precedence\n\tif (definition) {\n\t\tintl.dictionary = deepAssign(intl.dictionary || {}, definition);\n\t}\n\n\tif (mark || (typeof location!=='undefined' && String(location).match(URL_FLAG))) {\n\t\tintl.mark = true;\n\t}\n\n\treturn (\n\t\th( IntlContext.Provider, { value: { intl: intl } },\n\t\t\tprops.children\n\t\t)\n\t);\n}\n\n/**\n * Higher-order function that creates an `` wrapper component for the given component. It\n * takes two forms depending on how many arguments it's given:\n * It can take a functional form like:\n * intl(ComponentToWrap, options)\n *\n * or it can take an annotation form like:\n * @intl(options)\n * class ComponentToWrap extends Component {}\n *\n *\t@param {Component or Object} args[0] If there are two arguments, the first argument is the Component to wrap in ``. If there is just one argument, this is the options object to pass as `props` to ``. See the definition of the options param below for details.\n *\t@param {Object} options If there are two arguments, the second argument is Passed as `props` to ``\n *\t@param [options.scope]\t\t\tNest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `` keys).\n *\t@param [options.definition={}]\tMerge the given definition into the current intl definition, giving the *current* definition precedence (i.e., only adding keys, acting as defaults)\n */\nfunction intl(Child, options) {\n\tif (arguments.length<2) {\n\t\toptions = Child;\n\t\treturn function (Child) { return intl(Child, options); };\n\t}\n\tfunction IntlProviderWrapper(props) {\n\t\treturn h(\n\t\t\tIntlProvider,\n\t\t\toptions || {},\n\t\t\th(Child, props)\n\t\t);\n\t}\n\n\tIntlProviderWrapper.getWrappedComponent = Child && Child.getWrappedComponent || (function () { return Child; });\n\treturn IntlProviderWrapper;\n}\n\nvar EMPTY = {};\n\n/** Populate {{template.fields}} within a given string.\n *\n *\t@private\n *\t@param {String} template\tThe string containing fields to be resolved\n *\t@param {Object} [fields={}]\tOptionally nested object of fields, referencable from `template`.\n *\t@example\n *\t\ttemplate('foo{{bar}}', { bar:'baz' }) === 'foobaz'\n */\nfunction template(template, fields, scope, dictionary) {\n\treturn template && template.replace(/\\{\\{([\\w.-]+)\\}\\}/g, replacer.bind(null, fields || EMPTY, scope, dictionary));\n}\n\n/** Replacement callback for injecting fields into a String\n *\t@private\n */\nfunction replacer(currentFields, scope, dictionary, s, field) {\n\tvar parts = field.split('.'),\n\t\tv = currentFields;\n\tfor (var i=0; i nodes\n\t\tif (v && v.type === Text) {\n\t\t\treturn translate(v.props.id, scope, dictionary, v.props.fields, v.props.plural, v.props.fallback);\n\t\t}\n\t}\n\t// allow for recursive {{config.xx}} references:\n\tif (typeof v==='string' && v.match(/\\{\\{/)) {\n\t\tv = template(v, currentFields);\n\t}\n\treturn v;\n}\n\n/** Attempts to look up a translated value from a given dictionary.\n * Also supports json templating using the format: {{variable}}\n * Falls back to default text.\n *\n * @param {String} id \t\t\tIntl field name/id (subject to scope)\n * @param {String} [scope='']\t\tScope, which prefixes `id` with `${scope}.`\n * @param {Object} dictionary\t\tA nested object containing translations\n * @param {Object} [fields={}]\t\tTemplate fields for use by translated strings\n * @param {Number} [plural]\t\tIndicates a quantity, used to trigger pluralization\n * @param {String|Array} [fallback]\tText to return if no translation is found\n * @returns {String} translated\n */\nfunction translate(id, scope, dictionary, fields, plural, fallback) {\n\tif (scope) { id = scope + '.' + id; }\n\n\tvar value = dictionary && delve(dictionary, id);\n\n\t// plural forms:\n\t// key: ['plural', 'singular']\n\t// key: { none, one, many }\n\t// key: { zero, one, other }\n\t// key: { singular, plural }\n\tif ((plural || plural===0) && value && typeof value==='object') {\n\t\tif (value.splice) {\n\t\t\tvalue = value[plural] || value[0];\n\t\t}\n\t\telse if (plural===0 && defined(value.none || value.zero)) {\n\t\t\tvalue = value.none || value.zero;\n\t\t}\n\t\telse if (plural===1 && defined(value.one || value.singular)) {\n\t\t\tvalue = value.one || value.singular;\n\t\t}\n\t\telse {\n\t\t\tvalue = value.some || value.many || value.plural || value.other || value;\n\t\t}\n\t}\n\n\treturn value && template(value, fields, scope, dictionary) || fallback || null;\n}\n\n/** Highlight/colorize the i18n'd node if `mark` is set on `intl` in context. If not, just returns `value`\n *\n *\t@private\n *\t@param {String|VNode} value\tThe l10n'd text/vnode to highlight or pass through\n *\t@param {string} id\tThe key used to lookup the value in the intl dictionary\n */\nfunction HighlightI18N(ref) {\n\tvar value = ref.value;\n\tvar id = ref.id;\n\n\tvar ref$1 = useContext(IntlContext);\n\tvar intl = ref$1.intl;\n\n\tif (intl && intl.mark) {\n\t\tvar dictionaryKey = \"dictionary\" + (intl && intl.scope ? (\".\" + (intl.scope)) : '') + \".\" + id;\n\t\treturn (\n\t\t\th( 'mark', {\n\t\t\t\tstyle: {\n\t\t\t\t\tbackground: value\n\t\t\t\t\t\t? delve(intl, dictionaryKey)\n\t\t\t\t\t\t\t? 'rgba(119,231,117,.5)'\n\t\t\t\t\t\t\t: 'rgba(229,226,41,.5)'\n\t\t\t\t\t\t: 'rgba(228,147,51,.5)'\n\t\t\t\t}, title: id },\n\t\t\t\tvalue\n\t\t\t)\n\t\t);\n\t}\n\n\treturn value;\n}\n\n/** `` renders internationalized text.\n *\tIt attempts to look up translated values from a dictionary in context.\n *\n *\tTemplate strings can contain `{{field}}` placeholders,\n *\twhich injects values from the `fields` prop.\n *\n *\tWhen string lookup fails, renders its children as fallback text.\n *\n *\t@param {Object} props props\n *\t@param {String} props.id Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n *\t@param {ReactElement} [props.children] Fallback text if no definition is found\n *\t@param {Object} [props.fields={}] Values to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `` nodes which will be resolved to their translated value\n *\t@param {Number} [props.plural] Integer \"count\", used to select plural forms\n *\n *\t@example\n *\t// If there is no dictionary in context..\n *\tThe Foo\n *\t// ..produces the text:\n *\t\"The Foo\"\n *\n *\t@example\n *\t// Given a dictionary and some fields..\n *\t\n *\t\tThe Foo\n *\t\n *\t// ..produces the text:\n *\t\"Le Feux BEAR\"\n *\n *\t@example\n *\t// Within a scope, both `id` and the definition are namespaced..\n *\t\n *\t\tThe Foo\n *\t\n *\t// ..produces the text:\n *\t\"Le Feux\"\n */\nfunction Text(ref) {\n\tvar id = ref.id;\n\tvar fallback = ref.children;\n\tvar plural = ref.plural;\n\tvar fields = ref.fields;\n\n\tvar ref$1 = useContext(IntlContext);\n\tvar intl = ref$1.intl;\n\n\tvar value = translate(\n\t\tid,\n\t\tintl && intl.scope,\n\t\tintl && intl.dictionary,\n\t\tfields,\n\t\tplural,\n\t\tfallback\n\t);\n\n\treturn h( HighlightI18N, { id: id, value: value });\n}\n\n/** Translates the property values in an Object, returning a copy.\n *\t**Note:** By default, `String` keys will be treated as Intl ID's.\n *\tPass `true` to return an Object containing *only* translated\n *\tvalues where the prop is a node.\n *\n *\t@private\n *\t@param {Object} props\tAn object with values to translate\n *\t@param {Object} intl\tAn intl context object (eg: `context.intl`)\n *\t@param {Boolean} [onlyTextNodes=false]\tOnly process `` values\n *\t@returns {Object} translatedProps\n */\nfunction translateMapping(props, intl, onlyTextNodes) {\n\tvar out = {};\n\tintl = intl || {};\n\tprops = select(props);\n\tfor (var name in props) {\n\t\tif (props.hasOwnProperty(name) && props[name]) {\n\t\t\tvar def = props[name];\n\n\t\t\t// if onlyTextNodes=true, skip any props that aren't vnodes\n\t\t\tif (!onlyTextNodes && typeof def==='string') {\n\t\t\t\tout[name] = translate(def, intl.scope, intl.dictionary);\n\t\t\t}\n\t\t\telse if (def.type===Text) {\n\t\t\t\t// it's a , just grab its props:\n\t\t\t\tdef = assign({\n\t\t\t\t\t// use children as fallback content\n\t\t\t\t\tfallback: def.props.children\n\t\t\t\t}, def.props);\n\t\t\t\tout[name] = translate(def.id, intl.scope, intl.dictionary, def.fields, def.plural, def.fallback);\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n/** `` is a Compositional Component.\n *\tIt \"renders\" out any `` values in its child's props.\n *\n *\t@name Localizer\n *\t@param {Object} props\n *\t@param {Object} props.children\tChild components with props to localize.\n *\t@param {Object} context\n *\t@param {Object} context.intl\t\t[internal] dictionary and scope info\n *\t@example\n *\t\n *\t\t} />\n *\t\n *\t// produces:\n *\t\n *\n *\t@example\n *\t\n *\t\tOpen Source Software}>\n *\t\t\tOSS\n *\t\t\n *\t\n *\t// produces:\n *\tOSS\n */\nfunction Localizer(ref) {\n\tvar children = ref.children;\n\n\tvar ref$1 = useContext(IntlContext);\n\tvar intl = ref$1.intl;\n\n\treturn children && children.length\n\t\t? children.map(function (child) { return cloneElement(child, translateMapping(child.props, intl, true)); })\n\t\t: children && cloneElement(children, translateMapping(children.props, intl, true));\n}\n\nfunction objectWithoutProperties$1 (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }\n\n/* eslint-disable react/no-danger */\n\n/** `` is just like {@link Text} but it can also contain html markup in rendered strings. It wraps its contents in a `` tag.\n *\n *\t@param {Object} props\t\t\t\tprops\n *\t@param {String} props.id\t\t\tKey to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n *\t@param {Object} [props.fields={}]\tValues to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `` nodes which will be resolved to their translated value\n *\t@param {Number} [props.plural]\t\tInteger \"count\", used to select plural forms\n *\n *\t@example\n *\t// If there is no dictionary in context..\n *\tThe Foo\n *\t// ..produces the vnode:\n *\tThe Foo\n *\n *\t@example\n *\t// Given a dictionary and some fields..\n *\t{{bar}}' }}>\n *\t\tThe Foo\n *\t\n *\t// ..produces the vnode:\n *\tLe Feux BEAR\n *\n *\t@example\n *\t// Within a scope, both `id` and the definition are namespaced..\n *\tFeux' }}>\n *\t\tThe Foo\n *\t\n *\t// ..produces the vnode:\n *\tLe Feux\n *\n *\t@example\n *\t// renders nothing if there is no key match and no fallback\n *\t
\n *\t// ..produces the vnode:\n *\t
\n */\nfunction MarkupText(ref) {\n\tvar id = ref.id;\n\tvar fields = ref.fields;\n\tvar plural = ref.plural;\n\tvar children = ref.children;\n\tvar rest = objectWithoutProperties$1( ref, [\"id\", \"fields\", \"plural\", \"children\"] );\n\tvar props = rest;\n\n\treturn (\n\t\th( Localizer, null,\n\t\t\th( Html, Object.assign({}, { html: h( Text, { id: id, fields: fields, plural: plural, children: children }), id: id }, props))\n\t\t)\n\t);\n}\n\nfunction Html(ref) {\n\tvar html = ref.html;\n\tvar id = ref.id;\n\tvar rest = objectWithoutProperties$1( ref, [\"html\", \"id\"] );\n\tvar props = rest;\n\n\treturn (\n\t\th( HighlightI18N, {\n\t\t\tid: id, value: !html ? html : typeof html === 'string' ? h( Markup, Object.assign({}, { type: \"html\", trim: false }, props, { markup: html })) : h( 'span', null, html ) })\n\t);\n}\n\n/** `@withText()` is a Higher Order Component, often used as a decorator.\n *\n *\tIt wraps a child component and passes it translations\n *\tbased on a mapping to the dictionary & scope in context.\n *\n *\t@param {Object|Function|String} mapping\t\tMaps prop names to intl keys (or `` nodes).\n *\n *\t@example @withText({\n *\t\tplaceholder: 'user.placeholder'\n *\t})\n *\tclass Foo {\n *\t\t// now the `placeholder` prop is our localized String:\n *\t\trender({ placeholder }) {\n *\t\t\treturn \n *\t\t}\n *\t}\n *\n *\t@example @withText({\n *\t\tplaceholder: fallback text\n *\t})\n *\tclass Foo {\n *\t\trender({ placeholder }) {\n *\t\t\treturn \n *\t\t}\n *\t}\n *\n *\t@example @withText('user.placeholder')\n *\tclass Foo {\n *\t\t// for Strings/Arrays, the last path segment becomes the prop name:\n *\t\trender({ placeholder }) {\n *\t\t\treturn \n *\t\t}\n *\t}\n *\n *\t@example Works with functional components, too\n *\tconst Foo = withText('user.placeholder')( props =>\n *\t\t\n *\t)\n *\n * \t@example getWrappedComponent() returns wrapped child Component\n *\tconst Foo = () =>
;\n *\tconst WrappedFoo = withText('user.placeholer')(Foo);\n *\tWrappedFoo.getWrappedComponent() === Foo; // true\n */\nfunction withText(mapping) {\n\treturn function withTextWrapper(Child) {\n\t\tfunction WithTextWrapper(props, context) {\n\t\t\tvar ref = useContext(IntlContext);\n\t\t\tvar intl = ref.intl;\n\n\t\t\tvar map = typeof mapping==='function' ? mapping(props, { intl: intl }) : mapping;\n\t\t\tvar translations = translateMapping(map, intl);\n\t\t\treturn h(Child, assign(assign({}, props), translations));\n\t\t}\n\n\t\tWithTextWrapper.getWrappedComponent = Child && Child.getWrappedComponent || (function () { return Child; });\n\t\treturn WithTextWrapper;\n\t};\n}\n\n/** `useText` is the hook version of {@link withText}\n *\n *\t@param {Object|Function|String} mapping\t\tMaps prop names to intl keys (or `` nodes).\n *\n *\t@example function MyComponent() {\n *\t\tconst { placeholder } = useText({\n *\t\t\tplaceholder: 'user.placeholder'\n *\t\t});\n *\t\treturn \n *\t}\n *\n *\t@example function MyComponent() {\n *\t\tconst { placeholder } = useText({\n *\t\t\tplaceholder: fallback text\n *\t\t});\n *\t\treturn \n *\t}\n *\n *\t@example function MyComponent() {\n *\t\t// for Strings/Arrays, the last path segment becomes the prop name:\n *\t\tconst { placeholder } = useText('user.placeholder');\n *\n *\t\treturn \n *\t}\n */\nfunction useText(mapping) {\n\tvar ref = useContext(IntlContext);\n\tvar intl = ref.intl;\n\n\treturn translateMapping(\n\t\ttypeof mapping==='function' ? mapping({ intl: intl }) : mapping,\n\t\tintl\n\t);\n}\n\nintl.intl = intl;\nintl.IntlContext = IntlContext;\nintl.IntlProvider = IntlProvider;\nintl.Text = Text;\nintl.MarkupText = MarkupText;\nintl.Localizer = Localizer;\nintl.withText = withText;\nintl.useText = useText;\nintl.translate = translate;\n\nexport default intl;\nexport { IntlContext, IntlProvider, Localizer, MarkupText, Text, intl, translate, useText, withText };\n//# sourceMappingURL=preact-i18n.esm.js.map\n","/* eslint-disable unicorn/no-useless-undefined */\n/* eslint-disable no-console */\nimport { VNode } from \"preact\";\nimport { useErrorBoundary } from \"preact/hooks\";\n\ninterface TopiWidgetsErrorBoundaryProps {\n children: VNode;\n}\n\nconst ErrorBoundary = ({\n children,\n}: TopiWidgetsErrorBoundaryProps): VNode | undefined => {\n // TODO PHNX-339: Track production widget errors somewhere\n const [error] = useErrorBoundary();\n\n if (error) {\n console.error(error);\n return undefined;\n }\n\n return children;\n};\n\nexport default ErrorBoundary;\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default isPropValid;\n","import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useLayoutEffect as l}from\"react\";import d from\"shallowequal\";import h from\"@emotion/stylis\";import p from\"@emotion/unitless\";import f from\"@emotion/is-prop-valid\";import m from\"hoist-non-react-statics\";function y(){return(y=Object.assign||function(e){for(var t=1;t ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n1?t-1:0),r=1;r0?\" Args: \"+n.join(\", \"):\"\")):new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s1<<30)&&D(16,\"\"+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M=\"style[\"+N+'][data-styled-version=\"5.3.11\"]',G=new RegExp(\"^\"+N+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),L=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.11\");var i=Y();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,\"$1-$2\")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l=\"\",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),se=/^\\s*\\/\\/.*$/gm,ie=[\":\",\"[\",\".\",\"#\"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new h(a),d=[],p=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(se,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():\"\",m}var ce=r.createContext(),ue=ce.Consumer,le=r.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return s(ce)||de}function fe(){return s(le)||he}function me(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){d(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ce.Provider,{value:u},r.createElement(le.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return\"-\"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,\"-ms-\"):e}var be=function(e){return null==e||!1===e||\"\"===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r1?t-1:0),i=1;i?@[\\\\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,\"-\").replace(De,\"\")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,\"toString\",{value:function(){return\".\"+A.styledComponentId}}),i&&m(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!n(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Pe(a),r.memo(d)}function We(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\"+t+\"\"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]=\"\",t[\"data-styled-version\"]=\"5.3.11\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[r.createElement(\"style\",y({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):r.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+b(e)+'\"'),r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName=\"WithTheme(\"+b(e)+\")\",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default qe;export{Ue as ServerStyleSheet,ue as StyleSheetConsumer,ce as StyleSheetContext,me as StyleSheetManager,Ge as ThemeConsumer,Me as ThemeContext,Le as ThemeProvider,Ze as __PRIVATE__,$e as createGlobalStyle,Ae as css,_ as isStyledComponent,We as keyframes,Xe as useTheme,A as version,Je as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNC42IDE4LjQiIGZpbGw9Im5vbmUiPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMDE1OF8yNzg4MCkiPjxwYXRoIGQ9Ik0zMi4wMzUgMC4wMTgwMDU0SDIxLjg3NjJDMjAuNTQyNyAwLjAxODAwNTQgMTkuNDU3NSAxLjA2NjcyIDE5LjQ1NzUgMi4zNTcwNUMxOS40NTc1IDMuNjQ2MTkgMjAuNTQyNyA0LjY5NDkxIDIxLjg3NjIgNC42OTQ5MUgzMi4wMzVDMzMuMzY4NSA0LjY5NDkxIDM0LjQ1MzcgMy42NDYxOSAzNC40NTM3IDIuMzU1ODZDMzQuNDUzNyAxLjA2NjYgMzMuMzY4NSAwLjAxODAwNTQgMzIuMDM1IDAuMDE4MDA1NFoiIGZpbGw9IiMwMDJCRkYiLz48cGF0aCBkPSJNMzIuMDU5NCAwLjAwNTU1NDJDMzAuNzE3OSAwLjAwNTU1NDIgMjkuNjI2NSAxLjA2MDQ0IDI5LjYyNjUgMi4zNTcwNUMyOS42MjY1IDMuNjUzNjYgMzAuNzE3OCA0LjcwODU0IDMyLjA1OTQgNC43MDg1NEMzMy40MDA5IDQuNzA4NTQgMzQuNDkyMSAzLjY1MzY2IDM0LjQ5MjEgMi4zNTcwNUMzNC40OTIxIDEuMDYwNDQgMzMuNDAwOSAwLjAwNTU1NDIgMzIuMDU5NCAwLjAwNTU1NDJaIiBmaWxsPSIjRkYwMDYyIi8+PHBhdGggZD0iTTQuNDMxNTggMy41NzYxTDEuNjM5ODggMy41NzU4N0wxLjYzODkgNS44MjI4TDAuMDA3NTY4MzYgNS44MjI5MUwwLjAwNzkzNjEgOC4xODcwOUwxLjYzODE2IDguMTg3OTJMMS42Mzg2NSAxNC43Mjc4TDQuNDMxNDYgMTQuNzI4TDQuNDMyMTkgOC4xODgyN0w2LjIwMjEyIDguMTg3NDVMNi4yMDE3NSA1LjgyMzI3TDQuNDMxODIgNS44MjI4TDQuNDMxNTggMy41NzYxWiIgZmlsbD0id2hpdGUiLz48cGF0aCBkPSJNMTQuNTg5MyA2LjIzNTI2QzEzLjgwMzkgNS44MjY2MSAxMi45MjIzIDUuNjIxMjcgMTIuMDMwNSA1LjYzOTQxQzExLjE0MjIgNS42MjUwNyAxMC4yNjQ3IDUuODI5NjkgOS40ODA2OSA2LjIzMzk1QzguNzQ2MTYgNi42MTQ1MSA4LjEzMzkgNy4xODI3MyA3LjcxMDY1IDcuODc2NzRDNy4yNzI2NyA4LjYwNjA3IDcuMDQ5MDkgOS40MzcyNSA3LjA2MzkzIDEwLjI4MDVDNy4wNDk0NSAxMS4xMTQzIDcuMjcxOTQgMTEuOTM2IDcuNzA3MjEgMTIuNjU2QzguMTMwODQgMTMuMzQ5IDguNzQzNTggMTMuOTE2IDkuNDc4MjQgMTQuMjk0OUMxMS4wODI2IDE1LjA4NyAxMi45ODI2IDE1LjA4NyAxNC41ODcgMTQuMjk1MUMxNS4zMTggMTMuOTEyMyAxNS45MjcgMTMuMzQzOSAxNi4zNDgzIDEyLjY1MTFDMTYuNzgyOSAxMS45Mjk3IDE3LjAwNDkgMTEuMTA3MSAxNi45OTA0IDEwLjI3MjNDMTcuMDA2MSA5LjQyODU5IDE2Ljc4MzUgOC41OTY3MSAxNi4zNDY3IDcuODY2MDdDMTUuOTI1MSA3LjE3ODIyIDE1LjMxNzYgNi42MTQ1MSAxNC41ODkzIDYuMjM1MjZaTTE0LjE0OTkgMTAuMjg0N0MxNC4xNjc0IDEwLjY5MDggMTQuMDc3NSAxMS4wOTQ2IDEzLjg4ODggMTEuNDU3OUMxMy43MTY2IDExLjc5MDYgMTMuNDU3IDEyLjA3MzYgMTMuMTM2MiAxMi4yNzlDMTIuNDY0NSAxMi42ODEgMTEuNjE1MiAxMi42ODEzIDEwLjk0MzEgMTIuMjhDMTAuNjE3OCAxMi4wNzY2IDEwLjM1NDMgMTEuNzkzNCAxMC4xNzk3IDExLjQ1OUM5Ljk5MTI3IDExLjA5NDkgOS44OTYyMiAxMC42OTIxIDkuOTAyMjMgMTAuMjg1QzkuODkzMDMgOS44NjY1MyA5Ljk4ODgyIDkuNDUyMDcgMTAuMTgxNCA5LjA3NzJDMTAuMzU1IDguNzQxODIgMTAuNjE4OSA4LjQ1Nzg4IDEwLjk0NSA4LjI1NDhDMTEuMjcwNSA4LjA1MjU1IDExLjY1MDcgNy45NDc3NSAxMi4wMzc4IDcuOTUzOEMxMi40MjY2IDcuOTQ1ODUgMTIuODA5MyA4LjA0NzU3IDEzLjEzOTEgOC4yNDY2MkMxMy40NjM1IDguNDQ4NjQgMTMuNzI0NyA4LjczMjU3IDEzLjg5NCA5LjA2NzcyQzE0LjA4NSA5LjQ0NjI2IDE0LjE3NDcgOS44NjUxIDE0LjE1NDggMTAuMjg1OEwxNC4xNDk5IDEwLjI4NDdaIiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik0yNi40MzA0IDYuMjQxMjJDMjUuODA2OSA1Ljg0NjggMjUuMDc1NSA1LjY0MTk0IDI0LjMzMDQgNS42NTMwOEMyMy44MTMyIDUuNjUxNTQgMjMuMzAwNiA1Ljc0NjE0IDIyLjgyMDQgNS45MzE4QzIyLjM3OTIgNi4wOTY5NCAyMS45NzUzIDYuMzQzMjkgMjEuNjMxMiA2LjY1NzIyQzIxLjU5NDcgNi42OTE5NiAyMS41NTg0IDYuNzI4IDIxLjUyNDYgNi43NjM5MkwyMS40NjczIDUuODI2NzZMMTguODE0MiA1LjgyNjE3TDE4LjgxODkgMTguNDE3M0gyMS42MzAyTDIxLjYyOTkgMTMuODM4NEMyMi45MzIzIDE1LjAzNTkgMjQuOTExOSAxNS4yMTk5IDI2LjQyNjYgMTQuMjg0NUMyNy4wNTU5IDEzLjg3NjIgMjcuNTU5MyAxMy4zMTExIDI3Ljg4MzkgMTIuNjQ5QzI4LjI0NTQgMTEuOTExMSAyOC40MjQxIDExLjEwMiAyOC40MDYgMTAuMjg1OEMyOC40MjE4IDkuNDU2NiAyOC4yNDA2IDguNjM0OTIgMjcuODc2NCA3Ljg4NEMyNy41NTg0IDcuMjE5NCAyNy4wNTgzIDYuNjUxMjkgMjYuNDMwNCA2LjI0MTIyWk0yNS40MzIzIDExLjQ5ODJDMjUuMjgyNCAxMS44MzA2IDI1LjAzNTIgMTIuMTEzMyAyNC43MjEzIDEyLjMxMTZDMjQuMzk2MyAxMi41MDY1IDI0LjAxOTQgMTIuNjA1NCAyMy42MzY5IDEyLjU5NkMyMy4yNDcyIDEyLjYwNTggMjIuODYyNyAxMi41MDcxIDIyLjUyOTQgMTIuMzExNUMyMi4yMDk5IDEyLjExNTEgMjEuOTU1OCAxMS44MzM2IDIxLjc5OCAxMS41MDA4QzIxLjYxNzMgMTEuMTE4IDIxLjUyODEgMTAuNzAwOSAyMS41MzcyIDEwLjI4MDNDMjEuNTI1OSA5Ljg1MzA1IDIxLjYxNDkgOS40Mjg2MyAyMS43OTc1IDkuMDM5NDJDMjEuOTU2NCA4LjcwODY2IDIyLjIwNzkgOC40MjczMyAyMi41MjMyIDguMjI3MUMyMi44NTU2IDguMDI2NTEgMjMuMjQxNSA3LjkyNTUgMjMuNjMzMyA3LjkzNjUyQzI0LjAxNyA3LjkyNzYzIDI0LjM5NDcgOC4wMzAxOCAyNC43MTc2IDguMjMwNzdDMjUuMDMwNSA4LjQzMzg1IDI1LjI3NzEgOC43MTg3MyAyNS40MjgzIDkuMDUyMzRDMjUuNjA1MiA5LjQzOTA2IDI1LjY5MzQgOS44NTgyNiAyNS42ODY3IDEwLjI4MTFDMjUuNjk1MSAxMC43MDA3IDI1LjYwODMgMTEuMTE2OSAyNS40MzIzIDExLjUwMDZWMTEuNDk4MloiIGZpbGw9IndoaXRlIi8+PHBhdGggZD0iTTMzLjE3NzMgNS44MjE1M0gzMC4zODM1VjE0LjcyNkgzMy4xNzczVjUuODIxNTNaIiBmaWxsPSJ3aGl0ZSIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzEwMTU4XzI3ODgwIj48cmVjdCB3aWR0aD0iMzQuNiIgaGVpZ2h0PSIxOC40IiBmaWxsPSJ3aGl0ZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==\"","export const DEFAULT_FONT_SIZE = 16;\n\nexport const pxScaled = (px: number): string => {\n const factor = px / DEFAULT_FONT_SIZE;\n return `calc(var(--font-size-base) * ${factor})`;\n};\n","import { pxScaled } from \"$/ui/utils/px-scaled\";\n\nexport const DEFAULT_FONT_SIZE = \"16px\";\n\nexport const breakpoints = {\n s: 400,\n m: 800,\n l: 1200,\n xl: 1440,\n} as const;\n\nexport type Breakpoint = keyof typeof breakpoints;\n\nexport const colors = {\n // Brand colors\n topiBlue05: \"#E5EAFF\",\n topiBlue10: \"#CCD5FF\",\n topiBlue30: \"#6680FF\",\n topiBlue40: \"#3355FF\",\n topiBlue50: \"#002BFF\",\n topiBlue60: \"#0022CC\",\n topiBlue70: \"#001A99\",\n\n topiPink10: \"#FFCCE0\",\n topiPink50: \"#FF0062\",\n\n // Grey scale\n white: \"#FFFFFF\",\n black: \"#000000\",\n\n grey04: \"#F2F4F8\",\n grey10: \"#DFE4EC\",\n grey15: \"#D2D7DF\",\n grey20: \"#C6CBD2\",\n grey30: \"#ACB1B9\",\n grey40: \"#93989F\",\n grey60: \"#6B6F75\",\n grey80: \"#303236\",\n grey90: \"#18191B\",\n\n // State colors\n green05: \"#EDF8F5\",\n green10: \"#DBF0EB\",\n green70: \"#009974\",\n yellow05: \"#FFF4E5\",\n yellow10: \"#FFE8CC\",\n yellow50: \"#FF8A00\",\n red05: \"#FDE8E8\",\n red10: \"#FAD1D1\",\n red40: \"#EB4747\",\n red50: \"#E61919\",\n red60: \"#C80404\",\n red70: \"#990800\",\n\n // Alpha\n alpha04: \"rgba(24, 25, 27, 0.04)\",\n alpha08: \"rgba(24, 25, 27, 0.08)\",\n alpha20: \"rgba(0, 9, 51, 0.2)\",\n alpha40: \"rgba(0, 9, 51, 0.4)\",\n} as const;\n\nexport type Color = keyof typeof colors;\n\nexport type Colors = (typeof colors)[Color];\n\nexport const sizes = {\n sz002: pxScaled(2),\n sz004: pxScaled(4),\n sz008: pxScaled(8),\n sz012: pxScaled(12),\n sz016: pxScaled(16),\n sz020: pxScaled(20),\n sz024: pxScaled(24),\n sz032: pxScaled(32),\n sz036: pxScaled(36),\n sz040: pxScaled(40),\n sz044: pxScaled(44),\n sz048: pxScaled(48),\n sz056: pxScaled(56),\n sz064: pxScaled(64),\n sz080: pxScaled(80),\n sz096: pxScaled(96),\n sz128: pxScaled(128),\n sz200: pxScaled(200),\n sz240: pxScaled(240),\n sz260: pxScaled(260),\n sz312: pxScaled(312),\n sz400: pxScaled(400),\n sz480: pxScaled(480),\n sz644: pxScaled(644),\n sz866: pxScaled(866),\n sz1040: pxScaled(1040),\n} as const;\n\nexport type Size = keyof typeof sizes;\n\nexport const spacing = {\n sp001: pxScaled(1),\n sp002: pxScaled(2),\n sp004: pxScaled(4),\n sp008: pxScaled(8),\n sp012: pxScaled(12),\n sp016: pxScaled(16),\n sp020: pxScaled(20),\n sp024: pxScaled(24),\n sp028: pxScaled(28),\n sp032: pxScaled(32),\n sp036: pxScaled(36),\n sp040: pxScaled(40),\n sp044: pxScaled(44),\n sp048: pxScaled(48),\n sp056: pxScaled(56),\n sp064: pxScaled(64),\n sp080: pxScaled(80),\n sp096: pxScaled(96),\n sp128: pxScaled(128),\n} as const;\n\nexport type Spacing = keyof typeof spacing;\n\nexport const fontWeights = {\n light: 300,\n regular: 400,\n medium: 500,\n bold: 600,\n} as const;\n\nexport type FontWeight = keyof typeof fontWeights;\n\nexport const topiFont = \"/fonts/readex-pro.ttf\";\n\nexport const fontFaces = {\n primary:\n \"'Readex Pro', 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\",\n code: \"Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace\",\n} as const;\n\nexport type FontFace = keyof typeof fontFaces;\n\nexport const letterSpacing = {\n xxl: \"0.04em\",\n xl: \"-0.024em\",\n l: \"-0.016em\",\n m: \"-0.012em\",\n s: \"-0.008em\",\n xs: \"-0.004em\",\n} as const;\n\nexport type LetterSpacing = keyof typeof letterSpacing;\n\nexport const typography = {\n headline1: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(96),\n \"line-height\": 1,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.xl,\n },\n headline1small: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(32),\n \"line-height\": 1.125,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.xl,\n },\n headline2: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(32),\n \"line-height\": 1.125,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.l,\n },\n headline2small: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(24),\n \"line-height\": 1.16,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.l,\n },\n headline3: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(20),\n \"line-height\": 1.2,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.m,\n },\n headline4: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(16),\n \"line-height\": 1.25,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.s,\n },\n overline: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(11),\n \"line-height\": 1.45,\n \"font-weight\": fontWeights.regular,\n \"letter-spacing\": letterSpacing.xxl,\n \"text-transform\": \"uppercase\",\n },\n body1Emphasis: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(14),\n \"line-height\": 1.4,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.xs,\n },\n body1: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(14),\n \"line-height\": 1.4,\n \"font-weight\": fontWeights.light,\n \"letter-spacing\": letterSpacing.xs,\n },\n body2Emphasis: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(12),\n \"line-height\": 1.3,\n \"font-weight\": fontWeights.medium,\n \"letter-spacing\": letterSpacing.xs,\n },\n body2: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(12),\n \"line-height\": 1.3,\n \"font-weight\": fontWeights.light,\n \"letter-spacing\": letterSpacing.xs,\n },\n captionEmphasis: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(10),\n \"line-height\": 1.6,\n \"font-weight\": fontWeights.medium,\n },\n caption: {\n \"font-family\": fontFaces.primary,\n \"font-size\": pxScaled(10),\n \"line-height\": 1.6,\n \"font-weight\": fontWeights.light,\n },\n} as const;\n\nexport type Typography = keyof typeof typography;\n\nexport const borderWidths = {\n xs: pxScaled(0.5),\n sm: pxScaled(1),\n md: pxScaled(2),\n} as const;\n\nexport type BorderWidth = keyof typeof borderWidths;\n\nexport const borderRadius = {\n xs: pxScaled(2),\n s: pxScaled(4),\n m: pxScaled(8),\n l: pxScaled(12),\n xl: pxScaled(16),\n xxl: pxScaled(24),\n rounded: \"50%\",\n} as const;\n\nexport type BorderRadius = keyof typeof borderRadius;\n\nexport const blurRadius = {\n overlay: pxScaled(8),\n} as const;\n\nexport type BlurRadius = keyof typeof blurRadius;\n\nexport const transitions = {\n fast: \"100ms ease\",\n medium: \"200ms ease\",\n} as const;\n\nexport type Transition = keyof typeof transitions;\n\nexport const shadows = {\n xs: `0 ${pxScaled(1)} ${pxScaled(2)} ${pxScaled(-2)} ${\n colors.alpha04\n }, 0 ${pxScaled(1)} ${pxScaled(4)} ${colors.alpha04}`,\n s: `0 ${pxScaled(1)} ${pxScaled(4)} ${pxScaled(-2)} ${\n colors.alpha04\n }, 0 ${pxScaled(2)} ${pxScaled(8)} ${colors.alpha04}`,\n m: `0 ${pxScaled(2)} ${pxScaled(8)} ${pxScaled(-2)} ${\n colors.alpha04\n }, 0 ${pxScaled(4)} ${pxScaled(16)} ${colors.alpha04}`,\n l: `0 ${pxScaled(4)} ${pxScaled(16)} ${pxScaled(-2)} ${\n colors.alpha04\n }, ${pxScaled(4)} ${pxScaled(12)} ${pxScaled(32)} ${colors.alpha04}`,\n xl: `0 ${pxScaled(8)} ${pxScaled(32)} ${pxScaled(-2)} ${\n colors.alpha04\n }, 0 ${pxScaled(24)} ${pxScaled(64)} ${colors.alpha04}`,\n} as const;\n\nexport type Shadow = keyof typeof shadows;\n\nexport const backgroundImages = {\n roundedCheckmark:\n \"url(\\\"data:image/svg+xml;utf8,\\\")\",\n checkmark:\n \"url(\\\"data:image/svg+xml;utf8,\\\")\",\n} as const;\n\nexport type BackgroundImage = keyof typeof backgroundImages;\n\nexport const times = {\n slow: 5000,\n medium: 2000,\n fast: 1000,\n superfast: 500,\n};\n\nexport type Time = keyof typeof times;\n\nexport const zIndices = {\n mobileMenu: 1,\n modal: 2_147_483_647,\n} as const;\n","import { breakpoints, Breakpoint } from \"$/ui/styles/tokens/tokens\";\n\ntype SizesMap = Record;\n\n/*\n Use from to add media queries using min-width, instead of use:\n @media (min-width: 320px) {\n width:100%;\n }\n you can use:\n ${from.s} {\n width:100%;\n }\n*/\n\nexport const from: SizesMap = {\n s: `@media (min-width: ${breakpoints.s}px)`,\n m: `@media (min-width: ${breakpoints.m}px)`,\n l: `@media (min-width: ${breakpoints.l}px)`,\n xl: `@media (min-width: ${breakpoints.xl}px)`,\n};\n\nexport function getMediaQuery(breakpoint: Breakpoint): string {\n return from[breakpoint];\n}\n","import { css, FlattenSimpleInterpolation } from \"styled-components\";\n\nimport BackgroundSVG from \"$/ui/assets/backgrounds/bg-full-screen-text-box-layout.svg\";\nimport { from } from \"$/ui/styles/media-queries\";\nimport { pxScaled } from \"$/ui/utils/px-scaled\";\nimport {\n borderRadius,\n borderWidths,\n colors,\n DEFAULT_FONT_SIZE,\n spacing,\n typography,\n Typography,\n} from \"./tokens/tokens\";\n\n/**\n * Sets CSS variables on parent-most element that children elements will reference.\n *\n * CSS variables set externally by widget users:\n * * --topi-font-size-base: The font size in pixels, which can be set by widget users on the host site.\n *\n * CSS variables set internally:\n * * --default-font-size-base: The default font size in pixels.\n * * --font-size-base: The derived font size in pixels that is used throughout the application as a base.\n */\nexport const setTopLevelSharedCssVariables =\n (): FlattenSimpleInterpolation => css`\n --default-font-size-base: ${DEFAULT_FONT_SIZE};\n --font-size-base: var(--topi-font-size-base, var(--default-font-size-base));\n `;\n\nexport const setTypography = (category: Typography): string => `\n ${Object.entries(typography[category])\n .map(([key, value]) => `${key}: ${value};`)\n .join(\"\\n\")}\n`;\n\nexport const setTypographyImportant = (category: Typography): string => `\n ${Object.entries(typography[category])\n .map(([key, value]) => `${key}: ${value} !important;`)\n .join(\"\\n\")}\n`;\n\nexport const screenReaderOnly = (): FlattenSimpleInterpolation => css`\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n`;\n\nconst WRAPPER_WIDTH = 1170;\n\nexport const maxContent = css`\n margin: 0 auto;\n max-width: ${pxScaled(WRAPPER_WIDTH)};\n width: 100%;\n padding: ${spacing.sp032} ${spacing.sp016};\n\n ${from.m} {\n padding: ${spacing.sp032} ${spacing.sp024};\n }\n\n ${from.l} {\n padding: ${spacing.sp032} ${spacing.sp040};\n }\n`;\n\nexport const maxContentWidth = css`\n width: 100%;\n ${from.xl} {\n margin: 0 auto;\n max-width: ${pxScaled(1280)};\n }\n`;\n\n/*\n linesClamp is a function that takes a number of lines as an argument and returns a CSS string that\n will truncate text to that number of lines. With this function you don't need to worry about using a\n hardcoded max-width and no-wrap on your text becauses is not necessary.\n*/\n\nexport const linesClamp = (lines = 1): FlattenSimpleInterpolation => css`\n display: -webkit-box;\n -webkit-line-clamp: ${lines};\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-all;\n`;\n\nconst BG_SIZE_S = `${pxScaled(1211)} ${pxScaled(1165)}`;\nconst BG_SIZE_M_L_XL = `${pxScaled(2095)} ${pxScaled(2014)}`;\n\nconst BG_POSITION_S = `25vw ${pxScaled(-90)}`;\nconst BG_POSITION_M = `40vw ${pxScaled(-325)}`;\nconst BG_POSITION_L = `60vw ${pxScaled(-450)}`;\nconst BG_POSITION_XL = `52vw ${pxScaled(-450)}`;\n\nexport const colorfulBackground = (): FlattenSimpleInterpolation => css`\n background-image: url(${BackgroundSVG});\n background-size: ${BG_SIZE_S};\n /* This is not RTL friendly */\n background-repeat: no-repeat;\n background-position: ${BG_POSITION_S};\n\n ${from.m} {\n background-size: ${BG_SIZE_M_L_XL};\n background-position: ${BG_POSITION_M};\n }\n\n ${from.l} {\n background-position: ${BG_POSITION_L};\n background-attachment: fixed;\n }\n\n ${from.xl} {\n background-position: ${BG_POSITION_XL};\n }\n`;\n\nexport const whiteCardWithRoundedBorders =\n (): FlattenSimpleInterpolation => css`\n padding: ${spacing.sp048} ${spacing.sp024};\n border-radius: ${borderRadius.xxl};\n background-color: ${colors.white};\n text-align: center;\n /* To allow newline translation characters */\n white-space: pre-line;\n\n ${from.l} {\n padding: ${spacing.sp064} ${spacing.sp064} ${spacing.sp048};\n }\n `;\n\nexport const topiOutline = (): FlattenSimpleInterpolation => css`\n outline: none;\n box-shadow: 0 0 0 ${borderWidths.md} ${colors.topiBlue30};\n`;\n","import styled from \"styled-components\";\n\nimport LogoSvg from \"$/ui/assets/svgs/brand/topi-logo-on-black.svg\";\nimport { setTypographyImportant } from \"$/ui/styles/mixins\";\nimport {\n borderRadius,\n colors,\n sizes,\n spacing,\n} from \"$/ui/styles/tokens/tokens\";\nimport { pxScaled } from \"$/ui/utils/px-scaled\";\n\nconst CHECKOUT_BUTTON_MIN_WIDTH = 192;\n\ninterface ContainerProps {\n nonFullWidth?: boolean;\n hasChildren?: boolean;\n}\n\nexport const Container = styled.div`\n ${setTypographyImportant(\"headline4\")};\n color: ${colors.white} !important;\n\n box-sizing: border-box !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n background-color: ${colors.grey90} !important;\n width: ${(props) => (props.nonFullWidth ? undefined : \"100% !important\")};\n padding: ${({ hasChildren }) =>\n hasChildren\n ? `${spacing.sp012} ${spacing.sp024} !important`\n : `${spacing.sp004} ${spacing.sp008} !important`};\n border: none !important;\n border-radius: ${borderRadius.s} !important;\n min-width: ${({ nonFullWidth }) =>\n nonFullWidth ? \"\" : `${pxScaled(CHECKOUT_BUTTON_MIN_WIDTH)} !important`};\n cursor: default !important;\n`;\n\nexport const Logo = styled(LogoSvg)`\n width: ${sizes.sz032} !important;\n height: auto !important;\n margin-inline-start: ${({ hasChildren }) =>\n hasChildren ? `${spacing.sp004} !important` : undefined};\n`;\n","var r=require(\"preact\"),e=/[\"&<]/;function t(r){if(0===r.length||!1===e.test(r))return r;for(var t=0,n=0,o=\"\",f=\"\";n\n {children}\n \n \n );\n}\n\nexport default LogoBadge;\n","// eslint-disable-next-line import/no-cycle\nimport { languageMap } from \"../i18n-provider\";\nimport { DEFAULT_LOCALE } from \"./locale.constants\";\n\nexport function getProcessedLocale(locale: string): string {\n try {\n const regex = /^([a-z]{2})_?([a-z]{2})?$/;\n if (regex === null) {\n return DEFAULT_LOCALE;\n }\n\n const match = locale.toLowerCase().match(regex);\n if (match === null) {\n return DEFAULT_LOCALE;\n }\n\n const processedLocale = match[1];\n if (processedLocale === null) {\n return DEFAULT_LOCALE;\n }\n\n const acceptedLocales = Object.keys(languageMap);\n if (acceptedLocales.includes(processedLocale)) {\n return processedLocale;\n }\n // eslint-disable-next-line no-empty\n } catch {}\n\n return DEFAULT_LOCALE;\n}\n","import { IntlProvider } from \"preact-i18n\";\n\nimport deStrings from \"./translations/de/translation.json\";\nimport enStrings from \"./translations/en/translation.json\";\nimport nlStrings from \"./translations/nl/translation.json\";\n// eslint-disable-next-line import/no-cycle\nimport { getProcessedLocale } from \"./utils/locale\";\nimport { DEFAULT_LOCALE } from \"./utils/locale.constants\";\n\ninterface I18nProviderProps {\n children: JSX.Element | JSX.Element[];\n locale: string;\n}\n\ninterface LocaleData {\n // eslint-disable-next-line @typescript-eslint/ban-types\n definition: {};\n nativeName: string;\n}\n\nexport const languageMap: { [key: string]: LocaleData } = {\n en: { definition: enStrings, nativeName: \"English\" },\n de: { definition: deStrings, nativeName: \"Deutsch\" },\n nl: { definition: nlStrings, nativeName: \"Nederlands\" },\n};\n\nexport function getLang(locale: string) {\n try {\n const processedLocale = getProcessedLocale(locale);\n return languageMap[processedLocale] ?? languageMap[DEFAULT_LOCALE];\n } catch {\n return languageMap[DEFAULT_LOCALE];\n }\n}\n\nexport default function I18nProvider({ children, locale }: I18nProviderProps) {\n const lang = getLang(locale);\n return {children};\n}\n","import { useMemo } from \"react\";\n\nexport function usePriceDecimals(\n locale: string,\n price: number | undefined\n): string | undefined {\n return useMemo(() => {\n return price === undefined || price === null\n ? undefined\n : new Intl.NumberFormat(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(price);\n }, [locale, price]);\n}\n","import { Text } from \"preact-i18n\";\nimport { useSelector } from \"react-redux\";\n\nimport { getLocaleConfig } from \"../../slices/config-slice\";\nimport { usePriceDecimals } from \"$/widgets/cart-rental-summary-label/hooks/use-price-decimals\";\n\nconst CURRENCY_SYMBOLS: Record = {\n EUR: \"€\",\n GBP: \"£\",\n USD: \"$\",\n};\n\nfunction apiToDomainAmount(apiAmount: number | undefined): number | undefined {\n if (apiAmount === undefined) {\n return undefined;\n }\n return apiAmount / 100.0;\n}\n\nexport function useMoneyAmount(\n amount?: number,\n currency?: string\n): JSX.Element | undefined {\n const localeConfig = useSelector(getLocaleConfig);\n const domainAmount = apiToDomainAmount(amount);\n const formattedPrice = usePriceDecimals(localeConfig, domainAmount);\n const symbol = CURRENCY_SYMBOLS[currency];\n\n if (!symbol || !formattedPrice) {\n return undefined;\n }\n\n try {\n return (\n \n );\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n return undefined;\n }\n}\n","export default \"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMyA2TDggMTFMMyA2IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgMTAuNTMyMkw4IDUuNTMyMjNMMTMgMTAuNTMyMiIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4=\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xNi4xMjUgOS43NSAxMC42MjIgMTVsLTIuNzQ3LTIuNjI1Ii8+PHBhdGggc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xMiAyMWE5IDkgMCAxIDAgMC0xOCA5IDkgMCAwIDAgMCAxOFoiLz48L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDIxQzE2Ljk3MDYgMjEgMjEgMTYuOTcwNiAyMSAxMkMyMSA3LjAyOTQ0IDE2Ljk3MDYgMyAxMiAzQzcuMDI5NDQgMyAzIDcuMDI5NDQgMyAxMkMzIDE2Ljk3MDYgNy4wMjk0NCAyMSAxMiAyMVoiIHN0cm9rZT0iIzAwMkJGRiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIvPgo8cGF0aCBkPSJNMTIgNi43NVYxMkgxNy4yNSIgc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xOC43NSA1LjI1TDUuMjUgMTguNzUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xOC43NSAxOC43NUw1LjI1IDUuMjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2LjUgMi4yNUg3LjVDNi42NzE1NyAyLjI1IDYgMi45MjE1NyA2IDMuNzVWMjAuMjVDNiAyMS4wNzg0IDYuNjcxNTcgMjEuNzUgNy41IDIxLjc1SDE2LjVDMTcuMzI4NCAyMS43NSAxOCAyMS4wNzg0IDE4IDIwLjI1VjMuNzVDMTggMi45MjE1NyAxNy4zMjg0IDIuMjUgMTYuNSAyLjI1WiIgc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02IDUuMjVIMTgiIHN0cm9rZT0iIzAwMkJGRiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNNiAxOC43NUgxOCIgc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxOSIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04IDE1LjUzMmE2IDYgMCAxIDAgMC0xMiA2IDYgMCAwIDAgMCAxMloiLz48cGF0aCBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTkuNSA2Ljc4Mkg2Ljk4N0w2LjUgOS43OTVhMS43NSAxLjc1IDAgMSAxIDAgMi40NzUiLz48L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxOSIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04IDE1LjUzMmE2IDYgMCAxIDAgMC0xMiA2IDYgMCAwIDAgMCAxMloiLz48cGF0aCBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTcuNzUgNi4yODItMS41IDQuMjVoM005LjI1IDguNTMydjQiLz48L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNyIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04IDE0LjUzMmE2IDYgMCAxIDAgMC0xMiA2IDYgMCAwIDAgMCAxMloiLz48cGF0aCBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTYuNzUgNi43ODIgMS41LTF2NS43NSIvPjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxOSIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04IDE1LjUzMmE2IDYgMCAxIDAgMC0xMiA2IDYgMCAwIDAgMCAxMloiLz48cGF0aCBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNSA2Ljc4MmgzbC0xLjc1IDIuNWExLjc1IDEuNzUgMCAxIDEtMS4yMzcgMi45ODgiLz48L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxOSIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik04IDE1LjUzMmE2IDYgMCAxIDAgMC0xMiA2IDYgMCAwIDAgMCAxMloiLz48cGF0aCBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNjE5IDcuNDUxYTEuNSAxLjUgMCAwIDEgMi44ODEuNTgxYy4wMDEuMjk5LS4wODguNTktLjI1Ni44Mzh2MEw2LjUgMTIuNTMyaDMiLz48L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuMTI1IDkuNzVIMTYuODc1IiBzdHJva2U9IiMwMDJCRkYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTcuMTI1IDEyLjc1SDE2Ljg3NSIgc3Ryb2tlPSIjMDAyQkZGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0zIDE5LjVWNS4yNUMzIDUuMDUxMDkgMy4wNzkwMiA0Ljg2MDMyIDMuMjE5NjcgNC43MTk2N0MzLjM2MDMyIDQuNTc5MDIgMy41NTEwOSA0LjUgMy43NSA0LjVIMjAuMjVDMjAuNDQ4OSA0LjUgMjAuNjM5NyA0LjU3OTAyIDIwLjc4MDMgNC43MTk2N0MyMC45MjEgNC44NjAzMiAyMSA1LjA1MTA5IDIxIDUuMjVWMTkuNUwxOCAxOEwxNSAxOS41TDEyIDE4TDkgMTkuNUw2IDE4TDMgMTkuNVoiIHN0cm9rZT0iIzAwMkJGRiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K\"","import styled from \"styled-components\";\nimport { sizes } from \"$/ui/styles/tokens/tokens\";\n\nexport const Svg = styled.svg`\n width: ${sizes.sz016};\n height: ${sizes.sz016};\n`;\n","import { h, VNode } from \"preact\";\n\nimport CaretDown from \"$/ui/assets/svgs/icons/caret-down.svg\";\nimport CaretUp from \"$/ui/assets/svgs/icons/caret-up.svg\";\nimport CheckCircle from \"$/ui/assets/svgs/icons/check-circle.svg\";\nimport Clock from \"$/ui/assets/svgs/icons/clock.svg\";\nimport Cross from \"$/ui/assets/svgs/icons/cross.svg\";\nimport DeviceMobile from \"$/ui/assets/svgs/icons/device-mobile.svg\";\nimport NumberCircleFive from \"$/ui/assets/svgs/icons/number-circle-five.svg\";\nimport NumberCircleFour from \"$/ui/assets/svgs/icons/number-circle-four.svg\";\nimport NumberCircleOne from \"$/ui/assets/svgs/icons/number-circle-one.svg\";\nimport NumberCircleThree from \"$/ui/assets/svgs/icons/number-circle-three.svg\";\nimport NumberCircleTwo from \"$/ui/assets/svgs/icons/number-circle-two.svg\";\nimport Receipt from \"$/ui/assets/svgs/icons/receipt.svg\";\n\nimport { Svg } from \"./icon.styles\";\n\nexport const iconTypes = {\n caretDown: CaretDown,\n caretUp: CaretUp,\n cross: Cross,\n checkCircle: CheckCircle,\n clock: Clock,\n deviceMobile: DeviceMobile,\n receipt: Receipt,\n numberCircleOne: NumberCircleOne,\n numberCircleTwo: NumberCircleTwo,\n numberCircleThree: NumberCircleThree,\n numberCircleFour: NumberCircleFour,\n numberCircleFive: NumberCircleFive,\n} as const;\n\nexport type IconName = keyof typeof iconTypes;\n\nexport interface IconProps {\n title?: string;\n className?: string;\n name: IconName;\n}\n\nexport const Icon = ({\n title,\n className,\n name,\n}: IconProps): VNode | undefined => {\n const IconType = name ? iconTypes[name] : undefined;\n\n if (!IconType) {\n return undefined;\n }\n\n return ;\n};\n","/* eslint-disable default-case */\nimport styled, { css } from \"styled-components\";\nimport {\n borderRadius,\n colors,\n spacing,\n sizes,\n} from \"$/ui/styles/tokens/tokens\";\nimport { setTypography } from \"$/ui/styles/mixins\";\nimport { Icon as DefaultIcon } from \"$/ui/components/icon/icon\";\nimport type { CardProps } from \"./card\";\nimport { from } from \"$/ui/styles/media-queries\";\n\ntype CardContainerProps = Required> & {\n hasIcon: boolean;\n};\n\nexport const Container = styled.section`\n padding: var(--card-padding);\n background: var(--card-bg-color);\n border-radius: var(--card-radius);\n\n display: grid;\n gap: ${spacing.sp016};\n grid-template-columns: var(--card-grid-columns);\n grid-template-rows: var(--card-grid-rows);\n\n ${({ type, hasIcon }) => {\n switch (type) {\n case \"primary\": {\n return css`\n --card-bg-color: ${colors.white};\n --card-radius: ${borderRadius.xl};\n --card-padding: ${spacing.sp016};\n --card-grid-columns: none;\n --card-grid-rows: none;\n --card-content-align: top;\n ${setTypography(\"body1\")}\n `;\n }\n case \"secondary\": {\n return css`\n --card-bg-color: ${colors.grey04};\n --card-radius: ${borderRadius.m};\n --card-padding: ${spacing.sp016};\n --card-grid-columns: ${hasIcon ? `auto 1fr` : `none`};\n --card-grid-rows: none;\n --card-content-align: center;\n ${setTypography(\"body2Emphasis\")}\n `;\n }\n }\n return \"\";\n }};\n\n ${from.m} {\n ${({ type }) => {\n switch (type) {\n case \"primary\": {\n return css`\n --card-padding: ${spacing.sp024};\n `;\n }\n }\n return \"\";\n }}\n }\n`;\n\nexport const Content = styled.div`\n align-self: var(--card-content-align);\n flex: 1;\n`;\n\nexport const Icon = styled(DefaultIcon)`\n width: ${sizes.sz024};\n height: ${sizes.sz024};\n align-self: center;\n flex-shrink: 0;\n`;\n","import { FC, ReactNode } from \"react\";\nimport type { IconName } from \"$/ui/components/icon/icon\";\nimport { Container, Content, Icon } from \"./card.styles\";\n\ntype CommonProps = {\n className?: string;\n children?: ReactNode;\n testId?: string;\n};\n\ntype PrimaryOrSecondaryCardProps =\n | {\n // primary cards can have optional headers\n type?: \"primary\";\n icon?: never;\n }\n | {\n // secondary cards can have optional icons\n type: \"secondary\";\n header?: never;\n icon?: IconName;\n };\n\nexport type CardProps = CommonProps & PrimaryOrSecondaryCardProps;\n\nexport const Card: FC = ({\n className,\n children,\n type = \"primary\",\n icon,\n testId,\n}) => {\n return (\n \n {icon ? : undefined}\n {children}\n \n );\n};\n","import { createContext } from \"preact\";\n\nimport { sizes } from \"$/ui/styles/tokens/tokens\";\n\nexport const modalWidth = {\n s: { widthM: sizes.sz480, widthL: sizes.sz480, widthXL: sizes.sz480 },\n m: { widthM: sizes.sz644, widthL: sizes.sz644, widthXL: sizes.sz644 },\n l: { widthM: sizes.sz644, widthL: sizes.sz866, widthXL: sizes.sz866 },\n xl: { widthM: sizes.sz866, widthL: sizes.sz1040, widthXL: sizes.sz1040 },\n} as const;\n\nexport type ModalWidth = keyof typeof modalWidth;\n\nexport interface ModalWidthContextData {\n selectedWidth: ModalWidth;\n}\n\nexport const DEFAULT_MODAL_WIDTH = \"s\";\n\nexport const ModalWidthContext = createContext({\n selectedWidth: DEFAULT_MODAL_WIDTH,\n});\n","import styled from \"styled-components\";\n\nimport { Card } from \"$/ui/components/card/card\";\nimport {\n setTopLevelSharedCssVariables,\n setTypographyImportant,\n} from \"$/ui/styles/mixins\";\nimport {\n blurRadius,\n borderRadius,\n colors,\n sizes,\n spacing,\n zIndices,\n} from \"$/ui/styles/tokens/tokens\";\nimport { modalWidth } from \"./modal-width-context\";\n\nexport const ModalBackdrop = styled.div`\n ${setTopLevelSharedCssVariables()};\n\n position: fixed !important;\n z-index: ${zIndices.modal} !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n background: ${colors.alpha20} !important;\n padding-top: ${spacing.sp064} !important;\n padding-bottom: ${spacing.sp064} !important;\n min-height: auto !important;\n height: auto !important;\n overflow-y: auto !important;\n @supports (backdrop-filter: blur(${blurRadius.overlay})) {\n backdrop-filter: blur(${blurRadius.overlay}) !important;\n }\n`;\n\nexport const ModalContent = styled(Card)<{ width: string }>`\n position: relative !important;\n box-sizing: border-box !important;\n padding: ${spacing.sp040} !important;\n width: ${({ width }) => modalWidth[width]?.widthM};\n margin: auto !important;\n`;\n\nexport const CloseButton = styled.button`\n background: none !important;\n position: absolute !important;\n inset-block-start: ${spacing.sp024} !important;\n inset-inline-end: ${spacing.sp024} !important;\n border: none !important;\n padding: 0 !important;\n cursor: pointer !important;\n height: ${sizes.sz012} !important;\n width: ${sizes.sz012} !important;\n`;\n\nexport const Footer = styled.div`\n display: flex !important;\n justify-content: flex-end !important;\n margin-top: 2rem !important;\n`;\n\nexport const Button = styled.button`\n ${setTypographyImportant(\"body1Emphasis\")};\n background-color: ${colors.topiBlue50} !important;\n border: none !important;\n padding: ${sizes.sz012} ${sizes.sz016} ${sizes.sz012} ${sizes.sz016} !important;\n border-radius: ${borderRadius.xxl} !important;\n font-size: ${sizes.sz012} !important;\n color: ${colors.white} !important;\n cursor: pointer !important;\n &:hover {\n background-color: ${colors.topiBlue60} !important;\n }\n`;\n","import { h } from \"preact\";\nimport { Icon } from \"$/ui/components/icon/icon\";\nimport { ModalWidth } from \"./modal-width-context\";\nimport {\n Button,\n CloseButton,\n Footer,\n ModalBackdrop,\n ModalContent,\n} from \"./modal.styles\";\n\nexport type ModalProps = {\n onClose?: () => void;\n isOpen?: boolean;\n isDismissible?: boolean;\n width?: ModalWidth;\n children: h.JSX.Element | h.JSX.Element[];\n footerButtonAction?: () => void;\n footerButtonText?: JSX.Element;\n};\n\nconst Modal = ({\n children,\n onClose,\n isDismissible,\n width = \"m\",\n footerButtonAction,\n footerButtonText,\n}: ModalProps) => {\n const handleBackdropClick = (event) => {\n if (event.target === event.currentTarget && isDismissible && onClose) {\n onClose();\n }\n };\n\n return (\n \n \n {isDismissible && onClose && (\n \n \n \n )}\n {children}\n\n {footerButtonAction && footerButtonText ? (\n
\n \n
\n ) : undefined}\n
\n \n );\n};\n\nexport default Modal;\n","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzMiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCA3MyAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOS4yNDM0IDYuNjk5NzdIMjYuNTMyN1Y4LjA1OTZIMjMuNjY3NFYxNS43MDQ1SDIyLjA5MTFWOC4wNTk2SDE5LjIzNzFWNi42OTk3N0gxOS4yNDM0Wk0yNi4yMjE0IDkuMTg0NDNIMjcuNTY4NFYxMC40NDI3SDI3LjU5MzZDMjcuNjM5IDEwLjI2NDggMjcuNzIwOSAxMC4wOTMyIDI3Ljg0MTggOS45Mjc5N0MyNy45NjI4IDkuNzYyNzggMjguMTA5IDkuNjAzODkgMjguMjgwMyA5LjQ3MDQ2QzI4LjQ1MTcgOS4zMzA1OSAyOC42NDMyIDkuMjIyNjEgMjguODUyNCA5LjEzMzY1QzI5LjA2MjggOS4wNTA5OSAyOS4yNzgzIDkuMDA2NTEgMjkuNDkzNyA5LjAwNjUxQzI5LjY2MDEgOS4wMDY1MSAyOS43Nzk4IDkuMDEyODEgMjkuODQ0IDkuMDE5MjRDMjkuOTA3IDkuMDI1NTQgMjkuOTcxMyA5LjAzODI2IDMwLjA0MDYgOS4wNDQ2OVYxMC40M0MyOS45Mzk4IDEwLjQxMDkgMjkuODM3OCAxMC4zOTgyIDI5LjcyOTQgMTAuMzg1NUMyOS42MjEgMTAuMzcyOCAyOS41MjAyIDEwLjM2NjUgMjkuNDE4MSAxMC4zNjY1QzI5LjE3NjIgMTAuMzY2NSAyOC45NDgxIDEwLjQxNzIgMjguNzMxNCAxMC41MTI2QzI4LjUxNTkgMTAuNjA3OSAyOC4zMzIgMTAuNzU0IDI4LjE3MiAxMC45Mzg0QzI4LjAxMzIgMTEuMTI5IDI3Ljg4NTkgMTEuMzU3OSAyNy43OTE0IDExLjYzNzVDMjcuNjk1NyAxMS45MTcxIDI3LjY1MTYgMTIuMjM0NyAyNy42NTE2IDEyLjU5N1YxNS42OTgySDI2LjIxNTJWOS4xODQ0M0gyNi4yMjE0Wk0zNi42NDMyIDE1LjcwNDVIMzUuMjMzMlYxNC43OTU3SDM1LjIwNjdDMzUuMDI5MSAxNS4xMjYyIDM0Ljc2ODIgMTUuMzg2OCAzNC40MTkyIDE1LjU4MzhDMzQuMDcwMiAxNS43ODA3IDMzLjcxMzYgMTUuODgyNCAzMy4zNTIgMTUuODgyNEMzMi40OTM5IDE1Ljg4MjQgMzEuODcxNCAxNS42NzI3IDMxLjQ4OTYgMTUuMjQ3QzMxLjEwNzggMTQuODIxMiAzMC45MTc2IDE0LjE3OTMgMzAuOTE3NiAxMy4zMjE1VjkuMTg0NDNIMzIuMzU0VjEzLjE4MTZDMzIuMzU0IDEzLjc1MzYgMzIuNDYyNCAxNC4xNjAzIDMyLjY4NDIgMTQuMzk1NEMzMi45MDA5IDE0LjYzMDUgMzMuMjEyMSAxNC43NTEzIDMzLjYwNjUgMTQuNzUxM0MzMy45MTE0IDE0Ljc1MTMgMzQuMTU4NCAxNC43MDY4IDM0LjM2MjUgMTQuNjExNUMzNC41NjU0IDE0LjUxNjEgMzQuNzMwNCAxNC4zOTU0IDM0Ljg1MTQgMTQuMjM2NUMzNC45Nzg2IDE0LjA4NDEgMzUuMDY4MSAxMy44OTM0IDM1LjEyNDggMTMuNjc3M0MzNS4xODE1IDEzLjQ2MTIgMzUuMjA2NyAxMy4yMjYxIDM1LjIwNjcgMTIuOTcyVjkuMTkwODVIMzYuNjQzMlYxNS43MDQ1Wk0zOS4wOTAyIDEzLjYxMzhDMzkuMTM0MyAxNC4wMzMyIDM5LjI5MyAxNC4zMjU1IDM5LjU2NjQgMTQuNDk3MUMzOS44NDYyIDE0LjY2MjMgNDAuMTc2MyAxNC43NTEzIDQwLjU2NDQgMTQuNzUxM0M0MC42OTggMTQuNzUxMyA0MC44NTA0IDE0LjczODUgNDEuMDIxOCAxNC43MTk1QzQxLjE5MzEgMTQuNzAwNSA0MS4zNTgyIDE0LjY1NiA0MS41MDQ0IDE0LjU5ODhDNDEuNjU4MSAxNC41NDE2IDQxLjc3NzggMTQuNDUyNiA0MS44Nzk5IDE0LjMzODJDNDEuOTc1NiAxNC4yMjM4IDQyLjAxOTcgMTQuMDc3NiA0Mi4wMTM0IDEzLjg5MzRDNDIuMDA3MSAxMy43MDkxIDQxLjkzNjYgMTMuNTU2NiA0MS44MTA2IDEzLjQ0MjJDNDEuNjgzMyAxMy4zMjE1IDQxLjUyNDUgMTMuMjMyNCA0MS4zMjY3IDEzLjE1NjJDNDEuMTMwMSAxMy4wODY0IDQwLjkwNzEgMTMuMDIyNyA0MC42NTM5IDEyLjk3MkM0MC4zOTkzIDEyLjkyMTEgNDAuMTQ0OCAxMi44NjM4IDM5Ljg4NCAxMi44MDY2QzM5LjYxODEgMTIuNzQ5NiAzOS4zNTczIDEyLjY3MzIgMzkuMTA5MSAxMi41OTA3QzM4Ljg2MDggMTIuNTA4IDM4LjYzOTEgMTIuMzkzNiAzOC40NDI1IDEyLjI0NzRDMzguMjQ0NyAxMi4xMDc3IDM4LjA4NTkgMTEuOTIzNCAzNy45NzEyIDExLjcwMUMzNy44NTE1IDExLjQ3ODYgMzcuNzkzNiAxMS4yMDUzIDM3Ljc5MzYgMTAuODc0OUMzNy43OTM2IDEwLjUxODkgMzcuODgzMSAxMC4yMjY2IDM4LjA1NDQgOS45ODUxOEMzOC4yMjU4IDkuNzQzNjMgMzguNDQ4OCA5LjU1Mjk5IDM4LjcwODQgOS40MDY4MkMzOC45NzU1IDkuMjYwNjYgMzkuMjY3OCA5LjE1ODk4IDM5LjU5MTcgOS4wOTU0N0MzOS45MTY3IDkuMDM4MjcgNDAuMjI4IDkuMDA2NTEgNDAuNTIwMyA5LjAwNjUxQzQwLjg1NjcgOS4wMDY1MSA0MS4xODA1IDkuMDQ0NjkgNDEuNDg1NSA5LjExNDVDNDEuNzkwNCA5LjE4NDQzIDQyLjA3MDEgOS4yOTg4NCA0Mi4zMTg0IDkuNDY0MDNDNDIuNTY2NiA5LjYyMjkyIDQyLjc2OTQgOS44MzI1OSA0Mi45MzQ1IDEwLjA4NjlDNDMuMDk5NiAxMC4zNDEgNDMuMjAxNiAxMC42NTI0IDQzLjI0NTcgMTEuMDE0Nkg0MS43NDYzQzQxLjY3NyAxMC42NzE1IDQxLjUyNDUgMTAuNDM2NCA0MS4yNzYzIDEwLjMyMkM0MS4wMjgxIDEwLjIwMTMgNDAuNzQyIDEwLjE0NDEgNDAuNDI0NSAxMC4xNDQxQzQwLjMyMjUgMTAuMTQ0MSA0MC4yMDI4IDEwLjE1MDQgNDAuMDYyOSAxMC4xNjk0QzM5LjkyMyAxMC4xODg1IDM5Ljc5NTggMTAuMjIwMyAzOS42Njg1IDEwLjI2NDhDMzkuNTQ3NiAxMC4zMDkzIDM5LjQ0NTUgMTAuMzc5MiAzOS4zNTczIDEwLjQ2ODFDMzkuMjc0MSAxMC41NTcxIDM5LjIzIDEwLjY3MTUgMzkuMjMgMTAuODE3N0MzOS4yMyAxMC45OTU2IDM5LjI5MyAxMS4xMzUzIDM5LjQxNCAxMS4yNDM0QzM5LjUzNDkgMTEuMzUxNCAzOS42OTM3IDExLjQ0MDQgMzkuODkwMyAxMS41MTY2QzQwLjA4ODEgMTEuNTg2NiA0MC4zMDk5IDExLjY1MDEgNDAuNTY0NCAxMS43MDFDNDAuODE4OSAxMS43NTE3IDQxLjA3OTggMTEuODA4OSA0MS4zNDU2IDExLjg2NjJDNDEuNjA2NSAxMS45MjM0IDQxLjg2MSAxMS45OTk2IDQyLjExNTUgMTIuMDgyM0M0Mi4zNjg4IDEyLjE2NDkgNDIuNTkxOCAxMi4yNzkyIDQyLjc4ODMgMTIuNDI1NEM0Mi45ODYyIDEyLjU3MTUgNDMuMTQ0OSAxMi43NDk2IDQzLjI2NDYgMTIuOTY1NUM0My4zODU2IDEzLjE4MTYgNDMuNDQ5OSAxMy40NTQ5IDQzLjQ0OTkgMTMuNzcyNkM0My40NDk5IDE0LjE2MDMgNDMuMzYwNCAxNC40ODQ0IDQzLjE4MjcgMTQuNzU3N0M0My4wMDUxIDE1LjAyNDYgNDIuNzc1OCAxNS4yNDcgNDIuNDk2IDE1LjQxMjFDNDIuMjE2MyAxNS41Nzc1IDQxLjg5ODggMTUuNzA0NSA0MS41NTYgMTUuNzgwN0M0MS4yMTIgMTUuODU3MSA0MC44NjkzIDE1Ljg5NTEgNDAuNTMyOSAxNS44OTUxQzQwLjExOTYgMTUuODk1MSAzOS43Mzc4IDE1Ljg1MDYgMzkuMzg4OCAxNS43NTU0QzM5LjAzOTggMTUuNjYgMzguNzM0OCAxNS41MjAzIDM4LjQ4MDMgMTUuMzM1OUMzOC4yMjU4IDE1LjE0NTMgMzguMDIyOSAxNC45MTAxIDM3Ljg3NjcgMTQuNjMwNUMzNy43MzA2IDE0LjM1MDkgMzcuNjUzNyAxNC4wMTQxIDM3LjY0MTEgMTMuNjI2NEgzOS4wOTAyVjEzLjYxMzhaTTQzLjgzMDQgOS4xODQ0M0g0NC45MTc4VjcuMjI3MjJINDYuMzU0M1Y5LjE4NDQzSDQ3LjY0OTZWMTAuMjU4NEg0Ni4zNTQzVjEzLjc0MDhDNDYuMzU0MyAxMy44OTM0IDQ2LjM2MDUgMTQuMDIwNCA0Ni4zNzMxIDE0LjEzNDhDNDYuMzg1NyAxNC4yNDI4IDQ2LjQxNzMgMTQuMzM4MiA0Ni40NjE0IDE0LjQxNDRDNDYuNTA2NyAxNC40OTA3IDQ2LjU3NiAxNC41NDc5IDQ2LjY3MTggMTQuNTg2MUM0Ni43NjYzIDE0LjYyNDIgNDYuODg3MiAxNC42NDMzIDQ3LjA1MjMgMTQuNjQzM0M0Ny4xNTQ0IDE0LjY0MzMgNDcuMjU2NCAxNC42NDMzIDQ3LjM1NzIgMTQuNjM2OEM0Ny40NTkzIDE0LjYzMDUgNDcuNTYxNCAxNC42MTc4IDQ3LjY2MjIgMTQuNTkyNFYxNS43MDQ1QzQ3LjUwMzQgMTUuNzIzNiA0Ny4zNDQ2IDE1LjczNjIgNDcuMTk4NSAxNS43NTU0QzQ3LjA0NiAxNS43NzQ0IDQ2Ljg5MzUgMTUuNzgwNyA0Ni43MzQ4IDE1Ljc4MDdDNDYuMzU0MiAxNS43ODA3IDQ2LjA0ODEgMTUuNzQyNiA0NS44MiAxNS42NzI3QzQ1LjU5MDcgMTUuNjAyOCA0NS40MDY3IDE1LjQ5NDggNDUuMjc5NCAxNS4zNTQ5QzQ1LjE0NTkgMTUuMjE1MiA0NS4wNjQgMTUuMDQzNiA0NS4wMTIzIDE0LjgzMzlDNDQuOTY4MiAxNC42MjQyIDQ0LjkzNjcgMTQuMzgyNyA0NC45MzA0IDE0LjExNThWMTAuMjcxMUg0My44NDNWOS4xODQ0M0g0My44MzA0Wk00OC42NjY0IDkuMTg0NDNINTAuMDI3MlYxMC4wNjc3SDUwLjA1MjVDNTAuMjU1MyA5LjY4NjQzIDUwLjUzNSA5LjQxOTU1IDUwLjg5NzkgOS4yNTQzNkM1MS4yNTk2IDkuMDg5MTcgNTEuNjQ3NiA5LjAwNjUxIDUyLjA3MzUgOS4wMDY1MUM1Mi41ODc2IDkuMDA2NTEgNTMuMDMyNCA5LjA5NTQ3IDUzLjQxNDIgOS4yNzk4MUM1My43OTQ4IDkuNDU3NzMgNTQuMTEzNSA5LjcwNTU4IDU0LjM2NjggMTAuMDIzMkM1NC42MjEzIDEwLjM0MSA1NC44MDUzIDEwLjcwOTYgNTQuOTMyNSAxMS4xMjlDNTUuMDU5OCAxMS41NDg1IDU1LjEyMjggMTEuOTk5NiA1NS4xMjI4IDEyLjQ3NjNDNTUuMTIyOCAxMi45MTQ4IDU1LjA2NjEgMTMuMzQwNSA1NC45NTE1IDEzLjc0NzNDNTQuODM2OCAxNC4xNjAzIDU0LjY2NTQgMTQuNTIyNiA1NC40MzczIDE0Ljg0MDJDNTQuMjA4IDE1LjE1OCA1My45MTU3IDE1LjQwNTggNTMuNTYwNCAxNS41OTY1QzUzLjIwMzggMTUuNzg3MSA1Mi43OTE3IDE1Ljg4MjQgNTIuMzA3OSAxNS44ODI0QzUyLjA5ODcgMTUuODgyNCA1MS44ODgzIDE1Ljg2MzQgNTEuNjc5MSAxNS44MjUzQzUxLjQ2ODcgMTUuNzg3MSA1MS4yNjU4IDE1LjcyMzYgNTEuMDc1NiAxNS42NDFDNTAuODg0MSAxNS41NTgzIDUwLjcwMDEgMTUuNDUwMyA1MC41NDEzIDE1LjMxNjlDNTAuMzc2MyAxNS4xODM0IDUwLjI0MjcgMTUuMDMwOSA1MC4xMjgxIDE0Ljg1OTRINTAuMTAyOFYxOC4xMTNINDguNjY2NFY5LjE4NDQzWk01My42ODc2IDEyLjQ1MDhDNTMuNjg3NiAxMi4xNTg1IDUzLjY0ODYgMTEuODcyNiA1My41NzMgMTEuNTkzQzUzLjQ5NjEgMTEuMzEzMyA1My4zODI3IDExLjA3MTggNTMuMjMwMyAxMC44NTU3QzUzLjA3NjUgMTAuNjM5OCA1Mi44ODYzIDEwLjQ2ODEgNTIuNjY0NSAxMC4zNDFDNTIuNDM1MiAxMC4yMTM5IDUyLjE3NDMgMTAuMTQ0MSA1MS44ODIgMTAuMTQ0MUM1MS4yNzg1IDEwLjE0NDEgNTAuODIxMSAxMC4zNTM3IDUwLjUxNjEgMTAuNzczMkM1MC4yMTEyIDExLjE5MjUgNTAuMDU4NyAxMS43NTE3IDUwLjA1ODcgMTIuNDUwOEM1MC4wNTg3IDEyLjc4MTMgNTAuMDk2NSAxMy4wODY0IDUwLjE3OTcgMTMuMzY2QzUwLjI2MTYgMTMuNjQ1NiA1MC4zNzYzIDEzLjg4NyA1MC41NDEzIDE0LjA5MDRDNTAuNzAwMSAxNC4yOTM3IDUwLjg5MTYgMTQuNDUyNiA1MS4xMTM0IDE0LjU2N0M1MS4zMzY0IDE0LjY4NzcgNTEuNTk2IDE0Ljc0NSA1MS44ODgzIDE0Ljc0NUM1Mi4yMTk3IDE0Ljc0NSA1Mi40OTE5IDE0LjY3NSA1Mi43MjEyIDE0LjU0MTZDNTIuOTUwNSAxNC40MDgxIDUzLjEzNDUgMTQuMjMwMiA1My4yODA2IDE0LjAyMDRDNTMuNDI2OCAxMy44MDQ1IDUzLjUzNTIgMTMuNTYyOSA1My41OTgyIDEzLjI4OTZDNTMuNjU0OSAxMy4wMTY0IDUzLjY4NzYgMTIuNzM2OCA1My42ODc2IDEyLjQ1MDhaTTU2LjIyMjggNi42OTk3N0g1Ny42NTkzVjguMDU5Nkg1Ni4yMjI4VjYuNjk5NzdaTTU2LjIyMjggOS4xODQ0M0g1Ny42NTkzVjE1LjcwNDVINTYuMjIyOFY5LjE4NDQzWk01OC45NDMyIDYuNjk5NzdINjAuMzc4NFYxNS43MDQ1SDU4Ljk0MzJWNi42OTk3N1pNNjQuNzgyMiAxNS44ODI0QzY0LjI2MTggMTUuODgyNCA2My43OTgyIDE1Ljc5MzQgNjMuMzkxMiAxNS42MjE5QzYyLjk4NDIgMTUuNDUwMyA2Mi42NDE0IDE1LjIwODggNjIuMzU1NCAxNC45MTAxQzYyLjA3NTcgMTQuNjA1MSA2MS44NTkgMTQuMjQyOCA2MS43MTI4IDEzLjgyMzVDNjEuNTY2NiAxMy40MDQgNjEuNDkxIDEyLjk0MDIgNjEuNDkxIDEyLjQzODFDNjEuNDkxIDExLjk0MjQgNjEuNTY2NiAxMS40ODQ5IDYxLjcxMjggMTEuMDY1NUM2MS44NTkgMTAuNjQ2MSA2Mi4wNzU3IDEwLjI4MzggNjIuMzU1NCA5Ljk3ODc1QzYyLjYzNTEgOS42NzM4MyA2Mi45ODQyIDkuNDM4NyA2My4zOTEyIDkuMjY3MDlDNjMuNzk4MiA5LjA5NTQ3IDY0LjI2MTggOS4wMDY1MSA2NC43ODIyIDkuMDA2NTFDNjUuMzAzOSA5LjAwNjUxIDY1Ljc2NzYgOS4wOTU0NyA2Ni4xNzQ2IDkuMjY3MDlDNjYuNTgxNSA5LjQzODcgNjYuOTI0MyA5LjY4MDEzIDY3LjIxMDMgOS45Nzg3NUM2Ny40OSAxMC4yODM4IDY3LjcwNTUgMTAuNjQ2MSA2Ny44NTE3IDExLjA2NTVDNjcuOTk3OCAxMS40ODQ5IDY4LjA3NDcgMTEuOTQyNCA2OC4wNzQ3IDEyLjQzODFDNjguMDc0NyAxMi45NDAyIDY3Ljk5NzggMTMuNDA0IDY3Ljg1MTcgMTMuODIzNUM2Ny43MDU1IDE0LjI0MjggNjcuNDkgMTQuNjA1MSA2Ny4yMTAzIDE0LjkxMDFDNjYuOTMwNiAxNS4yMTUyIDY2LjU4MTUgMTUuNDUwMyA2Ni4xNzQ2IDE1LjYyMTlDNjUuNzY3NiAxNS43OTM0IDY1LjMwMzkgMTUuODgyNCA2NC43ODIyIDE1Ljg4MjRaTTY0Ljc4MjIgMTQuNzQ1QzY1LjEwMSAxNC43NDUgNjUuMzc5NSAxNC42NzUgNjUuNjE1MSAxNC41NDE2QzY1Ljg1MDcgMTQuNDA4MSA2Ni4wNDEgMTQuMjMwMiA2Ni4xOTM1IDE0LjAxNDFDNjYuMzQ1OSAxMy43OTggNjYuNDU0MyAxMy41NTAyIDY2LjUyOTkgMTMuMjc3QzY2LjYwMDUgMTMuMDAzNyA2Ni42MzgzIDEyLjcyNDEgNjYuNjM4MyAxMi40MzgxQzY2LjYzODMgMTIuMTU4NSA2Ni42MDA1IDExLjg4NTMgNjYuNTI5OSAxMS42MDU2QzY2LjQ2MDYgMTEuMzI2IDY2LjM0NTkgMTEuMDg0NiA2Ni4xOTM1IDEwLjg2ODVDNjYuMDQxIDEwLjY1MjQgNjUuODUwNyAxMC40ODA5IDY1LjYxNTEgMTAuMzQ3NEM2NS4zNzk1IDEwLjIxMzkgNjUuMTAxIDEwLjE0NDEgNjQuNzgyMiAxMC4xNDQxQzY0LjQ2NDcgMTAuMTQ0MSA2NC4xODUgMTAuMjEzOSA2My45NTA2IDEwLjM0NzRDNjMuNzE1IDEwLjQ4MDkgNjMuNTI0NyAxMC42NTg4IDYzLjM3MjIgMTAuODY4NUM2My4yMTk4IDExLjA4NDYgNjMuMTExNCAxMS4zMjYgNjMuMDM0NSAxMS42MDU2QzYyLjk2NTIgMTEuODg1MyA2Mi45Mjc1IDEyLjE1ODUgNjIuOTI3NSAxMi40MzgxQzYyLjkyNzUgMTIuNzI0MSA2Mi45NjUyIDEzLjAwMzcgNjMuMDM0NSAxMy4yNzdDNjMuMTA1MSAxMy41NTAyIDYzLjIxOTggMTMuNzk4IDYzLjM3MjIgMTQuMDE0MUM2My41MjQ3IDE0LjIzMDIgNjMuNzE1IDE0LjQwODEgNjMuOTUwNiAxNC41NDE2QzY0LjE4NSAxNC42ODEzIDY0LjQ2NDcgMTQuNzQ1IDY0Ljc4MjIgMTQuNzQ1Wk02OC40OTQzIDkuMTg0NDNINjkuNTgwNFY3LjIyNzIySDcxLjAxNjlWOS4xODQ0M0g3Mi4zMTM0VjEwLjI1ODRINzEuMDE2OVYxMy43NDA4QzcxLjAxNjkgMTMuODkzNCA3MS4wMjMyIDE0LjAyMDQgNzEuMDM1OCAxNC4xMzQ4QzcxLjA0ODQgMTQuMjQyOCA3MS4wNzk5IDE0LjMzODIgNzEuMTI1MiAxNC40MTQ0QzcxLjE2OTMgMTQuNDkwNyA3MS4yMzg2IDE0LjU0NzkgNzEuMzM0NCAxNC41ODYxQzcxLjQzMDIgMTQuNjI0MiA3MS41NTExIDE0LjY0MzMgNzEuNzE2MiAxNC42NDMzQzcxLjgxNyAxNC42NDMzIDcxLjkxOTEgMTQuNjQzMyA3Mi4wMjExIDE0LjYzNjhDNzIuMTIxOSAxNC42MzA1IDcyLjIyNCAxNC42MTc4IDcyLjMyNjEgMTQuNTkyNFYxNS43MDQ1QzcyLjE2NzMgMTUuNzIzNiA3Mi4wMDg1IDE1LjczNjIgNzEuODYyNCAxNS43NTU0QzcxLjcwOTkgMTUuNzc0NCA3MS41NTc0IDE1Ljc4MDcgNzEuMzk4NiAxNS43ODA3QzcxLjAxNjkgMTUuNzgwNyA3MC43MTE5IDE1Ljc0MjYgNzAuNDgyNiAxNS42NzI3QzcwLjI1NDYgMTUuNjAyOCA3MC4wNjkzIDE1LjQ5NDggNjkuOTQzMyAxNS4zNTQ5QzY5LjgwOTcgMTUuMjE1MiA2OS43MjY2IDE1LjA0MzYgNjkuNjc2MiAxNC44MzM5QzY5LjYzMDggMTQuNjI0MiA2OS41OTkzIDE0LjM4MjcgNjkuNTkzIDE0LjExNThWMTAuMjcxMUg2OC41MDY5VjkuMTg0NDNINjguNDk0M1oiIGZpbGw9IiMxQzFDMUMiLz4KICAgIDxwYXRoIGQ9Ik0xNy41NjQ4IDYuNjk5NDlIMTAuOTgxMkw4Ljk0ODc3IDAuNDMzNTk0TDYuOTA4NzUgNi42OTk0OUwwLjMyNTA3MyA2LjY5MzA2TDUuNjU2MjkgMTAuNTY5NkwzLjYxNjMyIDE2LjgyOUw4Ljk0ODc3IDEyLjk1ODlMMTQuMjczNiAxNi44MjlMMTIuMjQgMTAuNTY5NkwxNy41NjQ4IDYuNjk5NDlaIiBmaWxsPSIjMDBCNjdBIi8+CiAgICA8cGF0aCBkPSJNMTIuNjk3NSAxMS45ODY0TDEyLjI0MDEgMTAuNTY5M0w4Ljk0NzYzIDEyLjk1ODhMMTIuNjk3NSAxMS45ODY0WiIgZmlsbD0iIzAwNTEyOCIvPgo8L3N2Zz4K\"","export default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA1IiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMTA1IDIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0iTTIwLjM1MjcgMC41Njc1MDVIMC45NDE4OTVWMTkuOTc4OUgyMC4zNTI3VjAuNTY3NTA1WiIgZmlsbD0iIzAwQjY3QSIvPgogICAgPHBhdGggZD0iTTQxLjM4MTkgMC41Njc1MDVIMjEuOTdWMTkuOTc4OUg0MS4zODE5VjAuNTY3NTA1WiIgZmlsbD0iIzAwQjY3QSIvPgogICAgPHBhdGggZD0iTTYyLjQxIDAuNTY3NTA1SDQyLjk5OTNWMTkuOTc4OUg2Mi40MVYwLjU2NzUwNVoiIGZpbGw9IiMwMEI2N0EiLz4KICAgIDxwYXRoIGQ9Ik04My40Mzk2IDAuNTY3NTA1SDY0LjAyODhWMTkuOTc4OUg4My40Mzk2VjAuNTY3NTA1WiIgZmlsbD0iIzAwQjY3QSIvPgogICAgPHBhdGggZD0iTTEwNC40NjkgMC41Njc1MDVIOTQuNzYzMlYxOS45Nzg5SDEwNC40NjlWMC41Njc1MDVaIiBmaWxsPSIjRENEQ0U2Ii8+CiAgICA8cGF0aCBkPSJNOTQuNzY0NCAwLjU2NzUwNUg4NS4wNTc5VjE5Ljk3ODlIOTQuNzY0NFYwLjU2NzUwNVoiIGZpbGw9IiMwMEI2N0EiLz4KICAgIDxwYXRoIGQ9Ik0xMC42NDcxIDEzLjY0OTVMMTMuNTk5MSAxMi45MDEzTDE0LjgzMjUgMTYuNzAyN0wxMC42NDcxIDEzLjY0OTVaTTE3LjQ0MTUgOC43MzYwMkgxMi4yNDQxTDEwLjY0NzEgMy44NDI3N0w5LjA0OTA0IDguNzM2MDJIMy44NTI3OEw4LjA1ODY0IDExLjc2OTFMNi40NjE3MSAxNi42NjIzTDEwLjY2NzYgMTMuNjI5M0wxMy4yNTQ5IDExLjc2OTFMMTcuNDQxNSA4LjczNjAyWiIgZmlsbD0id2hpdGUiLz4KICAgIDxwYXRoIGQ9Ik0zMS42NzU1IDEzLjY0OTVMMzQuNjI4NiAxMi45MDEzTDM1Ljg2MjEgMTYuNzAyN0wzMS42NzU1IDEzLjY0OTVaTTM4LjQ2OTkgOC43MzYwMkgzMy4yNzM2TDMxLjY3NTUgMy44NDI3N0wzMC4wNzg2IDguNzM2MDJIMjQuODgyM0wyOS4wODgyIDExLjc2OTFMMjcuNDkwMSAxNi42NjIzTDMxLjY5NiAxMy42MjkzTDM0LjI4NDUgMTEuNzY5MUwzOC40Njk5IDguNzM2MDJaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPHBhdGggZD0iTTUyLjcwNDcgMTMuNjQ5NUw1NS42NTY3IDEyLjkwMTNMNTYuODkwMSAxNi43MDI3TDUyLjcwNDcgMTMuNjQ5NVpNNTkuNDk5MSA4LjczNjAySDU0LjMwMjhMNTIuNzA0NyAzLjg0Mjc3TDUxLjEwNzggOC43MzYwMkg0NS45MTA0TDUwLjExNjMgMTEuNzY5MUw0OC41MTkzIDE2LjY2MjNMNTIuNzI1MiAxMy42MjkzTDU1LjMxMzcgMTEuNzY5MUw1OS40OTkxIDguNzM2MDJaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPHBhdGggZD0iTTczLjczNCAxMy42NDk1TDc2LjY4NiAxMi45MDEzTDc3LjkxOTQgMTYuNzAyN0w3My43MzQgMTMuNjQ5NVpNODAuNTI3MiA4LjczNjAySDc1LjMzMUw3My43MzQgMy44NDI3N0w3Mi4xMzU5IDguNzM2MDJINjYuOTM5N0w3MS4xNDU2IDExLjc2OTFMNjkuNTQ4NiAxNi42NjIzTDczLjc1NDUgMTMuNjI5M0w3Ni4zNDE4IDExLjc2OTFMODAuNTI3MiA4LjczNjAyWiIgZmlsbD0id2hpdGUiLz4KICAgIDxwYXRoIGQ9Ik05NC43NjIyIDEzLjY0OTVMOTcuNzE1MyAxMi45MDEzTDk4Ljk0ODcgMTYuNzAyN0w5NC43NjIyIDEzLjY0OTVaTTEwMS41NTcgOC43MzYwMkg5Ni4zNjAzTDk0Ljc2MjIgMy44NDI3N0w5My4xNjUzIDguNzM2MDJIODcuOTY5TDkyLjE3NDkgMTEuNzY5MUw5MC41NzY4IDE2LjY2MjNMOTQuNzgyNiAxMy42MjkzTDk3LjM3MTEgMTEuNzY5MUwxMDEuNTU3IDguNzM2MDJaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K\"","import styled from \"styled-components\";\n\nimport { sizes } from \"$/ui/styles/tokens/tokens\";\n\nimport TrustpilotLogoSvg from \"../../assets/svgs/trustpilot-logo.svg\";\nimport TrustpilotRatingSvg from \"../../assets/svgs/trustpilot-rating.svg\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ${sizes.sz012};\n`;\n\nexport const TrustpilotLogo = styled(TrustpilotLogoSvg)``;\n\nexport const TrustpilotRating = styled(TrustpilotRatingSvg)``;\n","import {\n Container,\n TrustpilotLogo,\n TrustpilotRating,\n} from \"./trustpilot.styles\";\n\nfunction Trustpilot() {\n return (\n \n \n \n \n );\n}\n\nexport default Trustpilot;\n","import {\n CartRentalOverviewResult,\n RentContractTerm,\n RentContractTermDurationEnum,\n CartProductRentalOverview,\n} from \"../../api\";\n\ntype MonthlyAmount = {\n net: number;\n currency: string;\n};\n\nexport type AggregatedPrices = {\n [duration in RentContractTermDurationEnum]?: MonthlyAmount;\n};\n\nexport function aggregate(\n availableRentalTerms: RentContractTerm[]\n): AggregatedPrices | object {\n const monthlyAmountPerDuration: AggregatedPrices = {};\n\n availableRentalTerms?.forEach((term) => {\n const { duration, monthlyAmount } = term;\n const { net, currency } = monthlyAmount;\n\n if (monthlyAmountPerDuration[duration]) {\n monthlyAmountPerDuration[duration].net += net;\n } else {\n monthlyAmountPerDuration[duration] = { net, currency };\n }\n });\n\n return monthlyAmountPerDuration;\n}\n\nfunction adjustRentalTermsByQuantity(\n rentableProducts: CartProductRentalOverview[]\n): RentContractTerm[] {\n return rentableProducts?.flatMap((rp) => {\n const { availableRentalTerms, quantity = 1 } = rp;\n\n return availableRentalTerms.map((art) => {\n const { duration, monthlyAmount } = art;\n const { net } = monthlyAmount;\n\n const quantityAdjustedNet = net * quantity;\n const quantityAdjustedMonthlyAmount = {\n ...monthlyAmount,\n net: quantityAdjustedNet,\n };\n const quantityAdjustedArt = {\n duration,\n monthlyAmount: quantityAdjustedMonthlyAmount,\n };\n return quantityAdjustedArt;\n });\n });\n}\n\n// ? This skews towards larger numbers for durations that exist, and smaller for durations that don't\n// ? e.g. if we have 5 items, and 5 items have 12 months duration, but only 1 has 24 months duration,\n// ? then the 12 months duration will be 5x larger than the 24 months duration\nexport function useAggregatedPrices(\n rentalOverview?: CartRentalOverviewResult\n): AggregatedPrices | undefined {\n if (!rentalOverview?.productPrices?.length) {\n return undefined;\n }\n\n const rentableProducts = rentalOverview.productPrices?.filter(\n (pp) => pp.hasRentalTerms\n );\n\n const quantityAdjustedRentalTerms =\n adjustRentalTermsByQuantity(rentableProducts);\n\n const aggregated = aggregate(quantityAdjustedRentalTerms);\n return Object.keys(aggregated).length > 0 ? aggregated : undefined;\n}\n","import { CartRentalOverviewResult } from \"../../api\";\n\nexport function useCartHasRentalTerms(\n rentalOverview?: CartRentalOverviewResult\n): boolean {\n if (!rentalOverview) {\n return false;\n }\n\n const hasRentalTerms = rentalOverview.productPrices?.every(\n (pp) => pp?.hasRentalTerms\n );\n\n return !!hasRentalTerms;\n}\n","import { useState, useEffect } from \"preact/hooks\";\nimport { RentContractTermDurationEnum } from \"../../api\";\n\ntype UseTenureTogglesReturn = [\n RentContractTermDurationEnum | undefined,\n (tenure: RentContractTermDurationEnum) => void,\n];\n\nexport function useTenureToggles(\n availableRentDurations: RentContractTermDurationEnum[]\n): UseTenureTogglesReturn {\n const [tenure, setTenure] = useState<\n RentContractTermDurationEnum | undefined\n >();\n\n useEffect(() => {\n // should run only once, when availableRentDurations is defined\n if (availableRentDurations?.length === 0 || tenure !== undefined) {\n return;\n }\n\n const lastIndex = availableRentDurations.length - 1;\n const defaultTenure = availableRentDurations[lastIndex];\n\n setTenure(defaultTenure);\n }, [availableRentDurations, tenure]);\n\n return [tenure, setTenure];\n}\n","import styled from \"styled-components\";\n\nimport { borderRadius, colors, spacing } from \"$/ui/styles/tokens/tokens\";\n\nexport const Container = styled.div`\n display: flex !important;\n flex-direction: column !important;\n gap: ${spacing.sp016} !important;\n\n & > * {\n margin: 0 !important;\n }\n\n align-items: center !important;\n padding: ${spacing.sp016} !important;\n border: 1px solid ${colors.grey20} !important;\n border-radius: ${borderRadius.l} !important;\n min-height: 198px !important;\n box-sizing: border-box !important;\n flex: 1 1 auto;\n`;\n","import styled from \"styled-components\";\n\nimport { setTypographyImportant } from \"$/ui/styles/mixins\";\nimport {\n borderRadius,\n colors,\n sizes,\n spacing,\n} from \"$/ui/styles/tokens/tokens\";\n\nexport const PriceAmount = styled.div<{\n primaryColor?: string;\n hidden?: boolean;\n}>`\n ${setTypographyImportant(\"headline2\")};\n font-size: ${sizes.sz036} !important;\n display: ${({ hidden }) => (hidden ? \"none\" : \"inline-block\")} !important;\n color: ${({ primaryColor }) => primaryColor ?? colors.topiBlue50} !important;\n`;\nexport const PriceUnit = styled.div<{ primaryColor?: string }>`\n ${setTypographyImportant(\"headline2small\")};\n display: ${({ hidden }) => (hidden ? \"none\" : \"inline-block\")} !important;\n color: ${({ primaryColor }) =>\n primaryColor ?? `${colors.topiBlue50}`} !important;\n`;\n\nexport const EligibilityInfoPill = styled.div`\n ${setTypographyImportant(\"body2Emphasis\")};\n background-color: ${colors.topiBlue10} !important;\n border-radius: ${borderRadius.l} !important;\n padding: ${spacing.sp004} ${spacing.sp008} !important;\n display: block !important;\n`;\n\nexport const TaxNote = styled.div`\n ${setTypographyImportant(\"body2\")};\n color: ${colors.grey60} !important;\n text-align: center !important;\n`;\n\nexport const PriceTabPanel = styled.div<{ hidden?: boolean }>`\n display: ${({ hidden }) => (hidden ? \"none\" : \"flex\")} !important;\n flex-direction: column !important;\n gap: ${sizes.sz008} !important;\n`;\n\nexport const Container = styled.div`\n flex: 1 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n`;\n","import { Text } from \"preact-i18n\";\n\nimport { RentContractTermDurationEnum } from \"$/api\";\nimport { ThemeConfig } from \"$/slices/config-slice\";\nimport { AggregatedPrices } from \"$/widgets/hooks/use-aggregated-prices\";\nimport { useMoneyAmount } from \"$/widgets/hooks/use-money-amount\";\nimport {\n EligibilityInfoPill,\n PriceAmount,\n PriceUnit,\n PriceTabPanel,\n TaxNote,\n Container,\n} from \"./tenure-prices.styles\";\n\ntype TenurePricesProps = {\n aggregatedPrices?: AggregatedPrices;\n availableRentDurations?: RentContractTermDurationEnum[];\n cartHasRentalTerms: boolean;\n selectedTenure?: RentContractTermDurationEnum;\n themeConfig: ThemeConfig;\n};\n\nconst PriceInfo = ({\n currency,\n cartHasRentalTerms,\n duration,\n isSelected,\n monthlyNet,\n themeConfig,\n total,\n}) => {\n const rentMonthlyPrice = useMoneyAmount(monthlyNet, currency);\n const rentTotalPrice = useMoneyAmount(total, currency);\n return rentMonthlyPrice && rentTotalPrice ? (\n