mypgs 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/.vscode/tasks.json +39 -0
  2. package/AGENTS.md +22 -21
  3. package/README.md +2 -2
  4. package/assets/javascript/components/_menu.js +2 -1
  5. package/assets/javascript/components/_modals.js +1 -1
  6. package/assets/javascript/components/_notifications.js +2 -1
  7. package/assets/javascript/components/_slides.js +2 -2
  8. package/assets/scss/base/_body.scss +5 -5
  9. package/assets/scss/base/_general.scss +27 -18
  10. package/assets/scss/base/_variables.scss +1 -1
  11. package/assets/scss/components/_accordion.scss +9 -7
  12. package/assets/scss/components/_alerts.scss +71 -0
  13. package/assets/scss/components/_badges.scss +40 -48
  14. package/assets/scss/components/_button.scss +27 -19
  15. package/assets/scss/components/_card.scss +9 -4
  16. package/assets/scss/components/_formAddon.scss +5 -1
  17. package/assets/scss/components/_logo.scss +3 -4
  18. package/assets/scss/components/_menu.scss +26 -3
  19. package/assets/scss/components/_modals.scss +2 -2
  20. package/assets/scss/components/_stepTabs.scss +2 -1
  21. package/assets/scss/index.scss +2 -3
  22. package/assets/scss/layout/_header.scss +3 -3
  23. package/assets/scss/layout/_responsive.scss +63 -0
  24. package/assets/scss/mixin/_mx-base.scss +4 -8
  25. package/assets/scss/mixin/_mx-button.scss +74 -70
  26. package/assets/scss/mixin/_mx-card.scss +33 -36
  27. package/assets/scss/mixin/_mx-form.scss +10 -5
  28. package/assets/scss/mixin/_mx-formAddon.scss +100 -58
  29. package/assets/scss/mixin/_mx-hover.scss +21 -15
  30. package/assets/scss/mixin/_mx-responsive.scss +81 -201
  31. package/demo/demo.css +9 -6
  32. package/demo/demo.html +7 -5
  33. package/demo/demo.js +34 -32
  34. package/dist/css/index.css +2502 -3507
  35. package/dist/css/index.css.map +1 -1
  36. package/dist/css/index.min.css +1 -1
  37. package/dist/javascript/index.js +7 -5
  38. package/dist/javascript/index.js.map +1 -1
  39. package/dist/javascript/index.min.js +1 -1
  40. package/docs/componenti-e-markup.md +5 -5
  41. package/docs/components/accordion.md +3 -3
  42. package/docs/components/alerts.md +67 -0
  43. package/docs/components/badges.md +11 -8
  44. package/docs/components/breadcumbs.md +1 -1
  45. package/docs/components/button.md +9 -9
  46. package/docs/components/card.md +9 -6
  47. package/docs/components/dropdown.md +1 -1
  48. package/docs/components/form.md +6 -5
  49. package/docs/components/formAddon.md +56 -19
  50. package/docs/components/logo.md +1 -1
  51. package/docs/components/menu.md +2 -2
  52. package/docs/components/modal.md +7 -6
  53. package/docs/components/notification.md +2 -2
  54. package/docs/components/search.md +8 -7
  55. package/docs/components/slides.md +5 -6
  56. package/docs/components/stepTabs.md +7 -7
  57. package/docs/components/steps.md +1 -1
  58. package/docs/components/summary.md +1 -1
  59. package/docs/components/table.md +1 -1
  60. package/docs/components/tooltip.md +4 -3
  61. package/docs/convenzioni.md +1 -1
  62. package/docs/export-e-sviluppo.md +1 -1
  63. package/docs/helper-javascript.md +1 -1
  64. package/docs/layout/body.md +1 -1
  65. package/docs/layout/footer.md +7 -3
  66. package/docs/layout/header.md +5 -4
  67. package/docs/layout/pageShell.md +11 -11
  68. package/docs/layout/responsive.md +90 -0
  69. package/docs/layout/section.md +16 -16
  70. package/docs/patterns/cookieConsent.md +6 -3
  71. package/docs/utilizzo-css-scss.md +26 -2
  72. package/package.json +1 -1
  73. package/{templates → reference}/html/components/accordion.html +2 -2
  74. package/reference/html/components/alerts.html +59 -0
  75. package/{templates → reference}/html/components/badges.html +9 -7
  76. package/{templates → reference}/html/components/button.html +7 -7
  77. package/{templates → reference}/html/components/card.html +7 -5
  78. package/{templates → reference}/html/components/form.html +5 -4
  79. package/reference/html/components/formAddon.html +109 -0
  80. package/{templates → reference}/html/components/menu.html +2 -2
  81. package/{templates → reference}/html/components/modal.html +6 -5
  82. package/{templates → reference}/html/components/notification.html +2 -2
  83. package/{templates → reference}/html/components/search.html +7 -6
  84. package/{templates → reference}/html/components/slides.html +4 -5
  85. package/{templates → reference}/html/components/stepTabs.html +6 -6
  86. package/{templates → reference}/html/components/tooltip.html +3 -2
  87. package/{templates → reference}/html/layout/footer.html +5 -2
  88. package/{templates → reference}/html/layout/header.html +4 -3
  89. package/{templates → reference}/html/layout/pageShell.html +10 -10
  90. package/reference/html/layout/responsive.html +83 -0
  91. package/{templates → reference}/html/layout/section.html +15 -15
  92. package/{templates → reference}/html/patterns/cookieConsent.html +4 -2
  93. package/{templates → reference}/react/components/accordion.jsx +1 -1
  94. package/reference/react/components/alerts.jsx +46 -0
  95. package/{templates → reference}/react/components/button.jsx +4 -4
  96. package/{templates → reference}/react/components/card.jsx +2 -2
  97. package/{templates → reference}/react/components/form.jsx +1 -1
  98. package/{templates → reference}/react/components/modal.jsx +2 -2
  99. package/{templates → reference}/react/components/search.jsx +4 -4
  100. package/{templates → reference}/react/components/slides.jsx +1 -1
  101. package/{templates → reference}/react/components/stepTabs.jsx +4 -4
  102. package/{templates → reference}/react/components/tooltip.jsx +1 -1
  103. package/{templates → reference}/react/layout/pageShell.jsx +2 -2
  104. package/reference/react/layout/responsive.jsx +61 -0
  105. package/{templates → reference}/react/layout/section.jsx +12 -12
  106. package/{templates → reference}/react/patterns/cookieConsent.jsx +1 -1
  107. package/{templates → reference}/react/patterns/footer.jsx +1 -1
  108. package/{templates → reference}/react/patterns/header.jsx +2 -2
  109. package/scripts/generate-component-docs.js +8 -8
  110. package/assets/scss/layout/_flex.scss +0 -49
  111. package/assets/scss/layout/_gap.scss +0 -21
  112. package/assets/scss/layout/_grid.scss +0 -13
  113. package/docs/layout/flex.md +0 -116
  114. package/docs/layout/grid.md +0 -116
  115. package/templates/html/components/formAddon.html +0 -72
  116. package/templates/html/layout/flex.html +0 -109
  117. package/templates/html/layout/grid.html +0 -109
  118. package/templates/react/layout/flex.jsx +0 -36
  119. package/templates/react/layout/grid.jsx +0 -36
  120. /package/{templates → reference}/html/components/breadcumbs.html +0 -0
  121. /package/{templates → reference}/html/components/dropdown.html +0 -0
  122. /package/{templates → reference}/html/components/logo.html +0 -0
  123. /package/{templates → reference}/html/components/steps.html +0 -0
  124. /package/{templates → reference}/html/components/summary.html +0 -0
  125. /package/{templates → reference}/html/components/table.html +0 -0
  126. /package/{templates → reference}/html/layout/body.html +0 -0
  127. /package/{templates → reference}/react/components/breadcumbs.jsx +0 -0
  128. /package/{templates → reference}/react/components/dropdown.jsx +0 -0
  129. /package/{templates → reference}/react/components/logo.jsx +0 -0
  130. /package/{templates → reference}/react/components/menu.jsx +0 -0
  131. /package/{templates → reference}/react/components/notification.jsx +0 -0
  132. /package/{templates → reference}/react/components/steps.jsx +0 -0
  133. /package/{templates → reference}/react/components/summary.jsx +0 -0
  134. /package/{templates → reference}/react/components/table.jsx +0 -0
  135. /package/{templates → reference}/react/layout/body.jsx +0 -0
@@ -1 +1 @@
1
- (()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length||console.log('For the header to work correctly, insert "header-element" under "header"'),t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let d=null;function u(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(d=document.activeElement,setTimeout(()=>{o.focus()},0)):d instanceof HTMLElement&&d.focus({preventScroll:!0})}function p(){u(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),u(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):u(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,d=pgs(e).state.contains("open");function u(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),u(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),u(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),u(d,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const d={init:l,api:function(e){return s.get(e)}},u=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=u.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let d=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(d=s.left),"right"===i&&(d=s.right-a.width)),"left"!==r&&"right"!==r||(d="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&d<8&&(d=s.right+8),"right"===r&&d+a.width>c-8&&(d=s.left-a.width-8),g=d,f=l,d=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(d)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=u.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=u.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=u.get(e);t&&(t.isOpen()?b(e):y(e))}function w(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(u.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(w(e.parentNode||document),m(e),u.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),u.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),w();const A={init:w,api:function(e){return u.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>&#9207;</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),A.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e,t=null){if(L.has(e))return;const n=pgs(e).querySelector("modal-button"),o=t||e.querySelector("dialog");if(!n||!o)return;const r=new AbortController,{signal:i}=r;let s=null,a=null;const c='<button pgs="buttonClose modal-close" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',l=pgs(o).querySelector("modal-dialog-content-header"),d=pgs(e).option.contains("disableBackdropClose"),u=pgs(e).option.contains("history"),p=pgs(e).option.getValueBrackets("containerID"),g=pgs(e).option.getValueBrackets("containerPGS"),f=pgs(o).option.contains("topLevel");pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close")||(l?l.insertAdjacentHTML("beforeend",c):o.insertAdjacentHTML("beforeend",c));const m=pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close");function h(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function b(t){t?.stopImmediatePropagation(),o.open?y(t):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),h(!0),f?o.showModal():o.show(),e.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function y(t){t?.stopImmediatePropagation(),h(!1),o.close(),e.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),f&&!e.contains(o)?e.append(o):f||(p?document.querySelector("#"+p)?.append(o):g?pgs(document).querySelector(g)?.append(o):document.body.append(o)),n.addEventListener("click",e=>b(e),{signal:i}),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&b(e),{signal:i}),o.addEventListener("close",()=>h(!1),{signal:i}),o.addEventListener("click",e=>{e.target!=o||d||y(e)},{signal:i}),m?.addEventListener("click",e=>y(e),{signal:i}),u&&n.id&&(a=window.setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),b())},1),s=new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}),s.observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&y()}catch(e){}},{signal:i})),L.set(e,{element:e,button:n,dialog:o,closeButton:m,open:function(e){o.open||b(e)},close:function(e){o.open&&y(e)},toggle:b,refresh:()=>{const t=e.querySelector("dialog")||o;return r.abort(),s?.disconnect(),null!==a&&window.clearTimeout(a),L.delete(e),C(e,t),L.get(e)},isOpen:()=>o.open})}function q(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("modal")?[e]:[];return t.push(...pgs(e).querySelectorAll("modal")),t})(e).forEach(e=>C(e))}q();const x={init:q,api:function(e){return L.get(e)}},M=new WeakMap,T=new Set;let O=0;const _={minLength:2,debounce:200,limit:6,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function D(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function I(e){const t=M.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),T.delete(e))}function j(e){const t=M.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),T.add(e))}function $(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(M.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={..._},s=[],a=-1,c=null,l=null,d=0;function u(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),I(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,d+=1,u(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=d;l=new AbortController;const p=l;u(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=D(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==d||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(D).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?j(e):I(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==d||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===d&&u(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||_.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function w(){b()}function A(){s.length?j(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void I(e)):void("Tab"===t.key&&I(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),I(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>j(e),close:()=>I(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",w),t.removeEventListener("focus",A),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),M.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",w),t.addEventListener("focus",A),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),M.set(e,L)})}document.addEventListener("pointerdown",e=>{T.forEach(t=>{t.contains(e.target)||I(t)})}),$();const N={init:$,api:function(e){return M.get(e)}};function B(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})(),o=o=>{if(n.update(o))return;if(o.ctrlKey)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;let r=o.deltaY;1===o.deltaMode?r*=16:2===o.deltaMode&&(r*=e.clientHeight);const i=e.scrollLeft<=0,s=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;(r>0&&!s||r<0&&!i)&&(o.preventDefault(),e.scrollLeft+=r*t)};return e.addEventListener("wheel",o,{passive:!1}),()=>e.removeEventListener("wheel",o)}const P=new WeakMap;class R{constructor({element:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.element=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.element?pgs(this.element).querySelector("slides-container"):null}#e(){const e=this.element;pgs(e).querySelector("slides-prec")||e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),pgs(e).querySelector("slides-next")||e.insertAdjacentHTML("beforeend",'<button pgs="slides-next buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>'),pgs(e).querySelector("slides-dots")||e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>');const t=pgs(e).querySelector("slides-dots");for(;t.children.length<this.container.children.length;)t.insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot"></button>');for(;t.children.length>this.container.children.length;)t.lastElementChild.remove();Array.from(t.children).forEach((e,t)=>{e.setAttribute("aria-label",`vai alla slide ${t+1}`)})}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e]?.scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const d=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=d.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.element;if(!this.container)return;const t=new AbortController,{signal:n}=t;this.#e();const o=pgs(e).querySelector("slides-prec"),r=pgs(e).querySelector("slides-next"),i=Array.from(pgs(e).querySelector("slides-dots").children),s=pgs(e).option.contains("notScrollWithMouse")?null:B(this.container,5);i.forEach((e,t)=>e.addEventListener("click",()=>this.#o(t),{signal:n})),o.addEventListener("click",()=>this.#t(),{passive:!0,signal:n}),r.addEventListener("click",()=>this.#n(),{passive:!0,signal:n});const a=new IntersectionObserver(e=>this.#r(e,this.container,o,r,i),{root:this.container,...this.optionIntersectionObserver});let c;Array.from(this.container.children).forEach(e=>a.observe(e));const l=()=>{P.get(this.element)===c&&(t.abort(),a.disconnect(),s?.(),P.delete(this.element))};c={element:this.element,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(P.get(this.element)!==c||(l(),new R({element:this.element,viewRatio:this.viewRatio,optionIntersectionObserver:this.optionIntersectionObserver,scrollOptions:this.scrollOptions}).execute()),P.get(this.element))},P.set(this.element,c)}}function V(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("slides")?[e]:[];return t.push(...pgs(e).querySelectorAll("slides")),t})(e).forEach(e=>{P.has(e)||new R({element:e}).execute()})}V();const H={init:V,api:function(e){return P.get(e)}},z=new WeakMap;function F(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),F(e.parentNode||document),z.get(e))}))})}F();const W={init:F,api:function(e){return z.get(e)}},G=new WeakMap;function Y(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let d=!1;if(!i||0===a)return;const u=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];d=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),u.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),d=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),pgs(o).option.setValueBrackets("step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),u.push(o)})),f(0,!1);const h=new MutationObserver(()=>{d||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),G.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(Y(e.parentNode||document),G.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}Y();const U={init:Y,api:function(e){return G.get(e)}},J=new WeakMap;let K=0;function X(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function Q(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(J.has(e))return;const t=X(e,"summary-content"),n=X(e,"summary-button");if(!t||!n)return;const o=(K+=1,K),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),J.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}Q();const Z={init:Q,api:function(e){return J.get(e)}},ee={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?ne.toast:ne.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){const t=pgs(e).option.getValueBrackets("notification")||"{}";try{return JSON.parse(t)}catch(e){return console.warn("PGS notification: configurazione JSON non valida",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},_getContainer:e=>Array.from(pgs(document).querySelectorAll("notification")).find(t=>{const n=pgs(t).option.contains("toast");return"toast"===e?n:!n}),initNotification(e,t,n,o,r,i="replace",s=null){let a=this._getContainer(t);if(!a){const e=document.createElement("div");pgs(e).add("notification"),"toast"===t&&pgs(e).option.add("toast"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const d=document.createElement("button");d.type="button",d.ariaLabel="Rimuovi notifica",d.innerHTML='<i class="fa-solid fa-xmark"></i>',d.setAttribute("pgs","buttonClose"),c.insertAdjacentElement("afterbegin",d),d.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=this._getContainer(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===ne.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function te(e=document){return ee.trigger(e)}const ne={trigger:te,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>ee.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","toast",n,e,t),deleteAll:()=>ee.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>te()):te(),e.registerModules({svg:i,accordion:d,dropdown:A,menu:k,modal:x,notification:ne,search:N,slides:H,stepTabs:U,steps:W,summary:Z,formValidate:class{#i={};#s=!1;constructor(e,t={}){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError("options must be an object");this.container=e,this._rules=[],this.message={fieldError:"Please complete this field.",fieldsError:"Please complete all required fields.",success:"Submitted successfully."},void 0!==t.message&&(this.message=t.message),this.container?.setAttribute("novalidate","")}get message(){return{...this.#i}}set message(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError("message must be an object");this.#i={...this.#i,...e}}#a={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#c(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],d=new Map;for(const e of c){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t?(d.has(t)||d.set(t,[]),d.get(t).push(e)):e.checked||l.push(e)}const u=[];for(const[e,t]of d.entries())t.some(e=>e.checked)||u.push(t[0]);const p=Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.#a.isRequired(e)||e.files&&e.files.length>0));return[...new Set([n,o,r,a,l,u,p,t].flat())]}addFieldError(t,n=0,o=1){if(e(t).option.add("error"),0===n&&t.scrollIntoView(),0!==n)return;if(o>1)return void ne.toast.error(this.message.fieldsError);const r=e(t).option.getValueBrackets("message");ne.toast.error(r||this.message.fieldError)}removeFieldError(t){e(t).option.remove("error")}success(e=this.message.success){(this.#s||!0===this.validate())&&ne.toast.success(e)}validate(){const t=this.#c(this.container),n=this.container.querySelectorAll("input, textarea, select");Array.from(n).filter(e=>!e.disabled);for(const e of n)t.includes(e)||this.removeFieldError(e);return t.forEach((e,n)=>this.addFieldError(e,n,t.length)),n.forEach(e=>e.addEventListener("click",t=>this.removeFieldError(e))),t.length?(e(this.container).option.remove("success").add("error"),!1):(e(this.container).option.remove("error").add("success"),!0)}validator(e,t="submit"){if("function"!=typeof e)throw new TypeError("callback must be a function");if("string"!=typeof t||!t.trim())throw new TypeError("eventName must be a non-empty string");return this.container.addEventListener(t,t=>{if(t.preventDefault(),this.validate()){this.#s=!0;try{this.success(),e(t)}finally{this.#s=!1}}}),this}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:B}),n(682),n(48)})()})();
1
+ (()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length||console.log('For the header to work correctly, insert "header-element" under "header"'),t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let u=null;function d(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(u=document.activeElement,setTimeout(()=>{o.focus()},0)):u instanceof HTMLElement&&u.focus({preventScroll:!0})}function p(){d(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),d(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):d(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,u=pgs(e).state.contains("open");function d(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),d(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),d(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),d(u,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const u={init:l,api:function(e){return s.get(e)}},d=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=d.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let u=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(u=s.left),"right"===i&&(u=s.right-a.width)),"left"!==r&&"right"!==r||(u="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&u<8&&(u=s.right+8),"right"===r&&u+a.width>c-8&&(u=s.left-a.width-8),g=u,f=l,u=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(u)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=d.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=d.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=d.get(e);t&&(t.isOpen()?b(e):y(e))}function w(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(d.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(w(e.parentNode||document),m(e),d.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),d.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),w();const A={init:w,api:function(e){return d.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>&#9207;</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("button"),pgs(n).option.add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),A.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e,t=null){if(L.has(e))return;const n=pgs(e).querySelector("modal-button"),o=t||e.querySelector("dialog");if(!n||!o)return;const r=new AbortController,{signal:i}=r;let s=null,a=null;const c='<button pgs="button modal-close" pgs-option="buttonClose" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',l=pgs(o).querySelector("modal-dialog-content-header"),u=pgs(e).option.contains("disableBackdropClose"),d=pgs(e).option.contains("history"),p=pgs(e).option.getValueBrackets("containerID"),g=pgs(e).option.getValueBrackets("containerPGS"),f=pgs(o).option.contains("topLevel");pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close")||(l?l.insertAdjacentHTML("beforeend",c):o.insertAdjacentHTML("beforeend",c));const m=pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close");function h(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function b(t){t?.stopImmediatePropagation(),o.open?y(t):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),h(!0),f?o.showModal():o.show(),e.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function y(t){t?.stopImmediatePropagation(),h(!1),o.close(),e.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),f&&!e.contains(o)?e.append(o):f||(p?document.querySelector("#"+p)?.append(o):g?pgs(document).querySelector(g)?.append(o):document.body.append(o)),n.addEventListener("click",e=>b(e),{signal:i}),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&b(e),{signal:i}),o.addEventListener("close",()=>h(!1),{signal:i}),o.addEventListener("click",e=>{e.target!=o||u||y(e)},{signal:i}),m?.addEventListener("click",e=>y(e),{signal:i}),d&&n.id&&(a=window.setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),b())},1),s=new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}),s.observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&y()}catch(e){}},{signal:i})),L.set(e,{element:e,button:n,dialog:o,closeButton:m,open:function(e){o.open||b(e)},close:function(e){o.open&&y(e)},toggle:b,refresh:()=>{const t=e.querySelector("dialog")||o;return r.abort(),s?.disconnect(),null!==a&&window.clearTimeout(a),L.delete(e),C(e,t),L.get(e)},isOpen:()=>o.open})}function q(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("modal")?[e]:[];return t.push(...pgs(e).querySelectorAll("modal")),t})(e).forEach(e=>C(e))}q();const x={init:q,api:function(e){return L.get(e)}},M=new WeakMap,T=new Set;let O=0;const _={minLength:2,debounce:200,limit:6,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function D(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function I(e){const t=M.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),T.delete(e))}function j(e){const t=M.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),T.add(e))}function $(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(M.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={..._},s=[],a=-1,c=null,l=null,u=0;function d(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),I(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,u+=1,d(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=u;l=new AbortController;const p=l;d(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=D(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==u||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(D).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?j(e):I(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==u||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===u&&d(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||_.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function w(){b()}function A(){s.length?j(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void I(e)):void("Tab"===t.key&&I(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),I(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>j(e),close:()=>I(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",w),t.removeEventListener("focus",A),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),M.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",w),t.addEventListener("focus",A),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),M.set(e,L)})}document.addEventListener("pointerdown",e=>{T.forEach(t=>{t.contains(e.target)||I(t)})}),$();const N={init:$,api:function(e){return M.get(e)}};function B(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})(),o=o=>{if(n.update(o))return;if(o.ctrlKey)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;let r=o.deltaY;1===o.deltaMode?r*=16:2===o.deltaMode&&(r*=e.clientHeight);const i=e.scrollLeft<=0,s=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;(r>0&&!s||r<0&&!i)&&(o.preventDefault(),e.scrollLeft+=r*t)};return e.addEventListener("wheel",o,{passive:!1}),()=>e.removeEventListener("wheel",o)}const P=new WeakMap;class R{constructor({element:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.element=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.element?pgs(this.element).querySelector("slides-container"):null}#e(){const e=this.element;pgs(e).querySelector("slides-prec")||e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec button" pgs-option="buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),pgs(e).querySelector("slides-next")||e.insertAdjacentHTML("beforeend",'<button pgs="slides-next button" pgs-option="buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>'),pgs(e).querySelector("slides-dots")||e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>');const t=pgs(e).querySelector("slides-dots");for(;t.children.length<this.container.children.length;)t.insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot"></button>');for(;t.children.length>this.container.children.length;)t.lastElementChild.remove();Array.from(t.children).forEach((e,t)=>{e.setAttribute("aria-label",`vai alla slide ${t+1}`)})}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e]?.scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const u=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=u.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.element;if(!this.container)return;const t=new AbortController,{signal:n}=t;this.#e();const o=pgs(e).querySelector("slides-prec"),r=pgs(e).querySelector("slides-next"),i=Array.from(pgs(e).querySelector("slides-dots").children),s=pgs(e).option.contains("notScrollWithMouse")?null:B(this.container,5);i.forEach((e,t)=>e.addEventListener("click",()=>this.#o(t),{signal:n})),o.addEventListener("click",()=>this.#t(),{passive:!0,signal:n}),r.addEventListener("click",()=>this.#n(),{passive:!0,signal:n});const a=new IntersectionObserver(e=>this.#r(e,this.container,o,r,i),{root:this.container,...this.optionIntersectionObserver});let c;Array.from(this.container.children).forEach(e=>a.observe(e));const l=()=>{P.get(this.element)===c&&(t.abort(),a.disconnect(),s?.(),P.delete(this.element))};c={element:this.element,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(P.get(this.element)!==c||(l(),new R({element:this.element,viewRatio:this.viewRatio,optionIntersectionObserver:this.optionIntersectionObserver,scrollOptions:this.scrollOptions}).execute()),P.get(this.element))},P.set(this.element,c)}}function V(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("slides")?[e]:[];return t.push(...pgs(e).querySelectorAll("slides")),t})(e).forEach(e=>{P.has(e)||new R({element:e}).execute()})}V();const H={init:V,api:function(e){return P.get(e)}},z=new WeakMap;function F(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),F(e.parentNode||document),z.get(e))}))})}F();const W={init:F,api:function(e){return z.get(e)}},G=new WeakMap;function Y(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let u=!1;if(!i||0===a)return;const d=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];u=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),d.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),u=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),pgs(o).option.setValueBrackets("step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),d.push(o)})),f(0,!1);const h=new MutationObserver(()=>{u||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),G.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(Y(e.parentNode||document),G.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}Y();const U={init:Y,api:function(e){return G.get(e)}},J=new WeakMap;let K=0;function X(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function Q(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(J.has(e))return;const t=X(e,"summary-content"),n=X(e,"summary-button");if(!t||!n)return;const o=(K+=1,K),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),J.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}Q();const Z={init:Q,api:function(e){return J.get(e)}},ee={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?ne.toast:ne.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){const t=pgs(e).option.getValueBrackets("notification")||"{}";try{return JSON.parse(t)}catch(e){return console.warn("PGS notification: configurazione JSON non valida",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},_getContainer:e=>Array.from(pgs(document).querySelectorAll("notification")).find(t=>{const n=pgs(t).option.contains("toast");return"toast"===e?n:!n}),initNotification(e,t,n,o,r,i="replace",s=null){let a=this._getContainer(t);if(!a){const e=document.createElement("div");pgs(e).add("notification"),"toast"===t&&pgs(e).option.add("toast"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const u=document.createElement("button");u.type="button",u.ariaLabel="Rimuovi notifica",u.innerHTML='<i class="fa-solid fa-xmark"></i>',u.setAttribute("pgs","button"),u.setAttribute("pgs-option","buttonClose"),c.insertAdjacentElement("afterbegin",u),u.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=this._getContainer(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===ne.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function te(e=document){return ee.trigger(e)}const ne={trigger:te,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>ee.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","toast",n,e,t),deleteAll:()=>ee.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>te()):te(),e.registerModules({svg:i,accordion:u,dropdown:A,menu:k,modal:x,notification:ne,search:N,slides:H,stepTabs:U,steps:W,summary:Z,formValidate:class{#i={};#s=!1;constructor(e,t={}){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError("options must be an object");this.container=e,this._rules=[],this.message={fieldError:"Please complete this field.",fieldsError:"Please complete all required fields.",success:"Submitted successfully."},void 0!==t.message&&(this.message=t.message),this.container?.setAttribute("novalidate","")}get message(){return{...this.#i}}set message(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError("message must be an object");this.#i={...this.#i,...e}}#a={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#c(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],u=new Map;for(const e of c){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t?(u.has(t)||u.set(t,[]),u.get(t).push(e)):e.checked||l.push(e)}const d=[];for(const[e,t]of u.entries())t.some(e=>e.checked)||d.push(t[0]);const p=Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.#a.isRequired(e)||e.files&&e.files.length>0));return[...new Set([n,o,r,a,l,d,p,t].flat())]}addFieldError(t,n=0,o=1){if(e(t).option.add("error"),0===n&&t.scrollIntoView(),0!==n)return;if(o>1)return void ne.toast.error(this.message.fieldsError);const r=e(t).option.getValueBrackets("message");ne.toast.error(r||this.message.fieldError)}removeFieldError(t){e(t).option.remove("error")}success(e=this.message.success){(this.#s||!0===this.validate())&&ne.toast.success(e)}validate(){const t=this.#c(this.container),n=this.container.querySelectorAll("input, textarea, select");Array.from(n).filter(e=>!e.disabled);for(const e of n)t.includes(e)||this.removeFieldError(e);return t.forEach((e,n)=>this.addFieldError(e,n,t.length)),n.forEach(e=>e.addEventListener("click",t=>this.removeFieldError(e))),t.length?(e(this.container).option.remove("success").add("error"),!1):(e(this.container).option.remove("error").add("success"),!0)}validator(e,t="submit"){if("function"!=typeof e)throw new TypeError("callback must be a function");if("string"!=typeof t||!t.trim())throw new TypeError("eventName must be a non-empty string");return this.container.addEventListener(t,t=>{if(t.preventDefault(),this.validate()){this.#s=!0;try{this.success(),e(t)}finally{this.#s=!1}}}),this}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:B}),n(682),n(48)})()})();
@@ -1,12 +1,13 @@
1
1
  # Components and markup
2
2
 
3
- Complete templates are available in `templates/`. Use those files as the reference source before creating new markup.
3
+ Canonical component and layout examples are available in `reference/`. Use those files as the reference source before creating new markup.
4
4
 
5
5
  ## Componenti disponibili
6
6
 
7
7
  Componenti:
8
8
 
9
9
  - [`accordion`](components/accordion.md)
10
+ - [`alerts`](components/alerts.md)
10
11
  - [`badges`](components/badges.md)
11
12
  - [`breadcrumb`](components/breadcumbs.md)
12
13
  - [`button`](components/button.md)
@@ -33,8 +34,7 @@ Layout:
33
34
  - [`header`](layout/header.md)
34
35
  - [`footer`](layout/footer.md)
35
36
  - [`pageShell`](layout/pageShell.md)
36
- - [`flex`](layout/flex.md)
37
- - [`grid`](layout/grid.md)
37
+ - [`responsive`](layout/responsive.md)
38
38
 
39
39
  Pattern:
40
40
 
@@ -45,7 +45,7 @@ Pattern:
45
45
  `search` include sia lo stile sia il comportamento di ricerca e usa `search-suggestions` come lista opzionale:
46
46
 
47
47
  ```html
48
- <form pgs="buttonNohover search" autocomplete="off">
48
+ <form pgs="button search" pgs-option="buttonNohover" autocomplete="off">
49
49
  <button type="submit">Cerca</button>
50
50
  <input type="search" name="s" placeholder="Cerca">
51
51
  <ul pgs="search-suggestions"></ul>
@@ -76,7 +76,7 @@ pgs.search.api(form)?.configure({
76
76
 
77
77
  La sorgente puo' essere anche un array locale di stringhe o oggetti. Il componente gestisce debounce, annullamento richieste, risposte fuori ordine, tastiera, selezione, click esterno, stati `open`, `loading` ed `error` e attributi ARIA. Gli eventi `pgs:search:select` e `pgs:search:error` sono emessi sul root `search`.
78
78
 
79
- ## Other elements without templates
79
+ ## Other elements without reference files
80
80
 
81
81
  Base:
82
82
 
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/accordion.html. Edit templates/html/components/accordion.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/accordion.html. Edit reference/html/components/accordion.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Accordion
4
4
 
@@ -26,7 +26,7 @@ Interactive component that expands one panel at a time while synchronizing visib
26
26
 
27
27
  ## Related elements
28
28
 
29
- - `flexColumnTexts`: applies text spacing between the list items.
29
+ - `flexColumn`: applies text spacing between the list items.
30
30
 
31
31
  ## Output
32
32
 
@@ -35,7 +35,7 @@ HTML list of accessible accordion items with an associated button and panel.
35
35
  ## Example
36
36
 
37
37
  ```html
38
- <ul pgs="flexColumnTexts">
38
+ <ul pgs="flexColumn">
39
39
  <li pgs="accordion">
40
40
  <button pgs="accordion-button" type="button">
41
41
  <i class="fa-solid fa-circle-question" aria-hidden="true"></i>
@@ -0,0 +1,67 @@
1
+ <!-- Automatically generated from reference/html/components/alerts.html. Edit reference/html/components/alerts.html and run npm run docs:generate again. -->
2
+
3
+ # Alerts
4
+
5
+ Static inline feedback messages for contextual information, successful operations, warnings, and errors. Use the notification API for dynamic floating alerts and toasts.
6
+
7
+ ## PGS
8
+
9
+ - `alert`: identifies the inline alert container.
10
+ - `alert-icon`: identifies the decorative status icon.
11
+ - `alert-content`: groups the title and descriptive message.
12
+ - `alert-title`: identifies the alert heading.
13
+
14
+ ## PGS States
15
+
16
+ - `info`: presents neutral informational feedback.
17
+ - `success`: presents confirmation of a successful operation.
18
+ - `warning`: presents a condition that requires attention.
19
+ - `error`: presents a failure or blocking problem.
20
+
21
+ ## Related elements
22
+
23
+ - `flexColumn`: vertically arranges the alert examples.
24
+ - `gapElements`: applies element spacing between the examples.
25
+ - `notification`: provides dynamic floating alerts and toast messages.
26
+
27
+ ## Output
28
+
29
+ Accessible HTML examples of the four inline alert states.
30
+
31
+ ## Example
32
+
33
+ ```html
34
+ <div pgs="flexColumn gapElements">
35
+ <div pgs="alert" pgs-state="info" role="status">
36
+ <i pgs="alert-icon" class="fa-solid fa-circle-info" aria-hidden="true"></i>
37
+ <div pgs="alert-content">
38
+ <strong pgs="alert-title">Information</strong>
39
+ <p>Your profile information can be updated at any time.</p>
40
+ </div>
41
+ </div>
42
+
43
+ <div pgs="alert" pgs-state="success" role="status">
44
+ <i pgs="alert-icon" class="fa-solid fa-circle-check" aria-hidden="true"></i>
45
+ <div pgs="alert-content">
46
+ <strong pgs="alert-title">Changes saved</strong>
47
+ <p>Your preferences were updated successfully.</p>
48
+ </div>
49
+ </div>
50
+
51
+ <div pgs="alert" pgs-state="warning" role="alert">
52
+ <i pgs="alert-icon" class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
53
+ <div pgs="alert-content">
54
+ <strong pgs="alert-title">Check your information</strong>
55
+ <p>Some fields may require your attention before continuing.</p>
56
+ </div>
57
+ </div>
58
+
59
+ <div pgs="alert" pgs-state="error" role="alert">
60
+ <i pgs="alert-icon" class="fa-solid fa-circle-xmark" aria-hidden="true"></i>
61
+ <div pgs="alert-content">
62
+ <strong pgs="alert-title">Unable to save</strong>
63
+ <p>Correct the reported errors and try again.</p>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ ```
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/badges.html. Edit templates/html/components/badges.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/badges.html. Edit reference/html/components/badges.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Badge
4
4
 
@@ -7,6 +7,9 @@ Collection of compact indicators for displaying categories, priorities, and visu
7
7
  ## PGS
8
8
 
9
9
  - `badge`: identifies the base badge variant.
10
+
11
+ ## PGS Options
12
+
10
13
  - `badgePrimary`: applies the primary color variant.
11
14
  - `badgeStrong`: applies the high-contrast variant.
12
15
  - `badgeSuccess`: represents a successful result.
@@ -32,34 +35,34 @@ HTML examples of the available badge variants.
32
35
  Base
33
36
  </span>
34
37
 
35
- <span pgs="badgePrimary">
38
+ <span pgs="badge" pgs-option="badgePrimary">
36
39
  Primary
37
40
  </span>
38
41
 
39
- <span pgs="badgeStrong">
42
+ <span pgs="badge" pgs-option="badgeStrong">
40
43
  Strong
41
44
  </span>
42
45
 
43
- <span pgs="badgeSuccess badgeDot">
46
+ <span pgs="badge" pgs-option="badgeSuccess badgeDot">
44
47
  Active
45
48
  </span>
46
49
 
47
- <span pgs="badgeWarning">
50
+ <span pgs="badge" pgs-option="badgeWarning">
48
51
  <i class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
49
52
  Warning
50
53
  </span>
51
54
 
52
- <span pgs="badgeError">
55
+ <span pgs="badge" pgs-option="badgeError">
53
56
  <i class="fa-solid fa-xmark" aria-hidden="true"></i>
54
57
  Error
55
58
  </span>
56
59
 
57
- <span pgs="badgeInfo">
60
+ <span pgs="badge" pgs-option="badgeInfo">
58
61
  <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
59
62
  Info
60
63
  </span>
61
64
 
62
- <span pgs="badgeNeutral" href="#">
65
+ <span pgs="badge" pgs-option="badgeNeutral">
63
66
  Neutral
64
67
  </span>
65
68
 
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/breadcumbs.html. Edit templates/html/components/breadcumbs.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/breadcumbs.html. Edit reference/html/components/breadcumbs.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Breadcrumb
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/button.html. Edit templates/html/components/button.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/button.html. Edit reference/html/components/button.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Button
4
4
 
@@ -7,14 +7,14 @@ Button and action-link variants with sizes, emphasis, and icon-text composition
7
7
  ## PGS
8
8
 
9
9
  - `button`: identifies the standard button, which can also be used on anchor elements.
10
- - `buttonStrong`: applies the variant with stronger visual emphasis.
11
- - `buttonIcon`: identifies a compact button composed primarily of an icon.
12
- - `buttonMini`: applies the smallest size variant.
13
- - `buttonBig`: applies the large size variant.
14
10
 
15
11
  ## PGS Options
16
12
 
17
13
  - `buttonReverse`: reverses the visual order of the text and icon on the button.
14
+ - `buttonStrong`: applies the variant with stronger visual emphasis.
15
+ - `buttonIcon`: identifies a compact button composed primarily of an icon.
16
+ - `buttonMini`: applies the smallest size variant.
17
+ - `buttonBig`: applies the large size variant.
18
18
 
19
19
  ## Related elements
20
20
 
@@ -38,20 +38,20 @@ HTML collection of the main button variants.
38
38
  <i class="fa-solid fa-arrow-right" aria-hidden="true"></i>
39
39
  </button>
40
40
 
41
- <button pgs="buttonStrong" type="button">
41
+ <button pgs="button" pgs-option="buttonStrong" type="button">
42
42
  <i class="fa-solid fa-check" aria-hidden="true"></i>
43
43
  Submit
44
44
  </button>
45
45
 
46
- <button pgs="buttonIcon" type="button" aria-label="Settings">
46
+ <button pgs="button" pgs-option="buttonIcon" type="button" aria-label="Settings">
47
47
  <i class="fa-solid fa-gear" aria-hidden="true"></i>
48
48
  </button>
49
49
 
50
- <button pgs="buttonMini" type="button" aria-label="Information">
50
+ <button pgs="button" pgs-option="buttonMini" type="button" aria-label="Information">
51
51
  <i class="fa-solid fa-info" aria-hidden="true"></i>
52
52
  </button>
53
53
 
54
- <button pgs="buttonBig" type="button" aria-label="Large button">
54
+ <button pgs="button" pgs-option="buttonBig" type="button" aria-label="Large button">
55
55
  <i class="fa-solid fa-rocket" aria-hidden="true"></i>
56
56
  Large button
57
57
  </button>
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/card.html. Edit templates/html/components/card.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/card.html. Edit reference/html/components/card.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Card
4
4
 
@@ -9,12 +9,15 @@ Reusable container for grouping an image, title, text, and actions in responsive
9
9
  - `card`: identifies the main card container.
10
10
  - `card-img`: identifies the main card image.
11
11
 
12
+ ## PGS Options
13
+
14
+ - `column-2`: configures the related flex layout with two columns.
15
+
12
16
  ## Related elements
13
17
 
14
- - `flex-2`: arranges the cards in a responsive two-item layout.
18
+ - `flexRow`: arranges the cards in a responsive layout.
15
19
  - `flexColumn`: organizes the card or link content vertically.
16
20
  - `imgCover`: scales the image to fill the available area.
17
- - `flexColumnTexts`: applies vertical spacing to text content.
18
21
  - `button`: presents the final link as a standard button.
19
22
 
20
23
  ## Output
@@ -24,12 +27,12 @@ Two card HTML structures, one with a separate action and one that is fully click
24
27
  ## Example
25
28
 
26
29
  ```html
27
- <div pgs="flex-2">
30
+ <div pgs="flexRow" pgs-option="column-2">
28
31
 
29
32
  <article pgs="card flexColumn">
30
33
  <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image">
31
34
 
32
- <div pgs="flexColumnTexts">
35
+ <div pgs="flexColumn">
33
36
  <h3>Reusable card</h3>
34
37
  <p>Descriptive card content suitable for lists, previews, and grids.</p>
35
38
  <a pgs="button" href="#">Read more</a>
@@ -40,7 +43,7 @@ Two card HTML structures, one with a separate action and one that is fully click
40
43
  <a pgs="flexColumn" href="">
41
44
  <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image">
42
45
 
43
- <div pgs="flexColumnTexts">
46
+ <div pgs="flexColumn">
44
47
  <h3>Reusable card</h3>
45
48
  <p>Descriptive card content suitable for lists, previews, and grids.</p>
46
49
  </div>
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/dropdown.html. Edit templates/html/components/dropdown.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/dropdown.html. Edit reference/html/components/dropdown.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Dropdown
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Automatically generated from templates/html/components/form.html. Edit templates/html/components/form.html and run npm run docs:generate again. -->
1
+ <!-- Automatically generated from reference/html/components/form.html. Edit reference/html/components/form.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Form
4
4
 
@@ -18,6 +18,7 @@ Form structure with labels, text fields, a textarea, a checkbox, and a radio gro
18
18
  - `message`: defines a field-specific message with the syntax message[Message text].
19
19
  - `error`: is applied at runtime to the form and fields that fail validation.
20
20
  - `success`: is applied at runtime to the form after successful validation.
21
+ - `buttonStrong`: presents form submission as the primary action.
21
22
 
22
23
  ## JavaScript API
23
24
 
@@ -31,8 +32,8 @@ Form structure with labels, text fields, a textarea, a checkbox, and a radio gro
31
32
 
32
33
  ## Related elements
33
34
 
34
- - `buttonStrong`: presents form submission as the primary action.
35
- - `flexColumnTexts`: spaces text elements in the radio group.
35
+ - `button`: provides the base styling for the primary submit action.
36
+ - `flexColumn`: spaces text elements in the radio group.
36
37
 
37
38
  ## Output
38
39
 
@@ -68,7 +69,7 @@ Complete HTML form with required fields and an example script for a custom rule,
68
69
  <textarea id="form-message" pgs="textarea" name="message" rows="5" placeholder="Write your message" required></textarea>
69
70
 
70
71
  <br>
71
- <fieldset pgs="radio flexColumnTexts">
72
+ <fieldset pgs="radio flexColumn">
72
73
  <legend>Preferred contact method</legend>
73
74
 
74
75
  <label>
@@ -94,7 +95,7 @@ Complete HTML form with required fields and an example script for a custom rule,
94
95
  </label>
95
96
  <br>
96
97
 
97
- <button pgs="buttonStrong" type="submit">
98
+ <button pgs="button" pgs-option="buttonStrong" type="submit">
98
99
  <i class="fa-solid fa-paper-plane" aria-hidden="true"></i>
99
100
  Submit
100
101
  </button>