wonder-image 2.1.2-alpha.21 → 2.1.2-alpha.23

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.
@@ -1,2 +1,2 @@
1
- (()=>{var n={6867(n){n.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n } else {\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n API_CLIENT_APP.post(\"/frontend/alert/\", { code: alert })\n .then(data => {\n\n container.innerHTML += data.response;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n })\n .catch(error => console.error(error));\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068(n){n.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244(n){n.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787(n){n.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n textListValue(input, country);\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n\n if (typeof event.target !== "undefined") {\n var inputCountry = event.target;\n } else {\n var inputCountry = event;\n }\n \n var form = inputCountry.form;\n var inputCountryName = inputCountry.dataset.wiName.replace(\'-text\', \'\');\n var inputStateName = inputCountry.dataset.wiInputState;\n\n var inputState = form.querySelector(\'input[data-wi-name="\'+inputStateName+\'-text"]\');\n\n inputState.disabled = true;\n inputState.value = "";\n\n delay(100).then(() => {\n\n if (form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\') != null) {\n\n var country = form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\').value;\n \n if (inputState.dataset.wiListStates != country) {\n \n inputState.dataset.wiListStates = country;\n\n loadingSpinner(true);\n\n $.ajax({\n type: "POST",\n url: pathApp+\'/api/states.php\',\n data: { \n post: \'true\',\n country: country\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n\n textListOptions( inputState, response );\n\n inputState.disabled = false;\n\n if (stateValue != null && stateValue != "") { textListValue(inputState, stateValue); }\n\n loadingSpinner(false);\n\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner(false);\n\n }\n });\n\n } else {\n\n inputState.disabled = false;\n \n }\n\n }\n\n });\n\n}'},7350(n){n.exports='var x, i, j, l, ll, selElmnt, a, b, c;\n\n// Le liste dei select sono position:absolute dentro .wi-input-container: un\n// antenato con overflow:hidden le ritaglierebbe. All\'apertura la lista passa a\n// position:fixed con coordinate calcolate dal box selezionato, cosi\' esce da\n// qualsiasi overflow:hidden mantenendolo sul form. Il Popover API porta la lista\n// nel top layer senza cambiarne il parent DOM, evitando clipping e containing\n// block creati da transform. Il calcolo dell\'origine resta come fallback.\nfunction positionSelectList(container) {\n\n if (!container) { return; }\n\n var selected = container.querySelector(".select-selected");\n var list = container.querySelector(".select-items");\n\n if (!selected || !list) { return; }\n\n var rect = selected.getBoundingClientRect();\n var borderBottom = Number.parseFloat(getComputedStyle(selected).borderBottomWidth) || 0;\n var listTop = rect.bottom - borderBottom;\n var transition = list.style.transition;\n var supportsPopover = typeof list.showPopover === "function";\n\n list.style.transition = "none";\n list.style.position = "fixed";\n list.style.boxSizing = "border-box";\n list.style.width = rect.width + "px";\n list.style.zIndex = "1000";\n\n if (supportsPopover) {\n list.style.inset = "auto";\n list.style.margin = "0";\n list.style.padding = "0";\n list.style.top = listTop + "px";\n list.style.left = rect.left + "px";\n\n if (!list.matches(":popover-open")) { list.showPopover(); }\n\n list.getBoundingClientRect();\n list.style.transition = transition;\n return;\n }\n\n list.style.top = "0px";\n list.style.left = "0px";\n\n var origin = list.getBoundingClientRect();\n\n list.style.top = (listTop - origin.top) + "px";\n list.style.left = (rect.left - origin.left) + "px";\n\n // Applica le coordinate senza animarle dall\'origin temporanea.\n list.getBoundingClientRect();\n list.style.transition = transition;\n\n}\n\nfunction clearSelectListPosition(container) {\n\n if (!container) { return; }\n\n var list = container.querySelector(".select-items");\n\n if (!list) { return; }\n\n if (typeof list.hidePopover === "function" && list.matches(":popover-open")) {\n list.hidePopover();\n }\n\n list.style.position = "";\n list.style.boxSizing = "";\n list.style.inset = "";\n list.style.margin = "";\n list.style.padding = "";\n list.style.top = "";\n list.style.left = "";\n list.style.width = "";\n list.style.zIndex = "";\n\n}\n\nfunction repositionActiveSelect() {\n\n document.querySelectorAll(".wi-input-container.wi-list-active").forEach(positionSelectList);\n\n}\n\n// Un solo observer segue l\'apertura/chiusura (classe wi-list-active) di ogni\n// container, indipendentemente da come viene attivata la lista.\nvar wiSelectObserver = new MutationObserver(function(mutations) {\n\n mutations.forEach(function(mutation) {\n\n var el = mutation.target;\n\n if (!el.classList || !el.classList.contains("wi-input-container")) { return; }\n\n if (el.classList.contains("wi-list-active")) {\n positionSelectList(el);\n } else {\n clearSelectListPosition(el);\n }\n\n });\n\n});\n\nwindow.addEventListener("scroll", repositionActiveSelect, true);\nwindow.addEventListener("resize", repositionActiveSelect);\n\nif (window.visualViewport) {\n window.visualViewport.addEventListener("scroll", repositionActiveSelect);\n window.visualViewport.addEventListener("resize", repositionActiveSelect);\n}\n\n// Look for any elements with the class "custom-select":\nx = document.querySelectorAll("[data-wi-select=\'true\']");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n\n selElmnt = x[i].getElementsByTagName("select")[0];\n ll = selElmnt.length;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement("DIV");\n a.setAttribute("class", "select-selected wi-input");\n a.innerHTML = selElmnt.selectedIndex >= 0\n ? selElmnt.options[selElmnt.selectedIndex].innerHTML\n : "";\n x[i].appendChild(a);\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement("DIV");\n b.setAttribute("class", "select-items wi-input-list no-scrollbar");\n b.setAttribute("popover", "manual");\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement("DIV");\n c.id = selElmnt.options[j].value;\n c.dataset.wiOptionIndex = j;\n c.setAttribute("class", "wi-input-list-value");\n c.innerHTML = selElmnt.options[j].innerHTML;\n\n // Se è impostato un valore di default selezionalo\n if (j === selElmnt.selectedIndex) { c.classList.add("same-as-selected"); }\n\n c.addEventListener("click", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, s, h, container, optionIndex, previousIndex;\n container = this.closest("[data-wi-select=\'true\']");\n s = container ? container.querySelector("select") : null;\n h = container ? container.querySelector(".select-selected") : null;\n\n if (!s || !h) { return; }\n\n previousIndex = s.selectedIndex;\n optionIndex = parseInt(this.dataset.wiOptionIndex, 10);\n\n if (!Number.isNaN(optionIndex) && s.options[optionIndex]) {\n s.selectedIndex = optionIndex;\n h.innerHTML = s.options[optionIndex].innerHTML;\n y = this.parentNode.querySelectorAll(".same-as-selected");\n y.forEach(function(option) { option.classList.remove("same-as-selected"); });\n this.setAttribute("class", "wi-input-list-value same-as-selected");\n }\n\n closeSelect(container);\n\n if (s.selectedIndex !== previousIndex) {\n s.dispatchEvent(new Event("input", { bubbles: true }));\n s.dispatchEvent(new Event("change", { bubbles: true }));\n }\n\n });\n\n b.appendChild(c);\n\n }\n\n x[i].appendChild(b);\n\n // Segue i cambi di stato del container per riposizionare la lista aperta.\n wiSelectObserver.observe(x[i], { attributes: true, attributeFilter: ["class"] });\n\n a.addEventListener("click", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n\n if (this.parentNode.classList.contains("wi-list-active")) {\n closeSelect(this.parentNode);\n } else {\n openSelect(this.parentNode);\n }\n\n check();\n\n });\n\n}\n\nfunction openSelect(container) {\n\n closeAllSelect();\n\n var selected = container.querySelector(".select-selected");\n\n container.classList.add("wi-list-active");\n if (selected) { selected.classList.add("select-arrow-active"); }\n\n}\n\nfunction closeSelect(container) {\n\n if (!container) { return; }\n\n var selected = container.querySelector(".select-selected");\n\n container.classList.remove("wi-list-active");\n if (selected) { selected.classList.remove("select-arrow-active"); }\n\n}\n\nfunction closeAllSelect() {\n\n // Close every open custom select.\n document.querySelectorAll("[data-wi-select=\'true\'].wi-list-active").forEach(closeSelect);\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener("click", closeAllSelect);\n'},4428(n){n.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n \nasync function formSubmit(form, endpoint = \'/frontend/form/\', callback = loadingResponse ) {\n\n loadingSpinner();\n\n var data = new FormData(form);\n let response;\n\n try {\n\n response = await API_CLIENT.post(endpoint, data);\n\n } catch (error) {\n console.error(error);\n response = error;\n }\n\n if (typeof callback === \'function\') {\n callback(response);\n } else {\n loadingSpinner();\n }\n\n}\n\nfunction loadingResponse(data) {\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n\n var icon = `<i class="bi bi-check2-circle tx-success"></i>`;\n var action = `location.reload();`;\n var text = data.response;\n var buttonLabel = \'back_site\';\n\n if (!data.success) {\n\n icon = `<i class="bi bi-x-circle tx-danger"></i>`;\n action = `loadingSpinner();`;\n\n buttonLabel = \'retry\';\n\n }\n\n buttonLabel = __t(\'components.buttons.\'+buttonLabel)\n\n container.innerHTML = `\n <div class="title-big a-c">\n ${icon}\n </div>\n <div class="subtitle mt-8 a-c"> ${text} </div>\n <div class="c-w mt-10">\n <a onclick="${action}" class="btn btn-primary c-w"> ${buttonLabel} </a>\n </div>\n `;\n\n}'},8516(n){n.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148(n){n.exports="function modal(selector) {\n\n setUpModal(selector);\n\n var modal = document.querySelector(selector);\n\n modal.classList.toggle('wi-show');\n modal.classList.toggle('no-interaction');\n\n if (modal.classList.contains('wi-show')) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}\n\nfunction setUpModal(selector) {\n \n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\n if (element.onclick == null) {\n element.onclick = function() { modal(selector) };\n }\n });\n\n}"},225(n){n.exports="function setUpPage() {\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setInput();\n setDropdown();\n setVideoJS();\n setTooltip();\n \n window.dispatchEvent(new Event('loaded'));\n \n};"},4642(n){n.exports=function(n){function e(n){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",n)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(n):"undefined"!=typeof eval?eval.call(null,n):e("EvalError: No eval function available")}catch(n){e(n)}}},1120(n,e,t){t(4642)(t(6867))},2051(n,e,t){t(4642)(t(5068))},1809(n,e,t){t(4642)(t(7244))},7154(n,e,t){t(4642)(t(2787))},8865(n,e,t){t(4642)(t(7350))},1123(n,e,t){t(4642)(t(4428))},5329(n,e,t){t(4642)(t(8516))},871(n,e,t){t(4642)(t(148))},7186(n,e,t){t(4642)(t(225))}};const e={};function t(i){const o=e[i];if(void 0!==o)return o.exports;const a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.n=n=>{const e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),(()=>{"use strict";t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})()})();
1
+ (()=>{var e={6867(e){e.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n } else {\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n API_CLIENT_APP.post(\"/frontend/alert/\", { code: alert })\n .then(data => {\n\n container.innerHTML += data.response;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n })\n .catch(error => console.error(error));\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068(e){e.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244(e){e.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787(e){e.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n if (element.wiCountryBound) { return; }\n element.wiCountryBound = true;\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n if (input.tagName === "SELECT") {\n input.value = country;\n input.dispatchEvent(new Event("change", { bubbles: true }));\n } else {\n textListValue(input, country);\n }\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n var inputCountry = event.target || event;\n var form = inputCountry.form;\n if (!form) { return; }\n var nativeCountry = inputCountry.tagName === "SELECT";\n var countryName = nativeCountry ? inputCountry.name : String(inputCountry.dataset.wiName || "").replace(/-text$/, "");\n var stateName = inputCountry.dataset.wiInputState;\n var inputState = Array.from(form.querySelectorAll("select, input[data-wi-name]")).find(function(control) {\n return control.tagName === "SELECT" ? control.name === stateName : control.dataset.wiName === stateName + "-text";\n });\n if (!inputState) { return; }\n var checked = Array.from(form.querySelectorAll("input:checked")).find(function(control) { return control.name === countryName; });\n var country = nativeCountry ? inputCountry.value : (checked ? checked.value : "");\n var nativeState = inputState.tagName === "SELECT";\n function replaceStates(options, value) {\n if (nativeState) {\n inputState.replaceChildren(new Option("", ""));\n Object.entries(options).forEach(function(entry) { inputState.add(new Option(entry[1], entry[0])); });\n inputState.value = value || "";\n if (inputState.selectedIndex < 0) { inputState.value = ""; }\n var container = inputState.closest("[data-wi-select=\'true\']");\n if (container && typeof setSelect === "function") { setSelect(container); }\n inputState.dispatchEvent(new Event("change", { bubbles: true }));\n } else {\n textListOptions(inputState, options);\n textListValue(inputState, value || "");\n }\n }\n if (inputState.dataset.wiListStates === country && !inputState.wiStatesFailed) {\n if (stateValue !== null && !inputState.disabled) {\n if (nativeState) { inputState.value = stateValue; inputState.dispatchEvent(new Event("change", { bubbles: true })); }\n else { textListValue(inputState, stateValue); }\n } else if (stateValue !== null) { inputState.wiPendingStateValue = stateValue; }\n return;\n }\n inputState.dataset.wiListStates = country;\n inputState.wiStatesFailed = false;\n inputState.wiPendingStateValue = stateValue;\n var sequence = (inputState.wiStatesSequence || 0) + 1;\n inputState.wiStatesSequence = sequence;\n replaceStates({}, "");\n inputState.disabled = country !== "";\n if (!country) { return; }\n var url = inputCountry.dataset.wiStatesUrl || (typeof pathApi !== "undefined" ? pathApi.replace(/\\/$/, "") + "/states/" : pathApp + "/api/states.php");\n $.ajax({\n type: "POST", url: url, dataType: "json", data: { post: "true", country: country },\n success: function(data) {\n if (inputState.wiStatesSequence !== sequence) { return; }\n replaceStates(typeof data === "string" ? JSON.parse(data) : data, inputState.wiPendingStateValue);\n inputState.disabled = false;\n if (typeof check === "function") { check(); }\n },\n error: function(request) {\n if (inputState.wiStatesSequence !== sequence) { return; }\n inputState.wiStatesFailed = true;\n inputState.disabled = false;\n ajaxRequestError(request);\n }\n });\n}\n'},7350(e){e.exports="var x, i, j, l, ll, selElmnt, a, b, c;\nvar wiSelectId = 0;\n\n// Le liste dei select sono position:absolute dentro .wi-input-container: un\n// antenato con overflow:hidden le ritaglierebbe. All'apertura la lista passa a\n// position:fixed con coordinate calcolate dal box selezionato, cosi' esce da\n// qualsiasi overflow:hidden mantenendolo sul form. Il Popover API porta la lista\n// nel top layer senza cambiarne il parent DOM, evitando clipping e containing\n// block creati da transform. Il calcolo dell'origine resta come fallback.\nfunction positionSelectList(container) {\n\n if (!container) { return; }\n\n var selected = container.querySelector(\".select-selected\");\n var list = container.querySelector(\".select-items\");\n\n if (!selected || !list) { return; }\n\n var rect = selected.getBoundingClientRect();\n var borderBottom = Number.parseFloat(getComputedStyle(selected).borderBottomWidth) || 0;\n var listTop = rect.bottom - borderBottom;\n var transition = list.style.transition;\n var supportsPopover = typeof list.showPopover === \"function\";\n\n list.style.transition = \"none\";\n list.style.position = \"fixed\";\n list.style.boxSizing = \"border-box\";\n list.style.width = rect.width + \"px\";\n list.style.zIndex = \"1000\";\n\n if (supportsPopover) {\n list.style.inset = \"auto\";\n list.style.margin = \"0\";\n list.style.padding = \"0\";\n list.style.top = listTop + \"px\";\n list.style.left = rect.left + \"px\";\n\n if (!list.matches(\":popover-open\")) { list.showPopover(); }\n\n list.getBoundingClientRect();\n list.style.transition = transition;\n return;\n }\n\n list.style.top = \"0px\";\n list.style.left = \"0px\";\n\n var origin = list.getBoundingClientRect();\n\n list.style.top = (listTop - origin.top) + \"px\";\n list.style.left = (rect.left - origin.left) + \"px\";\n\n // Applica le coordinate senza animarle dall'origin temporanea.\n list.getBoundingClientRect();\n list.style.transition = transition;\n\n}\n\nfunction clearSelectListPosition(container) {\n\n if (!container) { return; }\n\n var list = container.querySelector(\".select-items\");\n\n if (!list) { return; }\n\n if (typeof list.hidePopover === \"function\" && list.matches(\":popover-open\")) {\n list.hidePopover();\n }\n\n list.style.position = \"\";\n list.style.boxSizing = \"\";\n list.style.inset = \"\";\n list.style.margin = \"\";\n list.style.padding = \"\";\n list.style.top = \"\";\n list.style.left = \"\";\n list.style.width = \"\";\n list.style.zIndex = \"\";\n\n}\n\nfunction repositionActiveSelect() {\n\n document.querySelectorAll(\".wi-input-container.wi-list-active\").forEach(positionSelectList);\n\n}\n\n// Un solo observer segue l'apertura/chiusura (classe wi-list-active) di ogni\n// container, indipendentemente da come viene attivata la lista.\nvar wiSelectObserver = new MutationObserver(function(mutations) {\n\n mutations.forEach(function(mutation) {\n\n var el = mutation.target;\n\n if (!el.classList || !el.classList.contains(\"wi-input-container\")) { return; }\n\n if (el.classList.contains(\"wi-list-active\")) {\n positionSelectList(el);\n } else {\n clearSelectListPosition(el);\n }\n\n });\n\n});\n\nwindow.addEventListener(\"scroll\", repositionActiveSelect, true);\nwindow.addEventListener(\"resize\", repositionActiveSelect);\n\nif (window.visualViewport) {\n window.visualViewport.addEventListener(\"scroll\", repositionActiveSelect);\n window.visualViewport.addEventListener(\"resize\", repositionActiveSelect);\n}\n\n// Look for any elements with the class \"custom-select\":\nx = document.querySelectorAll(\"[data-wi-select='true']\");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n setSelect(x[i]);\n}\n\nfunction setSelect(container) {\n var selElmnt = container.querySelector(\"select\");\n if (!selElmnt) { return; }\n closeSelect(container);\n container.querySelectorAll(\".select-selected, .select-items\").forEach(function(node) { node.remove(); });\n var ll = selElmnt.length;\n var a, b, c, j;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement(\"BUTTON\");\n a.type = \"button\";\n a.id = (selElmnt.id || 'wi-select-' + (++wiSelectId)) + '-control';\n a.setAttribute('aria-haspopup', 'listbox');\n a.setAttribute('aria-expanded', 'false');\n a.disabled = selElmnt.disabled;\n a.setAttribute(\"class\", \"select-selected wi-input\");\n a.textContent = selElmnt.selectedIndex >= 0\n ? selElmnt.options[selElmnt.selectedIndex].textContent\n : \"\";\n container.appendChild(a);\n selElmnt.classList.add('d-none');\n var label = container.querySelector('label');\n if (label) {\n label.htmlFor = a.id;\n if (!label.id) label.id = a.id + '-label';\n a.setAttribute('aria-labelledby', label.id);\n }\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement(\"DIV\");\n b.setAttribute(\"class\", \"select-items wi-input-list no-scrollbar\");\n b.setAttribute(\"popover\", \"manual\");\n b.id = a.id + '-list';\n a.setAttribute('aria-controls', b.id);\n var optionsList = document.createElement('DIV');\n optionsList.id = b.id + '-options';\n optionsList.setAttribute('role', 'listbox');\n if (label) optionsList.setAttribute('aria-labelledby', label.id);\n var search = null;\n if (selElmnt.dataset.wiSelectSearch === 'true') {\n search = document.createElement('INPUT');\n search.type = 'text';\n search.setAttribute('enterkeyhint', 'search');\n search.className = 'wi-input';\n search.autocomplete = 'off';\n search.setAttribute('role', 'combobox');\n search.setAttribute('aria-autocomplete', 'list');\n search.setAttribute('aria-expanded', 'false');\n search.setAttribute('aria-controls', optionsList.id);\n if (label) search.setAttribute('aria-labelledby', label.id);\n else search.setAttribute('aria-label', selElmnt.getAttribute('aria-label') || selElmnt.name);\n search.addEventListener('click', function(event) { event.stopPropagation(); });\n search.addEventListener('input', function() {\n clear.hidden = this.value === '';\n var query = wiSelectNormalize(this.value);\n optionsList.querySelectorAll('[role=\"option\"]').forEach(function(option) {\n option.hidden = !wiSelectNormalize(option.textContent).includes(query);\n });\n wiSelectActivate(container, wiSelectOptions(container)[0]);\n });\n var searchBar = document.createElement('DIV');\n searchBar.setAttribute('data-wi-select-search-bar', 'true');\n var clear = document.createElement('BUTTON');\n clear.type = 'button';\n clear.hidden = true;\n clear.setAttribute('data-wi-select-clear', 'true');\n clear.setAttribute('aria-label', selElmnt.dataset.wiSelectClearLabel || (typeof __t === 'function' ? __t('components.forms.clear_search') : 'Clear search'));\n var clearIcon = document.createElement('I');\n clearIcon.className = 'bi bi-x-lg';\n clearIcon.setAttribute('aria-hidden', 'true');\n clear.appendChild(clearIcon);\n clear.addEventListener('click', function(event) {\n event.stopPropagation();\n search.value = '';\n search.dispatchEvent(new Event('input', { bubbles: true }));\n search.focus({ preventScroll: true });\n });\n clear.addEventListener('keydown', function(event) {\n if (event.key === 'Escape' || event.key === 'Tab') wiSelectKeydown(event, container);\n });\n searchBar.append(search, clear);\n b.appendChild(searchBar);\n }\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement(\"DIV\");\n c.id = b.id + '-option-' + j;\n c.dataset.wiOptionIndex = j;\n c.setAttribute(\"class\", \"wi-input-list-value\");\n c.setAttribute('role', 'option');\n c.setAttribute('aria-selected', j === selElmnt.selectedIndex ? 'true' : 'false');\n c.setAttribute('aria-disabled', selElmnt.options[j].disabled ? 'true' : 'false');\n c.textContent = selElmnt.options[j].textContent;\n\n // Se è impostato un valore di default selezionalo\n if (j === selElmnt.selectedIndex) { c.classList.add(\"same-as-selected\"); }\n\n c.addEventListener(\"click\", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, s, h, container, optionIndex, previousIndex;\n container = this.closest(\"[data-wi-select='true']\");\n s = container ? container.querySelector(\"select\") : null;\n h = container ? container.querySelector(\".select-selected\") : null;\n\n if (!s || !h || s.disabled || this.getAttribute('aria-disabled') === 'true') { return; }\n\n previousIndex = s.selectedIndex;\n optionIndex = parseInt(this.dataset.wiOptionIndex, 10);\n\n if (!Number.isNaN(optionIndex) && s.options[optionIndex]) {\n s.selectedIndex = optionIndex;\n h.textContent = s.options[optionIndex].textContent;\n y = this.parentNode.querySelectorAll(\".same-as-selected\");\n y.forEach(function(option) { option.classList.remove(\"same-as-selected\"); });\n this.parentNode.querySelectorAll('[role=\"option\"]').forEach(function(option) { option.setAttribute('aria-selected', 'false'); });\n this.setAttribute('aria-selected', 'true');\n this.setAttribute(\"class\", \"wi-input-list-value same-as-selected\");\n }\n\n closeSelect(container);\n h.focus({ preventScroll: true });\n\n if (s.selectedIndex !== previousIndex) {\n s.dispatchEvent(new Event(\"input\", { bubbles: true }));\n s.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n\n });\n\n optionsList.appendChild(c);\n\n }\n\n b.appendChild(optionsList);\n b.addEventListener('click', function(event) { event.stopPropagation(); });\n container.appendChild(b);\n a.addEventListener('keydown', function(event) { wiSelectKeydown(event, container); });\n if (search) search.addEventListener('keydown', function(event) { wiSelectKeydown(event, container); });\n\n // Segue i cambi di stato del container per riposizionare la lista aperta.\n wiSelectObserver.observe(container, { attributes: true, attributeFilter: [\"class\"] });\n\n a.addEventListener(\"click\", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n if (selElmnt.disabled) { return; }\n\n if (this.parentNode.classList.contains(\"wi-list-active\")) {\n closeSelect(this.parentNode);\n } else {\n openSelect(this.parentNode);\n }\n\n if (typeof check === 'function') check();\n\n });\n\n if (!selElmnt.wiSelectChangeBound) {\n selElmnt.wiSelectChangeBound = true;\n new MutationObserver(function() {\n var control = container.querySelector('.select-selected');\n if (control) control.disabled = selElmnt.disabled;\n if (selElmnt.disabled) closeSelect(container);\n }).observe(selElmnt, { attributes: true, attributeFilter: ['disabled'] });\n selElmnt.addEventListener(\"change\", function() {\n var selected = container.querySelector(\".select-selected\");\n if (selected) { selected.textContent = selElmnt.selectedIndex >= 0 ? selElmnt.options[selElmnt.selectedIndex].textContent : \"\"; }\n container.querySelectorAll('[role=\"option\"]').forEach(function(option) {\n var active = Number(option.dataset.wiOptionIndex) === selElmnt.selectedIndex;\n option.setAttribute('aria-selected', active ? 'true' : 'false');\n option.classList.toggle('same-as-selected', active);\n });\n });\n }\n\n}\n\nfunction openSelect(container) {\n\n var nativeSelect = container.querySelector('select');\n if (!nativeSelect || nativeSelect.disabled) return;\n\n closeAllSelect();\n\n var selected = container.querySelector(\".select-selected\");\n\n container.classList.add(\"wi-list-active\");\n if (selected) { selected.classList.add(\"select-arrow-active\"); selected.setAttribute('aria-expanded', 'true'); }\n var search = container.querySelector('.select-items input[role=\"combobox\"]');\n container.querySelectorAll('[role=\"option\"]').forEach(function(option) { option.hidden = false; });\n positionSelectList(container);\n if (search) {\n search.value = '';\n container.querySelector('[data-wi-select-clear]').hidden = true;\n search.setAttribute('aria-expanded', 'true'); search.focus({ preventScroll: true });\n }\n wiSelectActivate(container, container.querySelector('[role=\"option\"][aria-selected=\"true\"]') || wiSelectOptions(container)[0]);\n\n}\n\nfunction closeSelect(container) {\n\n if (!container) { return; }\n\n var selected = container.querySelector(\".select-selected\");\n\n container.classList.remove(\"wi-list-active\");\n if (selected) { selected.classList.remove(\"select-arrow-active\"); selected.setAttribute('aria-expanded', 'false'); selected.removeAttribute('aria-activedescendant'); }\n var search = container.querySelector('.select-items input[role=\"combobox\"]');\n if (search) { search.setAttribute('aria-expanded', 'false'); search.removeAttribute('aria-activedescendant'); }\n clearSelectListPosition(container);\n\n}\n\nfunction closeAllSelect() {\n\n // Close every open custom select.\n document.querySelectorAll(\"[data-wi-select='true'].wi-list-active\").forEach(closeSelect);\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener(\"click\", closeAllSelect);\ndocument.addEventListener('focusin', function(event) {\n document.querySelectorAll(\"[data-wi-select='true'].wi-list-active\").forEach(function(container) {\n if (!container.contains(event.target)) closeSelect(container);\n });\n});\n\nfunction wiSelectNormalize(value) {\n return value.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '').toLocaleLowerCase().trim();\n}\nfunction wiSelectOptions(container) {\n return Array.from(container.querySelectorAll('[role=\"option\"]')).filter(function(option) {\n return !option.hidden && option.getAttribute('aria-disabled') !== 'true';\n });\n}\nfunction wiSelectActivate(container, active) {\n container.querySelectorAll('[role=\"option\"]').forEach(function(option) { option.dataset.wiActive = option === active ? 'true' : 'false'; });\n var target = container.querySelector('.select-items input[role=\"combobox\"]') || container.querySelector('.select-selected');\n if (active) {\n target.setAttribute('aria-activedescendant', active.id);\n active.scrollIntoView({ block: 'nearest' });\n } else target.removeAttribute('aria-activedescendant');\n}\nfunction wiSelectKeydown(event, container) {\n if (container.querySelector('select').disabled) return;\n var open = container.classList.contains('wi-list-active');\n if (event.key === 'Tab') { closeSelect(container); return; }\n if (event.key === 'Escape' && open) {\n event.preventDefault(); event.stopPropagation(); closeSelect(container);\n container.querySelector('.select-selected').focus({ preventScroll: true }); return;\n }\n var search = event.target.matches('.select-items input[role=\"combobox\"]');\n if (!['ArrowDown', 'ArrowUp', 'Enter', ' ', 'Home', 'End'].includes(event.key) || (search && [' ', 'Home', 'End'].includes(event.key))) return;\n event.preventDefault();\n if (!open) { openSelect(container); return; }\n var options = wiSelectOptions(container);\n var index = options.findIndex(function(option) { return option.dataset.wiActive === 'true'; });\n if (event.key === 'Enter' || event.key === ' ') { if (options[index]) options[index].click(); return; }\n if (event.key === 'Home') index = 0;\n else if (event.key === 'End') index = options.length - 1;\n else index = Math.max(0, Math.min(options.length - 1, index + (event.key === 'ArrowDown' ? 1 : -1)));\n wiSelectActivate(container, options[index]);\n}\n"},4428(e){e.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n \nasync function formSubmit(form, endpoint = \'/frontend/form/\', callback = loadingResponse ) {\n\n loadingSpinner();\n\n var data = new FormData(form);\n let response;\n\n try {\n\n response = await API_CLIENT.post(endpoint, data);\n\n } catch (error) {\n console.error(error);\n response = error;\n }\n\n if (typeof callback === \'function\') {\n callback(response);\n } else {\n loadingSpinner();\n }\n\n}\n\nfunction loadingResponse(data) {\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n\n var icon = `<i class="bi bi-check2-circle tx-success"></i>`;\n var action = `location.reload();`;\n var text = data.response;\n var buttonLabel = \'back_site\';\n\n if (!data.success) {\n\n icon = `<i class="bi bi-x-circle tx-danger"></i>`;\n action = `loadingSpinner();`;\n\n buttonLabel = \'retry\';\n\n }\n\n buttonLabel = __t(\'components.buttons.\'+buttonLabel)\n\n container.innerHTML = `\n <div class="title-big a-c">\n ${icon}\n </div>\n <div class="subtitle mt-8 a-c"> ${text} </div>\n <div class="c-w mt-10">\n <a onclick="${action}" class="btn btn-primary c-w"> ${buttonLabel} </a>\n </div>\n `;\n\n}'},8516(e){e.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148(e){e.exports="// Keep modal(selector) and setUpModal(selector) compatible with legacy views.\nvar wiModalStack = [];\nvar wiModalReturnFocus = new WeakMap();\n\nfunction wiModalFocusable(element) {\n return Array.from(element.querySelectorAll('a[href],button,input,select,textarea,[tabindex]')).filter(function (item) {\n return !item.disabled && item.tabIndex >= 0 && !item.closest('[inert]') && item.getClientRects().length > 0;\n });\n}\n\nfunction wiModalFocus(element) {\n var target = wiModalFocusable(element)[0] || element.querySelector('.wi-modal-content, .content') || element;\n if (target.tabIndex < 0) target.setAttribute('tabindex', '-1');\n target.focus({ preventScroll: true });\n}\n\nfunction wiModalVisibility(element, active) {\n element.inert = !active;\n element.setAttribute('aria-hidden', active ? 'false' : 'true');\n}\n\n/**\n * Toggles a wi-modal: opens it when closed, closes it when open.\n *\n * @deprecated Use wi.modal.open(id, { title }) and wi.modal.close(id).\n * @param {string} selector CSS selector of the .wi-modal.\n * @param {Element} [trigger] Element that gets the focus back on close.\n * @returns {boolean} false when the selector matches nothing.\n */\nfunction modal(selector, trigger) {\n var element;\n try { element = document.querySelector(selector); } catch (error) { return false; }\n if (!element) return false;\n setUpModal(selector);\n var opening = !element.classList.contains('wi-show');\n if (opening) {\n wiModalReturnFocus.set(element, trigger || document.activeElement);\n wiModalStack.forEach(function (other) { wiModalVisibility(other, false); });\n wiModalStack.push(element);\n element.classList.add('wi-show');\n element.classList.remove('no-interaction');\n wiModalVisibility(element, true);\n if (typeof disableScroll === 'function') disableScroll();\n wiModalFocus(element);\n } else {\n var wasTop = wiModalStack[wiModalStack.length - 1] === element;\n wiModalStack = wiModalStack.filter(function (other) { return other !== element; });\n element.classList.remove('wi-show');\n element.classList.add('no-interaction');\n wiModalVisibility(element, false);\n var previous = wiModalStack[wiModalStack.length - 1];\n if (previous) wiModalVisibility(previous, true);\n else if (typeof enableScroll === 'function') enableScroll();\n var returnFocus = wiModalReturnFocus.get(element);\n if (wasTop && returnFocus && returnFocus.isConnected && !returnFocus.closest('[inert]')) {\n returnFocus.focus({ preventScroll: true });\n } else if (wasTop && previous) wiModalFocus(previous);\n }\n return true;\n}\n\nfunction setUpModal(selector) {\n var element;\n try { element = document.querySelector(selector); } catch (error) { return; }\n if (!element) return;\n if (!element.hasAttribute('role')) element.setAttribute('role', 'dialog');\n element.setAttribute('aria-modal', 'true');\n wiModalVisibility(element, element.classList.contains('wi-show'));\n element.querySelectorAll('.wi-close-modal').forEach(function (close) {\n // Preserve project-specific onclick handlers.\n if (close.onclick == null) close.onclick = function () { modal(selector); };\n });\n}\n\ndocument.addEventListener('click', function (event) {\n var trigger = event.target.closest('[data-wi-modal-target]');\n if (!trigger || trigger.disabled || trigger.getAttribute('aria-disabled') === 'true') return;\n if (modal(trigger.getAttribute('data-wi-modal-target'), trigger)) event.preventDefault();\n});\n\ndocument.addEventListener('keydown', function (event) {\n var element = wiModalStack[wiModalStack.length - 1];\n if (!element || event.defaultPrevented) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n var close = element.querySelector('.wi-close-modal');\n if (close) close.click();\n else if (element.id) modal('#' + CSS.escape(element.id));\n } else if (event.key === 'Tab') {\n var fields = wiModalFocusable(element);\n var first = fields[0], last = fields[fields.length - 1];\n if (!fields.length) { event.preventDefault(); wiModalFocus(element); }\n else if (event.shiftKey && (document.activeElement === first || !element.contains(document.activeElement))) {\n event.preventDefault(); last.focus();\n } else if (!event.shiftKey && (document.activeElement === last || !element.contains(document.activeElement))) {\n event.preventDefault(); first.focus();\n }\n }\n});\n\nfunction setUpModals() {\n document.querySelectorAll('.wi-modal').forEach(function (element) {\n wiModalVisibility(element, element.classList.contains('wi-show'));\n });\n}\nif (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', setUpModals);\nelse setUpModals();\n\nfunction wiModalNode(tag, className, text) {\n var node = document.createElement(tag);\n if (className) node.className = className;\n if (text != null) node.textContent = text;\n return node;\n}\n\nfunction wiModalElement(id) {\n id = String(id == null ? '' : id).replace(/^#/, '');\n return id === '' ? null : document.getElementById(id);\n}\n\nvar wiConfirmCount = 0;\n\nfunction wiConfirmModal(options) {\n return new Promise(function (resolve) {\n\n var id = 'wi-confirm-' + (++wiConfirmCount);\n var root = wiModalNode('section', 'wi-modal no-interaction wi-confirm');\n root.id = id;\n root.setAttribute('role', 'alertdialog');\n root.setAttribute('aria-labelledby', id + '-title');\n root.setAttribute('aria-describedby', id + '-text');\n options.className.split(/\\s+/).filter(Boolean).forEach(function (name) { root.classList.add(name); });\n\n var backdrop = wiModalNode('div', 'bg wi-close-modal');\n var content = wiModalNode('div', 'content wi-modal-content c-w');\n\n var header = wiModalNode('div', 'wi-modal-header');\n var title = wiModalNode('h2', 'wi-modal-title', options.title);\n title.id = id + '-title';\n title.setAttribute('data-wi-modal-title', '');\n var close = wiModalNode('button', 'wi-modal-close wi-close-modal');\n close.type = 'button';\n close.setAttribute('aria-label', options.cancel);\n var icon = wiModalNode('i', 'bi bi-x-lg');\n icon.setAttribute('aria-hidden', 'true');\n close.append(icon);\n header.append(title, close);\n\n var body = wiModalNode('div', 'wi-modal-body no-scrollbar', options.text);\n body.id = id + '-text';\n body.style.whiteSpace = 'pre-line';\n\n var footer = wiModalNode('div', 'wi-modal-footer d-flex j-content-end gap-3');\n var cancel = wiModalNode('button', 'btn btn-' + (options.cancelVariant || 'dark-o') + ' wi-close-modal', options.cancel);\n cancel.type = 'button';\n var ok = wiModalNode('button', 'btn btn-' + options.variant, options.ok);\n ok.type = 'button';\n footer.append(cancel, ok);\n\n content.append(header, body, footer);\n root.append(backdrop, content);\n document.body.append(root);\n\n var done = false;\n function finish(confirmed) {\n if (done) return;\n done = true;\n modal('#' + id);\n setTimeout(function () { root.remove(); }, 600);\n resolve(confirmed);\n }\n\n // Set before modal(): setUpModal() keeps existing onclick handlers; Esc clicks the first .wi-close-modal.\n [backdrop, close, cancel].forEach(function (element) { element.onclick = function () { finish(false); }; });\n ok.onclick = function () { finish(true); };\n\n void root.offsetWidth;\n modal('#' + id, options.trigger || document.activeElement);\n (options.variant === 'danger' ? cancel : ok).focus({ preventScroll: true });\n\n });\n}\n\nwindow.wi = window.wi || {};\nwi.modal = wi.modal || {};\n\n/**\n * Opens a wi-modal by id (\"x\" or \"#x\"); options.title goes into its [data-wi-modal-title].\n * @returns {boolean} false when the modal is missing.\n */\nwi.modal.open = function (id, options) {\n var element = wiModalElement(id);\n if (!element) return false;\n if (options && options.title != null) {\n var title = element.querySelector('[data-wi-modal-title]');\n if (title) title.textContent = String(options.title);\n }\n if (!element.classList.contains('wi-show')) modal('#' + CSS.escape(element.id), document.activeElement);\n return true;\n};\n\n/** Closes a wi-modal by id (\"x\" or \"#x\"). */\nwi.modal.close = function (id) {\n var element = wiModalElement(id);\n if (!element) return false;\n if (element.classList.contains('wi-show')) modal('#' + CSS.escape(element.id));\n return true;\n};\n\nif (wi.confirm) wi.confirm.adapter = wiConfirmModal;\n"},225(e){e.exports="function setUpPage() {\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setInput();\n setDropdown();\n setVideoJS();\n setTooltip();\n \n window.dispatchEvent(new Event('loaded'));\n \n};"},4642(e){e.exports=function(e){function n(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):n("EvalError: No eval function available")}catch(e){n(e)}}},1120(e,n,t){t(4642)(t(6867))},2051(e,n,t){t(4642)(t(5068))},1809(e,n,t){t(4642)(t(7244))},7154(e,n,t){t(4642)(t(2787))},8865(e,n,t){t(4642)(t(7350))},1123(e,n,t){t(4642)(t(4428))},5329(e,n,t){t(4642)(t(8516))},871(e,n,t){t(4642)(t(148))},7186(e,n,t){t(4642)(t(225))}};const n={};function t(i){const o=n[i];if(void 0!==o)return o.exports;const a=n[i]={exports:{}};return e[i](a,a.exports,t),a.exports}t.n=e=>{const n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{"use strict";t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})()})();
2
2
  //# sourceMappingURL=body-end.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend/body-end.js","mappings":"qBAAAA,EAAAC,QAAA,w7CCAAD,EAAAC,QAAA,iPCAAD,EAAAC,QAAA,+zECAAD,EAAAC,QAAA,mpNCAAD,EAAAC,QAAA,koPCAAD,EAAAC,QAAA,wmKCAAD,EAAAC,QAAA,sbCAAD,EAAAC,QAAA,2kBCAAD,EAAAC,QAAA,6mBCIAD,EAAAC,QAAA,SAAAC,GACA,SAAAC,EAAAC,GACA,oBAAAC,UACAA,QAAAD,OAAAC,QAAAF,KAAA,kBAAAC,EACA,CAOA,IACA,oBAAAE,YAJA,oBAAAC,aAAA,oBAAAC,iBAKAF,WAAAJ,GACI,oBAAAO,KACJA,KAAAC,KAAA,KAAAR,GAEAC,EAAA,wCAEA,CAAG,MAAAC,GACHD,EAAAC,EACA,CACA,eC1BAO,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAiEA,EAAQ,mBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,mBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,QCCzE,MAAAC,EAAA,GAGA,SAAAD,EAAAE,GAEA,MAAAC,EAAAF,EAAAC,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAb,QAGA,MAAAD,EAAAY,EAAAC,GAAA,CAGAZ,QAAA,IAOA,OAHAe,EAAAH,GAAAb,EAAAA,EAAAC,QAAAU,GAGAX,EAAAC,OACA,CCrBAU,EAAAM,EAAAjB,IACA,MAAAkB,EAAAlB,GAAAA,EAAAmB,WACA,IAAAnB,EAAA,QACA,MAEA,OADAW,EAAAS,EAAAF,EAAA,CAAiCG,EAAAH,IACjCA,GCLAP,EAAAS,EAAA,CAAAnB,EAAAqB,KACA,QAAAC,KAAAD,EACAX,EAAAa,EAAAF,EAAAC,KAAAZ,EAAAa,EAAAvB,EAAAsB,IACAE,OAAAC,eAAAzB,EAAAsB,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCZ,EAAAa,EAAA,CAAAK,EAAAC,IAAAL,OAAAM,UAAAC,eAAAtB,KAAAmB,EAAAC","sources":["webpack://wonder-image/./src/build/frontend/js/alert.js","webpack://wonder-image/./src/build/frontend/js/aos.js","webpack://wonder-image/./src/build/frontend/js/dropdown.js","webpack://wonder-image/./src/build/frontend/js/form/place.js","webpack://wonder-image/./src/build/frontend/js/form/select.js","webpack://wonder-image/./src/build/frontend/js/form/send.js","webpack://wonder-image/./src/build/frontend/js/header.js","webpack://wonder-image/./src/build/frontend/js/modal.js","webpack://wonder-image/./src/build/frontend/js/pageSetUp.js","webpack://wonder-image/./node_modules/script-loader/addScript.js","webpack://wonder-image/./src/build/frontend/js/alert.js?37ef","webpack://wonder-image/./src/build/frontend/js/aos.js?68ca","webpack://wonder-image/./src/build/frontend/js/dropdown.js?51db","webpack://wonder-image/./src/build/frontend/js/form/place.js?6f16","webpack://wonder-image/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder-image/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder-image/./src/build/frontend/js/header.js?c891","webpack://wonder-image/./src/build/frontend/js/modal.js?9265","webpack://wonder-image/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder-image/webpack/bootstrap","webpack://wonder-image/webpack/runtime/compat get default export","webpack://wonder-image/webpack/runtime/define property getters","webpack://wonder-image/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n } else {\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n API_CLIENT_APP.post(\\\"/frontend/alert/\\\", { code: alert })\\n .then(data => {\\n\\n container.innerHTML += data.response;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n })\\n .catch(error => console.error(error));\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n textListValue(input, country);\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n\\n if (typeof event.target !== \\\"undefined\\\") {\\n var inputCountry = event.target;\\n } else {\\n var inputCountry = event;\\n }\\n \\n var form = inputCountry.form;\\n var inputCountryName = inputCountry.dataset.wiName.replace('-text', '');\\n var inputStateName = inputCountry.dataset.wiInputState;\\n\\n var inputState = form.querySelector('input[data-wi-name=\\\"'+inputStateName+'-text\\\"]');\\n\\n inputState.disabled = true;\\n inputState.value = \\\"\\\";\\n\\n delay(100).then(() => {\\n\\n if (form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked') != null) {\\n\\n var country = form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked').value;\\n \\n if (inputState.dataset.wiListStates != country) {\\n \\n inputState.dataset.wiListStates = country;\\n\\n loadingSpinner(true);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/states.php',\\n data: { \\n post: 'true',\\n country: country\\n }, \\n success: function (data) {\\n\\n const response = JSON.parse(data);\\n\\n textListOptions( inputState, response );\\n\\n inputState.disabled = false;\\n\\n if (stateValue != null && stateValue != \\\"\\\") { textListValue(inputState, stateValue); }\\n\\n loadingSpinner(false);\\n\\n },\\n error: function (XMLHttpRequest) {\\n\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner(false);\\n\\n }\\n });\\n\\n } else {\\n\\n inputState.disabled = false;\\n \\n }\\n\\n }\\n\\n });\\n\\n}\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\n\\n// Le liste dei select sono position:absolute dentro .wi-input-container: un\\n// antenato con overflow:hidden le ritaglierebbe. All'apertura la lista passa a\\n// position:fixed con coordinate calcolate dal box selezionato, cosi' esce da\\n// qualsiasi overflow:hidden mantenendolo sul form. Il Popover API porta la lista\\n// nel top layer senza cambiarne il parent DOM, evitando clipping e containing\\n// block creati da transform. Il calcolo dell'origine resta come fallback.\\nfunction positionSelectList(container) {\\n\\n if (!container) { return; }\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n var list = container.querySelector(\\\".select-items\\\");\\n\\n if (!selected || !list) { return; }\\n\\n var rect = selected.getBoundingClientRect();\\n var borderBottom = Number.parseFloat(getComputedStyle(selected).borderBottomWidth) || 0;\\n var listTop = rect.bottom - borderBottom;\\n var transition = list.style.transition;\\n var supportsPopover = typeof list.showPopover === \\\"function\\\";\\n\\n list.style.transition = \\\"none\\\";\\n list.style.position = \\\"fixed\\\";\\n list.style.boxSizing = \\\"border-box\\\";\\n list.style.width = rect.width + \\\"px\\\";\\n list.style.zIndex = \\\"1000\\\";\\n\\n if (supportsPopover) {\\n list.style.inset = \\\"auto\\\";\\n list.style.margin = \\\"0\\\";\\n list.style.padding = \\\"0\\\";\\n list.style.top = listTop + \\\"px\\\";\\n list.style.left = rect.left + \\\"px\\\";\\n\\n if (!list.matches(\\\":popover-open\\\")) { list.showPopover(); }\\n\\n list.getBoundingClientRect();\\n list.style.transition = transition;\\n return;\\n }\\n\\n list.style.top = \\\"0px\\\";\\n list.style.left = \\\"0px\\\";\\n\\n var origin = list.getBoundingClientRect();\\n\\n list.style.top = (listTop - origin.top) + \\\"px\\\";\\n list.style.left = (rect.left - origin.left) + \\\"px\\\";\\n\\n // Applica le coordinate senza animarle dall'origin temporanea.\\n list.getBoundingClientRect();\\n list.style.transition = transition;\\n\\n}\\n\\nfunction clearSelectListPosition(container) {\\n\\n if (!container) { return; }\\n\\n var list = container.querySelector(\\\".select-items\\\");\\n\\n if (!list) { return; }\\n\\n if (typeof list.hidePopover === \\\"function\\\" && list.matches(\\\":popover-open\\\")) {\\n list.hidePopover();\\n }\\n\\n list.style.position = \\\"\\\";\\n list.style.boxSizing = \\\"\\\";\\n list.style.inset = \\\"\\\";\\n list.style.margin = \\\"\\\";\\n list.style.padding = \\\"\\\";\\n list.style.top = \\\"\\\";\\n list.style.left = \\\"\\\";\\n list.style.width = \\\"\\\";\\n list.style.zIndex = \\\"\\\";\\n\\n}\\n\\nfunction repositionActiveSelect() {\\n\\n document.querySelectorAll(\\\".wi-input-container.wi-list-active\\\").forEach(positionSelectList);\\n\\n}\\n\\n// Un solo observer segue l'apertura/chiusura (classe wi-list-active) di ogni\\n// container, indipendentemente da come viene attivata la lista.\\nvar wiSelectObserver = new MutationObserver(function(mutations) {\\n\\n mutations.forEach(function(mutation) {\\n\\n var el = mutation.target;\\n\\n if (!el.classList || !el.classList.contains(\\\"wi-input-container\\\")) { return; }\\n\\n if (el.classList.contains(\\\"wi-list-active\\\")) {\\n positionSelectList(el);\\n } else {\\n clearSelectListPosition(el);\\n }\\n\\n });\\n\\n});\\n\\nwindow.addEventListener(\\\"scroll\\\", repositionActiveSelect, true);\\nwindow.addEventListener(\\\"resize\\\", repositionActiveSelect);\\n\\nif (window.visualViewport) {\\n window.visualViewport.addEventListener(\\\"scroll\\\", repositionActiveSelect);\\n window.visualViewport.addEventListener(\\\"resize\\\", repositionActiveSelect);\\n}\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n\\n selElmnt = x[i].getElementsByTagName(\\\"select\\\")[0];\\n ll = selElmnt.length;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"DIV\\\");\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.innerHTML = selElmnt.selectedIndex >= 0\\n ? selElmnt.options[selElmnt.selectedIndex].innerHTML\\n : \\\"\\\";\\n x[i].appendChild(a);\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n b.setAttribute(\\\"popover\\\", \\\"manual\\\");\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = selElmnt.options[j].value;\\n c.dataset.wiOptionIndex = j;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.innerHTML = selElmnt.options[j].innerHTML;\\n\\n // Se è impostato un valore di default selezionalo\\n if (j === selElmnt.selectedIndex) { c.classList.add(\\\"same-as-selected\\\"); }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, s, h, container, optionIndex, previousIndex;\\n container = this.closest(\\\"[data-wi-select='true']\\\");\\n s = container ? container.querySelector(\\\"select\\\") : null;\\n h = container ? container.querySelector(\\\".select-selected\\\") : null;\\n\\n if (!s || !h) { return; }\\n\\n previousIndex = s.selectedIndex;\\n optionIndex = parseInt(this.dataset.wiOptionIndex, 10);\\n\\n if (!Number.isNaN(optionIndex) && s.options[optionIndex]) {\\n s.selectedIndex = optionIndex;\\n h.innerHTML = s.options[optionIndex].innerHTML;\\n y = this.parentNode.querySelectorAll(\\\".same-as-selected\\\");\\n y.forEach(function(option) { option.classList.remove(\\\"same-as-selected\\\"); });\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n }\\n\\n closeSelect(container);\\n\\n if (s.selectedIndex !== previousIndex) {\\n s.dispatchEvent(new Event(\\\"input\\\", { bubbles: true }));\\n s.dispatchEvent(new Event(\\\"change\\\", { bubbles: true }));\\n }\\n\\n });\\n\\n b.appendChild(c);\\n\\n }\\n\\n x[i].appendChild(b);\\n\\n // Segue i cambi di stato del container per riposizionare la lista aperta.\\n wiSelectObserver.observe(x[i], { attributes: true, attributeFilter: [\\\"class\\\"] });\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n\\n if (this.parentNode.classList.contains(\\\"wi-list-active\\\")) {\\n closeSelect(this.parentNode);\\n } else {\\n openSelect(this.parentNode);\\n }\\n\\n check();\\n\\n });\\n\\n}\\n\\nfunction openSelect(container) {\\n\\n closeAllSelect();\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n\\n container.classList.add(\\\"wi-list-active\\\");\\n if (selected) { selected.classList.add(\\\"select-arrow-active\\\"); }\\n\\n}\\n\\nfunction closeSelect(container) {\\n\\n if (!container) { return; }\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n\\n container.classList.remove(\\\"wi-list-active\\\");\\n if (selected) { selected.classList.remove(\\\"select-arrow-active\\\"); }\\n\\n}\\n\\nfunction closeAllSelect() {\\n\\n // Close every open custom select.\\n document.querySelectorAll(\\\"[data-wi-select='true'].wi-list-active\\\").forEach(closeSelect);\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\\n\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n \\nasync function formSubmit(form, endpoint = '/frontend/form/', callback = loadingResponse ) {\\n\\n loadingSpinner();\\n\\n var data = new FormData(form);\\n let response;\\n\\n try {\\n\\n response = await API_CLIENT.post(endpoint, data);\\n\\n } catch (error) {\\n console.error(error);\\n response = error;\\n }\\n\\n if (typeof callback === 'function') {\\n callback(response);\\n } else {\\n loadingSpinner();\\n }\\n\\n}\\n\\nfunction loadingResponse(data) {\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n\\n var icon = `<i class=\\\"bi bi-check2-circle tx-success\\\"></i>`;\\n var action = `location.reload();`;\\n var text = data.response;\\n var buttonLabel = 'back_site';\\n\\n if (!data.success) {\\n\\n icon = `<i class=\\\"bi bi-x-circle tx-danger\\\"></i>`;\\n action = `loadingSpinner();`;\\n\\n buttonLabel = 'retry';\\n\\n }\\n\\n buttonLabel = __t('components.buttons.'+buttonLabel)\\n\\n container.innerHTML = `\\n <div class=\\\"title-big a-c\\\">\\n ${icon}\\n </div>\\n <div class=\\\"subtitle mt-8 a-c\\\"> ${text} </div>\\n <div class=\\\"c-w mt-10\\\">\\n <a onclick=\\\"${action}\\\" class=\\\"btn btn-primary c-w\\\"> ${buttonLabel} </a>\\n </div>\\n `;\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"function modal(selector) {\\n\\n setUpModal(selector);\\n\\n var modal = document.querySelector(selector);\\n\\n modal.classList.toggle('wi-show');\\n modal.classList.toggle('no-interaction');\\n\\n if (modal.classList.contains('wi-show')) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\\n\\nfunction setUpModal(selector) {\\n \\n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\\n if (element.onclick == null) {\\n element.onclick = function() { modal(selector) };\\n }\\n });\\n\\n}\"","module.exports = \"function setUpPage() {\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setInput();\\n setDropdown();\\n setVideoJS();\\n setTooltip();\\n \\n window.dispatchEvent(new Event('loaded'));\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./alert.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./aos.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./dropdown.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./place.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./select.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./send.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./header.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./modal.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./pageSetUp.js\"))","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tconst getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_require__","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty"],"sourceRoot":""}
1
+ {"version":3,"file":"frontend/body-end.js","mappings":"qBAAAA,EAAAC,QAAA,w7CCAAD,EAAAC,QAAA,iPCAAD,EAAAC,QAAA,+zECAAD,EAAAC,QAAA,ovQCAAD,EAAAC,QAAA,4lhBCAAD,EAAAC,QAAA,wmKCAAD,EAAAC,QAAA,sbCAAD,EAAAC,QAAA,s1RCAAD,EAAAC,QAAA,6mBCIAD,EAAAC,QAAA,SAAAC,GACA,SAAAC,EAAAC,GACA,oBAAAC,UACAA,QAAAD,OAAAC,QAAAF,KAAA,kBAAAC,EACA,CAOA,IACA,oBAAAE,YAJA,oBAAAC,aAAA,oBAAAC,iBAKAF,WAAAJ,GACI,oBAAAO,KACJA,KAAAC,KAAA,KAAAR,GAEAC,EAAA,wCAEA,CAAG,MAAAC,GACHD,EAAAC,EACA,CACA,eC1BAO,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,oBCAzEA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAoEA,EAAQ,oBCA5EA,EAAQ,KAARA,CAAiEA,EAAQ,mBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,mBCAzEA,EAAQ,KAARA,CAAiEA,EAAQ,QCCzE,MAAAC,EAAA,GAGA,SAAAD,EAAAE,GAEA,MAAAC,EAAAF,EAAAC,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAb,QAGA,MAAAD,EAAAY,EAAAC,GAAA,CAGAZ,QAAA,IAOA,OAHAe,EAAAH,GAAAb,EAAAA,EAAAC,QAAAU,GAGAX,EAAAC,OACA,CCrBAU,EAAAM,EAAAjB,IACA,MAAAkB,EAAAlB,GAAAA,EAAAmB,WACA,IAAAnB,EAAA,QACA,MAEA,OADAW,EAAAS,EAAAF,EAAA,CAAiCG,EAAAH,IACjCA,GCLAP,EAAAS,EAAA,CAAAnB,EAAAqB,KACA,QAAAC,KAAAD,EACAX,EAAAa,EAAAF,EAAAC,KAAAZ,EAAAa,EAAAvB,EAAAsB,IACAE,OAAAC,eAAAzB,EAAAsB,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCZ,EAAAa,EAAA,CAAAK,EAAAC,IAAAL,OAAAM,UAAAC,eAAAtB,KAAAmB,EAAAC","sources":["webpack://wonder-image/./src/build/frontend/js/alert.js","webpack://wonder-image/./src/build/frontend/js/aos.js","webpack://wonder-image/./src/build/frontend/js/dropdown.js","webpack://wonder-image/./src/build/frontend/js/form/place.js","webpack://wonder-image/./src/build/frontend/js/form/select.js","webpack://wonder-image/./src/build/frontend/js/form/send.js","webpack://wonder-image/./src/build/frontend/js/header.js","webpack://wonder-image/./src/build/frontend/js/modal.js","webpack://wonder-image/./src/build/frontend/js/pageSetUp.js","webpack://wonder-image/./node_modules/script-loader/addScript.js","webpack://wonder-image/./src/build/frontend/js/alert.js?37ef","webpack://wonder-image/./src/build/frontend/js/aos.js?68ca","webpack://wonder-image/./src/build/frontend/js/dropdown.js?51db","webpack://wonder-image/./src/build/frontend/js/form/place.js?6f16","webpack://wonder-image/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder-image/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder-image/./src/build/frontend/js/header.js?c891","webpack://wonder-image/./src/build/frontend/js/modal.js?9265","webpack://wonder-image/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder-image/webpack/bootstrap","webpack://wonder-image/webpack/runtime/compat get default export","webpack://wonder-image/webpack/runtime/define property getters","webpack://wonder-image/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n } else {\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n API_CLIENT_APP.post(\\\"/frontend/alert/\\\", { code: alert })\\n .then(data => {\\n\\n container.innerHTML += data.response;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n })\\n .catch(error => console.error(error));\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n if (element.wiCountryBound) { return; }\\n element.wiCountryBound = true;\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n if (input.tagName === \\\"SELECT\\\") {\\n input.value = country;\\n input.dispatchEvent(new Event(\\\"change\\\", { bubbles: true }));\\n } else {\\n textListValue(input, country);\\n }\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n var inputCountry = event.target || event;\\n var form = inputCountry.form;\\n if (!form) { return; }\\n var nativeCountry = inputCountry.tagName === \\\"SELECT\\\";\\n var countryName = nativeCountry ? inputCountry.name : String(inputCountry.dataset.wiName || \\\"\\\").replace(/-text$/, \\\"\\\");\\n var stateName = inputCountry.dataset.wiInputState;\\n var inputState = Array.from(form.querySelectorAll(\\\"select, input[data-wi-name]\\\")).find(function(control) {\\n return control.tagName === \\\"SELECT\\\" ? control.name === stateName : control.dataset.wiName === stateName + \\\"-text\\\";\\n });\\n if (!inputState) { return; }\\n var checked = Array.from(form.querySelectorAll(\\\"input:checked\\\")).find(function(control) { return control.name === countryName; });\\n var country = nativeCountry ? inputCountry.value : (checked ? checked.value : \\\"\\\");\\n var nativeState = inputState.tagName === \\\"SELECT\\\";\\n function replaceStates(options, value) {\\n if (nativeState) {\\n inputState.replaceChildren(new Option(\\\"\\\", \\\"\\\"));\\n Object.entries(options).forEach(function(entry) { inputState.add(new Option(entry[1], entry[0])); });\\n inputState.value = value || \\\"\\\";\\n if (inputState.selectedIndex < 0) { inputState.value = \\\"\\\"; }\\n var container = inputState.closest(\\\"[data-wi-select='true']\\\");\\n if (container && typeof setSelect === \\\"function\\\") { setSelect(container); }\\n inputState.dispatchEvent(new Event(\\\"change\\\", { bubbles: true }));\\n } else {\\n textListOptions(inputState, options);\\n textListValue(inputState, value || \\\"\\\");\\n }\\n }\\n if (inputState.dataset.wiListStates === country && !inputState.wiStatesFailed) {\\n if (stateValue !== null && !inputState.disabled) {\\n if (nativeState) { inputState.value = stateValue; inputState.dispatchEvent(new Event(\\\"change\\\", { bubbles: true })); }\\n else { textListValue(inputState, stateValue); }\\n } else if (stateValue !== null) { inputState.wiPendingStateValue = stateValue; }\\n return;\\n }\\n inputState.dataset.wiListStates = country;\\n inputState.wiStatesFailed = false;\\n inputState.wiPendingStateValue = stateValue;\\n var sequence = (inputState.wiStatesSequence || 0) + 1;\\n inputState.wiStatesSequence = sequence;\\n replaceStates({}, \\\"\\\");\\n inputState.disabled = country !== \\\"\\\";\\n if (!country) { return; }\\n var url = inputCountry.dataset.wiStatesUrl || (typeof pathApi !== \\\"undefined\\\" ? pathApi.replace(/\\\\/$/, \\\"\\\") + \\\"/states/\\\" : pathApp + \\\"/api/states.php\\\");\\n $.ajax({\\n type: \\\"POST\\\", url: url, dataType: \\\"json\\\", data: { post: \\\"true\\\", country: country },\\n success: function(data) {\\n if (inputState.wiStatesSequence !== sequence) { return; }\\n replaceStates(typeof data === \\\"string\\\" ? JSON.parse(data) : data, inputState.wiPendingStateValue);\\n inputState.disabled = false;\\n if (typeof check === \\\"function\\\") { check(); }\\n },\\n error: function(request) {\\n if (inputState.wiStatesSequence !== sequence) { return; }\\n inputState.wiStatesFailed = true;\\n inputState.disabled = false;\\n ajaxRequestError(request);\\n }\\n });\\n}\\n\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\nvar wiSelectId = 0;\\n\\n// Le liste dei select sono position:absolute dentro .wi-input-container: un\\n// antenato con overflow:hidden le ritaglierebbe. All'apertura la lista passa a\\n// position:fixed con coordinate calcolate dal box selezionato, cosi' esce da\\n// qualsiasi overflow:hidden mantenendolo sul form. Il Popover API porta la lista\\n// nel top layer senza cambiarne il parent DOM, evitando clipping e containing\\n// block creati da transform. Il calcolo dell'origine resta come fallback.\\nfunction positionSelectList(container) {\\n\\n if (!container) { return; }\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n var list = container.querySelector(\\\".select-items\\\");\\n\\n if (!selected || !list) { return; }\\n\\n var rect = selected.getBoundingClientRect();\\n var borderBottom = Number.parseFloat(getComputedStyle(selected).borderBottomWidth) || 0;\\n var listTop = rect.bottom - borderBottom;\\n var transition = list.style.transition;\\n var supportsPopover = typeof list.showPopover === \\\"function\\\";\\n\\n list.style.transition = \\\"none\\\";\\n list.style.position = \\\"fixed\\\";\\n list.style.boxSizing = \\\"border-box\\\";\\n list.style.width = rect.width + \\\"px\\\";\\n list.style.zIndex = \\\"1000\\\";\\n\\n if (supportsPopover) {\\n list.style.inset = \\\"auto\\\";\\n list.style.margin = \\\"0\\\";\\n list.style.padding = \\\"0\\\";\\n list.style.top = listTop + \\\"px\\\";\\n list.style.left = rect.left + \\\"px\\\";\\n\\n if (!list.matches(\\\":popover-open\\\")) { list.showPopover(); }\\n\\n list.getBoundingClientRect();\\n list.style.transition = transition;\\n return;\\n }\\n\\n list.style.top = \\\"0px\\\";\\n list.style.left = \\\"0px\\\";\\n\\n var origin = list.getBoundingClientRect();\\n\\n list.style.top = (listTop - origin.top) + \\\"px\\\";\\n list.style.left = (rect.left - origin.left) + \\\"px\\\";\\n\\n // Applica le coordinate senza animarle dall'origin temporanea.\\n list.getBoundingClientRect();\\n list.style.transition = transition;\\n\\n}\\n\\nfunction clearSelectListPosition(container) {\\n\\n if (!container) { return; }\\n\\n var list = container.querySelector(\\\".select-items\\\");\\n\\n if (!list) { return; }\\n\\n if (typeof list.hidePopover === \\\"function\\\" && list.matches(\\\":popover-open\\\")) {\\n list.hidePopover();\\n }\\n\\n list.style.position = \\\"\\\";\\n list.style.boxSizing = \\\"\\\";\\n list.style.inset = \\\"\\\";\\n list.style.margin = \\\"\\\";\\n list.style.padding = \\\"\\\";\\n list.style.top = \\\"\\\";\\n list.style.left = \\\"\\\";\\n list.style.width = \\\"\\\";\\n list.style.zIndex = \\\"\\\";\\n\\n}\\n\\nfunction repositionActiveSelect() {\\n\\n document.querySelectorAll(\\\".wi-input-container.wi-list-active\\\").forEach(positionSelectList);\\n\\n}\\n\\n// Un solo observer segue l'apertura/chiusura (classe wi-list-active) di ogni\\n// container, indipendentemente da come viene attivata la lista.\\nvar wiSelectObserver = new MutationObserver(function(mutations) {\\n\\n mutations.forEach(function(mutation) {\\n\\n var el = mutation.target;\\n\\n if (!el.classList || !el.classList.contains(\\\"wi-input-container\\\")) { return; }\\n\\n if (el.classList.contains(\\\"wi-list-active\\\")) {\\n positionSelectList(el);\\n } else {\\n clearSelectListPosition(el);\\n }\\n\\n });\\n\\n});\\n\\nwindow.addEventListener(\\\"scroll\\\", repositionActiveSelect, true);\\nwindow.addEventListener(\\\"resize\\\", repositionActiveSelect);\\n\\nif (window.visualViewport) {\\n window.visualViewport.addEventListener(\\\"scroll\\\", repositionActiveSelect);\\n window.visualViewport.addEventListener(\\\"resize\\\", repositionActiveSelect);\\n}\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n setSelect(x[i]);\\n}\\n\\nfunction setSelect(container) {\\n var selElmnt = container.querySelector(\\\"select\\\");\\n if (!selElmnt) { return; }\\n closeSelect(container);\\n container.querySelectorAll(\\\".select-selected, .select-items\\\").forEach(function(node) { node.remove(); });\\n var ll = selElmnt.length;\\n var a, b, c, j;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"BUTTON\\\");\\n a.type = \\\"button\\\";\\n a.id = (selElmnt.id || 'wi-select-' + (++wiSelectId)) + '-control';\\n a.setAttribute('aria-haspopup', 'listbox');\\n a.setAttribute('aria-expanded', 'false');\\n a.disabled = selElmnt.disabled;\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.textContent = selElmnt.selectedIndex >= 0\\n ? selElmnt.options[selElmnt.selectedIndex].textContent\\n : \\\"\\\";\\n container.appendChild(a);\\n selElmnt.classList.add('d-none');\\n var label = container.querySelector('label');\\n if (label) {\\n label.htmlFor = a.id;\\n if (!label.id) label.id = a.id + '-label';\\n a.setAttribute('aria-labelledby', label.id);\\n }\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n b.setAttribute(\\\"popover\\\", \\\"manual\\\");\\n b.id = a.id + '-list';\\n a.setAttribute('aria-controls', b.id);\\n var optionsList = document.createElement('DIV');\\n optionsList.id = b.id + '-options';\\n optionsList.setAttribute('role', 'listbox');\\n if (label) optionsList.setAttribute('aria-labelledby', label.id);\\n var search = null;\\n if (selElmnt.dataset.wiSelectSearch === 'true') {\\n search = document.createElement('INPUT');\\n search.type = 'text';\\n search.setAttribute('enterkeyhint', 'search');\\n search.className = 'wi-input';\\n search.autocomplete = 'off';\\n search.setAttribute('role', 'combobox');\\n search.setAttribute('aria-autocomplete', 'list');\\n search.setAttribute('aria-expanded', 'false');\\n search.setAttribute('aria-controls', optionsList.id);\\n if (label) search.setAttribute('aria-labelledby', label.id);\\n else search.setAttribute('aria-label', selElmnt.getAttribute('aria-label') || selElmnt.name);\\n search.addEventListener('click', function(event) { event.stopPropagation(); });\\n search.addEventListener('input', function() {\\n clear.hidden = this.value === '';\\n var query = wiSelectNormalize(this.value);\\n optionsList.querySelectorAll('[role=\\\"option\\\"]').forEach(function(option) {\\n option.hidden = !wiSelectNormalize(option.textContent).includes(query);\\n });\\n wiSelectActivate(container, wiSelectOptions(container)[0]);\\n });\\n var searchBar = document.createElement('DIV');\\n searchBar.setAttribute('data-wi-select-search-bar', 'true');\\n var clear = document.createElement('BUTTON');\\n clear.type = 'button';\\n clear.hidden = true;\\n clear.setAttribute('data-wi-select-clear', 'true');\\n clear.setAttribute('aria-label', selElmnt.dataset.wiSelectClearLabel || (typeof __t === 'function' ? __t('components.forms.clear_search') : 'Clear search'));\\n var clearIcon = document.createElement('I');\\n clearIcon.className = 'bi bi-x-lg';\\n clearIcon.setAttribute('aria-hidden', 'true');\\n clear.appendChild(clearIcon);\\n clear.addEventListener('click', function(event) {\\n event.stopPropagation();\\n search.value = '';\\n search.dispatchEvent(new Event('input', { bubbles: true }));\\n search.focus({ preventScroll: true });\\n });\\n clear.addEventListener('keydown', function(event) {\\n if (event.key === 'Escape' || event.key === 'Tab') wiSelectKeydown(event, container);\\n });\\n searchBar.append(search, clear);\\n b.appendChild(searchBar);\\n }\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = b.id + '-option-' + j;\\n c.dataset.wiOptionIndex = j;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.setAttribute('role', 'option');\\n c.setAttribute('aria-selected', j === selElmnt.selectedIndex ? 'true' : 'false');\\n c.setAttribute('aria-disabled', selElmnt.options[j].disabled ? 'true' : 'false');\\n c.textContent = selElmnt.options[j].textContent;\\n\\n // Se è impostato un valore di default selezionalo\\n if (j === selElmnt.selectedIndex) { c.classList.add(\\\"same-as-selected\\\"); }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, s, h, container, optionIndex, previousIndex;\\n container = this.closest(\\\"[data-wi-select='true']\\\");\\n s = container ? container.querySelector(\\\"select\\\") : null;\\n h = container ? container.querySelector(\\\".select-selected\\\") : null;\\n\\n if (!s || !h || s.disabled || this.getAttribute('aria-disabled') === 'true') { return; }\\n\\n previousIndex = s.selectedIndex;\\n optionIndex = parseInt(this.dataset.wiOptionIndex, 10);\\n\\n if (!Number.isNaN(optionIndex) && s.options[optionIndex]) {\\n s.selectedIndex = optionIndex;\\n h.textContent = s.options[optionIndex].textContent;\\n y = this.parentNode.querySelectorAll(\\\".same-as-selected\\\");\\n y.forEach(function(option) { option.classList.remove(\\\"same-as-selected\\\"); });\\n this.parentNode.querySelectorAll('[role=\\\"option\\\"]').forEach(function(option) { option.setAttribute('aria-selected', 'false'); });\\n this.setAttribute('aria-selected', 'true');\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n }\\n\\n closeSelect(container);\\n h.focus({ preventScroll: true });\\n\\n if (s.selectedIndex !== previousIndex) {\\n s.dispatchEvent(new Event(\\\"input\\\", { bubbles: true }));\\n s.dispatchEvent(new Event(\\\"change\\\", { bubbles: true }));\\n }\\n\\n });\\n\\n optionsList.appendChild(c);\\n\\n }\\n\\n b.appendChild(optionsList);\\n b.addEventListener('click', function(event) { event.stopPropagation(); });\\n container.appendChild(b);\\n a.addEventListener('keydown', function(event) { wiSelectKeydown(event, container); });\\n if (search) search.addEventListener('keydown', function(event) { wiSelectKeydown(event, container); });\\n\\n // Segue i cambi di stato del container per riposizionare la lista aperta.\\n wiSelectObserver.observe(container, { attributes: true, attributeFilter: [\\\"class\\\"] });\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n if (selElmnt.disabled) { return; }\\n\\n if (this.parentNode.classList.contains(\\\"wi-list-active\\\")) {\\n closeSelect(this.parentNode);\\n } else {\\n openSelect(this.parentNode);\\n }\\n\\n if (typeof check === 'function') check();\\n\\n });\\n\\n if (!selElmnt.wiSelectChangeBound) {\\n selElmnt.wiSelectChangeBound = true;\\n new MutationObserver(function() {\\n var control = container.querySelector('.select-selected');\\n if (control) control.disabled = selElmnt.disabled;\\n if (selElmnt.disabled) closeSelect(container);\\n }).observe(selElmnt, { attributes: true, attributeFilter: ['disabled'] });\\n selElmnt.addEventListener(\\\"change\\\", function() {\\n var selected = container.querySelector(\\\".select-selected\\\");\\n if (selected) { selected.textContent = selElmnt.selectedIndex >= 0 ? selElmnt.options[selElmnt.selectedIndex].textContent : \\\"\\\"; }\\n container.querySelectorAll('[role=\\\"option\\\"]').forEach(function(option) {\\n var active = Number(option.dataset.wiOptionIndex) === selElmnt.selectedIndex;\\n option.setAttribute('aria-selected', active ? 'true' : 'false');\\n option.classList.toggle('same-as-selected', active);\\n });\\n });\\n }\\n\\n}\\n\\nfunction openSelect(container) {\\n\\n var nativeSelect = container.querySelector('select');\\n if (!nativeSelect || nativeSelect.disabled) return;\\n\\n closeAllSelect();\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n\\n container.classList.add(\\\"wi-list-active\\\");\\n if (selected) { selected.classList.add(\\\"select-arrow-active\\\"); selected.setAttribute('aria-expanded', 'true'); }\\n var search = container.querySelector('.select-items input[role=\\\"combobox\\\"]');\\n container.querySelectorAll('[role=\\\"option\\\"]').forEach(function(option) { option.hidden = false; });\\n positionSelectList(container);\\n if (search) {\\n search.value = '';\\n container.querySelector('[data-wi-select-clear]').hidden = true;\\n search.setAttribute('aria-expanded', 'true'); search.focus({ preventScroll: true });\\n }\\n wiSelectActivate(container, container.querySelector('[role=\\\"option\\\"][aria-selected=\\\"true\\\"]') || wiSelectOptions(container)[0]);\\n\\n}\\n\\nfunction closeSelect(container) {\\n\\n if (!container) { return; }\\n\\n var selected = container.querySelector(\\\".select-selected\\\");\\n\\n container.classList.remove(\\\"wi-list-active\\\");\\n if (selected) { selected.classList.remove(\\\"select-arrow-active\\\"); selected.setAttribute('aria-expanded', 'false'); selected.removeAttribute('aria-activedescendant'); }\\n var search = container.querySelector('.select-items input[role=\\\"combobox\\\"]');\\n if (search) { search.setAttribute('aria-expanded', 'false'); search.removeAttribute('aria-activedescendant'); }\\n clearSelectListPosition(container);\\n\\n}\\n\\nfunction closeAllSelect() {\\n\\n // Close every open custom select.\\n document.querySelectorAll(\\\"[data-wi-select='true'].wi-list-active\\\").forEach(closeSelect);\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\\ndocument.addEventListener('focusin', function(event) {\\n document.querySelectorAll(\\\"[data-wi-select='true'].wi-list-active\\\").forEach(function(container) {\\n if (!container.contains(event.target)) closeSelect(container);\\n });\\n});\\n\\nfunction wiSelectNormalize(value) {\\n return value.normalize('NFD').replace(/[\\\\u0300-\\\\u036f]/g, '').toLocaleLowerCase().trim();\\n}\\nfunction wiSelectOptions(container) {\\n return Array.from(container.querySelectorAll('[role=\\\"option\\\"]')).filter(function(option) {\\n return !option.hidden && option.getAttribute('aria-disabled') !== 'true';\\n });\\n}\\nfunction wiSelectActivate(container, active) {\\n container.querySelectorAll('[role=\\\"option\\\"]').forEach(function(option) { option.dataset.wiActive = option === active ? 'true' : 'false'; });\\n var target = container.querySelector('.select-items input[role=\\\"combobox\\\"]') || container.querySelector('.select-selected');\\n if (active) {\\n target.setAttribute('aria-activedescendant', active.id);\\n active.scrollIntoView({ block: 'nearest' });\\n } else target.removeAttribute('aria-activedescendant');\\n}\\nfunction wiSelectKeydown(event, container) {\\n if (container.querySelector('select').disabled) return;\\n var open = container.classList.contains('wi-list-active');\\n if (event.key === 'Tab') { closeSelect(container); return; }\\n if (event.key === 'Escape' && open) {\\n event.preventDefault(); event.stopPropagation(); closeSelect(container);\\n container.querySelector('.select-selected').focus({ preventScroll: true }); return;\\n }\\n var search = event.target.matches('.select-items input[role=\\\"combobox\\\"]');\\n if (!['ArrowDown', 'ArrowUp', 'Enter', ' ', 'Home', 'End'].includes(event.key) || (search && [' ', 'Home', 'End'].includes(event.key))) return;\\n event.preventDefault();\\n if (!open) { openSelect(container); return; }\\n var options = wiSelectOptions(container);\\n var index = options.findIndex(function(option) { return option.dataset.wiActive === 'true'; });\\n if (event.key === 'Enter' || event.key === ' ') { if (options[index]) options[index].click(); return; }\\n if (event.key === 'Home') index = 0;\\n else if (event.key === 'End') index = options.length - 1;\\n else index = Math.max(0, Math.min(options.length - 1, index + (event.key === 'ArrowDown' ? 1 : -1)));\\n wiSelectActivate(container, options[index]);\\n}\\n\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n \\nasync function formSubmit(form, endpoint = '/frontend/form/', callback = loadingResponse ) {\\n\\n loadingSpinner();\\n\\n var data = new FormData(form);\\n let response;\\n\\n try {\\n\\n response = await API_CLIENT.post(endpoint, data);\\n\\n } catch (error) {\\n console.error(error);\\n response = error;\\n }\\n\\n if (typeof callback === 'function') {\\n callback(response);\\n } else {\\n loadingSpinner();\\n }\\n\\n}\\n\\nfunction loadingResponse(data) {\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n\\n var icon = `<i class=\\\"bi bi-check2-circle tx-success\\\"></i>`;\\n var action = `location.reload();`;\\n var text = data.response;\\n var buttonLabel = 'back_site';\\n\\n if (!data.success) {\\n\\n icon = `<i class=\\\"bi bi-x-circle tx-danger\\\"></i>`;\\n action = `loadingSpinner();`;\\n\\n buttonLabel = 'retry';\\n\\n }\\n\\n buttonLabel = __t('components.buttons.'+buttonLabel)\\n\\n container.innerHTML = `\\n <div class=\\\"title-big a-c\\\">\\n ${icon}\\n </div>\\n <div class=\\\"subtitle mt-8 a-c\\\"> ${text} </div>\\n <div class=\\\"c-w mt-10\\\">\\n <a onclick=\\\"${action}\\\" class=\\\"btn btn-primary c-w\\\"> ${buttonLabel} </a>\\n </div>\\n `;\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"// Keep modal(selector) and setUpModal(selector) compatible with legacy views.\\nvar wiModalStack = [];\\nvar wiModalReturnFocus = new WeakMap();\\n\\nfunction wiModalFocusable(element) {\\n return Array.from(element.querySelectorAll('a[href],button,input,select,textarea,[tabindex]')).filter(function (item) {\\n return !item.disabled && item.tabIndex >= 0 && !item.closest('[inert]') && item.getClientRects().length > 0;\\n });\\n}\\n\\nfunction wiModalFocus(element) {\\n var target = wiModalFocusable(element)[0] || element.querySelector('.wi-modal-content, .content') || element;\\n if (target.tabIndex < 0) target.setAttribute('tabindex', '-1');\\n target.focus({ preventScroll: true });\\n}\\n\\nfunction wiModalVisibility(element, active) {\\n element.inert = !active;\\n element.setAttribute('aria-hidden', active ? 'false' : 'true');\\n}\\n\\n/**\\n * Toggles a wi-modal: opens it when closed, closes it when open.\\n *\\n * @deprecated Use wi.modal.open(id, { title }) and wi.modal.close(id).\\n * @param {string} selector CSS selector of the .wi-modal.\\n * @param {Element} [trigger] Element that gets the focus back on close.\\n * @returns {boolean} false when the selector matches nothing.\\n */\\nfunction modal(selector, trigger) {\\n var element;\\n try { element = document.querySelector(selector); } catch (error) { return false; }\\n if (!element) return false;\\n setUpModal(selector);\\n var opening = !element.classList.contains('wi-show');\\n if (opening) {\\n wiModalReturnFocus.set(element, trigger || document.activeElement);\\n wiModalStack.forEach(function (other) { wiModalVisibility(other, false); });\\n wiModalStack.push(element);\\n element.classList.add('wi-show');\\n element.classList.remove('no-interaction');\\n wiModalVisibility(element, true);\\n if (typeof disableScroll === 'function') disableScroll();\\n wiModalFocus(element);\\n } else {\\n var wasTop = wiModalStack[wiModalStack.length - 1] === element;\\n wiModalStack = wiModalStack.filter(function (other) { return other !== element; });\\n element.classList.remove('wi-show');\\n element.classList.add('no-interaction');\\n wiModalVisibility(element, false);\\n var previous = wiModalStack[wiModalStack.length - 1];\\n if (previous) wiModalVisibility(previous, true);\\n else if (typeof enableScroll === 'function') enableScroll();\\n var returnFocus = wiModalReturnFocus.get(element);\\n if (wasTop && returnFocus && returnFocus.isConnected && !returnFocus.closest('[inert]')) {\\n returnFocus.focus({ preventScroll: true });\\n } else if (wasTop && previous) wiModalFocus(previous);\\n }\\n return true;\\n}\\n\\nfunction setUpModal(selector) {\\n var element;\\n try { element = document.querySelector(selector); } catch (error) { return; }\\n if (!element) return;\\n if (!element.hasAttribute('role')) element.setAttribute('role', 'dialog');\\n element.setAttribute('aria-modal', 'true');\\n wiModalVisibility(element, element.classList.contains('wi-show'));\\n element.querySelectorAll('.wi-close-modal').forEach(function (close) {\\n // Preserve project-specific onclick handlers.\\n if (close.onclick == null) close.onclick = function () { modal(selector); };\\n });\\n}\\n\\ndocument.addEventListener('click', function (event) {\\n var trigger = event.target.closest('[data-wi-modal-target]');\\n if (!trigger || trigger.disabled || trigger.getAttribute('aria-disabled') === 'true') return;\\n if (modal(trigger.getAttribute('data-wi-modal-target'), trigger)) event.preventDefault();\\n});\\n\\ndocument.addEventListener('keydown', function (event) {\\n var element = wiModalStack[wiModalStack.length - 1];\\n if (!element || event.defaultPrevented) return;\\n if (event.key === 'Escape') {\\n event.preventDefault();\\n var close = element.querySelector('.wi-close-modal');\\n if (close) close.click();\\n else if (element.id) modal('#' + CSS.escape(element.id));\\n } else if (event.key === 'Tab') {\\n var fields = wiModalFocusable(element);\\n var first = fields[0], last = fields[fields.length - 1];\\n if (!fields.length) { event.preventDefault(); wiModalFocus(element); }\\n else if (event.shiftKey && (document.activeElement === first || !element.contains(document.activeElement))) {\\n event.preventDefault(); last.focus();\\n } else if (!event.shiftKey && (document.activeElement === last || !element.contains(document.activeElement))) {\\n event.preventDefault(); first.focus();\\n }\\n }\\n});\\n\\nfunction setUpModals() {\\n document.querySelectorAll('.wi-modal').forEach(function (element) {\\n wiModalVisibility(element, element.classList.contains('wi-show'));\\n });\\n}\\nif (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', setUpModals);\\nelse setUpModals();\\n\\nfunction wiModalNode(tag, className, text) {\\n var node = document.createElement(tag);\\n if (className) node.className = className;\\n if (text != null) node.textContent = text;\\n return node;\\n}\\n\\nfunction wiModalElement(id) {\\n id = String(id == null ? '' : id).replace(/^#/, '');\\n return id === '' ? null : document.getElementById(id);\\n}\\n\\nvar wiConfirmCount = 0;\\n\\nfunction wiConfirmModal(options) {\\n return new Promise(function (resolve) {\\n\\n var id = 'wi-confirm-' + (++wiConfirmCount);\\n var root = wiModalNode('section', 'wi-modal no-interaction wi-confirm');\\n root.id = id;\\n root.setAttribute('role', 'alertdialog');\\n root.setAttribute('aria-labelledby', id + '-title');\\n root.setAttribute('aria-describedby', id + '-text');\\n options.className.split(/\\\\s+/).filter(Boolean).forEach(function (name) { root.classList.add(name); });\\n\\n var backdrop = wiModalNode('div', 'bg wi-close-modal');\\n var content = wiModalNode('div', 'content wi-modal-content c-w');\\n\\n var header = wiModalNode('div', 'wi-modal-header');\\n var title = wiModalNode('h2', 'wi-modal-title', options.title);\\n title.id = id + '-title';\\n title.setAttribute('data-wi-modal-title', '');\\n var close = wiModalNode('button', 'wi-modal-close wi-close-modal');\\n close.type = 'button';\\n close.setAttribute('aria-label', options.cancel);\\n var icon = wiModalNode('i', 'bi bi-x-lg');\\n icon.setAttribute('aria-hidden', 'true');\\n close.append(icon);\\n header.append(title, close);\\n\\n var body = wiModalNode('div', 'wi-modal-body no-scrollbar', options.text);\\n body.id = id + '-text';\\n body.style.whiteSpace = 'pre-line';\\n\\n var footer = wiModalNode('div', 'wi-modal-footer d-flex j-content-end gap-3');\\n var cancel = wiModalNode('button', 'btn btn-' + (options.cancelVariant || 'dark-o') + ' wi-close-modal', options.cancel);\\n cancel.type = 'button';\\n var ok = wiModalNode('button', 'btn btn-' + options.variant, options.ok);\\n ok.type = 'button';\\n footer.append(cancel, ok);\\n\\n content.append(header, body, footer);\\n root.append(backdrop, content);\\n document.body.append(root);\\n\\n var done = false;\\n function finish(confirmed) {\\n if (done) return;\\n done = true;\\n modal('#' + id);\\n setTimeout(function () { root.remove(); }, 600);\\n resolve(confirmed);\\n }\\n\\n // Set before modal(): setUpModal() keeps existing onclick handlers; Esc clicks the first .wi-close-modal.\\n [backdrop, close, cancel].forEach(function (element) { element.onclick = function () { finish(false); }; });\\n ok.onclick = function () { finish(true); };\\n\\n void root.offsetWidth;\\n modal('#' + id, options.trigger || document.activeElement);\\n (options.variant === 'danger' ? cancel : ok).focus({ preventScroll: true });\\n\\n });\\n}\\n\\nwindow.wi = window.wi || {};\\nwi.modal = wi.modal || {};\\n\\n/**\\n * Opens a wi-modal by id (\\\"x\\\" or \\\"#x\\\"); options.title goes into its [data-wi-modal-title].\\n * @returns {boolean} false when the modal is missing.\\n */\\nwi.modal.open = function (id, options) {\\n var element = wiModalElement(id);\\n if (!element) return false;\\n if (options && options.title != null) {\\n var title = element.querySelector('[data-wi-modal-title]');\\n if (title) title.textContent = String(options.title);\\n }\\n if (!element.classList.contains('wi-show')) modal('#' + CSS.escape(element.id), document.activeElement);\\n return true;\\n};\\n\\n/** Closes a wi-modal by id (\\\"x\\\" or \\\"#x\\\"). */\\nwi.modal.close = function (id) {\\n var element = wiModalElement(id);\\n if (!element) return false;\\n if (element.classList.contains('wi-show')) modal('#' + CSS.escape(element.id));\\n return true;\\n};\\n\\nif (wi.confirm) wi.confirm.adapter = wiConfirmModal;\\n\"","module.exports = \"function setUpPage() {\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setInput();\\n setDropdown();\\n setVideoJS();\\n setTooltip();\\n \\n window.dispatchEvent(new Event('loaded'));\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./alert.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./aos.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./dropdown.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./place.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./select.js\"))","require(\"!!../../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../../node_modules/raw-loader/index.js!./send.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./header.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./modal.js\"))","require(\"!!../../../../node_modules/script-loader/addScript.js\")(require(\"!!../../../../node_modules/raw-loader/index.js!./pageSetUp.js\"))","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tconst getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_require__","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty"],"sourceRoot":""}