@salla.sa/twilight-components 2.12.10 → 2.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-product-options.cjs.entry.js +28 -2
  3. package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -1
  4. package/dist/cjs/twilight.cjs.js +1 -1
  5. package/dist/collection/components/salla-product-options/interfaces.js.map +1 -1
  6. package/dist/collection/components/salla-product-options/salla-product-options.js +31 -2
  7. package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
  8. package/dist/components/salla-product-options.js +31 -2
  9. package/dist/components/salla-product-options.js.map +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/salla-product-options.entry.js +28 -2
  12. package/dist/esm/salla-product-options.entry.js.map +1 -1
  13. package/dist/esm/twilight.js +1 -1
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/loader.js.map +1 -1
  16. package/dist/esm-es5/salla-product-options.entry.js +2 -2
  17. package/dist/esm-es5/salla-product-options.entry.js.map +1 -1
  18. package/dist/esm-es5/twilight.js +1 -1
  19. package/dist/esm-es5/twilight.js.map +1 -1
  20. package/dist/twilight/p-03cfdef7.system.js +1 -1
  21. package/dist/twilight/p-03cfdef7.system.js.map +1 -1
  22. package/dist/twilight/p-25e1db16.entry.js +5 -0
  23. package/dist/twilight/p-25e1db16.entry.js.map +1 -0
  24. package/dist/twilight/p-eb9c5564.system.entry.js +5 -0
  25. package/dist/twilight/p-eb9c5564.system.entry.js.map +1 -0
  26. package/dist/twilight/twilight.esm.js +1 -1
  27. package/dist/twilight/twilight.esm.js.map +1 -1
  28. package/dist/types/components/salla-product-options/interfaces.d.ts +2 -0
  29. package/dist/types/components/salla-product-options/salla-product-options.d.ts +5 -0
  30. package/package.json +3 -3
  31. package/dist/twilight/p-c50e7524.entry.js +0 -5
  32. package/dist/twilight/p-c50e7524.entry.js.map +0 -1
  33. package/dist/twilight/p-f8addbca.system.entry.js +0 -5
  34. package/dist/twilight/p-f8addbca.system.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DisplayType","Currency","sallaProductOptionsCss","SallaProductOptions","exports","class_1","hostRef","_this","this","fileTypes","pdf","png","jpg","word","exl","txt","outSkus","handleDonationOptions","event","preventDefault","stopPropagation","isCustomDonation","target","value","donationInput","focus","salla","lang","get","getWithDefault","config","canDisabled","onLoaded","outOfStockText","donationAmount","selectDonationAmount","selectAmount","options","setOptionsData","Array","isArray","JSON","parse","e","log","optionsData","productId","url","is_page","api","product","getDetails","then","resp","data","prototype","that","_b","_a","details","forEach","detail","Object","entries","skus_availability","filter","sku","map","push","Number","getSelectedOptionsData","selectedOptions","formData","host","getElementSallaData","key","startsWith","replace","reportValidity","requiredElements","querySelectorAll","pass","i","length","hasOutOfStockOption","some","option","is_out","selectedSkus","every","includes","getSelectedOptions","getOption","option_id","find","id","invalidHandler","closestProductOption","closest","scrollIntoView","behavior","block","classList","add","changedHandler","optionElement","type","FILE","IMAGE","MAP","lat","lng","setTimeout","remove","index","findIndex","assign","setSelectedSkus","handleRequiredMultipleOptions","changed","emit","keys","reduce","p","c","MULTIPLE_OPTIONS","required","optionContainer","querySelector","concat","hasChecked","input","toggleAttribute","getLatLng","split","getDisplayForType","COLOR_PICKER","colorPickerOption","multipleOptions","SINGLE_OPTION","singleOption","getOptionShownWhen","visibility_condition","operator","componentWillLoad","cart","getCurrentCartId","render","h","Host","class","name","splitterOption","htmlFor","placeholder","donationOption","donation","can_donate","checked","is_selected","additional_price","onChange","money","custom_amount_enabled","shown","ref","el","onInput","helpers","inputDigitsOnly","onBlur","onInvalid","currency","symbol","fileUploader","additions","height","onAdded","getUploadImageEndpoint","cart_item_id","product_id","onInvalidInput","innerHTML","accept","CameraIcon","FileIcon","imageOption","fileOption","types","Boolean","join","numberOption","textOption","textareaOption","rows","mapOption","zoom","searchable","onSelected","onSubmitted","color","timeOption","noCalendar","enableTime","dateFormat","onPicked","dateOption","minDate","Date","datetimeOption","maxDate","to_date_time","from_date_time","getOptionDetailName","outOfStock","optionType","COLOR","isOptionDetailOut","isDetailSelected","outSelectableSkus_1","disabled","selected","is_required","colorOption","style","thumbnailOption","option_value","image","src","title","alt","CheckCircleIcon"],"sources":["src/components/salla-product-options/interfaces.ts","src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\"\n\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n custom_amount_enabled: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n donation?: Donation\n}\n\nexport interface Donation {\n custom_amount_enabled: boolean;\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}","import { Component, Prop, h, State, Element, Host, Event, EventEmitter, Method } from '@stencil/core';\nimport { Option, DisplayType, Detail } from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.products.notify_options_availability');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');\n this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n\n private setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n let that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n @Element() host: HTMLElement;\n\n private fileTypes: Object = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[];\n @State() outOfStockText: string = ''\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectDonationAmount: string = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع')\n @State() selectAmount: string = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ')\n @State() isCustomDonation: boolean = false;\n @State() selectedOptions: Array<any> = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n private outSkus: Array<string | number> = [];\n private donationInput?: HTMLInputElement;\n\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n let selectedOptions = {}\n let formData = (this.host as any).getElementSallaData();\n formData.forEach(function (value, key) {\n key.startsWith('options[') && (selectedOptions[key.replace('options[', '').replace(']', '')] = value);\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n let requiredElements: Array<HTMLInputElement> = this.host.querySelectorAll('[required]') as any;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (!salla.url.is_page('cart')) {\n closestProductOption.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n private changedHandler(event, option) {\n let data = { event: event, option: option, detail: null };\n if (option.details) {\n let detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail\n }\n\n let optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value\n || ((option.type == DisplayType.FILE || option.type == DisplayType.IMAGE) && event.type === 'added')\n || (option.type == DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);\n index > -1 ? this.selectedOptions[index] = {\n ...data.detail,\n option_id: data.option.id\n } : this.selectedOptions.push({ ...data.detail, option_id: data.option.id })\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n\n\n private handleDonationOptions = (event) => {\n event.preventDefault();\n event.stopPropagation();\n this.isCustomDonation = event.target.value === 'custom';\n if (this.donationInput) {\n if (event.target.value === 'custom') {\n this.donationInput.value = '';\n this.donationInput.focus()\n } else {\n this.donationInput.value = event.target.value;\n }\n }\n }\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)))\n .map(sku => Number(sku));\n }\n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type == 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? { \"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }\n : {};\n }\n\n //we need the cart Id for productOption Image\n componentWillLoad() {\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n return salla.api.cart.getCurrentCartId();\n }\n\n render() {\n if (this.optionsData?.length == 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div class={`s-product-options-option-container${option.visibility_condition ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name == 'splitter' ?\n this.splitterOption()\n : <div class=\"s-product-options-option\" data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={'options[' + option.id + ']'} class=\"s-product-options-option-label\">\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class=\"s-product-options-option-content\">\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n {\n option.donation ?\n <div class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : ''\n }\n\n {option.donation?.can_donate ?\n\n [option.details.length ? \n [<h4>{this.selectAmount}</h4>,\n <div class=\"s-product-options-donation-options\">\n {option.details.map((detail, i) =>\n <div class=\"s-product-options-donation-options-item\">\n <input id={`donation-option-${i}`} type=\"radio\" name=\"donating_option\" checked={detail.is_selected} value={detail.additional_price} onChange={e => this.handleDonationOptions(e)} />\n <label htmlFor={`donation-option-${i}`}>\n <span>{salla.money(detail.name)}</span>\n </label>\n </div>\n )}\n {option.donation?.custom_amount_enabled ?\n <div class=\"s-product-options-donation-options-item\">\n <input id={`donation-option-custom`} type=\"radio\" name=\"donating_option\" value=\"custom\" onChange={e => this.handleDonationOptions(e)} />\n <label htmlFor={`donation-option-custom`}>\n <span> {this.selectDonationAmount} </span> \n </label>\n </div>\n : ''\n }\n </div> ]: '',\n\n <div class={{\"s-product-options-donation-input-group\": true, \"shown\": !option.details.length || (option.details.length && this.isCustomDonation)}}>\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donation_amount\"\n class=\"s-form-control\"\n ref={el => this.donationInput = el as HTMLInputElement}\n value={option.value}\n // required\n placeholder={option.placeholder}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div> \n ] : ''}\n </div>\n }\n\n private fileUploader(option: Option, additions: Object | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{ cart_item_id: this.productId, product_id: this.productId }}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{ \"s-product-options-image-input\": true, required: option.required }}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as any).accept && (additions as any).accept.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, { accept: types.join(',') })\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)} />\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\" />\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n class='s-form-control'\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={(e) => this.changedHandler(e, option)} />\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)} />\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value} />\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock: boolean = true, optionType?: string) {\n if (optionType && optionType == DisplayType.COLOR) {\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price)}) </p>` : '');\n }\n\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n let isDetailSelected = this.selectedOptions.filter(option => option.id == detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length == 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n let outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n private singleOption(option: Option) {\n return <div>\n <select name={`options[${option.id}]`}\n required={option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}>\n <option value=\"\">{option.placeholder}</option>\n {\n option?.details.map((detail: Detail) => {\n return <option value={detail.id} disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}>\n {this.getOptionDetailName(detail)}\n </option>\n })\n }\n </select>\n </div>\n }\n\n private multipleOptions(option: Option) {\n let is_required = option.required && !option.details.some(detail => detail.is_selected);\n return <div class={{ \"s-product-options-multiple-options-wrapper\": true, 'required': option.required }}>\n {\n option?.details.map((detail: Detail) => {\n return <div>\n <input type=\"checkbox\"\n value={detail.id}\n disabled={this.isOptionDetailOut(detail)}\n checked={detail.is_selected}\n required={is_required}\n name={`options[${option.id}][]`}\n id={`field-${option.id}-${detail.id}`}\n onChange={(e) => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n aria-describedby={`options[${option.id}]-description`} />\n <label htmlFor={`field-${option.id}-${detail.id}`}>{this.getOptionDetailName(detail)}</label>\n </div>\n })\n }\n </div>\n }\n\n //@ts-ignore\n private colorOption(option: Option) {\n return <fieldset class=\"s-product-options-colors-wrapper\">\n {\n option?.details.map((detail) =>\n <div class=\"s-product-options-colors-item\">\n <input type=\"radio\"\n value={detail.id}\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`color-${this.productId}-${option.id}-${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)} />\n <label htmlFor={`color-${this.productId}-${option.id}-${detail.id}`}>\n <span style={{ \"background-color\": detail.color }} />\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)}></div>\n </label>\n </div>\n )\n }\n </fieldset>\n }\n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`option_${this.productId}-${option.id}_${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n <label htmlFor={`option_${this.productId}-${option.id}_${detail.id}`}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name} />\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\" />\n {this.isOptionDetailOut(detail) ?\n [\n <small class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div class=\"s-product-options-thumbnails-badge-overlay\" /> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n}\n"],"mappings":";;;mNAAA,IAAYA,GAAZ,SAAYA,GACVA,EAAA,iBACAA,EAAA,eACAA,EAAA,uBACAA,EAAA,uBACAA,EAAA,iBACAA,EAAA,uCACAA,EAAA,mBACAA,EAAA,iCACAA,EAAA,uBACAA,EAAA,eACAA,EAAA,uBACAA,EAAA,yBACAA,EAAA,eACAA,EAAA,iBACAA,EAAA,uBACAA,EAAA,aACAA,EAAA,eACAA,EAAA,8BAED,EApBD,CAAYA,MAAW,KAoJvB,IAAYC,GAAZ,SAAYA,GACVA,EAAA,YACD,EAFD,CAAYA,MAAQ,K,28CCpJpB,IAAMC,EAAyB,G,ICWlBC,EAAmBC,EAAA,mCAE9B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,2CAuCQA,KAAAC,UAAoB,CAC1BC,IAAK,kBACLC,IAAK,YACLC,IAAK,aACLC,KAAM,gIACNC,IAAK,yJACLC,IAAK,cAaCP,KAAAQ,QAAkC,GA+GlCR,KAAAS,sBAAwB,SAACC,GAC/BA,EAAMC,iBACND,EAAME,kBACNb,EAAKc,iBAAmBH,EAAMI,OAAOC,QAAU,SAC/C,GAAIhB,EAAKiB,cAAe,CACtB,GAAIN,EAAMI,OAAOC,QAAU,SAAU,CACnChB,EAAKiB,cAAcD,MAAQ,GAC3BhB,EAAKiB,cAAcC,O,KACd,CACLlB,EAAKiB,cAAcD,MAAQL,EAAMI,OAAOC,K,mDAjIZ,G,oBACAG,MAAMC,KAAKC,IAAI,kC,0BACTF,MAAMC,KAAKE,eAAe,wCAAyC,qB,kBAC3EH,MAAMC,KAAKE,eAAe,+BAAgC,e,sBACrD,M,qBACE,G,qGAUXH,MAAM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AAkC,OAAIpE,EAAOkC,IACpD4E,UAAW,SAAChI,GAAM,OAAApC,EAAKyF,eAAerD,EAAG2C,EAAvB,EAClB2E,SAAU,SAACtH,GAAM,OAAApC,EAAKiG,eAAe7D,EAAG2C,EAAvB,IACnB8D,EAAA,SAAOK,QAAS,UAAAxB,OAAU1H,EAAKuC,UAAS,KAAAmF,OAAI3C,EAAOS,GAAE,KAAAkC,OAAIpE,EAAOkC,IAAI,cACrDlC,EAAOqK,aACpB5E,MAAM,eACNF,EAAA,kBAAevF,EAAOsK,MAAOC,IAAKvK,EAAOsK,MAAOE,MAAOxK,EAAO0F,KAAM+E,IAAKzK,EAAO0F,OAChFH,EAAA,QAAMkC,UAAWiD,EAAiBjF,MAAM,sCACvC/I,EAAKkN,kBAAkB5J,GACtB,CACEuF,EAAA,SAAOE,MAAM,4CAA4C/I,EAAK0B,gBAC9D1B,EAAKwB,YAAcqH,EAAA,OAAKE,MAAM,+CAAkD,IAEhF,IAENF,EAAA,SAAI7I,EAAK8M,oBAAoBxJ,EAAQ,OAAM,K,6HA3nBrB,I"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{p as e,b as a}from"./p-c76c4ed2.js";export{s as setNonce}from"./p-c76c4ed2.js";import{g as t}from"./p-17d95443.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-8ce4ca08",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"currentPhone":[32],"currentEmail":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-ea65d3c9",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-c50e7524",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-d9be595b",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-d933f9ce",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-5f0dffdf",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-1fb9268c",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-e0cb00aa",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-ce042888",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"reset":[64]}]]],["p-1342a68f",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-81e2622b",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
4
+ import{p as e,b as a}from"./p-c76c4ed2.js";export{s as setNonce}from"./p-c76c4ed2.js";import{g as t}from"./p-17d95443.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-8ce4ca08",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"currentPhone":[32],"currentEmail":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-ea65d3c9",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-25e1db16",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-d9be595b",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-d933f9ce",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-5f0dffdf",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-1fb9268c",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-e0cb00aa",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-ce042888",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"reset":[64]}]]],["p-1342a68f",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-81e2622b",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
5
5
  //# sourceMappingURL=twilight.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kJAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,IAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,s8fAAuCJ,EAAA"}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kJAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,IAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,8ggBAAuCJ,EAAA"}
@@ -74,6 +74,7 @@ export interface ProductDonation {
74
74
  target_percent?: number;
75
75
  target_end_date?: string;
76
76
  can_donate: boolean;
77
+ custom_amount_enabled: boolean;
77
78
  }
78
79
  export interface Image {
79
80
  id: number;
@@ -107,6 +108,7 @@ export interface Option {
107
108
  donation?: Donation;
108
109
  }
109
110
  export interface Donation {
111
+ custom_amount_enabled: boolean;
110
112
  target_message?: string;
111
113
  target_date: string | "2023-04-18";
112
114
  target_end_date: string | "2023-04-18";
@@ -8,11 +8,15 @@ export declare class SallaProductOptions {
8
8
  optionsData: Option[];
9
9
  outOfStockText: string;
10
10
  donationAmount: string;
11
+ selectDonationAmount: string;
12
+ selectAmount: string;
13
+ isCustomDonation: boolean;
11
14
  selectedOptions: Array<any>;
12
15
  canDisabled: boolean;
13
16
  selectedSkus?: Array<string | number>;
14
17
  selectedOutSkus?: Array<string | number>;
15
18
  private outSkus;
19
+ private donationInput?;
16
20
  /**
17
21
  * The id of the product to which the options are going to be fetched for.
18
22
  */
@@ -47,6 +51,7 @@ export declare class SallaProductOptions {
47
51
  changed: EventEmitter;
48
52
  private invalidHandler;
49
53
  private changedHandler;
54
+ private handleDonationOptions;
50
55
  /**
51
56
  * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;
52
57
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.12.10",
3
+ "version": "2.12.11",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -81,7 +81,7 @@
81
81
  "dependencies": {
82
82
  "@salla.sa/applepay": "^2.11.127",
83
83
  "@salla.sa/twilight": "^2.12.7",
84
- "@salla.sa/twilight-tailwind-theme": "^2.12.0",
84
+ "@salla.sa/twilight-tailwind-theme": "^2.12.11",
85
85
  "@types/node": "^18.15.3",
86
86
  "animejs": "^3.2.1",
87
87
  "filepond": "^4.30.4",
@@ -98,5 +98,5 @@
98
98
  "vanilla-lazyload": "^17.8.3",
99
99
  "vanilla-picker": "^2.12.1"
100
100
  },
101
- "gitHead": "e52849618959673f5a9f25a90cacc0cb0757f31b"
101
+ "gitHead": "3daa5140d5c6dddf96ab9245d84b3b1a08c62048"
102
102
  }
@@ -1,5 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,c as i,h as o,H as e,g as s}from"./p-c76c4ed2.js";import{C as n}from"./p-ccd78636.js";var a;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker"})(a||(a={}));var l;(function(t){t["Sar"]="SAR"})(l||(l={}));const r=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>check</title>\n<path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>\n</svg>\n`;const p=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n`;const d="";const c=class{constructor(o){t(this,o);this.changed=i(this,"changed",7);this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outSkus=[];this.optionsData=undefined;this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectedOptions=[];this.canDisabled=undefined;this.selectedSkus=undefined;this.selectedOutSkus=undefined;this.productId=salla.config.get("page.id");this.options=undefined;this.canDisabled=!salla.config.get("store.settings.products.notify_options_availability");salla.lang.onLoaded((()=>{this.outOfStockText=salla.lang.get("pages.products.out_of_stock");this.donationAmount=salla.lang.get("pages.products.donation_amount")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((t=>this.setOptionsData(t.data.options)))}}setOptionsData(t){var i,o;this.optionsData=t;let e=this;(o=(i=this.optionsData[0])===null||i===void 0?void 0:i.details)===null||o===void 0?void 0:o.forEach((function(t){Object.entries(t.skus_availability||{}).filter((t=>!t[1])).map((t=>e.outSkus.push(Number(t[0]))))}))}async getSelectedOptionsData(){let t={};let i=this.host.getElementSallaData();i.forEach((function(i,o){o.startsWith("options[")&&(t[o.replace("options[","").replace("]","")]=i)}));return t}async reportValidity(){let t=this.host.querySelectorAll("[required]");let i=true;for(let o=0;o<t.length;o++){if("reportValidity"in t[o]&&!t[o].reportValidity()){i=false}}return i}async hasOutOfStockOption(){var t,i;return this.selectedOptions.some((t=>t.is_out))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((i=this.selectedSkus)===null||i===void 0?void 0:i.every((t=>this.outSkus.includes(t))))}async getSelectedOptions(){return this.selectedOptions}async getOption(t){return this.optionsData.find((i=>i.id===t))}invalidHandler(t,i){const o=t.target.closest(".s-product-options-option");if(!salla.url.is_page("cart")){o.scrollIntoView({behavior:"smooth",block:"center"})}o.classList.add("s-product-options-option-error")}changedHandler(t,i){let o={event:t,option:i,detail:null};if(i.details){let e=i.details.find((i=>Number(i.id)===Number(t.target.value)));o.detail=e}let e=t.target.closest(".s-product-options-option");if(t.target.value||(i.type==a.FILE||i.type==a.IMAGE)&&t.type==="added"||i.type==a.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((()=>{e.classList.remove("s-product-options-option-error")}),200)}const s=this.selectedOptions.findIndex((t=>t.option_id===o.option.id));s>-1?this.selectedOptions[s]=Object.assign(Object.assign({},o.detail),{option_id:o.option.id}):this.selectedOptions.push(Object.assign(Object.assign({},o.detail),{option_id:o.option.id}));this.setSelectedSkus();this.handleRequiredMultipleOptions(i);this.changed.emit(o);salla.event.emit("product-options::change",o)}setSelectedSkus(){this.selectedSkus=this.selectedOptions.map((t=>Object.keys(t.skus_availability||{}))).reduce(((t,i)=>t.filter((t=>i.includes(t))))).map((t=>Number(t)))}handleRequiredMultipleOptions(t){if(t.type!==a.MULTIPLE_OPTIONS||!t.required){return}const i=this.host.querySelector(`[data-option-id="${t.id}"]`);const o=i.querySelectorAll("input:checked").length;i.querySelectorAll("input").forEach((t=>t.toggleAttribute("required",!o)))}getLatLng(t,i){return t?t.split(",")[i=="lat"?0:1]:""}getDisplayForType(t){if(this[`${t.type}Option`]){return this[`${t.type}Option`](t)}if(t.type===a.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===a.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===a.SINGLE_OPTION){return this.singleOption(t)}salla.log(`Couldn't find options type(${t.type})😢`);return""}getOptionShownWhen(t){return t.visibility_condition?{"data-show-when":`options[${t.visibility_condition.option}] ${t.visibility_condition.operator} ${t.visibility_condition.value}`}:{}}componentWillLoad(){this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return salla.api.cart.getCurrentCartId()}render(){var t;if(((t=this.optionsData)===null||t===void 0?void 0:t.length)==0){return}return o(e,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((t=>o("div",Object.assign({class:`s-product-options-option-container${t.visibility_condition?" hidden":""}`,"data-option-id":t.id},this.getOptionShownWhen(t)),t.name=="splitter"?this.splitterOption():o("div",{class:"s-product-options-option","data-option-type":t.type,"data-option-required":`${t.required}`},o("label",{htmlFor:"options["+t.id+"]",class:"s-product-options-option-label"},o("b",null,t.name,t.required&&o("span",null," * ")," "),o("small",null,t.placeholder)),o("div",{class:"s-product-options-option-content"},this.getDisplayForType(t))))))))}donationOption(t,i){var e;return o("div",{class:"s-product-options-donation-wrapper"},t.donation?o("div",{class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",((e=t.donation)===null||e===void 0?void 0:e.can_donate)?o("div",{class:"s-product-options-donation-input-group"},o("input",{type:"text",id:"donating-amount",name:"donating_amount",class:"s-form-control",value:t.value,required:true,placeholder:t.placeholder,onInput:t=>salla.helpers.inputDigitsOnly(t.target),onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t)}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol)):"")}fileUploader(t,i=null){return o("salla-file-upload",Object.assign({},i||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:`options[${t.id}]`,required:t.required,height:"120px",onAdded:i=>this.changedHandler(i,t),url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:i=>this.invalidHandler(i,t),class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:i.accept&&i.accept.split(",").every((t=>t.includes("image")))?n:p}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))}imageOption(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})}fileOption(t){let i=t.details.map((t=>this.fileTypes[t.name])).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."}numberOption(t){return o("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onBlur:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t),onInput:t=>salla.helpers.inputDigitsOnly(t.target)})}splitterOption(){return o("div",{class:"s-product-options-splitter"})}textOption(t){return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onInput:i=>this.changedHandler(i,t)}))}textareaOption(t){return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,class:"s-form-control",required:t.required,id:`options[${t.id}]`,name:`options[${t.id}]`,placeholder:t.placeholder,onInvalid:i=>this.invalidHandler(i,t),onInput:i=>this.changedHandler(i,t)})))}mapOption(t){return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:`options[${t.id}]`,searchable:true,required:t.required,onInvalidInput:i=>this.invalidHandler(i,t),onSelected:i=>this.changedHandler(i,t)})}colorPickerOption(t){return o("salla-color-picker",{onSubmitted:i=>this.changedHandler(i,t),name:`options[${t.id}]`,required:t.required,onInvalidInput:i=>this.invalidHandler(i,t),color:t.value})}timeOption(t){return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:t.required,name:`options[${t.id}]`,class:"s-product-options-time-element",onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)})}dateOption(t){return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:t.required,minDate:new Date,name:`options[${t.id}]`,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}datetimeOption(t){return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:t.required,name:`options[${t.id}]`,maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:i=>this.invalidHandler(i,t),onPicked:i=>this.changedHandler(i,t)}))}getOptionDetailName(t,i=true,o){if(o&&o==a.COLOR){return t.name+(i&&this.isOptionDetailOut(t)?` <br/> <p> ${this.outOfStockText} </p>`:"")+(t.additional_price?` <p> (${salla.money(t.additional_price)}) </p>`:"")}return t.name+(i&&this.isOptionDetailOut(t)?` - ${this.outOfStockText}`:"")+(t.additional_price?` (${salla.money(t.additional_price)})`:"")}isOptionDetailOut(t){var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}let o=this.selectedOptions.filter((i=>i.id==t.id)).length;if(o&&this.selectedOptions.length==1){return false}if(o){let i=this.selectedSkus.filter((t=>this.outSkus.includes(t)));return Object.keys(t.skus_availability).some((t=>i.includes(Number(t))))}return this.selectedOptions.some((i=>i.is_out&&i.option_id!==t.option_id))}singleOption(t){return o("div",null,o("select",{name:`options[${t.id}]`,required:t.required,class:"s-form-control",onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((t=>o("option",{value:t.id,disabled:this.canDisabled&&this.isOptionDetailOut(t),selected:t.is_selected},this.getOptionDetailName(t))))))}multipleOptions(t){let i=t.required&&!t.details.some((t=>t.is_selected));return o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},t===null||t===void 0?void 0:t.details.map((e=>o("div",null,o("input",{type:"checkbox",value:e.id,disabled:this.isOptionDetailOut(e),checked:e.is_selected,required:i,name:`options[${t.id}][]`,id:`field-${t.id}-${e.id}`,onChange:i=>this.changedHandler(i,t),onInvalid:i=>this.invalidHandler(i,t),"aria-describedby":`options[${t.id}]-description`}),o("label",{htmlFor:`field-${t.id}-${e.id}`},this.getOptionDetailName(e))))))}colorOption(t){return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((i=>o("div",{class:"s-product-options-colors-item"},o("input",{type:"radio",value:i.id,required:t.required,checked:i.is_selected,name:`options[${t.id}]`,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:`color-${this.productId}-${t.id}-${i.id}`,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:`color-${this.productId}-${t.id}-${i.id}`},o("span",{style:{"background-color":i.color}}),o("div",{innerHTML:this.getOptionDetailName(i,true,t.type)}))))))}thumbnailOption(t){return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((i=>o("div",null,o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:t.required,checked:i.is_selected,name:`options[${t.id}]`,"data-img-id":i.option_value,disabled:this.canDisabled&&this.isOptionDetailOut(i),id:`option_${this.productId}-${t.id}_${i.id}`,onInvalid:i=>this.invalidHandler(i,t),onChange:i=>this.changedHandler(i,t)}),o("label",{htmlFor:`option_${this.productId}-${t.id}_${i.id}`,"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:r,class:"s-product-options-thumbnails-icon"}),this.isOptionDetailOut(i)?[o("small",{class:"s-product-options-thumbnails-stock-badge"},this.outOfStockText),this.canDisabled?o("div",{class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,this.getOptionDetailName(i,false)," ")))))}get host(){return s(this)}};c.style=d;export{c as salla_product_options};
5
- //# sourceMappingURL=p-c50e7524.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DisplayType","Currency","sallaProductOptionsCss","SallaProductOptions","constructor","hostRef","this","fileTypes","pdf","png","jpg","word","exl","txt","outSkus","salla","lang","get","config","canDisabled","onLoaded","outOfStockText","donationAmount","options","setOptionsData","Array","isArray","JSON","parse","e","log","optionsData","productId","url","is_page","api","product","getDetails","then","resp","data","that","_b","_a","details","forEach","detail","Object","entries","skus_availability","filter","sku","map","push","Number","async","selectedOptions","formData","host","getElementSallaData","value","key","startsWith","replace","requiredElements","querySelectorAll","pass","i","length","reportValidity","some","option","is_out","selectedSkus","every","includes","option_id","find","id","invalidHandler","event","closestProductOption","target","closest","scrollIntoView","behavior","block","classList","add","changedHandler","optionElement","type","FILE","IMAGE","MAP","lat","lng","setTimeout","remove","index","findIndex","assign","setSelectedSkus","handleRequiredMultipleOptions","changed","emit","keys","reduce","p","c","MULTIPLE_OPTIONS","required","optionContainer","querySelector","hasChecked","input","toggleAttribute","getLatLng","split","getDisplayForType","COLOR_PICKER","colorPickerOption","multipleOptions","SINGLE_OPTION","singleOption","getOptionShownWhen","visibility_condition","operator","componentWillLoad","cart","getCurrentCartId","render","h","Host","class","name","splitterOption","htmlFor","placeholder","donationOption","donation","can_donate","onInput","helpers","inputDigitsOnly","onBlur","onInvalid","currency","symbol","fileUploader","additions","height","onAdded","getUploadImageEndpoint","cart_item_id","product_id","onInvalidInput","innerHTML","accept","CameraIcon","FileIcon","imageOption","fileOption","types","Boolean","join","numberOption","textOption","textareaOption","rows","mapOption","zoom","searchable","onSelected","onSubmitted","color","timeOption","noCalendar","enableTime","dateFormat","onPicked","dateOption","minDate","Date","datetimeOption","maxDate","to_date_time","from_date_time","getOptionDetailName","outOfStock","optionType","COLOR","isOptionDetailOut","additional_price","money","isDetailSelected","outSelectableSkus","onChange","disabled","selected","is_selected","is_required","checked","colorOption","style","thumbnailOption","option_value","image","src","title","alt","CheckCircleIcon"],"sources":["./src/components/salla-product-options/interfaces.ts","./src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","./src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\"\n\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n donation?: Donation\n}\n\nexport interface Donation {\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}","import {Component, Prop, h, State, Element, Host, Event, EventEmitter, Method} from '@stencil/core';\nimport {Option, DisplayType, Detail} from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.products.notify_options_availability');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n\n private setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n let that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n\n @Element() host: HTMLElement;\n\n private fileTypes: Object = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[];\n @State() outOfStockText: string = ''\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectedOptions: Array<any> = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n private outSkus: Array<string | number> = [];\n\n\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n let selectedOptions = {}\n let formData = (this.host as any).getElementSallaData();\n formData.forEach(function (value, key) {\n key.startsWith('options[') && (selectedOptions[key.replace('options[', '').replace(']', '')] = value);\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n let requiredElements: Array<HTMLInputElement> = this.host.querySelectorAll('[required]') as any;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (!salla.url.is_page('cart')) {\n closestProductOption.scrollIntoView({behavior: 'smooth', block: 'center'});\n }\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n private changedHandler(event, option) {\n let data = {event: event, option: option, detail: null};\n if (option.details) {\n let detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail\n }\n\n let optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value\n || ((option.type == DisplayType.FILE || option.type == DisplayType.IMAGE) && event.type === 'added')\n || (option.type == DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);\n index > -1 ? this.selectedOptions[index] = {\n ...data.detail,\n option_id: data.option.id\n } : this.selectedOptions.push({...data.detail, option_id: data.option.id})\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)))\n .map(sku => Number(sku));\n }\n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type == 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? {\"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}`}\n : {};\n }\n\n //we need the cart Id for productOption Image\n componentWillLoad() {\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n return salla.api.cart.getCurrentCartId();\n }\n\n render() {\n if (this.optionsData?.length == 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div class={`s-product-options-option-container${option.visibility_condition ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name == 'splitter' ?\n this.splitterOption()\n : <div class=\"s-product-options-option\" data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={'options[' + option.id + ']'} class=\"s-product-options-option-label\">\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class=\"s-product-options-option-content\">\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n {\n option.donation ?\n <div class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : ''\n }\n {option.donation?.can_donate ? <div class=\"s-product-options-donation-input-group\">\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donating_amount\"\n class=\"s-form-control\"\n value={option.value}\n required\n placeholder={option.placeholder}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div> : ''}\n </div>\n }\n\n private fileUploader(option: Option, additions: Object | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{cart_item_id: this.productId, product_id: this.productId}}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{\"s-product-options-image-input\": true, required: option.required}}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as any).accept && (additions as any).accept.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, {accept: 'image/png,image/jpeg,image/jpg,image/gif'});\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, {accept: types.join(',')})\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)}/>\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\"/>\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n class='s-form-control'\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={(e) => this.changedHandler(e, option)}/>\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)}/>\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value}/>\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock: boolean = true, optionType?: string) {\n if (optionType && optionType == DisplayType.COLOR) {\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price)}) </p>` : '');\n }\n\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n let isDetailSelected = this.selectedOptions.filter(option => option.id == detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length == 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n let outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n private singleOption(option: Option) {\n return <div>\n <select name={`options[${option.id}]`}\n required={option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}>\n <option value=\"\">{option.placeholder}</option>\n {\n option?.details.map((detail: Detail) => {\n return <option value={detail.id} disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}>\n {this.getOptionDetailName(detail)}\n </option>\n })\n }\n </select>\n </div>\n }\n\n private multipleOptions(option: Option) {\n let is_required = option.required && !option.details.some(detail => detail.is_selected);\n return <div class={{\"s-product-options-multiple-options-wrapper\": true, 'required': option.required}}>\n {\n option?.details.map((detail: Detail) => {\n return <div>\n <input type=\"checkbox\"\n value={detail.id}\n disabled={this.isOptionDetailOut(detail)}\n checked={detail.is_selected}\n required={is_required}\n name={`options[${option.id}][]`}\n id={`field-${option.id}-${detail.id}`}\n onChange={(e) => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n aria-describedby={`options[${option.id}]-description`}/>\n <label htmlFor={`field-${option.id}-${detail.id}`}>{this.getOptionDetailName(detail)}</label>\n </div>\n })\n }\n </div>\n }\n\n //@ts-ignore\n private colorOption(option: Option) {\n return <fieldset class=\"s-product-options-colors-wrapper\">\n {\n option?.details.map((detail) =>\n <div class=\"s-product-options-colors-item\">\n <input type=\"radio\"\n value={detail.id}\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`color-${this.productId}-${option.id}-${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}/>\n <label htmlFor={`color-${this.productId}-${option.id}-${detail.id}`}>\n <span style={{\"background-color\": detail.color}}/>\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)}></div>\n </label>\n </div>\n )\n }\n </fieldset>\n }\n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`option_${this.productId}-${option.id}_${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}/>\n <label htmlFor={`option_${this.productId}-${option.id}_${detail.id}`}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name}/>\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\"/>\n {this.isOptionDetailOut(detail) ?\n [\n <small class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div class=\"s-product-options-thumbnails-badge-overlay\"/> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n}\n"],"mappings":";;;oGAAA,IAAYA,GAAZ,SAAYA,GACVA,EAAA,iBACAA,EAAA,eACAA,EAAA,uBACAA,EAAA,uBACAA,EAAA,iBACAA,EAAA,uCACAA,EAAA,mBACAA,EAAA,iCACAA,EAAA,uBACAA,EAAA,eACAA,EAAA,uBACAA,EAAA,yBACAA,EAAA,eACAA,EAAA,iBACAA,EAAA,uBACAA,EAAA,aACAA,EAAA,eACAA,EAAA,8BAED,EApBD,CAAYA,MAAW,KAkJvB,IAAYC,GAAZ,SAAYA,GACVA,EAAA,YACD,EAFD,CAAYA,MAAQ,K,+8CClJpB,MAAMC,EAAyB,G,MCWlBC,EAAmB,MAE9BC,YAAAC,G,2CAsCQC,KAAAC,UAAoB,CAC1BC,IAAK,kBACLC,IAAK,YACLC,IAAK,aACLC,KAAM,gIACNC,IAAK,yJACLC,IAAK,cAUCP,KAAAQ,QAAkC,G,+CANR,G,oBACAC,MAAMC,KAAKC,IAAI,kC,qBACV,G,qGAUXF,MAAMG,OAAOD,IAAI,W,uBA3D3CX,KAAKa,aAAeJ,MAAMG,OAAOD,IAAI,uDACrCF,MAAMC,KAAKI,UAAS,KAClBd,KAAKe,eAAiBN,MAAMC,KAAKC,IAAI,+BACrCX,KAAKgB,eAAiBP,MAAMC,KAAKC,IAAI,iCAAiC,IAGxE,GAAIX,KAAKiB,QAAS,CAChB,IACEjB,KAAKkB,eAAeC,MAAMC,QAAQpB,KAAKiB,SAAWjB,KAAKiB,QAAUI,KAAKC,MAAMtB,KAAKiB,UACjF,M,CACA,MAAOM,GACPd,MAAMe,IAAI,mC,EAGd,IAAKL,MAAMC,QAAQpB,KAAKyB,aAAc,CACpChB,MAAMe,IAAI,qCAAmCxB,KAAKyB,aAClDzB,KAAKkB,eAAe,G,CAGtB,GAAIlB,KAAK0B,YAAcjB,MAAMkB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Q,OAAM,Q"}
@@ -1,5 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function r(t){try{s(i.next(t))}catch(t){a(t)}}function l(t){try{s(i["throw"](t))}catch(t){a(t)}}function s(t){t.done?n(t.value):o(t.value).then(r,l)}s((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(t){return function(e){return s([t,e])}}function s(l){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(n=0)),n)try{if(i=1,o&&(a=l[0]&2?o["return"]:l[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;if(o=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=e.call(t,n)}catch(t){l=[6,t];o=0}finally{i=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};
2
- /*!
3
- * Crafted with ❤ by Salla
4
- */System.register(["./p-9fcca94b.system.js","./p-c328c14e.system.js"],(function(t){"use strict";var e,n,i,o,a,r;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.H;a=t.g},function(t){r=t.C}],execute:function(){var l;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker"})(l||(l={}));var s;(function(t){t["Sar"]="SAR"})(s||(s={}));var c='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>check</title>\n<path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>\n</svg>\n';var u='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var p=t("salla_product_options",function(){function t(t){var i=this;e(this,t);this.changed=n(this,"changed",7);this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outSkus=[];this.optionsData=undefined;this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectedOptions=[];this.canDisabled=undefined;this.selectedSkus=undefined;this.selectedOutSkus=undefined;this.productId=salla.config.get("page.id");this.options=undefined;this.canDisabled=!salla.config.get("store.settings.products.notify_options_availability");salla.lang.onLoaded((function(){i.outOfStockText=salla.lang.get("pages.products.out_of_stock");i.donationAmount=salla.lang.get("pages.products.donation_amount")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return i.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){var e,n;this.optionsData=t;var i=this;(n=(e=this.optionsData[0])===null||e===void 0?void 0:e.details)===null||n===void 0?void 0:n.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return i.outSkus.push(Number(t[0]))}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){t={};e=this.host.getElementSallaData();e.forEach((function(e,n){n.startsWith("options[")&&(t[n.replace("options[","").replace("]","")]=e)}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){t=this.host.querySelectorAll("[required]");e=true;for(n=0;n<t.length;n++){if("reportValidity"in t[n]&&!t[n].reportValidity()){e=false}}return[2,e]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var n=this;return __generator(this,(function(i){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((e=this.selectedSkus)===null||e===void 0?void 0:e.every((function(t){return n.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.optionsData.find((function(e){return e.id===t}))]}))}))};t.prototype.invalidHandler=function(t,e){var n=t.target.closest(".s-product-options-option");if(!salla.url.is_page("cart")){n.scrollIntoView({behavior:"smooth",block:"center"})}n.classList.add("s-product-options-option-error")};t.prototype.changedHandler=function(t,e){var n={event:t,option:e,detail:null};if(e.details){var i=e.details.find((function(e){return Number(e.id)===Number(t.target.value)}));n.detail=i}var o=t.target.closest(".s-product-options-option");if(t.target.value||(e.type==l.FILE||e.type==l.IMAGE)&&t.type==="added"||e.type==l.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){o.classList.remove("s-product-options-option-error")}),200)}var a=this.selectedOptions.findIndex((function(t){return t.option_id===n.option.id}));a>-1?this.selectedOptions[a]=Object.assign(Object.assign({},n.detail),{option_id:n.option.id}):this.selectedOptions.push(Object.assign(Object.assign({},n.detail),{option_id:n.option.id}));this.setSelectedSkus();this.handleRequiredMultipleOptions(e);this.changed.emit(n);salla.event.emit("product-options::change",n)};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,e){return t.filter((function(t){return e.includes(t)}))})).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==l.MULTIPLE_OPTIONS||!t.required){return}var e=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var n=e.querySelectorAll("input:checked").length;e.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!n)}))};t.prototype.getLatLng=function(t,e){return t?t.split(",")[e=="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===l.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===l.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===l.SINGLE_OPTION){return this.singleOption(t)}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.componentWillLoad=function(){this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return salla.api.cart.getCurrentCartId()};t.prototype.render=function(){var t=this;var e;if(((e=this.optionsData)===null||e===void 0?void 0:e.length)==0){return}return i(o,{class:"s-product-options-wrapper"},i("salla-conditional-fields",null,this.optionsData.map((function(e){return i("div",Object.assign({class:"s-product-options-option-container".concat(e.visibility_condition?" hidden":""),"data-option-id":e.id},t.getOptionShownWhen(e)),e.name=="splitter"?t.splitterOption():i("div",{class:"s-product-options-option","data-option-type":e.type,"data-option-required":"".concat(e.required)},i("label",{htmlFor:"options["+e.id+"]",class:"s-product-options-option-label"},i("b",null,e.name,e.required&&i("span",null," * ")," "),i("small",null,e.placeholder)),i("div",{class:"s-product-options-option-content"},t.getDisplayForType(e))))}))))};t.prototype.donationOption=function(t,e){var n=this;var o;return i("div",{class:"s-product-options-donation-wrapper"},t.donation?i("div",{class:"s-product-options-donation-progress"},i("salla-progress-bar",{donation:t.donation})):"",((o=t.donation)===null||o===void 0?void 0:o.can_donate)?i("div",{class:"s-product-options-donation-input-group"},i("input",{type:"text",id:"donating-amount",name:"donating_amount",class:"s-form-control",value:t.value,required:true,placeholder:t.placeholder,onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)},onBlur:function(e){return n.changedHandler(e,t)},onInvalid:function(e){return n.invalidHandler(e,t)}}),i("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol)):"")};t.prototype.fileUploader=function(t,e){var n=this;if(e===void 0){e=null}return i("salla-file-upload",Object.assign({},e||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:t.required,height:"120px",onAdded:function(e){return n.changedHandler(e,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(e){return n.invalidHandler(e,t)},class:{"s-product-options-image-input":true,required:t.required}}),i("div",{class:"s-product-options-filepond-placeholder"},i("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:e.accept&&e.accept.split(",").every((function(t){return t.includes("image")}))?r:u}),i("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),i("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var e=this;var n=t.details.map((function(t){return e.fileTypes[t.name]})).filter(Boolean);return(n===null||n===void 0?void 0:n.length)?this.fileUploader(t,{accept:n.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var e=this;return i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(n){return e.changedHandler(n,t)},onInvalid:function(n){return e.invalidHandler(n,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return i("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var e=this;return i("div",{class:"s-product-options-text"},i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(n){return e.invalidHandler(n,t)},onInput:function(n){return e.changedHandler(n,t)}}))};t.prototype.textareaOption=function(t){var e=this;return i("div",{class:"s-product-options-textarea"},i("div",{class:"mt-1"},i("textarea",{rows:4,value:t.value,class:"s-form-control",required:t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(n){return e.invalidHandler(n,t)},onInput:function(n){return e.changedHandler(n,t)}})))};t.prototype.mapOption=function(t){var e=this;return i("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(n){return e.invalidHandler(n,t)},onSelected:function(n){return e.changedHandler(n,t)}})};t.prototype.colorPickerOption=function(t){var e=this;return i("salla-color-picker",{onSubmitted:function(n){return e.changedHandler(n,t)},name:"options[".concat(t.id,"]"),required:t.required,onInvalidInput:function(n){return e.invalidHandler(n,t)},color:t.value})};t.prototype.timeOption=function(t){var e=this;return i("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(n){return e.invalidHandler(n,t)},onPicked:function(n){return e.changedHandler(n,t)}})};t.prototype.dateOption=function(t){var e=this;return i("div",{class:"s-product-options-date-element"},i("salla-datetime-picker",{value:t.value,placeholder:t.name,required:t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(n){return e.invalidHandler(n,t)},onPicked:function(n){return e.changedHandler(n,t)}}))};t.prototype.datetimeOption=function(t){var e=this;return i("div",{class:"s-product-options-datetime-element"},i("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(n){return e.invalidHandler(n,t)},onPicked:function(n){return e.changedHandler(n,t)}}))};t.prototype.getOptionDetailName=function(t,e,n){if(e===void 0){e=true}if(n&&n==l.COLOR){return t.name+(e&&this.isOptionDetailOut(t)?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price),") </p>"):"")}return t.name+(e&&this.isOptionDetailOut(t)?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price),")"):"")};t.prototype.isOptionDetailOut=function(t){var e=this;var n;if(t.is_out||!t.skus_availability||!((n=this.selectedSkus)===null||n===void 0?void 0:n.length)){return t.is_out}var i=this.selectedOptions.filter((function(e){return e.id==t.id})).length;if(i&&this.selectedOptions.length==1){return false}if(i){var o=this.selectedSkus.filter((function(t){return e.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return o.includes(Number(t))}))}return this.selectedOptions.some((function(e){return e.is_out&&e.option_id!==t.option_id}))};t.prototype.singleOption=function(t){var e=this;return i("div",null,i("select",{name:"options[".concat(t.id,"]"),required:t.required,class:"s-form-control",onInvalid:function(n){return e.invalidHandler(n,t)},onChange:function(n){return e.changedHandler(n,t)}},i("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return i("option",{value:t.id,disabled:e.canDisabled&&e.isOptionDetailOut(t),selected:t.is_selected},e.getOptionDetailName(t))}))))};t.prototype.multipleOptions=function(t){var e=this;var n=t.required&&!t.details.some((function(t){return t.is_selected}));return i("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},t===null||t===void 0?void 0:t.details.map((function(o){return i("div",null,i("input",{type:"checkbox",value:o.id,disabled:e.isOptionDetailOut(o),checked:o.is_selected,required:n,name:"options[".concat(t.id,"][]"),id:"field-".concat(t.id,"-").concat(o.id),onChange:function(n){return e.changedHandler(n,t)},onInvalid:function(n){return e.invalidHandler(n,t)},"aria-describedby":"options[".concat(t.id,"]-description")}),i("label",{htmlFor:"field-".concat(t.id,"-").concat(o.id)},e.getOptionDetailName(o)))})))};t.prototype.colorOption=function(t){var e=this;return i("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(n){return i("div",{class:"s-product-options-colors-item"},i("input",{type:"radio",value:n.id,required:t.required,checked:n.is_selected,name:"options[".concat(t.id,"]"),disabled:e.canDisabled&&e.isOptionDetailOut(n),id:"color-".concat(e.productId,"-").concat(t.id,"-").concat(n.id),onInvalid:function(n){return e.invalidHandler(n,t)},onChange:function(n){return e.changedHandler(n,t)}}),i("label",{htmlFor:"color-".concat(e.productId,"-").concat(t.id,"-").concat(n.id)},i("span",{style:{"background-color":n.color}}),i("div",{innerHTML:e.getOptionDetailName(n,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var e=this;return i("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(n){return i("div",null,i("input",{type:"radio",value:n.id,"data-itemid":n.id,required:t.required,checked:n.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":n.option_value,disabled:e.canDisabled&&e.isOptionDetailOut(n),id:"option_".concat(e.productId,"-").concat(t.id,"_").concat(n.id),onInvalid:function(n){return e.invalidHandler(n,t)},onChange:function(n){return e.changedHandler(n,t)}}),i("label",{htmlFor:"option_".concat(e.productId,"-").concat(t.id,"_").concat(n.id),"data-img-id":n.option_value,class:"go-to-slide"},i("img",{"data-src":n.image,src:n.image,title:n.name,alt:n.name}),i("span",{innerHTML:c,class:"s-product-options-thumbnails-icon"}),e.isOptionDetailOut(n)?[i("small",{class:"s-product-options-thumbnails-stock-badge"},e.outOfStockText),e.canDisabled?i("div",{class:"s-product-options-thumbnails-badge-overlay"}):""]:""),i("p",null,e.getOptionDetailName(n,false)," "))})))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());p.style=d}}}));
5
- //# sourceMappingURL=p-f8addbca.system.entry.js.map