{"version":3,"sources":["webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/order.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/delivery-slot.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/index.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/recurring-order.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/region.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/supply-order.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/delivery.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/fee.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/customer.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/product.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/delivery-type.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/delivery-type.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/delivery.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/customer.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/shop.settings.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/template.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/category.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/supplier.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/item.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/delivery-slot.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/country.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/coupon.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/delivery-slot-config.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/subscription.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/country.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/admin/option.model.js","webpack:///./node_modules/aurelia-shop/dist/native-modules/models/category.model.js"],"names":["AdminOrderModel_1","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__metadata","k","v","metadata","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","AdminOrderModel","super","this","region","undefined","recurringId","products","manualItems","fees","couponAmount","couponValue","payments","comments","customer","get","computeFullNameFromAutoFetchedData","filter","p","productsParts","partsValidated","Array","isArray","totalPriceTTC","reduce","a","b","amount","total","payment","slotId","response","api","put","shopId","id","deliverySlot","updateInstanceFromElement","order","properties","keys","updateProperties","save","saveBefore","status","Error","gettingReady","gettingReadyAt","toDate","invoicedOrder","invoicedAt","useCredits","existingCreditPayment","find","paymentMethod","leftToPay","newPayment","date","ref","totalPaid","label","concat","push","paidOrder","String","prototype","model","integer","Number","required","modelName","dateFormat","Date","select","options","float","fromApiOnly","string","array","type","position","productId","productType","optionsIds","quantity","productIds","isMain","partsValided","items","timesIds","manualPrice","fullPrice","paidPrice","fullPriceTTC","paidPriceTTC","vatCode","description","productAndOptionsPaidPrice","productAndOptionsPaidPriceTTC","optionsPrices","paymentStatus","trialPeriod","subscriptionStatus","subscriptionId","subscriptionInterval","subscriptionIntervalFactor","digitalCode","digitalCodeUsed","digitalCreditUsed","digitalCreditAmount","name","boolean","Boolean","userId","title","comment","visibility","any","AdminDeliverySlotModel","deliveriesIds","ordersIds","slots","sortSlots","models","AdminRecurringOrderModel","customerId","deliveryType","frequencyUnit","daysOfWeek","deliveryTime","recurringOrderStatus","autoValidationDelay","autoValidationTime","i18n","fakeRecurringOrderModel","updateInstanceFromUnclassedElement","frequencyLabel","AdminRegionModel","deliveryAddresses","supplyDeliveryTypes","supplyPaymentMethods","supplyLocations","multilang","AdminSupplyOrderModel_1","AdminSupplyOrderModel","supplyOrderStatus","supplyOrderId","getAll","productItems","item","nbPerDelivery","usages","usage","u","deliveryId","delivery","npd","nbPerDeliveryText","map","join","optionsNames","o","supplier","AdminDeliveryModel_1","AdminDeliveryModel","deliveryNb","deliveryStatus","deliveryProducts","packingItems","textarea","packingItemId","itemsIds","packingItemSerialId","productName","AdminFeeModel","disableFee","modifiers","conditions","operation","conditionsOperator","replacedValues","allowOtherKeys","CustomerModel_1","CustomerModel","favoriteDeliveryType","isCompany","companyName","addresses","relatedCustomers","firstname","lastname","trim","suffix","route","baseroute","replace","elements","element","set","deco","elementId","autoFetchedData","user","object","cardLast4","expiryDate","settings","instance","shop","picturePreviewsFormats","pictureDefaultPreview","pictureExportQuality","AdminProductModel","availableRegions","isPackage","packageQuantity","unit","expiryType","priceType","refWeightUnit","size","active","subscriptionChangeImpliesNewInterval","canMoneyBeRefunded","enableTrial","supplyBatches","countries","countryPrices","country","countryCode","price","discount","discountLabel","files","accepted","previewsFormats","defaultPreview","imageExportQuality","hint","multiple","locked","DeliveryTypeModel","useDeliverySlots","AdminDeliveryTypeModel","productItem","expiryWeightItems","index","weight","product","refWeight","weightText","weightUnit","defined","moment","format","existingEntry","AdminCustomerModel","emailTokenExpires","mobileTokenExpires","AdminShopSettingsModel","enableStock","supplyPurchaseCurrencies","enableOptions","defaultProductMetadata","defaultOptionMetadata","defaultCategoryMetadata","defaultCustomerMetadata","defaultOrderMetadata","defaultDeliveryMetadata","defaultDeliveryTypeMetadata","enableSponsorship","sponsorCouponValue","sponsoredCouponValue","enableRegionCheck","enableEstimatedDeliveryDateCheck","dashboard","file","labels","datasets","AdminTemplateModel","fr","en","tableStyle","productPositionHeader","productQuantityHeader","productItemHeader","productUnitMonthlyHeader","productTotalHeader","coupon","mainDigitalCredit","secondaryDigitalCredit","mainTotalHTLine","mainTaxesHTLine","mainTotalWithoutTaxesText","mainTotalTTCText","mainPaymentLine","secondaryPaymentLine","mainLeftToPay","secondaryLeftToPay","commentsHeader","page","AdminCategoryModel","AdminSupplierModel","relatedSuppliers","AdminItemModel_1","AdminItemModel","combinedOrderedIds","itemStatus","unavailable","rentalItem","isAssembled","notifications","packageQuantityLeft","ignoreForAveragePrice","itemParts","readyForAssembly","itemPartsFetched","nbParts","nbPartsFetched","computeQuantityLeft","forceReload","_a","itemPart","ip","nbOutOfStock","nbOrdered","nbStock","nbGettingReady","nbSent","nbDelivered","sort","getOneWithId","ordered","newRegionId","error","subject","content","DeliverySlotModel","ma","startOf","mb","isSame","timeStart","isBefore","isAfter","CountryModel","default","AdminCouponModel","enabled","unlimited","orders","activeUntil","nbOrders","history","action","orderId","test","AdminCountryModel","AdminOptionModel","CategoryModel"],"mappings":"8FAAA,sCAkBIA,EAlBJ,6LAAIC,EAA0C,SAAUC,EAAYC,EAAQC,EAAKC,GAC7E,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,GAE5DO,EAA0C,SAAUC,EAAGC,GACvD,GAAuB,iBAAZN,SAAoD,mBAArBA,QAAQO,SAAyB,OAAOP,QAAQO,SAASF,EAAGC,IAEtGE,EAAwC,SAAUC,EAASC,EAAYC,EAAGC,GAE1E,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,IAAW,MAAOG,GAAKL,EAAOK,IACpF,SAASC,EAASJ,GAAS,IAAMC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"vendors~7afbc5de.8d1cc2169b9de4a4ac9a.chunk.js","sourcesContent":["var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nvar AdminOrderModel_1;\nimport { AdminDeliverySlotModel } from './delivery-slot.model';\nimport { AdminRegionModel } from './region.model';\nimport { RecurringOrderModel } from './../recurring-order.model';\nimport { AdminDeliveryTypeModel } from './delivery-type.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { OptionModel } from './option.model';\nimport { errorify } from 'aurelia-resources';\nimport { model, type, validate, io } from 'aurelia-deco';\nimport { AdminCustomerModel } from './customer.model';\nimport { AdminCountryModel } from './country.model';\nimport { AdminProductModel } from './product.model';\nimport { AdminItemModel } from './item.model';\nimport { UserModel } from 'aurelia-deco';\nimport { currencies } from '../../shop-common';\nimport { address, jsonify } from 'aurelia-deco';\nimport * as moment from 'moment';\nlet AdminOrderModel = AdminOrderModel_1 = class AdminOrderModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.recurringId = null;\n        this.products = [];\n        this.manualItems = [];\n        this.fees = [];\n        this.couponAmount = 0;\n        this.couponValue = 0;\n        this.payments = [];\n        this.comments = [];\n        this.metadata = [];\n    }\n    customerName() {\n        const customer = this.get('customer');\n        return AdminCustomerModel.computeFullNameFromAutoFetchedData(customer);\n    }\n    get allPartsValidated() {\n        if (this.products.filter(p => p.productsParts && p.productsParts.length > 0).length === 0) {\n            return undefined;\n        }\n        return this.products.filter(p => p.partsValidated === false).length === 0;\n    }\n    leftToPay() {\n        if (!Array.isArray(this.payments)) {\n            this.payments = [];\n        }\n        return this.totalPriceTTC - this.payments.reduce((a, b) => a + b.amount, 0);\n    }\n    totalPaid() {\n        if (!Array.isArray(this.payments)) {\n            this.payments = [];\n        }\n        let total = 0;\n        for (let payment of this.payments || []) {\n            total += payment.amount;\n        }\n        return total;\n    }\n    setSlot(slotId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield AdminOrderModel_1.api.put(`/shop/admin/${this.shopId}/order/${this.id}/set-slot`, { slotId }).then(jsonify);\n            this.deliverySlot = response.deliverySlot;\n            yield this.updateInstanceFromElement(response, ['estimatedDeliveryDate']);\n        });\n    }\n    saveBefore() {\n        return __awaiter(this, void 0, void 0, function* () {\n            let order;\n            if (!this.id) {\n                order = yield this.save();\n            }\n            else {\n                const properties = Object.keys(this).filter(key => {\n                    if (key === 'payments' || key === 'products' || key === 'manualItems' || key === 'comments') {\n                        return false;\n                    }\n                    return true;\n                });\n                order = yield this.updateProperties('', properties);\n            }\n            return order;\n        });\n    }\n    setAsGettingReady(saveBefore = true) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (saveBefore) {\n                yield this.saveBefore();\n            }\n            if (this.status !== 'ordered') {\n                return errorify(new Error('Only ordered order can be set in getting-ready'));\n            }\n            const gettingReady = yield this.api.put(`/shop/admin/${this.shopId}/order/${this.id}`, { gettingReadyAt: moment().toDate() }).then(jsonify);\n            yield this.updateInstanceFromElement(gettingReady);\n        });\n    }\n    setAsInvoiced(saveBefore = true) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (saveBefore) {\n                yield this.saveBefore();\n            }\n            if (this.status !== 'getting-ready') {\n                return errorify(new Error('Only getting-ready order can be invoiced'));\n            }\n            const invoicedOrder = yield this.api.put(`/shop/admin/${this.shopId}/order/${this.id}`, { invoicedAt: moment().toDate() }).then(jsonify);\n            yield this.updateInstanceFromElement(invoicedOrder);\n        });\n    }\n    setAsPaid(useCredits = false, saveBefore = true) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (saveBefore) {\n                yield this.saveBefore();\n            }\n            if (this.status !== 'invoiced' && this.status !== 'paid') {\n                return errorify(new Error('Only invoiced order can be invoiced'));\n            }\n            if (!Array.isArray(this.payments)) {\n                this.payments = [];\n            }\n            const existingCreditPayment = this.payments.find(p => p.paymentMethod === 'digital-credit');\n            if (useCredits && existingCreditPayment) {\n                existingCreditPayment.amount += this.leftToPay();\n                const order = yield this.api.put(`/shop/admin/${this.shopId}/order/${this.id}/payments`, this.payments).then(jsonify);\n                yield this.updateInstanceFromElement(order);\n                return;\n            }\n            const newPayment = {\n                date: moment().toDate(),\n                paymentMethod: useCredits ? 'digital-credit' : 'other',\n                ref: '',\n                amount: this.totalPriceTTC - this.totalPaid(),\n                label: ''\n            };\n            const payments = [].concat(...this.payments);\n            payments.push(newPayment);\n            const paidOrder = yield this.api.put(`/shop/admin/${this.shopId}/order/${this.id}/payments`, payments).then(jsonify);\n            yield this.updateInstanceFromElement(paidOrder);\n        });\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"region\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"orderNb\", void 0);\n__decorate([\n    type.model({ model: AdminCustomerModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"customerId\", void 0);\n__decorate([\n    type.model({ model: AdminCustomerModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"customerContactId\", void 0);\n__decorate([\n    type.model({ model: RecurringOrderModel, modelName: 'RecurringOrderModel' }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"recurringId\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY HH:mm' }),\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"autoValidationDate\", void 0);\n__decorate([\n    address,\n    validate.required,\n    __metadata(\"design:type\", Object)\n], AdminOrderModel.prototype, \"deliveryAddress\", void 0);\n__decorate([\n    address,\n    validate.required,\n    __metadata(\"design:type\", Object)\n], AdminOrderModel.prototype, \"billingAddress\", void 0);\n__decorate([\n    type.model({ model: AdminCountryModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"country\", void 0);\n__decorate([\n    type.select({ options: currencies }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"currency\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"totalPrice\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"totalPriceTTC\", void 0);\n__decorate([\n    type.select({ options: ['basket', 'ordered', 'getting-ready', 'invoiced', 'paid', 'canceled'] }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"status\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"basketTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"orderedTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"invoicedTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"paidTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"canceledTemplate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"quotedAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"orderedAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"gettingReadyAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"invoicedAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"canceledAt\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY HH:mm' }),\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"estimatedDeliveryDate\", void 0);\n__decorate([\n    type.model({ model: AdminDeliverySlotModel }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"deliverySlotId\", void 0);\n__decorate([\n    type.model({ model: AdminDeliveryTypeModel }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"deliveryType\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"pickUpRef\", void 0);\n__decorate([\n    type.select({ options: ['stripe', 'twint', 'invoice', 'other'] }),\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"paymentMethod\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                position: { type: 'integer', required: true },\n                productId: { type: 'model', options: { model: AdminProductModel }, required: true },\n                productType: { type: 'select', options: { options: ['sell', 'rent', 'subscription', 'digital', 'time-cost'] } },\n                optionsIds: { type: 'models', options: { model: OptionModel } },\n                productsParts: { type: 'object', keys: {\n                        quantity: { type: 'integer', required: true },\n                        productIds: { type: 'models', options: { model: AdminProductModel }, required: true },\n                        isMain: { type: 'boolean' },\n                    } },\n                partsValided: { type: 'boolean' },\n                items: { type: 'models', options: { model: AdminItemModel } },\n                quantity: { type: 'float', required: true },\n                timesIds: { type: 'array', options: { type: 'string' } },\n                manualPrice: { type: 'boolean' },\n                fullPrice: { type: 'float', required: true },\n                paidPrice: { type: 'float', required: true },\n                fullPriceTTC: { type: 'float', required: true },\n                paidPriceTTC: { type: 'float', required: true },\n                vatCode: { type: 'string', required: true },\n                description: { type: 'string' },\n                productAndOptionsPaidPrice: { type: 'float', required: true },\n                productAndOptionsPaidPriceTTC: { type: 'float', required: true },\n                optionsPrices: { type: 'object' },\n                paymentStatus: { type: 'select', options: { options: ['unpaid', 'paid', 'trialing'] } },\n                trialPeriod: { type: 'integer' },\n                subscriptionStatus: { type: 'select', options: { options: ['n/a', 'ordered', 'created'] } },\n                subscriptionId: { type: 'string' },\n                subscriptionInterval: { type: 'select', options: { options: ['monthly', 'yearly'] } },\n                subscriptionIntervalFactor: { type: 'float' },\n                digitalCode: { type: 'string' },\n                digitalCodeUsed: { type: 'boolean' },\n                digitalCreditUsed: { type: 'boolean' },\n                digitalCreditAmount: { type: 'float' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"products\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                position: { type: 'integer', required: true },\n                label: { type: 'string', required: true },\n                description: { type: 'string' },\n                ref: { type: 'string' },\n                quantity: { type: 'integer', required: true },\n                paidPrice: { type: 'float', required: true },\n                paidPriceTTC: { type: 'float', required: true },\n                vatCode: { type: 'string', required: true },\n                paymentStatus: { type: 'select', options: { options: ['unpaid', 'paid'] } },\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"manualItems\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                name: { type: 'string', required: true },\n                description: { type: 'string' },\n                ref: { type: 'string' },\n                quantity: { type: 'float', required: true },\n                paidPrice: { type: 'float', required: true },\n                paidPriceTTC: { type: 'float', required: true },\n                vatCode: { type: 'string', required: true }\n            }\n        } }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"fees\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"coupon\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"couponType\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOrderModel.prototype, \"couponCode\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"couponAmount\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"couponValue\", void 0);\n__decorate([\n    type.float,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"digitalCreditAvailable\", void 0);\n__decorate([\n    type.float,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"digitalCreditUsed\", void 0);\n__decorate([\n    type.float,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Number)\n], AdminOrderModel.prototype, \"digitalCreditLeft\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"acceptedTermsDate\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminOrderModel.prototype, \"ignoreTaxes\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                paymentMethod: { type: 'select', options: { options: ['stripe', 'twint', 'invoice'] } },\n                ref: { type: 'string', required: true },\n                amount: { type: 'float', required: true },\n                label: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"payments\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminOrderModel.prototype, \"deadlinePayment\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                userId: { type: 'model', options: { model: UserModel } },\n                title: { type: 'string', required: false },\n                comment: { type: 'string', required: true },\n                visibility: { type: 'select', options: { options: ['user-only', 'admin-only', 'all'] } }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"comments\", void 0);\n__decorate([\n    type.any,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Object)\n], AdminOrderModel.prototype, \"deliverySlot\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminOrderModel.prototype, \"metadata\", void 0);\nAdminOrderModel = AdminOrderModel_1 = __decorate([\n    model('/shop/admin/order')\n], AdminOrderModel);\nexport { AdminOrderModel };\n\n//# sourceMappingURL=order.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { model, type, validate } from 'aurelia-deco';\nimport { AdminRegionModel } from './region.model';\nimport { AdminDeliveryTypeModel } from './delivery-type.model';\nimport { AdminDeliveryModel } from './delivery.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { DeliverySlotModel } from '../delivery-slot.model';\nlet AdminDeliverySlotModel = class AdminDeliverySlotModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.quantity = 1;\n        this.deliveriesIds = [];\n        this.ordersIds = [];\n    }\n    static sortSlots(slots) {\n        DeliverySlotModel.sortSlots(slots);\n    }\n    isAvailable() {\n        return (this.deliveriesIds || []).length + (this.ordersIds || []).length < (this.quantity || 0);\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: AdminDeliveryTypeModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotModel.prototype, \"deliveryTypeId\", void 0);\n__decorate([\n    type.date(),\n    validate.required,\n    __metadata(\"design:type\", Date)\n], AdminDeliverySlotModel.prototype, \"date\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotModel.prototype, \"timeStart\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotModel.prototype, \"timeEnd\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotModel.prototype, \"quantity\", void 0);\n__decorate([\n    type.models({ model: AdminDeliveryModel }),\n    validate.required,\n    __metadata(\"design:type\", Array)\n], AdminDeliverySlotModel.prototype, \"deliveriesIds\", void 0);\n__decorate([\n    type.models({ model: AdminDeliveryModel }),\n    validate.required,\n    __metadata(\"design:type\", Array)\n], AdminDeliverySlotModel.prototype, \"ordersIds\", void 0);\nAdminDeliverySlotModel = __decorate([\n    model('/shop/admin/delivery-slot')\n], AdminDeliverySlotModel);\nexport { AdminDeliverySlotModel };\n\n//# sourceMappingURL=delivery-slot.model.js.map\n","import { PLATFORM } from 'aurelia-pal';\nexport function configure(config) {\n    config.globalResources([\n        PLATFORM.moduleName('./dialogs/recurring-order/recurring-order-add-product-dialog'),\n        PLATFORM.moduleName('./controls/metadata-control'),\n        PLATFORM.moduleName('./front/elements/shop-product-counter'),\n        PLATFORM.moduleName('./front/elements/shop-product-preview'),\n        PLATFORM.moduleName('./front/elements/shop-products'),\n        PLATFORM.moduleName('./front/elements/shop-product'),\n        PLATFORM.moduleName('./front/elements/shop-basket'),\n        PLATFORM.moduleName('./front/elements/shop-credits-transactions'),\n        PLATFORM.moduleName('./front/elements/shop-order'),\n        PLATFORM.moduleName('./front/elements/shop-basket-badge'),\n        PLATFORM.moduleName('./front/elements/shop-price'),\n        PLATFORM.moduleName('./value-converters/filter-delivery-types-by-region'),\n        PLATFORM.moduleName('./value-converters/nice-restocking'),\n    ]);\n}\nexport * from './controls';\nexport * from './dialogs';\nexport * from './front';\nexport * from './helpers';\nexport * from './models';\nexport * from './state';\nexport * from './shop-common';\nimport { ShopGlobal as ShopGlobal2 } from './aurelia-shop';\nexport { ShopGlobal2 };\nexport { ShopGlobal2 as ShopGlobal };\nexport * from './aurelia-shop-front';\nexport * from './aurelia-shop-admin';\nimport supplyCurrencies from './supply-currencies';\nexport { supplyCurrencies };\nexport * from './value-converters/filter-delivery-types-by-region';\nexport * from './value-converters/nice-restocking';\n\n//# sourceMappingURL=index.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { AdminRegionModel } from './region.model';\nimport { RecurringOrderModel } from './../recurring-order.model';\nimport { AdminDeliveryTypeModel } from './delivery-type.model';\nimport { AdminCountryModel } from './country.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { io, model, type, validate } from 'aurelia-deco';\nimport { AdminCustomerModel } from './customer.model';\nimport { AdminProductModel } from './product.model';\nimport { address } from 'aurelia-deco';\nimport { currencies } from '../../shop-common';\nlet AdminRecurringOrderModel = class AdminRecurringOrderModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.name = '';\n        this.description = '';\n        this.customerId = null;\n        this.region = undefined;\n        this.deliveryType = '';\n        this.frequencyUnit = '1/1w';\n        this.daysOfWeek = [];\n        this.deliveryTime = '08:00';\n        this.products = [];\n        this.recurringOrderStatus = 'getting-ready';\n        this.autoValidationDelay = 2;\n        this.autoValidationTime = '15:00';\n    }\n    frequencyLabel(i18n) {\n        const fakeRecurringOrderModel = new RecurringOrderModel();\n        fakeRecurringOrderModel.updateInstanceFromUnclassedElement(this);\n        return fakeRecurringOrderModel.frequencyLabel(i18n);\n    }\n    customerName() {\n        const customer = this.get('customer');\n        return AdminCustomerModel.computeFullNameFromAutoFetchedData(customer);\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"name\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"description\", void 0);\n__decorate([\n    type.model({ model: AdminCustomerModel, modelName: 'AdminCustomerModel' }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"customerId\", void 0);\n__decorate([\n    address,\n    __metadata(\"design:type\", Object)\n], AdminRecurringOrderModel.prototype, \"deliveryAddress\", void 0);\n__decorate([\n    address,\n    __metadata(\"design:type\", Object)\n], AdminRecurringOrderModel.prototype, \"billingAddress\", void 0);\n__decorate([\n    type.model({ model: AdminCountryModel }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"country\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"region\", void 0);\n__decorate([\n    type.select({ options: currencies }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"currency\", void 0);\n__decorate([\n    type.model({ model: AdminDeliveryTypeModel }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"deliveryType\", void 0);\n__decorate([\n    type.select({ options: ['credit-card', 'twint', 'invoice', 'other'] }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"paymentMethod\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    __metadata(\"design:type\", Date)\n], AdminRecurringOrderModel.prototype, \"start\", void 0);\n__decorate([\n    type.select({ options: ['1/1w', '1/2w', '1/3w', '1/4w', '1/8w'] }),\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"frequencyUnit\", void 0);\n__decorate([\n    type.array({ type: 'integer' }),\n    __metadata(\"design:type\", Array)\n], AdminRecurringOrderModel.prototype, \"daysOfWeek\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    __metadata(\"design:type\", Date)\n], AdminRecurringOrderModel.prototype, \"end\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"deliveryTime\", void 0);\n__decorate([\n    type.array({ type: 'object', options: { keys: {\n                quantity: { type: 'float', required: true },\n                productId: { type: 'model', options: { model: AdminProductModel }, required: true }\n            } } }),\n    __metadata(\"design:type\", Array)\n], AdminRecurringOrderModel.prototype, \"products\", void 0);\n__decorate([\n    type.select({ options: ['getting-ready', 'running', 'paused', 'finished', 'canceled'] }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"recurringOrderStatus\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminRecurringOrderModel.prototype, \"autoValidationDelay\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminRecurringOrderModel.prototype, \"autoValidationTime\", void 0);\nAdminRecurringOrderModel = __decorate([\n    model('/shop/admin/recurring-order')\n], AdminRecurringOrderModel);\nexport { AdminRecurringOrderModel };\n\n//# sourceMappingURL=recurring-order.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nimport { addressArray } from 'aurelia-deco';\nlet AdminRegionModel = class AdminRegionModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.order = 0;\n        this.deliveryAddresses = [];\n        this.supplyDeliveryTypes = [];\n        this.supplyPaymentMethods = [];\n        this.supplyLocations = [];\n    }\n    get _label() {\n        return this.name;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminRegionModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminRegionModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminRegionModel.prototype, \"description\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminRegionModel.prototype, \"order\", void 0);\n__decorate([\n    addressArray,\n    __metadata(\"design:type\", Array)\n], AdminRegionModel.prototype, \"deliveryAddresses\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminRegionModel.prototype, \"supplyDeliveryTypes\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminRegionModel.prototype, \"supplyPaymentMethods\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminRegionModel.prototype, \"supplyLocations\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminRegionModel.prototype, \"metadata\", void 0);\nAdminRegionModel = __decorate([\n    model('/shop/admin/region')\n], AdminRegionModel);\nexport { AdminRegionModel };\n\n//# sourceMappingURL=region.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nvar AdminSupplyOrderModel_1;\nimport { AdminRegionModel } from './region.model';\nimport { AdminItemModel } from './item.model';\nimport { AdminSupplierModel } from './supplier.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type, io, jsonify, validate } from 'aurelia-deco';\nimport { address } from 'aurelia-deco';\nlet AdminSupplyOrderModel = AdminSupplyOrderModel_1 = class AdminSupplyOrderModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.supplyOrderStatus = 'getting-ready';\n    }\n    static items(shopId, supplyOrderId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            return yield AdminItemModel.getAll(`?supplyOrderId=${supplyOrderId}`, { shopId });\n        });\n    }\n    static productItems(shopId, supplyOrderId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const productItems = yield AdminSupplyOrderModel_1.api.get(`/shop/admin/${shopId}/supply-order/${supplyOrderId}/product-items?autoFetch=product,options`).then(jsonify);\n            for (const item of productItems) {\n                item.nbPerDelivery = [];\n                for (const usages of item.usages) {\n                    for (const usage of usages.filter(u => u.type === 'delivery')) {\n                        const deliveryId = usage.id;\n                        let delivery = item.nbPerDelivery.find(npd => npd.deliveryId === deliveryId);\n                        if (!delivery) {\n                            delivery = { deliveryId, quantity: 0 };\n                            item.nbPerDelivery.push(delivery);\n                        }\n                        delivery.quantity += 1;\n                    }\n                }\n                item.nbPerDeliveryText = (item.nbPerDelivery || []).map((npd) => `${npd.quantity}x`).join(', ');\n                item.optionsNames = (item.options || []).map(o => o.name).join(', ');\n            }\n            return productItems;\n        });\n    }\n    supplierName() {\n        const supplier = this.get('supplier');\n        return AdminSupplierModel.computeFullNameFromAutoFetchedData(supplier);\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"region\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminSupplyOrderModel.prototype, \"supplyOrderNb\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplyOrderTemplate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSupplyOrderModel.prototype, \"orderedAt\", void 0);\n__decorate([\n    address,\n    __metadata(\"design:type\", Object)\n], AdminSupplyOrderModel.prototype, \"deliveryAddress\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"deliveryType\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"paymentMethod\", void 0);\n__decorate([\n    type.select({ options: ['getting-ready', 'ordered', 'validated', 'received', 'canceled'] }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplyOrderStatus\", void 0);\n__decorate([\n    type.model({ model: AdminSupplierModel }),\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplierId\", void 0);\n__decorate([\n    type.model({ model: AdminSupplierModel }),\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplierContactId\", void 0);\n__decorate([\n    address,\n    __metadata(\"design:type\", Object)\n], AdminSupplyOrderModel.prototype, \"supplierAddress\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplyOrderSupplierRef\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSupplyOrderModel.prototype, \"estimatedDeliveryDate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSupplyOrderModel.prototype, \"validationDateFromSupplier\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplyOrderModel.prototype, \"supplyOrderCurrency\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminSupplyOrderModel.prototype, \"metadata\", void 0);\n__decorate([\n    type.float,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Number)\n], AdminSupplyOrderModel.prototype, \"total\", void 0);\nAdminSupplyOrderModel = AdminSupplyOrderModel_1 = __decorate([\n    model('/shop/admin/supply-order')\n], AdminSupplyOrderModel);\nexport { AdminSupplyOrderModel };\n\n//# sourceMappingURL=supply-order.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nvar AdminDeliveryModel_1;\nimport { AdminCustomerModel } from './customer.model';\nimport { ItemModel } from './../item.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type, io, jsonify, UserModel } from 'aurelia-deco';\n;\nlet AdminDeliveryModel = AdminDeliveryModel_1 = class AdminDeliveryModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.deliveryNb = 0;\n        this.deliveryStatus = 'getting-ready';\n        this.deliveryProducts = [];\n        this.productItems = [];\n        this.packingItems = [];\n    }\n    customerName() {\n        const customer = this.get('customer');\n        return AdminCustomerModel.computeFullNameFromAutoFetchedData(customer);\n    }\n    setSlot(slotId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield AdminDeliveryModel_1.api.put(`/shop/admin/${this.shopId}/delivery/${this.id}/set-slot`, { slotId }).then(jsonify);\n            this.deliverySlot = response.deliverySlot;\n            yield this.updateInstanceFromElement(response, ['deliveryDate']);\n        });\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"orderId\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryModel.prototype, \"deliveryNb\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"deliveryTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"deliveryType\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY HH:mm' }),\n    __metadata(\"design:type\", Date)\n], AdminDeliveryModel.prototype, \"deliveryDate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminDeliveryModel.prototype, \"sentAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminDeliveryModel.prototype, \"deliveredAt\", void 0);\n__decorate([\n    type.select({ options: ['getting-ready', 'items-ready', 'ready-to-be-sent', 'sent', 'delivered', 'returned', 'canceled'] }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"deliveryStatus\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                position: { type: 'integer', required: true },\n                items: { type: 'models', options: { model: ItemModel } },\n                quantity: { type: 'integer', required: true },\n                comment: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminDeliveryModel.prototype, \"deliveryProducts\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryModel.prototype, \"height\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryModel.prototype, \"width\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryModel.prototype, \"length\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryModel.prototype, \"weight\", void 0);\n__decorate([\n    type.string({ textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"packaging\", void 0);\n__decorate([\n    type.string({ textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"deliveryInstructions\", void 0);\n__decorate([\n    type.model({ model: UserModel }),\n    __metadata(\"design:type\", String)\n], AdminDeliveryModel.prototype, \"deliverer\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                status: { type: 'array', options: ['ready', 'sent', 'picked', 'delivered', 'returned'] },\n                comment: { type: 'string', required: true }\n            }\n        } }),\n    __metadata(\"design:type\", Date)\n], AdminDeliveryModel.prototype, \"history\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminDeliveryModel.prototype, \"metadata\", void 0);\n__decorate([\n    type.array({ type: 'any' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminDeliveryModel.prototype, \"productItems\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                packingItemId: { type: 'string' },\n                itemsIds: { type: 'any' },\n                packingItemSerialId: { type: 'string' },\n                productId: { type: 'string' },\n                productName: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminDeliveryModel.prototype, \"packingItems\", void 0);\n__decorate([\n    type.any,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Object)\n], AdminDeliveryModel.prototype, \"deliverySlot\", void 0);\nAdminDeliveryModel = AdminDeliveryModel_1 = __decorate([\n    model('/shop/admin/delivery')\n], AdminDeliveryModel);\nexport { AdminDeliveryModel };\n\n//# sourceMappingURL=delivery.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { AdminCountryModel } from './country.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nlet AdminFeeModel = class AdminFeeModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.description = '';\n        this.order = 0;\n        this.ref = '';\n        this.vatCode = '';\n        this.paidPrice = '';\n        this.disableFee = false;\n        this.modifiers = [];\n    }\n    get _label() {\n        return this.name;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminCountryModel }),\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"countryId\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"description\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminFeeModel.prototype, \"order\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"ref\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"vatCode\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminFeeModel.prototype, \"paidPrice\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminFeeModel.prototype, \"disableFee\", void 0);\n__decorate([\n    type.array({\n        type: 'object',\n        options: {\n            keys: {\n                conditions: { type: 'array', options: {\n                        type: 'object',\n                        options: {\n                            keys: {\n                                key: { type: 'string' },\n                                operation: { type: 'string' },\n                                value: { type: 'string' }\n                            }\n                        }\n                    } },\n                conditionsOperator: { type: 'select', options: { options: ['or', 'and'] } },\n                replacedValues: { type: 'object', options: { allowOtherKeys: true } }\n            }\n        }\n    }),\n    __metadata(\"design:type\", Array)\n], AdminFeeModel.prototype, \"modifiers\", void 0);\nAdminFeeModel = __decorate([\n    model('/shop/admin/fee')\n], AdminFeeModel);\nexport { AdminFeeModel };\n\n//# sourceMappingURL=fee.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nvar CustomerModel_1;\nimport { DeliveryTypeModel } from './delivery-type.model';\nimport { RegionModel } from './region.model';\nimport { UserModel } from 'aurelia-deco';\nimport { model, Model, type, validate, jsonify } from 'aurelia-deco';\nimport { addressArray } from 'aurelia-deco';\nlet CustomerModel = CustomerModel_1 = class CustomerModel extends Model {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.favoriteDeliveryType = undefined;\n        this.isCompany = false;\n        this.companyName = void 0;\n        this.title = '';\n        this.addresses = [];\n        this.relatedCustomers = [];\n    }\n    get fullName() {\n        return this.isCompany ? this.companyName : `${this.title} ${this.firstname} ${this.lastname}`.trim();\n    }\n    static getAll(suffix = '', options = {}) {\n        if (!options.route && options.shopId) {\n            options.route = this.baseroute.replace('/shop/', `/shop/${options.shopId}/`);\n        }\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n    static getCurrentCustomer(shopId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            let model = yield CustomerModel_1.api.get(`/shop/${shopId}/customer/current`).then(jsonify);\n            if (!model)\n                return null;\n            let customer = new CustomerModel_1;\n            customer.id = model.id;\n            yield customer.updateInstanceFromElement(model);\n            return customer;\n        });\n    }\n    getRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    getOneRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    postRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    putRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    deleteRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    static computeFullNameFromAutoFetchedData(autoFetchedData) {\n        if (!autoFetchedData || typeof autoFetchedData !== 'object') {\n            return '';\n        }\n        if (autoFetchedData.user && autoFetchedData.user.firstname) {\n            return `${autoFetchedData.user.firstname} ${autoFetchedData.user.lastname}`.trim();\n        }\n        else {\n            const title = autoFetchedData.title ? `${autoFetchedData.title} ` : '';\n            return autoFetchedData.isCompany\n                ? autoFetchedData.companyName\n                : `${title}${autoFetchedData.firstname} ${autoFetchedData.lastname}`.trim();\n        }\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: RegionModel }),\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: DeliveryTypeModel }),\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"favoriteDeliveryType\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], CustomerModel.prototype, \"customerNb\", void 0);\n__decorate([\n    type.model({ model: UserModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"userId\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], CustomerModel.prototype, \"isCompany\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", Object)\n], CustomerModel.prototype, \"companyName\", void 0);\n__decorate([\n    type.select({ options: ['', 'Mr', 'Ms'] }),\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"title\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"firstname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"lastname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"email\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"mobile\", void 0);\n__decorate([\n    addressArray,\n    __metadata(\"design:type\", Array)\n], CustomerModel.prototype, \"addresses\", void 0);\n__decorate([\n    type.select({ options: ['credit-card', 'twint', 'invoice'] }),\n    __metadata(\"design:type\", String)\n], CustomerModel.prototype, \"paymentType\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], CustomerModel.prototype, \"tags\", void 0);\n__decorate([\n    type.object({ keys: {\n            id: { type: 'string' },\n            cardLast4: { type: 'string' },\n            expiryDate: { type: 'date' }\n        } }),\n    __metadata(\"design:type\", Object)\n], CustomerModel.prototype, \"stripe\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], CustomerModel.prototype, \"relatedCustomers\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], CustomerModel.prototype, \"creditAmount\", void 0);\n__decorate([\n    type.metadata,\n    __metadata(\"design:type\", Array)\n], CustomerModel.prototype, \"metadata\", void 0);\nCustomerModel = CustomerModel_1 = __decorate([\n    model('/shop/customer')\n], CustomerModel);\nexport { CustomerModel };\n\n//# sourceMappingURL=customer.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { AdminRegionModel } from './region.model';\nimport { AdminSupplierModel } from './supplier.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { OptionModel } from './option.model';\nimport { model, type, form, validate, io } from 'aurelia-deco';\nimport { countryPrices } from '../../shop-common';\nimport { AdminCategoryModel } from './category.model';\nimport { Container } from 'aurelia-framework';\nimport { UserModel } from 'aurelia-deco';\nlet settings = Container.instance.get('sd-settings');\nif (!settings.shop)\n    settings.shop = {};\nsettings.shop.picturePreviewsFormats = settings.shop.picturePreviewsFormats || ['160', '320', '320:320', '640:640', '1024:1024'];\nsettings.shop.pictureDefaultPreview = settings.shop.pictureDefaultPreview || '160';\nsettings.shop.pictureExportQuality = settings.shop.pictureExportQuality || 0.6;\nlet AdminProductModel = class AdminProductModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.availableRegions = [];\n        this.type = 'sell';\n        this.isPackage = false;\n        this.packageQuantity = 1;\n        this.unit = 'u';\n        this.expiryType = 'none';\n        this.priceType = 'default';\n        this.refWeightUnit = 'g';\n        this.size = '';\n        this.active = true;\n        this.subscriptionChangeImpliesNewInterval = true;\n        this.canMoneyBeRefunded = false;\n        this.enableTrial = false;\n        this.trialPeriod = 30;\n        this.supplyBatches = [];\n    }\n    get _label() {\n        return this.name;\n    }\n    setProductCountryPrices(countries) {\n        if (!this.countryPrices)\n            this.countryPrices = {};\n        for (let country of countries) {\n            if (!this.countryPrices[country.countryCode]) {\n                this.countryPrices[country.countryCode] = {\n                    price: undefined,\n                    discount: undefined,\n                    discountLabel: undefined,\n                    vatCode: ''\n                };\n            }\n        }\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"id\", void 0);\n__decorate([\n    type.models({ model: AdminRegionModel }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"availableRegions\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"sku\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"upc\", void 0);\n__decorate([\n    type.select({ options: ['sell', 'rent', 'subscription', 'digital', 'time-cost'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"type\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"description\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"shortDescription\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminProductModel.prototype, \"isPackage\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"packageQuantity\", void 0);\n__decorate([\n    type.select({ options: ['u', 'm', 'cm', 'mm', 'm2', 'cm2', 'mm2', 'm3', 'cm3', 'mm3', 'kg', 'g', 'mg', 'l', 'dl', 'ml', 'h', 'hl'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"unit\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"stockMinimum\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"restockingDelay\", void 0);\n__decorate([\n    type.select({ options: ['none', 'shelf-life', 'best-before', 'warranty'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"expiryType\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"expiryDelay\", void 0);\n__decorate([\n    type.select({ options: ['default', 'per-weight'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"priceType\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"refWeight\", void 0);\n__decorate([\n    type.select({ options: ['kg', 'g', 'mg'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"refWeightUnit\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", Object)\n], AdminProductModel.prototype, \"size\", void 0);\n__decorate([\n    type.any,\n    __metadata(\"design:type\", Object)\n], AdminProductModel.prototype, \"specifications\", void 0);\n__decorate([\n    type.models({ model: OptionModel }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"optionsIds\", void 0);\n__decorate([\n    countryPrices,\n    __metadata(\"design:type\", Object)\n], AdminProductModel.prototype, \"countryPrices\", void 0);\n__decorate([\n    type.models({ model: AdminCategoryModel }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"categories\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"tags\", void 0);\n__decorate([\n    type.files({\n        accepted: ['image/*'],\n        previewsFormats: settings.shop.picturePreviewsFormats,\n        defaultPreview: settings.shop.pictureDefaultPreview,\n        imageExportQuality: settings.shop.pictureExportQuality\n    }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"pictures\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"similarProducts\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"relatedProducts\", void 0);\n__decorate([\n    type.model({ model: 'self' }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"replacedBy\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"subscriptionAllowedChangeProducts\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminProductModel.prototype, \"active\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    form.hint('Optional : If defined, the product will only become effectively active from this date'),\n    __metadata(\"design:type\", Date)\n], AdminProductModel.prototype, \"activeFrom\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    form.hint('Optional : If defined, the product will be automatically set to inactive after this date'),\n    __metadata(\"design:type\", Date)\n], AdminProductModel.prototype, \"activeUntil\", void 0);\n__decorate([\n    type.select({ options: ['monthly', 'yearly'], multiple: true }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"subscriptionInterval\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminProductModel.prototype, \"subscriptionChangeImpliesNewInterval\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminProductModel.prototype, \"canMoneyBeRefunded\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminProductModel.prototype, \"enableTrial\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"trialPeriod\", void 0);\n__decorate([\n    type.select({ options: ['ordered', 'paid'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"createSubscriptionWhen\", void 0);\n__decorate([\n    type.select({ options: ['ordered', 'paid'] }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"activeDigitalWhen\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"digitalCreditAmount\", void 0);\n__decorate([\n    type.files({ accepted: '*' }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"downloadableFiles\", void 0);\n__decorate([\n    type.model({ model: AdminSupplierModel }),\n    __metadata(\"design:type\", String)\n], AdminProductModel.prototype, \"defaultSupplierId\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"defaultSupplierPrice\", void 0);\n__decorate([\n    type.float,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Number)\n], AdminProductModel.prototype, \"averagePackagePrice\", void 0);\n__decorate([\n    type.array({ type: 'object', keys: {\n            name: { type: 'string', required: true },\n            quantity: { type: 'number', required: true }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"supplyBatches\", void 0);\n__decorate([\n    type.array({ type: 'object', keys: {\n            quantity: { type: 'integer', required: true },\n            productIds: { type: 'models', options: { model: 'self' }, required: true },\n            isMain: { type: 'boolean' },\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"productsParts\", void 0);\n__decorate([\n    type.array({ type: 'object', keys: {\n            date: { type: 'date', required: true },\n            locked: { type: 'boolean', required: true },\n            userId: { type: 'model', options: { model: UserModel }, required: true }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"productsPartsLockHistory\", void 0);\n__decorate([\n    type.metadata,\n    __metadata(\"design:type\", Array)\n], AdminProductModel.prototype, \"metadata\", void 0);\nAdminProductModel = __decorate([\n    model('/shop/admin/product')\n], AdminProductModel);\nexport { AdminProductModel };\n\n//# sourceMappingURL=product.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { RegionModel } from './region.model';\nimport { model, Model, type } from 'aurelia-deco';\nlet DeliveryTypeModel = class DeliveryTypeModel extends Model {\n    constructor() {\n        super(...arguments);\n        this.availableRegions = [];\n        this.order = 0;\n        this.useDeliverySlots = false;\n    }\n    get _label() {\n        return this.name;\n    }\n    static getAll(suffix = '', options = {}) {\n        if (!options.route && options.shopId) {\n            options.route = this.baseroute.replace('/shop/', `/shop/${options.shopId}/`);\n        }\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n    getRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    getOneRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    postRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    putRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    deleteRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], DeliveryTypeModel.prototype, \"id\", void 0);\n__decorate([\n    type.models({ model: RegionModel }),\n    __metadata(\"design:type\", Array)\n], DeliveryTypeModel.prototype, \"availableRegions\", void 0);\n__decorate([\n    type.string(),\n    __metadata(\"design:type\", String)\n], DeliveryTypeModel.prototype, \"zones\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], DeliveryTypeModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], DeliveryTypeModel.prototype, \"description\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], DeliveryTypeModel.prototype, \"order\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], DeliveryTypeModel.prototype, \"useDeliverySlots\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], DeliveryTypeModel.prototype, \"metadata\", void 0);\nDeliveryTypeModel = __decorate([\n    model('/shop/delivery-type')\n], DeliveryTypeModel);\nexport { DeliveryTypeModel };\n\n//# sourceMappingURL=delivery-type.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { AdminRegionModel } from './region.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nlet AdminDeliveryTypeModel = class AdminDeliveryTypeModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.availableRegions = [];\n        this.order = 0;\n        this.useDeliverySlots = false;\n    }\n    get _label() {\n        return this.name;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminDeliveryTypeModel.prototype, \"id\", void 0);\n__decorate([\n    type.models({ model: AdminRegionModel }),\n    __metadata(\"design:type\", Array)\n], AdminDeliveryTypeModel.prototype, \"availableRegions\", void 0);\n__decorate([\n    type.string(),\n    __metadata(\"design:type\", String)\n], AdminDeliveryTypeModel.prototype, \"zones\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminDeliveryTypeModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminDeliveryTypeModel.prototype, \"description\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminDeliveryTypeModel.prototype, \"order\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminDeliveryTypeModel.prototype, \"useDeliverySlots\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminDeliveryTypeModel.prototype, \"metadata\", void 0);\nAdminDeliveryTypeModel = __decorate([\n    model('/shop/admin/delivery-type')\n], AdminDeliveryTypeModel);\nexport { AdminDeliveryTypeModel };\n\n//# sourceMappingURL=delivery-type.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ItemModel } from './item.model';\nimport { ShopBaseModel } from './shop.base.model';\nimport { model, type, io, UserModel } from 'aurelia-deco';\nimport { DateHelper } from 'aurelia-resources';\n;\nlet DeliveryModel = class DeliveryModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.deliveryNb = 0;\n        this.deliveryStatus = 'getting-ready';\n        this.deliveryProducts = [];\n        this.productItems = [];\n        this.packingItems = [];\n    }\n    static computeOptionsNames(productItems) {\n        for (const productItem of productItems) {\n            productItem.optionsNames = productItem.options.map(o => o.name).join(', ');\n        }\n    }\n    static computeExpiryWeightItems(productItems) {\n        for (const productItem of productItems) {\n            productItem.expiryWeightItems = [];\n            for (let index = 0; index < productItem.quantity; index++) {\n                const item = productItem.items[index];\n                let expiryDate = '';\n                let weight = productItem.product.refWeight;\n                let weightText = `${productItem.product.refWeight}${productItem.product.refWeightUnit}`;\n                let weightUnit = productItem.product.refWeightUnit;\n                let defined = false;\n                if (item) {\n                    weight = item.weight !== undefined ? item.weight : weight;\n                    weightText = item.weight !== undefined ? `${item.weight}${item.weightUnit}` : weightText;\n                    weightUnit = item.weightUnit !== undefined ? item.weightUnit : weightUnit;\n                    expiryDate = item.expiryDate !== undefined && DateHelper.moment(item.expiryDate) ? DateHelper.moment(item.expiryDate).format('DD/MM/YYYY') : expiryDate;\n                    defined = true;\n                }\n                const key = `${weight}${expiryDate}${defined ? 'def' : 'not-def'}`;\n                const existingEntry = productItem.expiryWeightItems.find(i => i.key === key);\n                if (existingEntry) {\n                    existingEntry.quantity += 1;\n                }\n                else {\n                    productItem.expiryWeightItems.push({\n                        quantity: 1,\n                        key,\n                        weight: weight,\n                        weightText,\n                        weightUnit,\n                        expiryDate,\n                        defined\n                    });\n                }\n            }\n        }\n    }\n    static getAll(suffix = '', options = {}) {\n        if (!options.route && options.shopId) {\n            options.route = this.baseroute.replace('/shop/', `/shop/${options.shopId}/`);\n        }\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n    getRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    getOneRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    postRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    putRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    deleteRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"orderId\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], DeliveryModel.prototype, \"deliveryNb\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"deliveryTemplate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"deliveryType\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY HH:mm' }),\n    __metadata(\"design:type\", Date)\n], DeliveryModel.prototype, \"deliveryDate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], DeliveryModel.prototype, \"sentAt\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], DeliveryModel.prototype, \"deliveredAt\", void 0);\n__decorate([\n    type.select({ options: ['getting-ready', 'items-ready', 'ready-to-be-sent', 'sent', 'delivered', 'returned', 'canceled'] }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"deliveryStatus\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                position: { type: 'integer', required: true },\n                items: { type: 'models', options: { model: ItemModel } },\n                quantity: { type: 'integer', required: true },\n                comment: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], DeliveryModel.prototype, \"deliveryProducts\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], DeliveryModel.prototype, \"height\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], DeliveryModel.prototype, \"width\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], DeliveryModel.prototype, \"length\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], DeliveryModel.prototype, \"weight\", void 0);\n__decorate([\n    type.string({ textarea: true }),\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"packaging\", void 0);\n__decorate([\n    type.string({ textarea: true }),\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"deliveryInstructions\", void 0);\n__decorate([\n    type.model({ model: UserModel }),\n    __metadata(\"design:type\", String)\n], DeliveryModel.prototype, \"deliverer\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                status: { type: 'array', options: ['ready', 'sent', 'picked', 'delivered', 'returned'] },\n                comment: { type: 'string', required: true }\n            }\n        } }),\n    __metadata(\"design:type\", Date)\n], DeliveryModel.prototype, \"history\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], DeliveryModel.prototype, \"metadata\", void 0);\n__decorate([\n    type.array({ type: 'any' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], DeliveryModel.prototype, \"productItems\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                packingItemId: { type: 'string' },\n                itemsIds: { type: 'any' },\n                packingItemSerialId: { type: 'string' },\n                productId: { type: 'string' },\n                productName: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], DeliveryModel.prototype, \"packingItems\", void 0);\n__decorate([\n    type.any,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Object)\n], DeliveryModel.prototype, \"deliverySlot\", void 0);\nDeliveryModel = __decorate([\n    model('/shop/delivery')\n], DeliveryModel);\nexport { DeliveryModel };\n\n//# sourceMappingURL=delivery.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { AdminDeliveryTypeModel } from './delivery-type.model';\nimport { AdminRegionModel } from './region.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { UserModel } from 'aurelia-deco';\nimport { model, type } from 'aurelia-deco';\nimport { addressArray } from 'aurelia-deco';\nlet AdminCustomerModel = class AdminCustomerModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.favoriteDeliveryType = undefined;\n        this.isCompany = false;\n        this.companyName = void 0;\n        this.title = '';\n        this.emailTokenExpires = void 0;\n        this.mobileTokenExpires = void 0;\n        this.addresses = [];\n        this.relatedCustomers = [];\n        this.comments = [];\n    }\n    get fullName() {\n        return this.isCompany ? this.companyName : `${this.title} ${this.firstname} ${this.lastname}`.trim();\n    }\n    static computeFullNameFromAutoFetchedData(autoFetchedData) {\n        if (!autoFetchedData || typeof autoFetchedData !== 'object') {\n            return '';\n        }\n        if (autoFetchedData.user && autoFetchedData.user.firstname) {\n            return `${autoFetchedData.user.firstname} ${autoFetchedData.user.lastname}`.trim();\n        }\n        else {\n            const title = autoFetchedData.title ? `${autoFetchedData.title} ` : '';\n            return autoFetchedData.isCompany\n                ? autoFetchedData.companyName\n                : `${title}${autoFetchedData.firstname} ${autoFetchedData.lastname}`.trim();\n        }\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: AdminDeliveryTypeModel }),\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"favoriteDeliveryType\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminCustomerModel.prototype, \"customerNb\", void 0);\n__decorate([\n    type.model({ model: UserModel }),\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"userId\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminCustomerModel.prototype, \"isCompany\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", Object)\n], AdminCustomerModel.prototype, \"companyName\", void 0);\n__decorate([\n    type.select({ options: ['', 'Mr', 'Ms'] }),\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"title\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"firstname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"lastname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"email\", void 0);\n__decorate([\n    type.date({ dateFormat: 'YYYY-MM-DDTHH:mm:ss[Z]' }),\n    __metadata(\"design:type\", Date)\n], AdminCustomerModel.prototype, \"emailTokenExpires\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"mobile\", void 0);\n__decorate([\n    type.date({ dateFormat: 'YYYY-MM-DDTHH:mm:ss[Z]' }),\n    __metadata(\"design:type\", Date)\n], AdminCustomerModel.prototype, \"mobileTokenExpires\", void 0);\n__decorate([\n    addressArray,\n    __metadata(\"design:type\", Array)\n], AdminCustomerModel.prototype, \"addresses\", void 0);\n__decorate([\n    type.select({ options: ['credit-card', 'twint', 'invoice'] }),\n    __metadata(\"design:type\", String)\n], AdminCustomerModel.prototype, \"paymentType\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminCustomerModel.prototype, \"tags\", void 0);\n__decorate([\n    type.object({ keys: {\n            id: { type: 'string' },\n            cardLast4: { type: 'string' },\n            expiryDate: { type: 'date' }\n        } }),\n    __metadata(\"design:type\", Object)\n], AdminCustomerModel.prototype, \"stripe\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], AdminCustomerModel.prototype, \"relatedCustomers\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                userId: { type: 'model', options: { model: UserModel } },\n                title: { type: 'string', required: false },\n                comment: { type: 'string', required: true },\n                visibility: { type: 'select', options: { options: ['user-only', 'admin-only', 'all'] } }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminCustomerModel.prototype, \"comments\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminCustomerModel.prototype, \"creditAmount\", void 0);\n__decorate([\n    type.metadata,\n    __metadata(\"design:type\", Array)\n], AdminCustomerModel.prototype, \"metadata\", void 0);\nAdminCustomerModel = __decorate([\n    model('/shop/admin/customer')\n], AdminCustomerModel);\nexport { AdminCustomerModel };\n\n//# sourceMappingURL=customer.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { address, io } from 'aurelia-deco';\nimport { model, Model, type } from 'aurelia-deco';\nlet AdminShopSettingsModel = class AdminShopSettingsModel extends Model {\n    constructor() {\n        super(...arguments);\n        this.active = false;\n        this.enableStock = false;\n        this.supplyPurchaseCurrencies = [];\n        this.enableOptions = false;\n        this.defaultProductMetadata = [];\n        this.defaultOptionMetadata = [];\n        this.defaultCategoryMetadata = [];\n        this.defaultCustomerMetadata = [];\n        this.defaultOrderMetadata = [];\n        this.defaultDeliveryMetadata = [];\n        this.defaultDeliveryTypeMetadata = [];\n        this.enableSponsorship = false;\n        this.sponsorCouponValue = 10;\n        this.sponsoredCouponValue = 10;\n        this.enableRegionCheck = false;\n        this.enableEstimatedDeliveryDateCheck = false;\n        this.dashboard = [];\n    }\n    static getAll(suffix = '', options = {}) {\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"id\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"name\", void 0);\n__decorate([\n    type.string(),\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"stripeApiKey\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminShopSettingsModel.prototype, \"active\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminShopSettingsModel.prototype, \"enableStock\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"supplyPurchaseCurrencies\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminShopSettingsModel.prototype, \"enableOptions\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultProductMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultOptionMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultCategoryMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultCustomerMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultOrderMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultDeliveryMetadata\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"defaultDeliveryTypeMetadata\", void 0);\n__decorate([\n    type.select({ options: ['credit-card', 'twint', 'invoice', 'other'], multiple: true }),\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"paymentMethods\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"deliveryTypes\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"adminEmail\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"adminEmailName\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"companyName\", void 0);\n__decorate([\n    address,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"companyAddress\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"companyVATNumber\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"qrCodeBase\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"packagingCategoryId\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminShopSettingsModel.prototype, \"companyColor\", void 0);\n__decorate([\n    type.file({ accepted: 'image/*' }),\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"companyLogo\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"enableSponsorship\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"sponsorCouponValue\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"sponsoredCouponValue\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"enableRegionCheck\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Object)\n], AdminShopSettingsModel.prototype, \"enableEstimatedDeliveryDateCheck\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                type: { type: 'string' },\n                title: { type: 'string' },\n                labels: { type: 'array', options: { type: 'string' } },\n                datasets: { type: 'array', options: { type: 'any' } },\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"dashboard\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"myRoles\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"myActions\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminShopSettingsModel.prototype, \"myRegions\", void 0);\nAdminShopSettingsModel = __decorate([\n    model('/shop/admin')\n], AdminShopSettingsModel);\nexport { AdminShopSettingsModel };\n\n//# sourceMappingURL=shop.settings.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type, validate } from 'aurelia-deco';\nlet AdminTemplateModel = class AdminTemplateModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.name = {\n            fr: 'Nouveau template',\n            en: 'New template'\n        };\n        this.tableStyle = 'light';\n        this.productPositionHeader = 'P';\n        this.productQuantityHeader = 'Q';\n        this.productItemHeader = {\n            fr: 'Produit',\n            en: 'Product'\n        };\n        this.productUnitMonthlyHeader = {\n            fr: 'Unité / mensualité',\n            en: 'Unit / monthly',\n        };\n        this.productTotalHeader = {\n            fr: 'Total',\n            en: 'Total',\n        };\n        this.coupon = {\n            fr: 'Coupon',\n            en: 'Coupon'\n        };\n        this.mainDigitalCredit = {\n            fr: 'Crédit digital utilisé dans cette commande',\n            en: 'Digital credit used in this order'\n        };\n        this.secondaryDigitalCredit = {\n            fr: 'Vous avez #{order:digitalCreditLeft:round:2} crédits restant dans votre compte',\n            en: 'You have #{order:digitalCreditLeft:round:2} credit left in your account'\n        };\n        this.mainTotalHTLine = {\n            fr: 'Total HT',\n            en: 'Total excl taxes'\n        };\n        this.mainTaxesHTLine = {\n            fr: 'TVA (inclue dans le prix)',\n            en: 'Taxes included in the price'\n        };\n        this.mainTotalWithoutTaxesText = {\n            fr: 'Total (taxes non applicables)',\n            en: 'Total (taxes not applicable)'\n        };\n        this.mainTotalTTCText = {\n            fr: 'Total TTC',\n            en: 'Total incl taxes'\n        };\n        this.mainPaymentLine = {\n            fr: 'Paiement du #{payment:date}',\n            en: 'Deposit on #{payment:date}'\n        };\n        this.secondaryPaymentLine = {\n            fr: '#{payment:ref} #{payment:label}',\n            en: '#{payment:ref} #{payment:label}'\n        };\n        this.mainLeftToPay = {\n            fr: 'Total restant à payer TTC',\n            en: 'Total left to pay, incl taxes'\n        };\n        this.secondaryLeftToPay = {\n            fr: '',\n            en: ''\n        };\n        this.commentsHeader = {\n            fr: 'Commentaires',\n            en: 'Comments'\n        };\n        this.page = {\n            fr: 'Page #{page:pageNb}',\n            en: 'Page #{page:pageNb}'\n        };\n    }\n    get _label() {\n        return this.name;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"id\", void 0);\n__decorate([\n    type.select({ options: ['order', 'delivery', 'supplyOrder'] }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"type\", void 0);\n__decorate([\n    type.select({ options: ['basket', 'ordered', 'getting-ready', 'invoiced', 'paid', 'canceled'], multiple: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"status\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    validate.required,\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"title\", void 0);\n__decorate([\n    type.file({ accepted: 'image/*' }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"templateHeader\", void 0);\n__decorate([\n    type.select({ options: ['light', 'alternate'] }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"tableStyle\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"senderAddress\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"receiverAddress\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"headerText\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"infosLeft\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"infosRight\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminTemplateModel.prototype, \"displayProductPosition\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminTemplateModel.prototype, \"displayProductDiscounts\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"productPositionHeader\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"productQuantityHeader\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"productItemHeader\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"productUnitMonthlyHeader\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"productTotalHeader\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"mainProductLine\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryProductLine\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminTemplateModel.prototype, \"displayProductParts\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"mainProductPartLine\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryProductPartLine\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminTemplateModel.prototype, \"displayProductWithoutTaxes\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"coupon\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainDigitalCredit\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"secondaryDigitalCredit\", void 0);\n__decorate([\n    type.boolean(),\n    __metadata(\"design:type\", Boolean)\n], AdminTemplateModel.prototype, \"hideTotalTaxes\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainTotalHTLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryTotalHTLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainTaxesHTLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryTaxesHTLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainTotalWithoutTaxesText\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryTotalWithoutTaxesText\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainTotalTTCText\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"secondaryTotalTTCText\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainPaymentLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"secondaryPaymentLine\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"mainLeftToPay\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"secondaryLeftToPay\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"commentsHeader\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"conditionText\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"footerLeft\", void 0);\n__decorate([\n    type.string({ multilang: true, textarea: true }),\n    __metadata(\"design:type\", String)\n], AdminTemplateModel.prototype, \"footerRight\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", Object)\n], AdminTemplateModel.prototype, \"page\", void 0);\nAdminTemplateModel = __decorate([\n    model('/shop/admin/template')\n], AdminTemplateModel);\nexport { AdminTemplateModel };\n\n//# sourceMappingURL=template.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nlet AdminCategoryModel = class AdminCategoryModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.order = 0;\n        this.active = true;\n    }\n    get _label() {\n        return this.name;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminCategoryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminCategoryModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminCategoryModel.prototype, \"description\", void 0);\n__decorate([\n    type.file({ accepted: ['image/*'], previewsFormats: ['320:320', '640:640', '1200'], defaultPreview: '320:320' }),\n    __metadata(\"design:type\", Object)\n], AdminCategoryModel.prototype, \"image\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminCategoryModel.prototype, \"order\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminCategoryModel.prototype, \"active\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminCategoryModel.prototype, \"metadata\", void 0);\nAdminCategoryModel = __decorate([\n    model('/shop/admin/category')\n], AdminCategoryModel);\nexport { AdminCategoryModel };\n\n//# sourceMappingURL=category.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { UserModel } from 'aurelia-deco';\nimport { model, type } from 'aurelia-deco';\nimport { addressArray } from 'aurelia-deco';\nlet AdminSupplierModel = class AdminSupplierModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.isCompany = false;\n        this.companyName = void 0;\n        this.title = '';\n        this.addresses = [];\n        this.relatedSuppliers = [];\n        this.comments = [];\n    }\n    get fullName() {\n        return this.isCompany ? this.companyName : `${this.title} ${this.firstname} ${this.lastname}`.trim();\n    }\n    static computeFullNameFromAutoFetchedData(autoFetchedData) {\n        if (!autoFetchedData || typeof autoFetchedData !== 'object') {\n            return '';\n        }\n        const title = autoFetchedData.title ? `${autoFetchedData.title} ` : '';\n        return autoFetchedData.isCompany\n            ? autoFetchedData.companyName\n            : `${title}${autoFetchedData.firstname} ${autoFetchedData.lastname}`.trim();\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"id\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminSupplierModel.prototype, \"supplierNb\", void 0);\n__decorate([\n    type.model({ model: UserModel }),\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"userId\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminSupplierModel.prototype, \"isCompany\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", Object)\n], AdminSupplierModel.prototype, \"companyName\", void 0);\n__decorate([\n    type.select({ options: ['', 'Mr', 'Ms'] }),\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"title\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"firstname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"lastname\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"email\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminSupplierModel.prototype, \"mobile\", void 0);\n__decorate([\n    addressArray,\n    __metadata(\"design:type\", Array)\n], AdminSupplierModel.prototype, \"addresses\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    __metadata(\"design:type\", Array)\n], AdminSupplierModel.prototype, \"tags\", void 0);\n__decorate([\n    type.models({ model: 'self' }),\n    __metadata(\"design:type\", Array)\n], AdminSupplierModel.prototype, \"relatedSuppliers\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                date: { type: 'date', required: true },\n                userId: { type: 'model', options: { model: UserModel } },\n                title: { type: 'string', required: false },\n                comment: { type: 'string', required: true },\n                visibility: { type: 'select', options: { options: ['user-only', 'admin-only', 'all'] } }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminSupplierModel.prototype, \"comments\", void 0);\n__decorate([\n    type.metadata,\n    __metadata(\"design:type\", Array)\n], AdminSupplierModel.prototype, \"metadata\", void 0);\nAdminSupplierModel = __decorate([\n    model('/shop/admin/supplier')\n], AdminSupplierModel);\nexport { AdminSupplierModel };\n\n//# sourceMappingURL=supplier.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nvar AdminItemModel_1;\nimport { AdminRegionModel } from './region.model';\nimport { AdminSupplyOrderModel } from './supply-order.model';\nimport { AdminSupplierModel } from './supplier.model';\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type, io, validate } from 'aurelia-deco';\nimport { AdminProductModel } from './product.model';\nimport { rentingDates } from '../../shop-common';\nlet AdminItemModel = AdminItemModel_1 = class AdminItemModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.optionsIds = [];\n        this.combinedOrderedIds = '';\n        this.itemStatus = 'out-of-stock';\n        this.unavailable = false;\n        this.rentalItem = false;\n        this.isAssembled = false;\n        this.usage = [];\n        this.notifications = [];\n        this.packageQuantity = 1;\n        this.packageQuantityLeft = 1;\n        this.unit = 'u';\n        this.weightUnit = 'g';\n        this.ignoreForAveragePrice = false;\n        this.itemParts = [];\n        this.readyForAssembly = false;\n        this.itemPartsFetched = false;\n        this.nbParts = {};\n        this.nbPartsFetched = false;\n    }\n    get isReserved() {\n        return this.unavailable\n            || this.computeQuantityLeft() <= 0;\n    }\n    get isAvailable() {\n        return !this.unavailable\n            && this.computeQuantityLeft() > 0;\n    }\n    computeQuantityLeft() {\n        return Array.isArray(this.usage)\n            ? this.packageQuantity - this.usage.map(u => u.quantity).reduce((a, b) => a + b, 0)\n            : this.packageQuantity;\n    }\n    getItemParts(forceReload = false) {\n        var _a;\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this.itemPartsFetched && !forceReload) {\n                return this.itemParts;\n            }\n            if (!this.isAssembled) {\n                this.itemParts = [];\n                this.itemPartsFetched = true;\n                return this.itemParts;\n            }\n            const itemParts = [];\n            const items = yield AdminItemModel_1.getAll(`?parentItemId=${this.id}&autoFetch=product`, { shopId: this.shopId });\n            for (const item of items) {\n                let itemPart = itemParts.find(ip => ip.productId === item.productId);\n                if (!itemPart) {\n                    itemPart = {\n                        productId: item.productId,\n                        product: item.get('product'),\n                        items: [],\n                        quantity: 0,\n                        nbOutOfStock: 0,\n                        nbOrdered: 0,\n                        nbStock: 0,\n                        nbGettingReady: 0,\n                        nbSent: 0,\n                        nbDelivered: 0\n                    };\n                    itemParts.push(itemPart);\n                }\n                itemPart.items.push(item);\n                itemPart.quantity += ((_a = item.usage.find(u => u.id === this.id)) === null || _a === void 0 ? void 0 : _a.quantity) || 0;\n                if (item.itemStatus === 'out-of-stock')\n                    itemPart.nbOutOfStock++;\n                if (item.itemStatus === 'ordered')\n                    itemPart.nbOrdered++;\n                if (item.itemStatus === 'stock')\n                    itemPart.nbStock++;\n                if (item.itemStatus === 'getting-ready')\n                    itemPart.nbGettingReady++;\n                if (item.itemStatus === 'sent')\n                    itemPart.nbSent++;\n                if (item.itemStatus === 'delivered')\n                    itemPart.nbDelivered++;\n            }\n            this.itemParts = itemParts;\n            this.itemPartsFetched = true;\n            return this.itemParts;\n        });\n    }\n    static updateItemPartsStatuses(itemPart, items) {\n        const updateWithOriginalItems = !items;\n        if (updateWithOriginalItems) {\n            items = itemPart.items;\n        }\n        else {\n            if (itemPart.items.length !== items.length) {\n                return;\n            }\n            if (itemPart.items.map(i => i.id).sort().join(',') !== items.map(i => i.id).sort().join(',')) {\n                return;\n            }\n        }\n        itemPart.nbOutOfStock = 0;\n        itemPart.nbOrdered = 0;\n        itemPart.nbStock = 0;\n        itemPart.nbGettingReady = 0;\n        itemPart.nbSent = 0;\n        itemPart.nbDelivered = 0;\n        for (const item of items) {\n            if (item.itemStatus === 'out-of-stock')\n                itemPart.nbOutOfStock++;\n            if (item.itemStatus === 'ordered')\n                itemPart.nbOrdered++;\n            if (item.itemStatus === 'stock')\n                itemPart.nbStock++;\n            if (item.itemStatus === 'getting-ready')\n                itemPart.nbGettingReady++;\n            if (item.itemStatus === 'sent')\n                itemPart.nbSent++;\n            if (item.itemStatus === 'delivered')\n                itemPart.nbDelivered++;\n        }\n    }\n    getNbParts(forceReload = false) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this.nbPartsFetched && !forceReload) {\n                return this.nbParts;\n            }\n            if (!this.isAssembled) {\n                this.nbParts = {};\n                this.nbPartsFetched = true;\n                return this.nbParts;\n            }\n            const item = yield AdminItemModel_1.getOneWithId(this.id, '?fetchNbParts=1', { shopId: this.shopId });\n            this.nbParts = item.nbParts;\n            this.readyForAssembly = (this.itemStatus === 'out-of-stock' || this.itemStatus === 'ordered') && (this.nbParts['out-of-stock'] || 0) === 0 && (this.nbParts.ordered || 0) === 0;\n            return this.nbParts;\n        });\n    }\n    changeRegion(newRegionId) {\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                yield AdminItemModel_1.api.put(`/shop/admin/${this.shopId}/item/${this.id}/change-region/${newRegionId}`);\n            }\n            catch (error) {\n                throw new Error('Failed to change region');\n            }\n            this.region = newRegionId;\n            return;\n        });\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: AdminProductModel }),\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"productId\", void 0);\n__decorate([\n    type.array({ type: 'string' }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"optionsIds\", void 0);\n__decorate([\n    type.string,\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"combinedOrderedIds\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"serialId\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminItemModel.prototype, \"expiryDate\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"lotNumber\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"supplyOrderRef\", void 0);\n__decorate([\n    type.select({ options: ['out-of-stock', 'ordered', 'stock', 'getting-ready', 'sent', 'delivered'] }),\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"itemStatus\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminItemModel.prototype, \"unavailable\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminItemModel.prototype, \"rentalItem\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminItemModel.prototype, \"isAssembled\", void 0);\n__decorate([\n    type.any,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"parentItems\", void 0);\n__decorate([\n    type.any,\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"deliveries\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                id: { type: 'id', required: true },\n                type: { type: 'select', options: ['delivery', 'item'], required: true },\n                quantity: { type: 'float', required: true }\n            }\n        } }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"usage\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                type: { type: 'select', options: ['packaging-return', 'other'], required: true },\n                date: { type: 'date', required: true },\n                customerId: { type: 'id', required: false },\n                subject: { type: 'string', required: false },\n                content: { type: 'string', required: false },\n            }\n        } }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"notifications\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminItemModel.prototype, \"packageQuantity\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminItemModel.prototype, \"packageQuantityLeft\", void 0);\n__decorate([\n    type.select({ options: ['u', 'm', 'cm', 'mm', 'm2', 'cm2', 'mm2', 'm3', 'cm3', 'mm3', 'kg', 'g', 'mg', 'l', 'dl', 'ml', 'h', 'hl'] }),\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"unit\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminItemModel.prototype, \"weight\", void 0);\n__decorate([\n    type.select({ options: ['kg', 'g', 'mg'] }),\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"weightUnit\", void 0);\n__decorate([\n    type.model({ model: AdminSupplierModel }),\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"supplierId\", void 0);\n__decorate([\n    type.model({ model: AdminSupplyOrderModel }),\n    io.fromApiOnly,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"supplyOrderId\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminItemModel.prototype, \"purchasedDate\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminItemModel.prototype, \"purchasedPrice\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminItemModel.prototype, \"supplierPrice\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"supplierCurrency\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminItemModel.prototype, \"ignoreForAveragePrice\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"location\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminItemModel.prototype, \"stockEntry\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminItemModel.prototype, \"stockExit\", void 0);\n__decorate([\n    rentingDates,\n    __metadata(\"design:type\", Object)\n], AdminItemModel.prototype, \"rentingDates\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminItemModel.prototype, \"soldTo\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminItemModel.prototype, \"metadata\", void 0);\nAdminItemModel = AdminItemModel_1 = __decorate([\n    model('/shop/admin/item')\n], AdminItemModel);\nexport { AdminItemModel };\n\n//# sourceMappingURL=item.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { io, model, type, validate } from 'aurelia-deco';\nimport { RegionModel } from './region.model';\nimport { DeliveryTypeModel } from './delivery-type.model';\nimport { ShopBaseModel } from './shop.base.model';\nimport * as moment from 'moment';\nlet DeliverySlotModel = class DeliverySlotModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.quantity = 1;\n    }\n    static sortSlots(slots) {\n        slots.sort((a, b) => {\n            const ma = moment(a.date).startOf('day');\n            const mb = moment(b.date).startOf('day');\n            if (ma.isSame(mb, 'date')) {\n                if (a.timeStart < b.timeStart) {\n                    return -1;\n                }\n                else if (b.timeStart < a.timeStart) {\n                    return 1;\n                }\n                {\n                    return 0;\n                }\n            }\n            if (ma.isBefore(mb)) {\n                return -1;\n            }\n            else if (ma.isAfter(mb)) {\n                return 1;\n            }\n        });\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], DeliverySlotModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: RegionModel }),\n    __metadata(\"design:type\", String)\n], DeliverySlotModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: DeliveryTypeModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], DeliverySlotModel.prototype, \"deliveryTypeId\", void 0);\n__decorate([\n    type.date(),\n    validate.required,\n    __metadata(\"design:type\", Date)\n], DeliverySlotModel.prototype, \"date\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], DeliverySlotModel.prototype, \"timeStart\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], DeliverySlotModel.prototype, \"timeEnd\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], DeliverySlotModel.prototype, \"quantity\", void 0);\n__decorate([\n    io.fromApiOnly,\n    __metadata(\"design:type\", Boolean)\n], DeliverySlotModel.prototype, \"isAvailable\", void 0);\nDeliverySlotModel = __decorate([\n    model('/shop/delivery-slot')\n], DeliverySlotModel);\nexport { DeliverySlotModel };\n\n//# sourceMappingURL=delivery-slot.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { model, Model, type } from 'aurelia-deco';\nimport { vatCodes } from '../shop-common';\nlet CountryModel = class CountryModel extends Model {\n    constructor() {\n        super(...arguments);\n        this.default = false;\n    }\n    get _label() {\n        return this.countryCode;\n    }\n    static getAll(suffix = '', options = {}) {\n        if (!options.route && options.shopId) {\n            options.route = this.baseroute.replace('/shop/', `/shop/${options.shopId}/`);\n        }\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n    getRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    getOneRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    postRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    putRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    deleteRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], CountryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CountryModel.prototype, \"countryCode\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], CountryModel.prototype, \"currency\", void 0);\n__decorate([\n    vatCodes,\n    __metadata(\"design:type\", Object)\n], CountryModel.prototype, \"vatCodes\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], CountryModel.prototype, \"default\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], CountryModel.prototype, \"metadata\", void 0);\nCountryModel = __decorate([\n    model('/shop/country')\n], CountryModel);\nexport { CountryModel };\n\n//# sourceMappingURL=country.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { AdminOrderModel } from './order.model';\nimport { model, type } from 'aurelia-deco';\nlet AdminCouponModel = class AdminCouponModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.enabled = true;\n        this.quantity = 1;\n        this.unlimited = false;\n        this.orders = [];\n        this.type = 'amount';\n        this.amount = 0;\n    }\n    get available() {\n        if (!this.enabled)\n            return false;\n        if (this.activeUntil && this.activeUntil < new Date())\n            return false;\n        if (this.unlimited)\n            return true;\n        let nbOrders = (Array.isArray(this.orders)) ? this.orders.length : 0;\n        if (this.quantity > nbOrders)\n            return true;\n        return false;\n    }\n    get usage() {\n        if (this.unlimited)\n            return '∞';\n        return `${(Array.isArray(this.orders)) ? this.orders.length : 0}/${this.quantity}`;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminCouponModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCouponModel.prototype, \"token\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminCouponModel.prototype, \"enabled\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], AdminCouponModel.prototype, \"quantity\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminCouponModel.prototype, \"unlimited\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    __metadata(\"design:type\", Date)\n], AdminCouponModel.prototype, \"activeUntil\", void 0);\n__decorate([\n    type.models({ model: AdminOrderModel }),\n    __metadata(\"design:type\", Array)\n], AdminCouponModel.prototype, \"orders\", void 0);\n__decorate([\n    type.select({ options: ['amount', 'percent', 'sponsorship', 'reward'] }),\n    __metadata(\"design:type\", String)\n], AdminCouponModel.prototype, \"type\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCouponModel.prototype, \"sponsorCustomerId\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCouponModel.prototype, \"customerId\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminCouponModel.prototype, \"amount\", void 0);\nAdminCouponModel = __decorate([\n    model('/shop/admin/coupon')\n], AdminCouponModel);\nexport { AdminCouponModel };\n\n//# sourceMappingURL=coupon.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { model, type, validate } from 'aurelia-deco';\nimport { AdminRegionModel } from './region.model';\nimport { AdminDeliveryTypeModel } from './delivery-type.model';\nimport { ShopBaseModel } from './../shop.base.model';\nlet AdminDeliverySlotConfigModel = class AdminDeliverySlotConfigModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.region = undefined;\n        this.quantity = 1;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotConfigModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminRegionModel }),\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotConfigModel.prototype, \"region\", void 0);\n__decorate([\n    type.model({ model: AdminDeliveryTypeModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminDeliverySlotConfigModel.prototype, \"deliveryTypeId\", void 0);\n__decorate([\n    type.select({ options: [1, 2, 3, 4, 5, 6, 7] }),\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotConfigModel.prototype, \"day\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotConfigModel.prototype, \"timeStart\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotConfigModel.prototype, \"timeEnd\", void 0);\n__decorate([\n    type.integer,\n    validate.required,\n    __metadata(\"design:type\", Number)\n], AdminDeliverySlotConfigModel.prototype, \"quantity\", void 0);\nAdminDeliverySlotConfigModel = __decorate([\n    model('/shop/admin/delivery-slot-config')\n], AdminDeliverySlotConfigModel);\nexport { AdminDeliverySlotConfigModel };\n\n//# sourceMappingURL=delivery-slot-config.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type, validate } from 'aurelia-deco';\nimport { countryPrices, currencies } from '../../shop-common';\nimport { OptionModel } from './option.model';\nimport { AdminCustomerModel } from './customer.model';\nimport { AdminProductModel } from './product.model';\nimport { AdminCountryModel } from './country.model';\nimport { AdminOrderModel } from './order.model';\nlet AdminSubscriptionModel = class AdminSubscriptionModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.history = [];\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"id\", void 0);\n__decorate([\n    type.model({ model: AdminProductModel }),\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"productId\", void 0);\n__decorate([\n    type.model({ model: OptionModel }),\n    __metadata(\"design:type\", Array)\n], AdminSubscriptionModel.prototype, \"optionsIds\", void 0);\n__decorate([\n    type.model({ model: AdminCustomerModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"customerId\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminSubscriptionModel.prototype, \"currentIntervalPrice\", void 0);\n__decorate([\n    type.float,\n    __metadata(\"design:type\", Number)\n], AdminSubscriptionModel.prototype, \"currentIntervalPriceTTC\", void 0);\n__decorate([\n    type.model({ model: AdminCountryModel }),\n    validate.required,\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"country\", void 0);\n__decorate([\n    type.select({ options: currencies }),\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"currency\", void 0);\n__decorate([\n    type.select({ options: ['trialing', 'active', 'past_due', 'canceled'] }),\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"status\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSubscriptionModel.prototype, \"startingDate\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSubscriptionModel.prototype, \"trialingUntil\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSubscriptionModel.prototype, \"activeUntil\", void 0);\n__decorate([\n    type.date,\n    __metadata(\"design:type\", Date)\n], AdminSubscriptionModel.prototype, \"canceledAt\", void 0);\n__decorate([\n    type.select({ options: ['monthly', 'quarterly', 'yearly'] }),\n    __metadata(\"design:type\", String)\n], AdminSubscriptionModel.prototype, \"interval\", void 0);\n__decorate([\n    countryPrices,\n    __metadata(\"design:type\", Object)\n], AdminSubscriptionModel.prototype, \"countryPrices\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                action: { type: 'select', options: { options: ['started', 'renewed', 'request-cancelation', 'remove-cancelation', 'canceled', 'changed', 'renew-error'] }, required: true },\n                date: { type: 'date' },\n                orderId: { type: 'model', options: { model: AdminOrderModel, test: 'here' } },\n                comment: { type: 'string' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminSubscriptionModel.prototype, \"history\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminSubscriptionModel.prototype, \"autoRenewal\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminSubscriptionModel.prototype, \"metadata\", void 0);\nAdminSubscriptionModel = __decorate([\n    model('/shop/admin/subscriptions')\n], AdminSubscriptionModel);\nexport { AdminSubscriptionModel };\n\n//# sourceMappingURL=subscription.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nimport { vatCodes } from '../../shop-common';\nlet AdminCountryModel = class AdminCountryModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.default = false;\n    }\n    get _label() {\n        return this.countryCode;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminCountryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCountryModel.prototype, \"countryCode\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminCountryModel.prototype, \"currency\", void 0);\n__decorate([\n    vatCodes,\n    __metadata(\"design:type\", Object)\n], AdminCountryModel.prototype, \"vatCodes\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminCountryModel.prototype, \"default\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], AdminCountryModel.prototype, \"metadata\", void 0);\nAdminCountryModel = __decorate([\n    model('/shop/admin/country')\n], AdminCountryModel);\nexport { AdminCountryModel };\n\n//# sourceMappingURL=country.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { ShopBaseModel } from './../shop.base.model';\nimport { model, type } from 'aurelia-deco';\nimport { countryPrices } from '../../shop-common';\nimport { Container } from 'aurelia-framework';\nlet settings = Container.instance.get('sd-settings');\nif (!settings.shop)\n    settings.shop = {};\nsettings.shop.picturePreviewsFormats = settings.shop.picturePreviewsFormats || ['160', '320', '320:320', '640:640', '1024:1024'];\nsettings.shop.pictureDefaultPreview = settings.shop.pictureDefaultPreview || '160';\nlet AdminOptionModel = class AdminOptionModel extends ShopBaseModel {\n    constructor() {\n        super(...arguments);\n        this.active = true;\n    }\n    get _label() {\n        return this.name;\n    }\n    setOptionCountryPrices(countries) {\n        if (!this.countryPrices)\n            this.countryPrices = {};\n        for (let country of countries) {\n            if (!this.countryPrices[country.countryCode]) {\n                this.countryPrices[country.countryCode] = {\n                    price: undefined,\n                    discount: undefined,\n                    discountLabel: undefined,\n                    vatCode: ''\n                };\n            }\n        }\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], AdminOptionModel.prototype, \"id\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminOptionModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminOptionModel.prototype, \"description\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], AdminOptionModel.prototype, \"shortDescription\", void 0);\n__decorate([\n    type.string,\n    __metadata(\"design:type\", String)\n], AdminOptionModel.prototype, \"groupId\", void 0);\n__decorate([\n    type.any,\n    __metadata(\"design:type\", Object)\n], AdminOptionModel.prototype, \"specifications\", void 0);\n__decorate([\n    countryPrices,\n    __metadata(\"design:type\", Object)\n], AdminOptionModel.prototype, \"countryPrices\", void 0);\n__decorate([\n    type.any,\n    __metadata(\"design:type\", Object)\n], AdminOptionModel.prototype, \"price\", void 0);\n__decorate([\n    type.files({ accepted: ['image/*'], previewsFormats: settings.shop.picturePreviewsFormats, defaultPreview: settings.shop.pictureDefaultPreview }),\n    __metadata(\"design:type\", Array)\n], AdminOptionModel.prototype, \"pictures\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], AdminOptionModel.prototype, \"active\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    __metadata(\"design:type\", Date)\n], AdminOptionModel.prototype, \"activeFrom\", void 0);\n__decorate([\n    type.date({ dateFormat: 'DD-MM-YYYY' }),\n    __metadata(\"design:type\", Date)\n], AdminOptionModel.prototype, \"activeUntil\", void 0);\n__decorate([\n    type.metadata,\n    __metadata(\"design:type\", Array)\n], AdminOptionModel.prototype, \"metadata\", void 0);\nAdminOptionModel = __decorate([\n    model('/shop/admin/option')\n], AdminOptionModel);\nexport { AdminOptionModel };\nexport { AdminOptionModel as OptionModel };\n\n//# sourceMappingURL=option.model.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { model, Model, type } from 'aurelia-deco';\nlet CategoryModel = class CategoryModel extends Model {\n    constructor() {\n        super(...arguments);\n        this.order = 0;\n        this.active = true;\n    }\n    get _label() {\n        return this.name;\n    }\n    static getAll(suffix = '', options = {}) {\n        if (!options.route && options.shopId) {\n            options.route = this.baseroute.replace('/shop/', `/shop/${options.shopId}/`);\n        }\n        return super.getAll(suffix, options).then((elements) => {\n            for (let element of elements) {\n                if (options.shopId)\n                    element.set('shopId', options.shopId);\n            }\n            return elements;\n        });\n    }\n    getRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    getOneRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    postRoute() {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + '/';\n    }\n    putRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n    deleteRoute(elementId) {\n        return this.deco.baseroute.replace('/shop', `/shop/${this.shopId}`) + `/${elementId}`;\n    }\n};\n__decorate([\n    type.id,\n    __metadata(\"design:type\", String)\n], CategoryModel.prototype, \"id\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], CategoryModel.prototype, \"name\", void 0);\n__decorate([\n    type.string({ multilang: true }),\n    __metadata(\"design:type\", String)\n], CategoryModel.prototype, \"description\", void 0);\n__decorate([\n    type.file({ accepted: ['image/*'], previewsFormats: ['320:320', '640:640', '1200'], defaultPreview: '320:320' }),\n    __metadata(\"design:type\", Object)\n], CategoryModel.prototype, \"image\", void 0);\n__decorate([\n    type.integer,\n    __metadata(\"design:type\", Number)\n], CategoryModel.prototype, \"order\", void 0);\n__decorate([\n    type.boolean,\n    __metadata(\"design:type\", Boolean)\n], CategoryModel.prototype, \"active\", void 0);\n__decorate([\n    type.array({ type: 'object', options: {\n            keys: {\n                key: { type: 'string' },\n                value: { type: 'any' }\n            }\n        } }),\n    __metadata(\"design:type\", Array)\n], CategoryModel.prototype, \"metadata\", void 0);\nCategoryModel = __decorate([\n    model('/shop/category')\n], CategoryModel);\nexport { CategoryModel };\n\n//# sourceMappingURL=category.model.js.map\n"],"sourceRoot":""}