@undrr/undrr-mangrove 1.3.2 → 1.3.3

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 (40) hide show
  1. package/README.md +4 -4
  2. package/components/BarChart.js +1 -1
  3. package/components/Fetcher.js +1 -1
  4. package/components/Gallery.js +2 -2
  5. package/components/IconCard.js +2 -2
  6. package/components/IconCard.js.LICENSE.txt +1 -1
  7. package/components/MapComponent.js +2 -2
  8. package/components/MegaMenu.js +2 -2
  9. package/components/Pager.js +1 -1
  10. package/components/QuoteHighlight.js +2 -2
  11. package/components/ScrollContainer.js +2 -2
  12. package/components/ShareButtons.js +2 -2
  13. package/components/StatsCard.js +2 -2
  14. package/components/SyndicationSearchWidget.js +2 -2
  15. package/components/hydrate.js +5 -0
  16. package/css/style-gutenberg.css +2 -1
  17. package/css/style-gutenberg.css.map +1 -1
  18. package/css/style-irp.css +3 -3
  19. package/css/style-irp.css.map +1 -1
  20. package/css/style-mcr.css +3 -3
  21. package/css/style-mcr.css.map +1 -1
  22. package/css/style-preventionweb.css +3 -3
  23. package/css/style-preventionweb.css.map +1 -1
  24. package/css/style.css +3 -3
  25. package/css/style.css.map +1 -1
  26. package/error-pages/401.html +1 -1
  27. package/error-pages/403.html +1 -1
  28. package/error-pages/404.html +1 -1
  29. package/error-pages/429.html +1 -1
  30. package/error-pages/500.html +1 -1
  31. package/error-pages/502.html +1 -1
  32. package/error-pages/503.html +1 -1
  33. package/error-pages/504.html +1 -1
  34. package/error-pages/5xx.html +1 -1
  35. package/error-pages/challenge.html +1 -1
  36. package/error-pages/managed-challenge.html +1 -1
  37. package/js/tabs.js +0 -7
  38. package/package.json +1 -1
  39. package/scss/Components/Cards/Card/card.scss +2 -2
  40. package/scss/Components/MegaMenu/megamenu.scss +74 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see MegaMenu.js.LICENSE.txt */
6
- import{useEffect as e,useRef as n,useState as t}from"react";var i={9698(e,n){var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(e,n,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==n.key&&(r=""+n.key),"key"in n)for(var a in i={},n)"key"!==a&&(i[a]=n[a]);else i=n;return n=i.ref,{$$typeof:t,type:e,key:r,ref:void 0!==n?n:null,props:i}}n.Fragment=i,n.jsx=r,n.jsxs=r},4848(e,n,t){e.exports=t(9698)}},r={};function a(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={exports:{}};return i[e](t,t.exports,a),t.exports}a.d=(e,n)=>{for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var s=a(4848);function o({section:i,index:r,sectionListRef:a,itemListRef:o}){const[l,c]=t(0),[m,u]=t(0),[d,g]=t([]),f=n(null),p=n(null),h=e=>{if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"ArrowDown"!==e.key&&"Tab"!==e.key||(m<d?.length-1?u(e=>e+1):(u(0),o.current?.[r+1]?.focus())),("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(m>0?u(e=>e-1):(o.current?.[r]?.focus(),u(0))),f.current&&("ArrowLeft"===e.key&&u(0),"ArrowRight"===e.key)){const e=p.current,n=e?.querySelector("ul > li > a");if(n){e.setAttribute("tabindex","-1"),n.focus();const t=d.findIndex(e=>e===n);-1!==t&&u(t)}else{p.current?.focus();const e=d.filter(e=>e===p.current);e[0]&&u(d.indexOf(e[0]))}}};return e(()=>{const e=a?.current?.[r]?.querySelectorAll("audio, button, a, canvas, details, iframe, input, select, summary, textarea, video, [tabindex]");g(Array.from(e||[]))},[a,r,l]),e(()=>{d.length>0&&m>=0&&d[m]?.focus()},[m]),(0,s.jsxs)(s.Fragment,{children:[i&&i.items&&(0,s.jsxs)("article",{className:"mg-mega-content | mg-container-full-width","aria-label":"Menu section","aria-live":"polite",tabIndex:0,ref:e=>a.current[r]=e,onKeyDown:h,role:"region",children:[i.bannerHeading&&i.bannerDescription&&i.items&&(0,s.jsxs)("aside",{className:"mg-mega-content__left","aria-label":"Category navigation",ref:f,tabIndex:0,role:"navigation",children:[(0,s.jsxs)("section",{className:"mg-mega-content__banner",children:[(0,s.jsx)("header",{children:i.bannerHeading}),i.bannerDescription.includes("<")?(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:i.bannerDescription}}):(0,s.jsx)("p",{children:i.bannerDescription}),i.bannerButton?.label&&(0,s.jsx)("a",{href:i.bannerButton.url,className:"mg-button mg-button-primary",children:i.bannerButton.label})]}),i.items.length>0&&i.items[0].items&&i.items[0].items.length>0?(0,s.jsx)("ul",{className:"mg-mega-content__section-list",role:"menu","aria-label":"Categories",children:i.items.map((e,n)=>(0,s.jsx)("li",{className:"mg-mega-content__section-list-item",onMouseEnter:()=>c(n),role:"none",children:(0,s.jsx)("a",{className:"mg-mega-content__section-list-link "+(l===n?"mg-mega-content__section-list-link--active":""),href:e.url,"aria-current":l===n?"page":void 0,onFocus:()=>c(n),role:"menuitem","aria-haspopup":e.items&&e.items.length>0?"true":void 0,children:e.title})},n))}):null]}),i.items&&(0,s.jsxs)("section",{className:"mg-mega-content__right","aria-label":"Submenu content",ref:p,tabIndex:0,role:"navigation",children:[(0,s.jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--mobile",children:i.items.map((e,n)=>(0,s.jsxs)("li",{role:"none",children:[(0,s.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&e.items.length>0&&(0,s.jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,n)=>(0,s.jsxs)("li",{role:"none",children:[(0,s.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s.jsx)("ul",{role:"menu","aria-label":`${e.title} nested submenu`,children:e.items.map((e,n)=>(0,s.jsx)("li",{role:"none",children:(0,s.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))})]},n))})]},n))}),(0,s.jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--desktop",children:i.items[l]?.items?i.items[l].items.map((e,n)=>(0,s.jsxs)("li",{role:"none",children:[(0,s.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s.jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,n)=>(0,s.jsx)("li",{role:"none",children:(0,s.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))})]},n)):i.items.map((e,n)=>(0,s.jsx)("li",{role:"none",children:(0,s.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))},`desktop-menu-${l}`)]})]}),i&&!i.items&&i.bannerDescription&&(0,s.jsx)("article",{className:"mg-mega-content | mg-container-full-width","aria-live":"polite","aria-label":"Submenu item",tabIndex:0,ref:e=>a.current[r]=e,dangerouslySetInnerHTML:{__html:i.bannerDescription},onKeyDown:h})]})}function l({title:e,onMouseEnter:n,activeItem:t,link:i,bannerDescription:r,handleOnKeyDown:a,ref:l,section:c,sectionListRef:m,itemListRef:u,index:d}){let g=d===t;return(0,s.jsxs)("li",{className:"mg-mega-topbar__item "+(g?"mg-mega-topbar__item--active":""),onMouseEnter:c||r?n:void 0,onFocus:n,onKeyDown:a,role:"none",children:[i&&i.url?(0,s.jsx)("a",{className:"mg-mega-topbar__item-link",href:i.url,ref:l,role:"menuitem","aria-haspopup":c&&c.items?"true":void 0,"aria-expanded":g?"true":void 0,children:e}):(0,s.jsx)("button",{className:"mg-mega-topbar__item-link",ref:l,role:"menuitem","aria-haspopup":c&&c.items?"true":void 0,"aria-expanded":g?"true":void 0,children:e}),(0,s.jsx)(o,{section:c,index:d,sectionListRef:m,itemListRef:u})]})}function c({onClick:e,isOpen:n}){return(0,s.jsx)("button",{className:"mg-mega-topbar-mobile__icon-button",onClick:e,"aria-label":"Toggle navigation menu","aria-haspopup":"true",children:(0,s.jsx)("span",{className:"mg-icon "+(n?"mg-icon-angle-circled-left":"mg-icon-menu"),"aria-hidden":"true"})})}function m({handleItemHover:e,toggleShowSidebar:n,showSidebar:t,sections:i,activeItem:r,sectionListRef:a,itemListRef:o}){return(0,s.jsxs)("ul",{className:"mg-mega-topbar | mg-container-full-width",role:"menubar","aria-label":"Main navigation menu",children:[(0,s.jsx)(c,{isOpen:t,onClick:()=>n()}),i.map((n,t)=>(0,s.jsx)(l,{index:t,ref:e=>o.current[t]=e,title:n.title,bannerDescription:n.bannerDescription,link:n.bannerButton,children:n.sections,onMouseEnter:()=>e(t),activeItem:r,section:n,handleOnKeyDown:e=>{((e,n)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const t=o?.current;"ArrowLeft"===e.key&&n>=1&&t[n-1].focus(),"ArrowRight"===e.key&&n<t?.length-1&&t[n+1].focus(),"ArrowDown"===e.key&&a?.current?.[n].focus()})(e,t)},sectionListRef:a,itemListRef:o},t))]})}function u({section:e,sectionListRef:n,sectionIndex:t,handleSectionToggle:i,index:r,itemListRef:a,ref:l,handleOnKeyDown:c}){const m=t===r,u=e?.items&&e.items.length>0;return(0,s.jsxs)("li",{className:"mg-mega-sidebar-section",onKeyDown:c,role:"none",children:[u?(0,s.jsxs)("button",{className:"mg-mega-sidebar-section__item",onClick:()=>i(r),"aria-pressed":m,"aria-expanded":m,"aria-haspopup":"true",ref:l,role:"menuitem",children:[(0,s.jsx)("span",{children:e.title}),(0,s.jsx)("span",{className:"mg-icon mg-icon-angle-circled-left","aria-hidden":"true"})]}):(0,s.jsx)("a",{className:"mg-mega-sidebar-section__item",href:e.url||e.bannerButton?.url||"#",ref:l,role:"menuitem",children:(0,s.jsx)("span",{children:e.title})}),u&&m&&(0,s.jsx)(o,{section:e,index:r,sectionListRef:n,itemListRef:a})]})}function d({sections:n,itemListRef:i,sectionListRef:r,open:a}){const[o,l]=t(null);e(()=>{a||l(null)},[a]);const c=e=>{l(e!==o?e:null)};return(0,s.jsx)("div",{className:"mg-mega-mobile-sidebar "+(a?"mg-mega-mobile-sidebar--open":""),role:"dialog","aria-label":"Mobile navigation menu",children:(0,s.jsx)("ul",{className:"mg-mega-sidebar__list",role:"menu","aria-label":"Navigation options",children:n.map((e,n)=>(0,s.jsx)(u,{index:n,section:e,ref:e=>i.current[n]=e,sectionIndex:o,handleSectionToggle:c,sectionListRef:r,itemListRef:i,handleOnKeyDown:e=>((e,n)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const t=i?.current;"ArrowDown"===e.key&&n<t?.length-1&&(Number.isInteger(o)?r.current?.[n].focus():t[n+1].focus()),"ArrowUp"===e.key&&n>=1&&t[n-1].focus()})(e,n)},n))})})}const g=({sections:i,delay:r=300,hoverDelay:a=180})=>{const[o,l]=t(!1),[c,u]=t(null),g=n([]),f=n([]),p=n(null),h=n(null);return e(()=>()=>{clearTimeout(p.current),clearTimeout(h.current)},[]),e(()=>{const e=e=>{const n=document.querySelector(".mg-mega-wrapper");n&&!n.contains(e.target)&&u(null)};if(null!==c)return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[c]),(0,s.jsxs)("nav",{className:"mg-mega-wrapper",onMouseLeave:()=>{clearTimeout(h.current),p.current=setTimeout(()=>{u(null)},r)},onKeyDown:e=>{"Escape"===e.key&&u(null)},"aria-label":"Main Navigation",children:[(0,s.jsx)(m,{sections:i,handleItemHover:e=>{clearTimeout(p.current),clearTimeout(h.current),h.current=setTimeout(()=>{u(e)},a)},toggleShowSidebar:()=>l(e=>!e),showSidebar:o,activeItem:c,itemListRef:g,sectionListRef:f}),o&&(0,s.jsx)("button",{className:"mg-mega-mobile-sidebar-overlay","aria-label":"Close mobile navigation",onClick:()=>l(!1)}),(0,s.jsx)(d,{open:o,sections:i,itemListRef:g,sectionListRef:f})]})};export{g as default};
6
+ import{useEffect as e,useRef as n,useState as t}from"react";var i={9698(e,n){var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(e,n,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==n.key&&(r=""+n.key),"key"in n)for(var a in i={},n)"key"!==a&&(i[a]=n[a]);else i=n;return n=i.ref,{$$typeof:t,type:e,key:r,ref:void 0!==n?n:null,props:i}}n.Fragment=i,n.jsx=r,n.jsxs=r},4848(e,n,t){e.exports=t(9698)}},r={};function a(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={exports:{}};return i[e](t,t.exports,a),t.exports}a.d=(e,n)=>{for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var o=a(4848);function s({section:i,index:r,sectionListRef:a,itemListRef:s}){const[l,c]=t(0),[m,u]=t(0),[d,g]=t([]),h=n(null),f=n(null),p=e=>{if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"ArrowDown"!==e.key&&"Tab"!==e.key||(m<d?.length-1?u(e=>e+1):(u(0),s.current?.[r+1]?.focus())),("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(m>0?u(e=>e-1):(s.current?.[r]?.focus(),u(0))),h.current&&("ArrowLeft"===e.key&&u(0),"ArrowRight"===e.key)){const e=f.current,n=e?.querySelector("ul > li > a");if(n){e.setAttribute("tabindex","-1"),n.focus();const t=d.findIndex(e=>e===n);-1!==t&&u(t)}else{f.current?.focus();const e=d.filter(e=>e===f.current);e[0]&&u(d.indexOf(e[0]))}}};return e(()=>{const e=a?.current?.[r]?.querySelectorAll("audio, button, a, canvas, details, iframe, input, select, summary, textarea, video, [tabindex]");g(Array.from(e||[]))},[a,r,l]),e(()=>{d.length>0&&m>=0&&d[m]?.focus()},[m]),(0,o.jsxs)(o.Fragment,{children:[i&&i.items&&(0,o.jsxs)("article",{className:"mg-mega-content | mg-container-full-width","aria-label":"Menu section","aria-live":"polite",tabIndex:0,ref:e=>a.current[r]=e,onKeyDown:p,role:"region",children:[i.bannerHeading&&i.bannerDescription&&i.items&&(0,o.jsxs)("aside",{className:"mg-mega-content__left","aria-label":"Category navigation",ref:h,tabIndex:0,role:"navigation",children:[(0,o.jsxs)("section",{className:"mg-mega-content__banner",children:[(0,o.jsx)("header",{children:i.bannerHeading}),i.bannerDescription.includes("<")?(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:i.bannerDescription}}):(0,o.jsx)("p",{children:i.bannerDescription}),i.bannerButton?.label&&(0,o.jsx)("a",{href:i.bannerButton.url,className:"mg-button mg-button-primary",children:i.bannerButton.label})]}),i.items.length>0&&i.items[0].items&&i.items[0].items.length>0?(0,o.jsx)("ul",{className:"mg-mega-content__section-list",role:"menu","aria-label":"Categories",children:i.items.map((e,n)=>(0,o.jsx)("li",{className:"mg-mega-content__section-list-item",onMouseEnter:()=>c(n),role:"none",children:(0,o.jsx)("a",{className:"mg-mega-content__section-list-link "+(l===n?"mg-mega-content__section-list-link--active":""),href:e.url,"aria-current":l===n?"page":void 0,onFocus:()=>c(n),role:"menuitem","aria-haspopup":e.items&&e.items.length>0?"true":void 0,children:e.title})},n))}):null]}),i.items&&(0,o.jsxs)("section",{className:"mg-mega-content__right","aria-label":"Submenu content",ref:f,tabIndex:0,role:"navigation",children:[(0,o.jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--mobile",children:i.items.map((e,n)=>(0,o.jsxs)("li",{role:"none",children:[(0,o.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&e.items.length>0&&(0,o.jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,n)=>(0,o.jsxs)("li",{role:"none",children:[(0,o.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,o.jsx)("ul",{role:"menu","aria-label":`${e.title} nested submenu`,children:e.items.map((e,n)=>(0,o.jsx)("li",{role:"none",children:(0,o.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))})]},n))})]},n))}),(0,o.jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--desktop",children:i.items[l]?.items?i.items[l].items.map((e,n)=>(0,o.jsxs)("li",{role:"none",children:[(0,o.jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,o.jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,n)=>(0,o.jsx)("li",{role:"none",children:(0,o.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))})]},n)):i.items.map((e,n)=>(0,o.jsx)("li",{role:"none",children:(0,o.jsx)("a",{href:e.url,role:"menuitem",children:e.title})},n))},`desktop-menu-${l}`)]})]}),i&&!i.items&&i.bannerDescription&&(0,o.jsx)("article",{className:"mg-mega-content | mg-container-full-width","aria-live":"polite","aria-label":"Submenu item",tabIndex:0,ref:e=>a.current[r]=e,dangerouslySetInnerHTML:{__html:i.bannerDescription},onKeyDown:p})]})}function l({title:e,onMouseEnter:n,activeItem:t,link:i,bannerDescription:r,handleOnKeyDown:a,ref:l,section:c,sectionListRef:m,itemListRef:u,index:d}){let g=d===t;return(0,o.jsxs)("li",{className:"mg-mega-topbar__item "+(g?"mg-mega-topbar__item--active":""),onMouseEnter:c||r?n:void 0,onFocus:n,onKeyDown:a,role:"none",children:[i&&i.url?(0,o.jsx)("a",{className:"mg-mega-topbar__item-link",href:i.url,ref:l,role:"menuitem","aria-haspopup":c&&c.items?"true":void 0,"aria-expanded":g?"true":void 0,children:e}):(0,o.jsx)("button",{className:"mg-mega-topbar__item-link",ref:l,role:"menuitem","aria-haspopup":c&&c.items?"true":void 0,"aria-expanded":g?"true":void 0,children:e}),(0,o.jsx)(s,{section:c,index:d,sectionListRef:m,itemListRef:u})]})}function c({onClick:e,isOpen:n}){return(0,o.jsx)("button",{className:"mg-mega-topbar-mobile__icon-button",onClick:e,"aria-label":"Toggle navigation menu","aria-haspopup":"true",children:(0,o.jsx)("span",{className:"mg-icon "+(n?"mg-icon-angle-circled-left":"mg-icon-menu"),"aria-hidden":"true"})})}function m({handleItemHover:e,toggleShowSidebar:n,showSidebar:t,sections:i,activeItem:r,sectionListRef:a,itemListRef:s,logoSrc:m,logoAlt:u="",logoHref:d="/",logoWidth:g,logoHeight:h}){const f=i.map((n,t)=>(0,o.jsx)(l,{index:t,ref:e=>s.current[t]=e,title:n.title,bannerDescription:n.bannerDescription,link:n.bannerButton,children:n.sections,onMouseEnter:()=>e(t),activeItem:r,section:n,handleOnKeyDown:e=>{((e,n)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const t=s?.current;"ArrowLeft"===e.key&&n>=1&&t[n-1].focus(),"ArrowRight"===e.key&&n<t?.length-1&&t[n+1].focus(),"ArrowDown"===e.key&&a?.current?.[n].focus()})(e,t)},sectionListRef:a,itemListRef:s},t));return m?(0,o.jsxs)("div",{className:"mg-mega-topbar mg-mega-topbar--branded | mg-container-full-width",children:[(0,o.jsx)("a",{className:"mg-mega-topbar__logo",href:d,"aria-label":u||"Home",children:(0,o.jsx)("img",{className:"mg-mega-topbar__logo-img",src:m,alt:u,...null!=g?{width:g}:{},...null!=h?{height:h}:{}})}),(0,o.jsx)(c,{isOpen:t,onClick:()=>n()}),(0,o.jsx)("ul",{className:"mg-mega-topbar__nav",role:"menubar","aria-label":"Main navigation menu",children:f})]}):(0,o.jsxs)("ul",{className:"mg-mega-topbar | mg-container-full-width",role:"menubar","aria-label":"Main navigation menu",children:[(0,o.jsx)(c,{isOpen:t,onClick:()=>n()}),f]})}function u({section:e,sectionListRef:n,sectionIndex:t,handleSectionToggle:i,index:r,itemListRef:a,ref:l,handleOnKeyDown:c}){const m=t===r,u=e?.items&&e.items.length>0;return(0,o.jsxs)("li",{className:"mg-mega-sidebar-section",onKeyDown:c,role:"none",children:[u?(0,o.jsxs)("button",{className:"mg-mega-sidebar-section__item",onClick:()=>i(r),"aria-pressed":m,"aria-expanded":m,"aria-haspopup":"true",ref:l,role:"menuitem",children:[(0,o.jsx)("span",{children:e.title}),(0,o.jsx)("span",{className:"mg-icon mg-icon-angle-circled-left","aria-hidden":"true"})]}):(0,o.jsx)("a",{className:"mg-mega-sidebar-section__item",href:e.url||e.bannerButton?.url||"#",ref:l,role:"menuitem",children:(0,o.jsx)("span",{children:e.title})}),u&&m&&(0,o.jsx)(s,{section:e,index:r,sectionListRef:n,itemListRef:a})]})}function d({sections:n,itemListRef:i,sectionListRef:r,open:a}){const[s,l]=t(null);e(()=>{a||l(null)},[a]);const c=e=>{l(e!==s?e:null)};return(0,o.jsx)("div",{className:"mg-mega-mobile-sidebar "+(a?"mg-mega-mobile-sidebar--open":""),role:"dialog","aria-label":"Mobile navigation menu",children:(0,o.jsx)("ul",{className:"mg-mega-sidebar__list",role:"menu","aria-label":"Navigation options",children:n.map((e,n)=>(0,o.jsx)(u,{index:n,section:e,ref:e=>i.current[n]=e,sectionIndex:s,handleSectionToggle:c,sectionListRef:r,itemListRef:i,handleOnKeyDown:e=>((e,n)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const t=i?.current;"ArrowDown"===e.key&&n<t?.length-1&&(Number.isInteger(s)?r.current?.[n].focus():t[n+1].focus()),"ArrowUp"===e.key&&n>=1&&t[n-1].focus()})(e,n)},n))})})}const g=({sections:i,delay:r=300,hoverDelay:a=180,logoSrc:s,logoAlt:l="",logoHref:c="/",logoWidth:u,logoHeight:g})=>{const[h,f]=t(!1),[p,b]=t(null),x=n([]),j=n([]),v=n(null),y=n(null);return e(()=>()=>{clearTimeout(v.current),clearTimeout(y.current)},[]),e(()=>{const e=e=>{const n=document.querySelector(".mg-mega-wrapper");n&&!n.contains(e.target)&&b(null)};if(null!==p)return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[p]),(0,o.jsxs)("nav",{className:"mg-mega-wrapper",onMouseLeave:()=>{clearTimeout(y.current),v.current=setTimeout(()=>{b(null)},r)},onKeyDown:e=>{"Escape"===e.key&&b(null)},"aria-label":"Main Navigation",children:[(0,o.jsx)(m,{sections:i,handleItemHover:e=>{clearTimeout(v.current),clearTimeout(y.current),y.current=setTimeout(()=>{b(e)},a)},toggleShowSidebar:()=>f(e=>!e),showSidebar:h,activeItem:p,itemListRef:x,sectionListRef:j,logoSrc:s,logoAlt:l,logoHref:c,logoWidth:u,logoHeight:g}),h&&(0,o.jsx)("button",{className:"mg-mega-mobile-sidebar-overlay","aria-label":"Close mobile navigation",onClick:()=>f(!1)}),(0,o.jsx)(d,{open:h,sections:i,itemListRef:x,sectionListRef:j})]})};function h(e){const{dataset:n}=e,t={delay:n.delay?parseInt(n.delay,10):300,hoverDelay:n.hoverDelay?parseInt(n.hoverDelay,10):180};if(n.sections)try{t.sections=JSON.parse(n.sections)}catch{t.sections=[]}return t}export{g as default,h as fromElement};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see Pager.js.LICENSE.txt */
6
6
  import*as e from"react";var a={2694(e,a,n){var r=n(6925);function t(){}function s(){}s.resetWarningCache=t,e.exports=function(){function e(e,a,n,t,s,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function a(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:s,resetWarningCache:t};return n.PropTypes=n,n}},5556(e,a,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,a){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(e,a,r){var t=null;if(void 0!==r&&(t=""+r),void 0!==a.key&&(t=""+a.key),"key"in a)for(var s in r={},a)"key"!==s&&(r[s]=a[s]);else r=a;return a=r.ref,{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:r}}a.Fragment=r,a.jsx=t,a.jsxs=t},4848(e,a,n){e.exports=n(9698)},1649(a,n,r){var t,s;a.exports=(t={useCallback:()=>e.useCallback,useMemo:()=>e.useMemo,useState:()=>e.useState},s={},r.d(s,t),s)}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return a[e](s,s.exports,r),s.exports}r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},r.d=(e,a)=>{for(var n in a)r.o(a,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var t=r(1649),s=r(5556),i=r.n(s),l=r(4848);function o({page:e,totalPages:a,onPageChange:n,isLoading:r=!1}){const s=(0,t.useMemo)(()=>function(e,a){if(null==a)return[{type:"page",number:e}];if(a<=1)return[];const n=[],r=Math.floor(2.5);let t=Math.max(1,e-r),s=Math.min(a,t+5-1);s-t<4&&(t=Math.max(1,s-5+1)),t>1&&(n.push({type:"page",number:1}),t>2&&n.push({type:"ellipsis",key:"start"}));for(let e=t;e<=s;e++)(1!==e&&e!==a||1===e&&1===t||e===a&&s===a)&&n.push({type:"page",number:e});return s<a&&(s<a-1&&n.push({type:"ellipsis",key:"end"}),n.push({type:"page",number:a})),n}(e,a),[e,a]),i=(0,t.useCallback)(r=>{r<1||null!=a&&r>a||r!==e&&n(r)},[n,e,a]),o=(0,t.useCallback)((e,a)=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i(a))},[i]);if(null!=a&&a<=1)return null;const p=e>1,g=null==a||e<a;return(0,l.jsxs)("ul",{className:"mg-pager__list",children:[(0,l.jsx)("li",{className:"mg-pager__item mg-pager__item--prev",children:(0,l.jsxs)("button",{type:"button",className:"mg-pager__link mg-pager__link--prev "+(p?"":"mg-pager__link--disabled"),onClick:()=>i(e-1),onKeyDown:a=>o(a,e-1),disabled:!p||r,"aria-label":"Go to previous page","aria-disabled":!p,children:[(0,l.jsx)("svg",{className:"mg-pager__icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})}),(0,l.jsx)("span",{className:"mg-pager__text",children:"Previous"})]})}),s.map(a=>{if("ellipsis"===a.type)return(0,l.jsx)("li",{className:"mg-pager__item mg-pager__item--ellipsis","aria-hidden":"true",children:(0,l.jsx)("span",{className:"mg-pager__ellipsis",children:"…"})},a.key);const n=a.number===e;return(0,l.jsx)("li",{className:"mg-pager__item",children:(0,l.jsx)("button",{type:"button",className:"mg-pager__link mg-pager__link--number "+(n?"mg-pager__link--current":""),onClick:()=>i(a.number),onKeyDown:e=>o(e,a.number),disabled:r,"aria-label":`Page ${a.number}${n?", current page":""}`,"aria-current":n?"page":void 0,children:a.number})},a.number)}),(0,l.jsx)("li",{className:"mg-pager__item mg-pager__item--next",children:(0,l.jsxs)("button",{type:"button",className:"mg-pager__link mg-pager__link--next "+(g?"":"mg-pager__link--disabled"),onClick:()=>i(e+1),onKeyDown:a=>o(a,e+1),disabled:!g||r,"aria-label":"Go to next page","aria-disabled":!g,children:[(0,l.jsx)("span",{className:"mg-pager__text",children:"Next"}),(0,l.jsx)("svg",{className:"mg-pager__icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,l.jsx)("polyline",{points:"9 18 15 12 9 6"})})]})})]})}function p({range:e,rangeLabel:a="Showing {start}–{end}"}){if(!e)return null;const n=a.replace("{start}",e.start).replace("{end}",e.end);return(0,l.jsx)("p",{className:"mg-pager__range","aria-live":"polite",children:n})}function g({jumpToLabel:e="Go to page",jumpToAction:a="Go",onPageChange:n,totalPages:r,isLoading:s=!1}){const[i,o]=(0,t.useState)(""),p=(0,t.useCallback)(e=>{e.preventDefault();const a=parseInt(i,10);if(Number.isNaN(a)||a<1)return;let t=a;null!=r&&(t=Math.min(t,r)),t=Math.max(1,t),n(t),o("")},[i,n,r]),g="mg-pager-jump-input";return(0,l.jsxs)("form",{className:"mg-pager__jump",onSubmit:p,children:[(0,l.jsx)("label",{className:"mg-pager__jump-label",htmlFor:g,children:e}),(0,l.jsx)("input",{id:g,className:"mg-pager__jump-input",type:"number",min:1,max:null!=r?r:void 0,value:i,onChange:e=>o(e.target.value),disabled:s,"aria-label":e}),(0,l.jsx)("button",{type:"submit",className:"mg-pager__jump-btn",disabled:s||!i,children:a})]})}function u({page:e,totalPages:a=null,onPageChange:n,isLoading:r=!1,layout:t="centered",ariaLabel:s="Pagination",range:i,rangeLabel:u,showJumpTo:m=!1,jumpToLabel:c,jumpToAction:d,emptyState:b,emptyAction:h}){return b?(0,l.jsx)("nav",{className:"mg-pager","aria-label":s,children:(0,l.jsxs)("p",{className:"mg-pager__notice",children:[b,h&&(0,l.jsxs)(l.Fragment,{children:[" ",(0,l.jsx)("button",{type:"button",className:"mg-pager__notice-action",onClick:h.onClick,children:h.label})]})]})}):"bar"===t?(0,l.jsxs)("nav",{className:"mg-pager","aria-label":s,children:[(0,l.jsxs)("div",{className:"mg-pager__bar",children:[i&&(0,l.jsx)(p,{range:i,rangeLabel:u}),(0,l.jsx)(o,{page:e,totalPages:a,onPageChange:n,isLoading:r}),m&&(0,l.jsx)(g,{jumpToLabel:c,jumpToAction:d,onPageChange:n,totalPages:a,isLoading:r})]}),(0,l.jsxs)("div",{className:"mg-u-sr-only","aria-live":"polite",children:["Page ",e,null!=a&&` of ${a}`]})]}):(0,l.jsxs)("nav",{className:"mg-pager","aria-label":s,children:[(0,l.jsx)(o,{page:e,totalPages:a,onPageChange:n,isLoading:r}),(0,l.jsxs)("div",{className:"mg-u-sr-only","aria-live":"polite",children:["Page ",e,null!=a&&` of ${a}`]})]})}o.propTypes={page:i().number.isRequired,totalPages:i().number,onPageChange:i().func.isRequired,isLoading:i().bool},p.propTypes={range:i().shape({start:i().number.isRequired,end:i().number.isRequired}),rangeLabel:i().string},g.propTypes={jumpToLabel:i().string,jumpToAction:i().string,onPageChange:i().func.isRequired,totalPages:i().number,isLoading:i().bool},u.propTypes={page:i().number.isRequired,totalPages:i().number,onPageChange:i().func.isRequired,isLoading:i().bool,layout:i().oneOf(["centered","bar"]),ariaLabel:i().string,range:i().shape({start:i().number.isRequired,end:i().number.isRequired}),rangeLabel:i().string,showJumpTo:i().bool,jumpToLabel:i().string,jumpToAction:i().string,emptyState:i().string,emptyAction:i().shape({label:i().string.isRequired,onClick:i().func.isRequired})};const m=u;export{u as Pager,m as default};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see QuoteHighlight.js.LICENSE.txt */
6
- import"react";var e={2694(e,t,r){var a=r(6925);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,i,s){if(s!==a){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var r=Symbol.for("react.transitional.element");function a(e,t,a){var n=null;if(void 0!==a&&(n=""+a),void 0!==t.key&&(n=""+t.key),"key"in t)for(var i in a={},t)"key"!==i&&(a[i]=t[i]);else a=t;return t=a.ref,{$$typeof:r,type:e,key:n,ref:void 0!==t?t:null,props:a}}Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a},4848(e,t,r){e.exports=r(9698)}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=r(5556),n=r.n(a),i=r(4848);const s=({quote:e,attribution:t,attributionTitle:r,imageSrc:a,imageAlt:n,backgroundColor:s="light",variant:o="line",alignment:l="full",className:c="",...p})=>{const u="mg-quote-highlight",m=!!a;return(0,i.jsxs)("section",{className:`${u} ${u}--${s} ${u}--${o} ${u}--${l} ${m?`${u}--has-image`:""} ${c}`,...p,children:[(0,i.jsxs)("div",{className:`${u}__content`,children:[(0,i.jsx)("blockquote",{className:`${u}__quote`,children:"string"!=typeof e||e.includes("<")?(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}):(0,i.jsx)("p",{children:e})}),"line"===o&&(0,i.jsx)("div",{className:`${u}__separator`}),(t||r||m)&&(0,i.jsx)("div",{className:`${u}__attribution`,children:(0,i.jsxs)("div",{className:`${u}__attribution-wrapper`,children:[m&&(0,i.jsx)("div",{className:`${u}__portrait-container`,children:(0,i.jsx)("img",{src:a,alt:n||`${t||"Quote"} image`,className:`${u}__portrait`})}),(t||r)&&(0,i.jsxs)("div",{className:`${u}__attribution-text`,children:[t&&(0,i.jsx)("p",{className:`${u}__attribution-name`,dangerouslySetInnerHTML:{__html:t}}),r&&(0,i.jsx)("p",{className:`${u}__attribution-title`,dangerouslySetInnerHTML:{__html:r}})]})]})})]}),"image"===o&&m&&(0,i.jsx)("div",{className:`${u}__image-container`,children:(0,i.jsx)("img",{src:a,alt:n||`${t||"Quote"} image`,className:`${u}__image`})})]})};s.propTypes={quote:n().string.isRequired,attribution:n().string,attributionTitle:n().string,imageSrc:n().string,imageAlt:n().string,backgroundColor:n().oneOf(["light","dark","bright"]),variant:n().oneOf(["line","image"]),alignment:n().oneOf(["full","left","right"]),className:n().string};const o=s;export{o as default};
6
+ import"react";var e={2694(e,t,r){var a=r(6925);function i(){}function n(){}n.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,n,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:i};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var r=Symbol.for("react.transitional.element");function a(e,t,a){var i=null;if(void 0!==a&&(i=""+a),void 0!==t.key&&(i=""+t.key),"key"in t)for(var n in a={},t)"key"!==n&&(a[n]=t[n]);else a=t;return t=a.ref,{$$typeof:r,type:e,key:i,ref:void 0!==t?t:null,props:a}}Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a},4848(e,t,r){e.exports=r(9698)}},t={};function r(a){var i=t[a];if(void 0!==i)return i.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=r(5556),i=r.n(a),n=r(4848);const o=({quote:e,attribution:t,attributionTitle:r,imageSrc:a,imageAlt:i,backgroundColor:o="light",variant:s="line",alignment:l="full",className:c="",...u})=>{const m="mg-quote-highlight",p=!!a;return(0,n.jsxs)("section",{className:`${m} ${m}--${o} ${m}--${s} ${m}--${l} ${p?`${m}--has-image`:""} ${c}`,...u,children:[(0,n.jsxs)("div",{className:`${m}__content`,children:[(0,n.jsx)("blockquote",{className:`${m}__quote`,children:"string"!=typeof e||e.includes("<")?(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}):(0,n.jsx)("p",{children:e})}),"line"===s&&(0,n.jsx)("div",{className:`${m}__separator`}),(t||r||p)&&(0,n.jsx)("div",{className:`${m}__attribution`,children:(0,n.jsxs)("div",{className:`${m}__attribution-wrapper`,children:[p&&(0,n.jsx)("div",{className:`${m}__portrait-container`,children:(0,n.jsx)("img",{src:a,alt:i||`${t||"Quote"} image`,className:`${m}__portrait`})}),(t||r)&&(0,n.jsxs)("div",{className:`${m}__attribution-text`,children:[t&&(0,n.jsx)("p",{className:`${m}__attribution-name`,dangerouslySetInnerHTML:{__html:t}}),r&&(0,n.jsx)("p",{className:`${m}__attribution-title`,dangerouslySetInnerHTML:{__html:r}})]})]})})]}),"image"===s&&p&&(0,n.jsx)("div",{className:`${m}__image-container`,children:(0,n.jsx)("img",{src:a,alt:i||`${t||"Quote"} image`,className:`${m}__image`})})]})};o.propTypes={quote:i().string.isRequired,attribution:i().string,attributionTitle:i().string,imageSrc:i().string,imageAlt:i().string,backgroundColor:i().oneOf(["light","dark","bright"]),variant:i().oneOf(["line","image"]),alignment:i().oneOf(["full","left","right"]),className:i().string};const s=o;function l(e){const{dataset:t}=e;return{quote:t.quote||"",attribution:t.attribution||void 0,attributionTitle:t.attributionTitle||void 0,imageSrc:t.imageSrc||void 0,imageAlt:t.imageAlt||void 0,backgroundColor:t.backgroundColor||"light",variant:t.variant||"line",alignment:t.alignment||"full"}}export{s as default,l as fromElement};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see ScrollContainer.js.LICENSE.txt */
6
- import{default as e,useCallback as r,useEffect as t,useMemo as n,useRef as o}from"react";var s={2694(e,r,t){var n=t(6925);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,s,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:s,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");function n(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var s in n={},r)"key"!==s&&(n[s]=r[s]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n},4848(e,r,t){e.exports=t(9698)}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={exports:{}};return s[e](t,t.exports,a),t.exports}a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var l=a(5556),c=a.n(l),u=a(4848);const d=e.memo(({onScroll:e,leftButtonRef:r,rightButtonRef:t})=>(0,u.jsxs)("nav",{className:"mg-scroll__nav",children:[(0,u.jsx)("button",{ref:r,className:"mg-scroll__nav-button",onClick:()=>e("left"),"aria-label":"Scroll left",children:"←"}),(0,u.jsx)("button",{ref:t,className:"mg-scroll__nav-button",onClick:()=>e("right"),"aria-label":"Scroll right",children:"→"})]}));d.propTypes={onScroll:c().func.isRequired,leftButtonRef:c().object.isRequired,rightButtonRef:c().object.isRequired};const m=({children:s,height:i,minWidth:a,itemWidth:l,padding:c,className:m,showArrows:p,stepSize:g,...f})=>{const h=o(null),v=o(null),w=o(null),y=o(null),_=o(!1),b=o({isDragging:!1,hasDragged:!1,startX:0,startScrollLeft:0}),L=r(()=>{_.current="ontouchstart"in window&&/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)},[]),x=r(e=>{if(!h.current)return;const r=g||h.current.clientWidth/2,t=h.current.scrollLeft+("right"===e?r:-r);h.current.scrollTo({left:t,behavior:"smooth"})},[g]),E=r(()=>{if(!h.current||!p||_.current)return;const{scrollLeft:e,scrollWidth:r,clientWidth:t}=h.current,n=e>0,o=e+t<r;w.current&&(w.current.disabled=!n),y.current&&(y.current.disabled=!o)},[p]),j=r(e=>{!h.current||e.type.includes("mouse")&&_.current||e.type.includes("mouse")&&(b.current={...b.current,isDragging:!0,hasDragged:!1,startX:e.pageX,startScrollLeft:h.current.scrollLeft},e.preventDefault())},[]),S=r(e=>{if(b.current.isDragging&&h.current&&(!e.type.includes("mouse")||!_.current)&&e.type.includes("mouse")){const r=e.pageX;if(Math.abs(b.current.startX-r)>10){e.preventDefault(),b.current.hasDragged=!0;const t=b.current.startX-r;h.current.scrollLeft=b.current.startScrollLeft+t,E()}}},[E]),R=r(e=>{b.current.isDragging&&(b.current.isDragging=!1);const r=e.pageX;Math.abs(b.current.startX-r)<2&&e.target.href&&(window.parent.location.href=e.target.href)},[]),k=r(e=>{b.current.hasDragged&&(e.preventDefault(),e.stopPropagation())},[]),D=n(()=>({"--scroll-height":i,"--scroll-min-width":a,"--scroll-padding":c,"--scroll-item-width":l}),[i,a,c,l]),T=n(()=>["mg-scroll__container",i&&"mg-scroll__container--custom-height",a&&"mg-scroll__container--custom-width",c&&"mg-scroll__container--custom-padding",l&&"mg-scroll__container--custom-item-width",_.current&&"mg-scroll__container--mobile",m].filter(Boolean).join(" "),[i,a,c,l,m]);return t(()=>{L(),E();const e=h.current;return e&&(e.addEventListener("scroll",E,{passive:!0}),window.addEventListener("resize",E,{passive:!0}),_.current||(e.addEventListener("mousedown",j),window.addEventListener("mousemove",S),window.addEventListener("mouseup",R),window.addEventListener("mouseleave",R)),e.addEventListener("click",k,{capture:!0})),()=>{e&&(e.removeEventListener("scroll",E),window.removeEventListener("resize",E),_.current||(e.removeEventListener("mousedown",j),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",R),window.removeEventListener("mouseleave",R)),e.removeEventListener("click",k,{capture:!0}))}},[L,E,j,S,R,k]),(0,u.jsxs)("section",{className:"mg-scroll"+(_.current?" mg-scroll--mobile":""),"data-mg-scroll-container":!0,children:[p&&!_.current&&(0,u.jsx)(d,{onScroll:x,leftButtonRef:w,rightButtonRef:y}),(0,u.jsx)("div",{ref:h,className:T,style:D,...f,children:(0,u.jsx)("div",{ref:v,className:"mg-scroll__content"+(_.current?"":" mg-grid"),children:Array.isArray(s)&&!e.isValidElement(s[0])?s.map((e,r)=>(0,u.jsx)("div",{className:"mg-scroll__item-wrapper",children:(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:String(e)}})},r)):e.Children.map(s,e=>(0,u.jsx)("div",{className:"mg-scroll__item-wrapper",children:e}))})})]})};m.propTypes={children:c().node.isRequired,height:c().string,minWidth:c().string,itemWidth:c().string,padding:c().string,className:c().string,showArrows:c().bool,stepSize:c().number},m.defaultProps={height:"auto",minWidth:"auto",itemWidth:"auto",padding:"0",className:"",showArrows:!1,stepSize:null};const p=e.memo(m);export{p as default};
6
+ import{default as e,useCallback as r,useEffect as t,useMemo as n,useRef as o}from"react";var s={2694(e,r,t){var n=t(6925);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,s,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:s,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");function n(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var s in n={},r)"key"!==s&&(n[s]=r[s]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n},4848(e,r,t){e.exports=t(9698)}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={exports:{}};return s[e](t,t.exports,a),t.exports}a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var l=a(5556),c=a.n(l),u=a(4848);const d=e.memo(({onScroll:e,leftButtonRef:r,rightButtonRef:t})=>(0,u.jsxs)("nav",{className:"mg-scroll__nav",children:[(0,u.jsx)("button",{ref:r,className:"mg-scroll__nav-button",onClick:()=>e("left"),"aria-label":"Scroll left",children:"←"}),(0,u.jsx)("button",{ref:t,className:"mg-scroll__nav-button",onClick:()=>e("right"),"aria-label":"Scroll right",children:"→"})]}));d.propTypes={onScroll:c().func.isRequired,leftButtonRef:c().object.isRequired,rightButtonRef:c().object.isRequired};const m=({children:s,height:i,minWidth:a,itemWidth:l,padding:c,className:m,showArrows:p,stepSize:g,...h})=>{const f=o(null),v=o(null),w=o(null),y=o(null),_=o(!1),b=o({isDragging:!1,hasDragged:!1,startX:0,startScrollLeft:0}),L=r(()=>{_.current="ontouchstart"in window&&/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)},[]),S=r(e=>{if(!f.current)return;const r=g||f.current.clientWidth/2,t=f.current.scrollLeft+("right"===e?r:-r);f.current.scrollTo({left:t,behavior:"smooth"})},[g]),x=r(()=>{if(!f.current||!p||_.current)return;const{scrollLeft:e,scrollWidth:r,clientWidth:t}=f.current,n=e>0,o=e+t<r;w.current&&(w.current.disabled=!n),y.current&&(y.current.disabled=!o)},[p]),E=r(e=>{!f.current||e.type.includes("mouse")&&_.current||e.type.includes("mouse")&&(b.current={...b.current,isDragging:!0,hasDragged:!1,startX:e.pageX,startScrollLeft:f.current.scrollLeft},e.preventDefault())},[]),j=r(e=>{if(b.current.isDragging&&f.current&&(!e.type.includes("mouse")||!_.current)&&e.type.includes("mouse")){const r=e.pageX;if(Math.abs(b.current.startX-r)>10){e.preventDefault(),b.current.hasDragged=!0;const t=b.current.startX-r;f.current.scrollLeft=b.current.startScrollLeft+t,x()}}},[x]),T=r(e=>{b.current.isDragging&&(b.current.isDragging=!1);const r=e.pageX;Math.abs(b.current.startX-r)<2&&e.target.href&&(window.parent.location.href=e.target.href)},[]),R=r(e=>{b.current.hasDragged&&(e.preventDefault(),e.stopPropagation())},[]),W=n(()=>({"--scroll-height":i,"--scroll-min-width":a,"--scroll-padding":c,"--scroll-item-width":l}),[i,a,c,l]),D=n(()=>["mg-scroll__container",i&&"mg-scroll__container--custom-height",a&&"mg-scroll__container--custom-width",c&&"mg-scroll__container--custom-padding",l&&"mg-scroll__container--custom-item-width",_.current&&"mg-scroll__container--mobile",m].filter(Boolean).join(" "),[i,a,c,l,m]);return t(()=>{L(),x();const e=f.current;return e&&(e.addEventListener("scroll",x,{passive:!0}),window.addEventListener("resize",x,{passive:!0}),_.current||(e.addEventListener("mousedown",E),window.addEventListener("mousemove",j),window.addEventListener("mouseup",T),window.addEventListener("mouseleave",T)),e.addEventListener("click",R,{capture:!0})),()=>{e&&(e.removeEventListener("scroll",x),window.removeEventListener("resize",x),_.current||(e.removeEventListener("mousedown",E),window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",T),window.removeEventListener("mouseleave",T)),e.removeEventListener("click",R,{capture:!0}))}},[L,x,E,j,T,R]),(0,u.jsxs)("section",{className:"mg-scroll"+(_.current?" mg-scroll--mobile":""),children:[p&&!_.current&&(0,u.jsx)(d,{onScroll:S,leftButtonRef:w,rightButtonRef:y}),(0,u.jsx)("div",{ref:f,className:D,style:W,...h,children:(0,u.jsx)("div",{ref:v,className:"mg-scroll__content"+(_.current?"":" mg-grid"),children:Array.isArray(s)&&!e.isValidElement(s[0])?s.map((e,r)=>(0,u.jsx)("div",{className:"mg-scroll__item-wrapper",children:(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:String(e)}})},r)):e.Children.map(s,e=>(0,u.jsx)("div",{className:"mg-scroll__item-wrapper",children:e}))})})]})};m.propTypes={children:c().node.isRequired,height:c().string,minWidth:c().string,itemWidth:c().string,padding:c().string,className:c().string,showArrows:c().bool,stepSize:c().number},m.defaultProps={height:"auto",minWidth:"auto",itemWidth:"auto",padding:"0",className:"",showArrows:!1,stepSize:null};const p=e.memo(m);function g(e){const{dataset:r}=e,t={height:r.height||"auto",minWidth:r.minWidth||"auto",itemWidth:r.itemWidth||"auto",padding:r.padding||"0",showArrows:"true"===r.showArrows,stepSize:r.stepSize?parseInt(r.stepSize,10):null},n=[],o=(new DOMParser).parseFromString(e.innerHTML,"text/html").querySelector(".mg-scroll__content");return o?Array.from(o.children).forEach(e=>{n.push(e.outerHTML)}):e.innerHTML.trim()&&n.push(e.innerHTML),t.children=n,t}export{p as default,g as fromElement};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see ShareButtons.js.LICENSE.txt */
6
- import{useEffect as t,useRef as e,useState as n}from"react";var r={6320(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,s,c,l,u,d,h,g=e.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(c in s=(a=g.pop()).value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=i[c],(void 0===i[c]||h>d)&&(i[c]=d,g.push(c,d),o[c]=s));if(void 0!==r&&void 0===i[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},7583(t,e,n){const r=n(1333),o=n(157),i=n(7899),a=n(6756);function s(t,e,n,i,a){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=i=void 0):2!==c||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=i=void 0):3===c&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=s.bind(null,i.render),e.toDataURL=s.bind(null,i.renderToDataURL),e.toString=s.bind(null,function(t,e,n){return a.render(t,n)})},1333(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(t,e,n){const r=n(6886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},1433(t,e,n){const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},9899(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8820(t){function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},5822(t,e,n){const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},7518(t,e,n){const r=n(9953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},9953(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},7756(t,e,n){const r=n(6886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},4565(t,e,n){const r=n(6886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},2731(t,e){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},4861(t,e,n){const r=n(208),o=n(6886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},1332(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let s=0;s<e;s++){r=o=0,i=a=null;for(let c=0;c<e;c++){let e=t.get(s,c);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(c,s),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208(t,e,n){const r=n(1878),o=n(7044);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},4357(t,e,n){const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4713(t,e,n){const r=n(2731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(t,e,n){const r=n(6886),o=n(9953),i=n(9899),a=n(8820),s=n(6421),c=n(7756),l=n(1332),u=n(7518),d=n(4764),h=n(1427),g=n(4565),f=n(208),p=n(9801);function m(t,e,n){const r=t.size,o=g.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function w(t,e,n,o){let g;if(Array.isArray(t))g=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=p.rawSplit(t);r=h.getBestVersionForData(e,n)}g=p.fromString(t,r||40)}}const w=h.getBestVersionForData(g,n);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<w)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+w+".\n")}else e=w;const y=function(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),f.getCharCountIndicator(e.mode,t)),e.write(o)});const a=8*(r.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const s=(a-o.getLengthInBits())/8;for(let t=0;t<s;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-u.getTotalCodewordsCount(e,n),a=u.getBlocksCount(e,n),s=a-o%a,c=Math.floor(o/a),l=Math.floor(i/a),h=l+1,g=c-l,f=new d(g);let p=0;const m=new Array(a),w=new Array(a);let y=0;const b=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<s?l:h;m[t]=b.slice(p,p+e),w[t]=f.encode(m[t]),p+=e,y=Math.max(y,e)}const x=new Uint8Array(o);let E,v,C=0;for(E=0;E<y;E++)for(v=0;v<a;v++)E<m[v].length&&(x[C++]=m[v][E]);for(E=0;E<g;E++)for(v=0;v<a;v++)x[C++]=w[v][E];return x}(o,t,e)}(e,n,g),b=r.getSymbolSize(e),x=new a(b);return function(t,e){const n=t.size,r=c.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(x,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(x),function(t,e){const n=s.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(x,e),m(x,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(x,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,s-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,s-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(x,y),isNaN(o)&&(o=l.getBestMask(x,m.bind(null,x,n))),l.applyMask(o,x),m(x,n,o),{modules:x,version:e,errorCorrectionLevel:n,maskPattern:o,segments:g}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),w(t,n,a,i)}},4764(t,e,n){const r=n(4713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7044(t,e){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return s.test(t)}},9801(t,e,n){const r=n(208),o=n(4357),i=n(1433),a=n(5822),s=n(4861),c=n(7044),l=n(6886),u=n(6320);function d(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function g(t){const e=h(c.NUMERIC,r.NUMERIC,t),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return l.isKanjiModeEnabled()?(o=h(c.BYTE,r.BYTE,t),i=h(c.KANJI,r.KANJI,t)):(o=h(c.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function f(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return s.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function p(t,e){let n;const c=r.getBestModeForData(t);if(n=r.from(e,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new s(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return e}(g(t,l.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const s=t[a],c=[];for(let t=0;t<s.length;t++){const l=s[t],u=""+a+t;c.push(u),n[u]={node:l,lastCount:0},o[u]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===l.mode?(o[a][u]=f(n[a].lastCount+l.length,l.mode)-f(n[a].lastCount,l.mode),n[a].lastCount+=l.length):(n[a]&&(n[a].lastCount=l.length),o[a][u]=f(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e))}}i=c}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=u.find_path(i.map,"start","end"),s=[];for(let t=1;t<a.length-1;t++)s.push(i.table[a[t]].node);return e.fromArray(s.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},e.rawSplit=function(t){return e.fromArray(g(t,l.isKanjiModeEnabled()))}},6886(t,e){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},1878(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},1427(t,e,n){const r=n(6886),o=n(7518),i=n(9953),a=n(208),s=n(1878),c=r.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach(function(t){const r=l(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const c=i-l(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-c>=0;)e^=7973<<r.getBCHDigit(e)-c;return t<<12|e}},7899(t,e,n){const r=n(2726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),s=i.getContext("2d"),c=s.createImageData(a,a);return r.qrToImageData(c.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,a),s.putImageData(c,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},6756(t,e,n){const r=n(2726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,s=0;for(let c=0;c<t.length;c++){const l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(r+=a?i("M",l+n,.5+u+n):i("m",o,0),o=0,a=!1),l+1<e&&t[c+1]||(r+=i("h",s),s=0)):o++}return r}(c,s,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,g),g}},2726(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),s=Math.floor((o+2*r.margin)*a),c=r.margin*a,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),d=r.color.light;e>=c&&n>=c&&e<s-c&&n<s-c&&(d=l[i[Math.floor((e-c)/a)*o+Math.floor((n-c)/a)]?1:0]),t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}},9698(t,e){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(t,e,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in r={},e)"key"!==i&&(r[i]=e[i]);else r=e;return e=r.ref,{$$typeof:n,type:t,key:o,ref:void 0!==e?e:null,props:r}}e.Fragment=r,e.jsx=o,e.jsxs=o},4848(t,e,n){t.exports=n(9698)}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return r[t](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a=i(7583);const s=JSON.parse('{"Mail":"mailto:?subject=[SHARING_TEXT_SUBJECT]&body=[SHARING_TEXT_BODY]","Facebook":"https://facebook.com/sharer/sharer.php?u=[SHARING_TEXT_BODY]","LinkedIn":"https://www.linkedin.com/sharing/share-offsite/?url=[SHARING_TEXT_BODY]","Twitter":"https://twitter.com/intent/tweet?text=[SHARING_TEXT_BODY]"}');var c=i(4848);const l="Check out this link: ",u="Sharing Link",d=({isOpen:r,onClose:o,qrCodeDataUrl:i,onCopy:a,onDownload:s,sharedLink:l,copiedLabel:u="Image copied"})=>{const d=e(null),[h,g]=n(!1);return t(()=>{const t=t=>{"Escape"===t.key&&o()},e=t=>{d.current&&!d.current.contains(t.target)&&o()};return r&&(document.addEventListener("keydown",t),document.addEventListener("mousedown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.removeEventListener("mousedown",e),document.body.style.overflow="unset"}},[r,o]),t(()=>{r&&g(!1)},[r]),r?(0,c.jsx)("div",{"data-vf-google-analytics-region":"share-qr-code",className:"mg-modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,c.jsxs)("div",{ref:d,className:"mg-modal",style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"500px",width:"90%",maxHeight:"90vh",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,c.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",flexShrink:0},children:[(0,c.jsx)("h3",{children:"QR code"}),(0,c.jsx)("button",{onClick:o,style:{background:"none",border:"none",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",color:"#666"},"aria-label":"Close modal",children:"×"})]}),(0,c.jsx)("p",{children:"This QR code contains the link below. You can copy the image or add it to your printed or display materials."}),(0,c.jsx)("div",{style:{flex:1,overflowY:"auto",paddingRight:"8px"},children:i&&(0,c.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,c.jsx)("img",{src:i,alt:"QR Code",style:{maxWidth:"100%",maxHeight:"220px",height:"auto"}}),(0,c.jsx)("div",{style:{textAlign:"left"},children:(0,c.jsx)("code",{className:"mg-code--block",children:(()=>{const t=new URL(l);return t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box"),t.toString()})()})})]})}),(0,c.jsx)("div",{"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:h?`${u}`:""}),(0,c.jsxs)("div",{style:{marginTop:"16px",flexShrink:0,display:"flex",gap:"8px",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-end"},children:[(0,c.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,c.jsx)("button",{onClick:async()=>{try{await a(),g(!0),setTimeout(()=>{g(!1)},2e3)}catch(t){console.error("Copy failed:",t)}},className:"mg-button mg-button-primary",disabled:h,children:h?u:"Copy image"}),(0,c.jsx)("button",{onClick:s,className:"mg-button mg-button-secondary",children:"Download image"})]}),(0,c.jsx)("button",{onClick:o,className:"mg-button mg-button-secondary",style:{marginLeft:"auto"},children:"Close message"})]})]})}):null};function h({copiedLabel:e,sharedLink:r,className:o}){const[i,a]=n(!1),[s,l]=n(r);return t(()=>{let t=r;r.startsWith("https://")?t=r.replace("https://",""):r.startsWith("http://")&&(t=r.replace("http://","")),l(t)},[r]),(0,c.jsxs)("button",{"data-vf-analytics-label":"Quick link copy","aria-label":"Copy to Clipboard",title:"Copy to Clipboard",className:o,onClick:()=>(navigator.clipboard.writeText(r),void a(!0)),children:[(0,c.jsx)("div",{className:"mg-share__clip-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-link","aria-hidden":"true"})}),(0,c.jsx)("div",{className:"mg-share__copy-text",children:i?e:s}),(0,c.jsx)("div",{className:"mg-share__stack-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-clone",alt:"Copy icon"})})]})}const g=({labels:t,SharingSubject:e,SharingTextBody:r,...o})=>{const[i,g]=n(!1),[f,p]=n(null),m=(()=>{const t=document.querySelector('link[rel="shortlink"]');return t?t.href:window.location.href})(),w=t=>{if("QRCode"===t)y();else if("WebShare"===t&&navigator.share)navigator.share({title:e??u,text:r??l,url:m}).catch(t=>console.error("Error sharing",t));else{var n=(t=>{let n=s[t];const o=encodeURIComponent(e??u),i=encodeURIComponent(r??l)+encodeURIComponent(m);return n.replace("[SHARING_TEXT_SUBJECT]",o).replace("[SHARING_TEXT_BODY]",i)})(t);"Mail"===t?window.location.href=n:window.open(n,"_blank","width=600,height=300")}},y=async()=>{try{const t=new URL(m);t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box");const e=t.toString(),n=await a.toDataURL(e,{width:1024,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});p(n),g(!0)}catch(t){console.error("Error generating QR code:",t),alert("Failed to generate QR code. Please try again.")}};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("section",{"data-vf-google-analytics-region":"share-this",className:"mg-share",...o,children:[(0,c.jsx)("header",{className:"mg-share__header",children:t.mainLabel}),(0,c.jsxs)("div",{className:"mg-share__buttons",children:[navigator.share&&(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Web Share API",onClick:()=>w("WebShare"),"aria-label":"Share using your device",title:"Share using your device",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-share","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: LinkedIn",onClick:()=>w("LinkedIn"),"aria-label":"Share on LinkedIn",className:"mg-share__button",title:"Share on LinkedIn",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-linkedin","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Facebook",onClick:()=>w("Facebook"),"aria-label":"Share on Facebook",title:"Share on Facebook",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-facebook","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: X",onClick:()=>w("Twitter"),"aria-label":"Share on X",className:"mg-share__button",title:"Share on X",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-x-social","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Mail",onClick:()=>w("Mail"),"aria-label":"Share via Email",className:"mg-share__button",title:"Share via Email",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-envelope","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: QR Code",onClick:()=>w("QRCode"),"aria-label":"Generate QR Code",className:"mg-share__button",title:"Generate QR Code",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-qrcode","aria-hidden":"true"})})]}),(0,c.jsx)(h,{className:"mg-share__copy-button",copiedLabel:t.onCopy,sharedLink:m})]}),(0,c.jsx)(d,{isOpen:i,onClose:()=>{g(!1),f&&(URL.revokeObjectURL(f),p(null))},qrCodeDataUrl:f,onCopy:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new ClipboardItem({"image/png":e});await navigator.clipboard.write([n])}}catch(t){console.error("Error copying QR code to clipboard:",t),alert("Failed to copy QR code to clipboard. Please check browser permissions.")}},onDownload:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new URL(m);let r="qr-code";if(n.hostname&&(r+=`-${n.hostname.replace(/^www\./,"").replace(/\./g,"-")}`),n.pathname&&"/"!==n.pathname){const t=n.pathname.replace(/^\//,"").replace(/\/$/,"").replace(/[^a-zA-Z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");t&&(r+=`-${t}`)}r=r.substring(0,100)+".png";const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}}catch(t){console.error("Error downloading QR code:",t),alert("Failed to download QR code. Please try again.")}},sharedLink:m,copiedLabel:t.onCopy})]})};export{h as CopyButton,g as default};
6
+ import{useEffect as t,useRef as e,useState as n}from"react";var r={6320(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,s,c,l,u,d,h,g=e.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(c in s=(a=g.pop()).value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=i[c],(void 0===i[c]||h>d)&&(i[c]=d,g.push(c,d),o[c]=s));if(void 0!==r&&void 0===i[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},7583(t,e,n){const r=n(1333),o=n(157),i=n(7899),a=n(6756);function s(t,e,n,i,a){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=i=void 0):2!==c||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=i=void 0):3===c&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=s.bind(null,i.render),e.toDataURL=s.bind(null,i.renderToDataURL),e.toString=s.bind(null,function(t,e,n){return a.render(t,n)})},1333(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(t,e,n){const r=n(6886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},1433(t,e,n){const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},9899(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8820(t){function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},5822(t,e,n){const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},7518(t,e,n){const r=n(9953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},9953(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},7756(t,e,n){const r=n(6886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},4565(t,e,n){const r=n(6886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},2731(t,e){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},4861(t,e,n){const r=n(208),o=n(6886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},1332(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let s=0;s<e;s++){r=o=0,i=a=null;for(let c=0;c<e;c++){let e=t.get(s,c);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(c,s),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208(t,e,n){const r=n(1878),o=n(7044);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},4357(t,e,n){const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4713(t,e,n){const r=n(2731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(t,e,n){const r=n(6886),o=n(9953),i=n(9899),a=n(8820),s=n(6421),c=n(7756),l=n(1332),u=n(7518),d=n(4764),h=n(1427),g=n(4565),f=n(208),p=n(9801);function m(t,e,n){const r=t.size,o=g.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function w(t,e,n,o){let g;if(Array.isArray(t))g=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=p.rawSplit(t);r=h.getBestVersionForData(e,n)}g=p.fromString(t,r||40)}}const w=h.getBestVersionForData(g,n);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<w)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+w+".\n")}else e=w;const y=function(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),f.getCharCountIndicator(e.mode,t)),e.write(o)});const a=8*(r.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const s=(a-o.getLengthInBits())/8;for(let t=0;t<s;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-u.getTotalCodewordsCount(e,n),a=u.getBlocksCount(e,n),s=a-o%a,c=Math.floor(o/a),l=Math.floor(i/a),h=l+1,g=c-l,f=new d(g);let p=0;const m=new Array(a),w=new Array(a);let y=0;const b=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<s?l:h;m[t]=b.slice(p,p+e),w[t]=f.encode(m[t]),p+=e,y=Math.max(y,e)}const x=new Uint8Array(o);let E,C,v=0;for(E=0;E<y;E++)for(C=0;C<a;C++)E<m[C].length&&(x[v++]=m[C][E]);for(E=0;E<g;E++)for(C=0;C<a;C++)x[v++]=w[C][E];return x}(o,t,e)}(e,n,g),b=r.getSymbolSize(e),x=new a(b);return function(t,e){const n=t.size,r=c.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(x,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(x),function(t,e){const n=s.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(x,e),m(x,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(x,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,s-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,s-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(x,y),isNaN(o)&&(o=l.getBestMask(x,m.bind(null,x,n))),l.applyMask(o,x),m(x,n,o),{modules:x,version:e,errorCorrectionLevel:n,maskPattern:o,segments:g}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),w(t,n,a,i)}},4764(t,e,n){const r=n(4713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7044(t,e){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return s.test(t)}},9801(t,e,n){const r=n(208),o=n(4357),i=n(1433),a=n(5822),s=n(4861),c=n(7044),l=n(6886),u=n(6320);function d(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function g(t){const e=h(c.NUMERIC,r.NUMERIC,t),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return l.isKanjiModeEnabled()?(o=h(c.BYTE,r.BYTE,t),i=h(c.KANJI,r.KANJI,t)):(o=h(c.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function f(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return s.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function p(t,e){let n;const c=r.getBestModeForData(t);if(n=r.from(e,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new s(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return e}(g(t,l.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const s=t[a],c=[];for(let t=0;t<s.length;t++){const l=s[t],u=""+a+t;c.push(u),n[u]={node:l,lastCount:0},o[u]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===l.mode?(o[a][u]=f(n[a].lastCount+l.length,l.mode)-f(n[a].lastCount,l.mode),n[a].lastCount+=l.length):(n[a]&&(n[a].lastCount=l.length),o[a][u]=f(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e))}}i=c}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=u.find_path(i.map,"start","end"),s=[];for(let t=1;t<a.length-1;t++)s.push(i.table[a[t]].node);return e.fromArray(s.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},e.rawSplit=function(t){return e.fromArray(g(t,l.isKanjiModeEnabled()))}},6886(t,e){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},1878(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},1427(t,e,n){const r=n(6886),o=n(7518),i=n(9953),a=n(208),s=n(1878),c=r.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach(function(t){const r=l(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const c=i-l(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-c>=0;)e^=7973<<r.getBCHDigit(e)-c;return t<<12|e}},7899(t,e,n){const r=n(2726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),s=i.getContext("2d"),c=s.createImageData(a,a);return r.qrToImageData(c.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,a),s.putImageData(c,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},6756(t,e,n){const r=n(2726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,s=0;for(let c=0;c<t.length;c++){const l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(r+=a?i("M",l+n,.5+u+n):i("m",o,0),o=0,a=!1),l+1<e&&t[c+1]||(r+=i("h",s),s=0)):o++}return r}(c,s,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,g),g}},2726(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),s=Math.floor((o+2*r.margin)*a),c=r.margin*a,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),d=r.color.light;e>=c&&n>=c&&e<s-c&&n<s-c&&(d=l[i[Math.floor((e-c)/a)*o+Math.floor((n-c)/a)]?1:0]),t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}},9698(t,e){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(t,e,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in r={},e)"key"!==i&&(r[i]=e[i]);else r=e;return e=r.ref,{$$typeof:n,type:t,key:o,ref:void 0!==e?e:null,props:r}}e.Fragment=r,e.jsx=o,e.jsxs=o},4848(t,e,n){t.exports=n(9698)}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return r[t](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a=i(7583);const s=JSON.parse('{"Mail":"mailto:?subject=[SHARING_TEXT_SUBJECT]&body=[SHARING_TEXT_BODY]","Facebook":"https://facebook.com/sharer/sharer.php?u=[SHARING_TEXT_BODY]","LinkedIn":"https://www.linkedin.com/sharing/share-offsite/?url=[SHARING_TEXT_BODY]","Twitter":"https://twitter.com/intent/tweet?text=[SHARING_TEXT_BODY]"}');var c=i(4848);const l="Check out this link: ",u="Sharing Link",d=({isOpen:r,onClose:o,qrCodeDataUrl:i,onCopy:a,onDownload:s,sharedLink:l,copiedLabel:u="Image copied"})=>{const d=e(null),[h,g]=n(!1);return t(()=>{const t=t=>{"Escape"===t.key&&o()},e=t=>{d.current&&!d.current.contains(t.target)&&o()};return r&&(document.addEventListener("keydown",t),document.addEventListener("mousedown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.removeEventListener("mousedown",e),document.body.style.overflow="unset"}},[r,o]),t(()=>{r&&g(!1)},[r]),r?(0,c.jsx)("div",{"data-vf-google-analytics-region":"share-qr-code",className:"mg-modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,c.jsxs)("div",{ref:d,className:"mg-modal",style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"500px",width:"90%",maxHeight:"90vh",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,c.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",flexShrink:0},children:[(0,c.jsx)("h3",{children:"QR code"}),(0,c.jsx)("button",{onClick:o,style:{background:"none",border:"none",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",color:"#666"},"aria-label":"Close modal",children:"×"})]}),(0,c.jsx)("p",{children:"This QR code contains the link below. You can copy the image or add it to your printed or display materials."}),(0,c.jsx)("div",{style:{flex:1,overflowY:"auto",paddingRight:"8px"},children:i&&(0,c.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,c.jsx)("img",{src:i,alt:"QR Code",style:{maxWidth:"100%",maxHeight:"220px",height:"auto"}}),(0,c.jsx)("div",{style:{textAlign:"left"},children:(0,c.jsx)("code",{className:"mg-code--block",children:(()=>{const t=new URL(l);return t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box"),t.toString()})()})})]})}),(0,c.jsx)("div",{"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:h?`${u}`:""}),(0,c.jsxs)("div",{style:{marginTop:"16px",flexShrink:0,display:"flex",gap:"8px",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-end"},children:[(0,c.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,c.jsx)("button",{onClick:async()=>{try{await a(),g(!0),setTimeout(()=>{g(!1)},2e3)}catch(t){console.error("Copy failed:",t)}},className:"mg-button mg-button-primary",disabled:h,children:h?u:"Copy image"}),(0,c.jsx)("button",{onClick:s,className:"mg-button mg-button-secondary",children:"Download image"})]}),(0,c.jsx)("button",{onClick:o,className:"mg-button mg-button-secondary",style:{marginLeft:"auto"},children:"Close message"})]})]})}):null};function h({copiedLabel:e,sharedLink:r,className:o}){const[i,a]=n(!1),[s,l]=n(r);return t(()=>{let t=r;r.startsWith("https://")?t=r.replace("https://",""):r.startsWith("http://")&&(t=r.replace("http://","")),l(t)},[r]),(0,c.jsxs)("button",{"data-vf-analytics-label":"Quick link copy","aria-label":"Copy to Clipboard",title:"Copy to Clipboard",className:o,onClick:()=>(navigator.clipboard.writeText(r),void a(!0)),children:[(0,c.jsx)("div",{className:"mg-share__clip-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-link","aria-hidden":"true"})}),(0,c.jsx)("div",{className:"mg-share__copy-text",children:i?e:s}),(0,c.jsx)("div",{className:"mg-share__stack-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-clone",alt:"Copy icon"})})]})}const g=({labels:t,SharingSubject:e,SharingTextBody:r,...o})=>{const[i,g]=n(!1),[f,p]=n(null),m=(()=>{const t=document.querySelector('link[rel="shortlink"]');return t?t.href:window.location.href})(),w=t=>{if("QRCode"===t)y();else if("WebShare"===t&&navigator.share)navigator.share({title:e??u,text:r??l,url:m}).catch(t=>console.error("Error sharing",t));else{var n=(t=>{let n=s[t];const o=encodeURIComponent(e??u),i=encodeURIComponent(r??l)+encodeURIComponent(m);return n.replace("[SHARING_TEXT_SUBJECT]",o).replace("[SHARING_TEXT_BODY]",i)})(t);"Mail"===t?window.location.href=n:window.open(n,"_blank","width=600,height=300")}},y=async()=>{try{const t=new URL(m);t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box");const e=t.toString(),n=await a.toDataURL(e,{width:1024,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});p(n),g(!0)}catch(t){console.error("Error generating QR code:",t),alert("Failed to generate QR code. Please try again.")}};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("section",{"data-vf-google-analytics-region":"share-this",className:"mg-share",...o,children:[(0,c.jsx)("header",{className:"mg-share__header",children:t.mainLabel}),(0,c.jsxs)("div",{className:"mg-share__buttons",children:[navigator.share&&(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Web Share API",onClick:()=>w("WebShare"),"aria-label":"Share using your device",title:"Share using your device",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-share","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: LinkedIn",onClick:()=>w("LinkedIn"),"aria-label":"Share on LinkedIn",className:"mg-share__button",title:"Share on LinkedIn",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-linkedin","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Facebook",onClick:()=>w("Facebook"),"aria-label":"Share on Facebook",title:"Share on Facebook",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-facebook","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: X",onClick:()=>w("Twitter"),"aria-label":"Share on X",className:"mg-share__button",title:"Share on X",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-x-social","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Mail",onClick:()=>w("Mail"),"aria-label":"Share via Email",className:"mg-share__button",title:"Share via Email",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-envelope","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: QR Code",onClick:()=>w("QRCode"),"aria-label":"Generate QR Code",className:"mg-share__button",title:"Generate QR Code",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-qrcode","aria-hidden":"true"})})]}),(0,c.jsx)(h,{className:"mg-share__copy-button",copiedLabel:t.onCopy,sharedLink:m})]}),(0,c.jsx)(d,{isOpen:i,onClose:()=>{g(!1),f&&(URL.revokeObjectURL(f),p(null))},qrCodeDataUrl:f,onCopy:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new ClipboardItem({"image/png":e});await navigator.clipboard.write([n])}}catch(t){console.error("Error copying QR code to clipboard:",t),alert("Failed to copy QR code to clipboard. Please check browser permissions.")}},onDownload:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new URL(m);let r="qr-code";if(n.hostname&&(r+=`-${n.hostname.replace(/^www\./,"").replace(/\./g,"-")}`),n.pathname&&"/"!==n.pathname){const t=n.pathname.replace(/^\//,"").replace(/\/$/,"").replace(/[^a-zA-Z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");t&&(r+=`-${t}`)}r=r.substring(0,100)+".png";const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}}catch(t){console.error("Error downloading QR code:",t),alert("Failed to download QR code. Please try again.")}},sharedLink:m,copiedLabel:t.onCopy})]})};function f(t){const{dataset:e}=t;return{labels:{mainLabel:e.mainLabel||"Share this",onCopy:e.onCopyLabel||"Link copied"},SharingSubject:e.sharingSubject||"Sharing Link",SharingTextBody:e.sharingBody||""}}export{h as CopyButton,g as default,f as fromElement};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-03-10T20:55:47.135Z
3
+ * Compiled on: 2026-03-12T16:42:33.816Z
4
4
  */
5
5
  /*! For license information please see StatsCard.js.LICENSE.txt */
6
- import"react";var e={2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},4848(e,t,n){e.exports=n(9698)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(5556),o=n.n(r),a=n(4848);const i=({type:e=2,children:t,className:n,tabIndex:r,dataViewport:o,...i})=>{const l=`h${Math.min(Math.max(parseInt(e,10)||2,1),6)}`;return(0,a.jsx)(l,{className:n,tabIndex:r,"data-viewport":o,...i,children:t})},{entries:l,setPrototypeOf:s,isFrozen:c,getPrototypeOf:u,getOwnPropertyDescriptor:m}=Object;let{freeze:p,seal:f,create:d}=Object,{apply:h,construct:g}="undefined"!=typeof Reflect&&Reflect;p||(p=function(e){return e}),f||(f=function(e){return e}),h||(h=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),g||(g=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const T=C(Array.prototype.forEach),y=C(Array.prototype.lastIndexOf),b=C(Array.prototype.pop),_=C(Array.prototype.push),E=C(Array.prototype.splice),A=C(String.prototype.toLowerCase),N=C(String.prototype.toString),S=C(String.prototype.match),v=C(String.prototype.replace),x=C(String.prototype.indexOf),O=C(String.prototype.trim),R=C(Object.prototype.hasOwnProperty),D=C(RegExp.prototype.test),w=(k=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(k,t)});var k;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h(e,t,r)}}function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;s&&s(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(c(t)||(t[r]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++)R(e,t)||(e[t]=null);return e}function M(e){const t=d(null);for(const[n,r]of l(e))R(e,n)&&(Array.isArray(r)?t[n]=I(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=M(r):t[n]=r);return t}function P(e,t){for(;null!==e;){const n=m(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=u(e)}return function(){return null}}const U=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),z=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=p(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),j=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),W=p(["#text"]),G=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Y=p(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=f(/<%[\w\W]*|[\w\W]*%>/gm),K=f(/\$\{[\w\W]*/gm),Z=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),J=f(/^aria-[\-\w]+$/),Q=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=f(/^(?:\w+script|data):/i),te=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=f(/^html$/i),re=f(/^[a-z][.\w]*(-[.\w]+)+$/i);var oe=Object.freeze({__proto__:null,ARIA_ATTR:J,ATTR_WHITESPACE:te,CUSTOM_ELEMENT:re,DATA_ATTR:Z,DOCTYPE_NAME:ne,ERB_EXPR:V,IS_ALLOWED_URI:Q,IS_SCRIPT_OR_DATA:ee,MUSTACHE_EXPR:X,TMPLIT_EXPR:K});const ae=function(){return"undefined"==typeof window?null:window};var ie=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae();const n=t=>e(t);if(n.version="3.3.2",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:m,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:g,trustedTypes:k}=t,C=u.prototype,I=P(C,"cloneNode"),X=P(C,"remove"),V=P(C,"nextSibling"),K=P(C,"childNodes"),Z=P(C,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:re,createDocumentFragment:ie,getElementsByTagName:le}=r,{importNode:se}=o;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof l&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=oe;let{IS_ALLOWED_URI:ye}=oe,be=null;const _e=L({},[...U,...z,...F,...j,...W]);let Ee=null;const Ae=L({},[...G,...Y,...$,...q]);let Ne=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,ve=null;const xe=Object.seal(d(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,Re=!0,De=!1,we=!0,ke=!1,Ce=!0,Le=!1,Ie=!1,Me=!1,Pe=!1,Ue=!1,ze=!1,Fe=!0,He=!1,je=!0,Be=!1,We={},Ge=null;const Ye=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const qe=L({},["audio","video","img","source","image","track"]);let Xe=null;const Ve=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=L({},[Ke,Ze,Je],N);let rt=L({},["mi","mo","mn","ms","mtext"]),ot=L({},["annotation-xml"]);const at=L({},["title","style","font","a","script"]);let it=null;const lt=["application/xhtml+xml","text/html"];let st=null,ct=null;const ut=r.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=M(e),it=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,st="application/xhtml+xml"===it?N:A,be=R(e,"ALLOWED_TAGS")?L({},e.ALLOWED_TAGS,st):_e,Ee=R(e,"ALLOWED_ATTR")?L({},e.ALLOWED_ATTR,st):Ae,tt=R(e,"ALLOWED_NAMESPACES")?L({},e.ALLOWED_NAMESPACES,N):nt,Xe=R(e,"ADD_URI_SAFE_ATTR")?L(M(Ve),e.ADD_URI_SAFE_ATTR,st):Ve,$e=R(e,"ADD_DATA_URI_TAGS")?L(M(qe),e.ADD_DATA_URI_TAGS,st):qe,Ge=R(e,"FORBID_CONTENTS")?L({},e.FORBID_CONTENTS,st):Ye,Se=R(e,"FORBID_TAGS")?L({},e.FORBID_TAGS,st):M({}),ve=R(e,"FORBID_ATTR")?L({},e.FORBID_ATTR,st):M({}),We=!!R(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ue=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||Q,Qe=e.NAMESPACE||Je,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Ne=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Re=!1),Ue&&(Pe=!0),We&&(be=L({},W),Ee=d(null),!0===We.html&&(L(be,U),L(Ee,G)),!0===We.svg&&(L(be,z),L(Ee,Y),L(Ee,q)),!0===We.svgFilters&&(L(be,F),L(Ee,Y),L(Ee,q)),!0===We.mathMl&&(L(be,j),L(Ee,$),L(Ee,q))),R(e,"ADD_TAGS")||(xe.tagCheck=null),R(e,"ADD_ATTR")||(xe.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(be===_e&&(be=M(be)),L(be,e.ADD_TAGS,st))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Ee===Ae&&(Ee=M(Ee)),L(Ee,e.ADD_ATTR,st))),e.ADD_URI_SAFE_ATTR&&L(Xe,e.ADD_URI_SAFE_ATTR,st),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=M(Ge)),L(Ge,e.FORBID_CONTENTS,st)),e.ADD_FORBID_CONTENTS&&(Ge===Ye&&(Ge=M(Ge)),L(Ge,e.ADD_FORBID_CONTENTS,st)),je&&(be["#text"]=!0),Le&&L(be,["html","head","body"]),be.table&&(L(be,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(k,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));p&&p(e),ct=e}},ft=L({},[...z,...F,...H]),dt=L({},[...j,...B]),ht=function(e){_(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){X(e)}},gt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=S(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Qe===Je)try{t=(new g).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?ee:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Qe===Je?le.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},yt=function(e){return re.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof c&&e instanceof c};function Et(e,t,r){T(e,e=>{e.call(n,t,r,ct)})}const At=function(e){let t=null;if(Et(ce.beforeSanitizeElements,e,null),bt(e))return ht(e),!0;const r=st(e.nodeName);if(Et(ce.uponSanitizeElement,e,{tagName:r,allowedTags:be}),Ce&&e.hasChildNodes()&&!_t(e.firstElementChild)&&D(/<[/\w!]/g,e.innerHTML)&&D(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(Ce&&8===e.nodeType&&D(/<[/\w]/g,e.data))return ht(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(r))&&(!be[r]||Se[r])){if(!Se[r]&&St(r)){if(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,r))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(r))return!1}if(je&&!Ge[r]){const t=Z(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=I(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,V(e))}}return ht(e),!0}return e instanceof u&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=A(e.tagName),r=A(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&ot[r]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!ot[r])&&!(t.namespaceURI===Ke&&!rt[r])&&!dt[n]&&(at[n]||!ft[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!D(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&3===e.nodeType&&(t=e.textContent,T([ue,me,pe],e=>{t=v(t,e," ")}),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(ce.afterSanitizeElements,e,null),!1):(ht(e),!0)},Nt=function(e,t,n){if(ve[t])return!1;if(Fe&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Re&&!ve[t]&&D(fe,t));else if(Oe&&D(de,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Ee[t]||ve[t]){if(!(St(e)&&(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&D(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t,e))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Xe[t]);else if(D(ye,v(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==x(n,"data:")||!$e[e])if(De&&!D(he,v(n,ge,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&S(e,Te)},vt=function(e){Et(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:s}=a,c=st(i),u=s;let m="value"===i?u:O(u);if(r.attrName=c,r.attrValue=m,r.keepAttr=!0,r.forceKeepAttr=void 0,Et(ce.uponSanitizeAttribute,e,r),m=r.attrValue,!He||"id"!==c&&"name"!==c||(gt(i,e),m="user-content-"+m),Ce&&D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)){gt(i,e);continue}if("attributename"===c&&S(m,"href")){gt(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(i,e);continue}if(!we&&D(/\/>/i,m)){gt(i,e);continue}ke&&T([ue,me,pe],e=>{m=v(m,e," ")});const p=st(e.nodeName);if(Nt(p,c,m)){if(J&&"object"==typeof k&&"function"==typeof k.getAttributeType)if(l);else switch(k.getAttributeType(p,c)){case"TrustedHTML":m=J.createHTML(m);break;case"TrustedScriptURL":m=J.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,i,m):e.setAttribute(i,m),bt(e)?ht(e):b(n.removed)}catch(t){gt(i,e)}}else gt(i,e)}Et(ce.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const r=yt(t);for(Et(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Et(ce.uponSanitizeShadowNode,n,null),At(n),vt(n),n.content instanceof i&&e(n.content);Et(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,l=null,s=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||pt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=st(e.nodeName);if(!be[t]||Se[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=Tt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Pe&&!ke&&!Le&&-1===e.indexOf("<"))return J&&ze?J.createHTML(e):e;if(r=Tt(e),!r)return Pe?null:ze?ee:""}r&&Me&&ht(r.firstChild);const u=yt(Be?e:r);for(;l=u.nextNode();)At(l),vt(l),l.content instanceof i&&xt(l.content);if(Be)return e;if(Pe){if(Ue)for(s=ie.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Ee.shadowroot||Ee.shadowrootmode)&&(s=se.call(o,s,!0)),s}let m=Le?r.outerHTML:r.innerHTML;return Le&&be["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&D(ne,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),ke&&T([ue,me,pe],e=>{m=v(m,e," ")}),J&&ze?J.createHTML(m):m},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){ct=null,Ie=!1},n.isValidAttribute=function(e,t,n){ct||pt({});const r=st(e),o=st(t);return Nt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&_(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=y(ce[e],t);return-1===n?void 0:E(ce[e],n,1)[0]}return b(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function le({icon:e,label:t,value:n,bottomLabel:r,summaryText:o,link:i,className:l="",...s}){const c="mg-stats-card-item",u=["mg-card",c,i&&`${c}--linked`,l].filter(Boolean).join(" "),m=i?(0,a.jsx)("a",{href:i,className:`${c}__value`,children:n}):(0,a.jsx)("data",{className:`${c}__value`,value:n,children:n});return(0,a.jsxs)("article",{className:u,...s,children:[e&&(0,a.jsx)("span",{className:`${c}__icon`,"aria-hidden":"true",children:(0,a.jsx)("span",{className:e})}),t&&(0,a.jsx)("span",{className:`${c}__label`,children:t}),m,r&&(0,a.jsx)("strong",{className:`${c}__bottom-label`,children:r}),o&&(0,a.jsx)("p",{className:`${c}__summary`,dangerouslySetInnerHTML:{__html:ie.sanitize(o)}})]})}function se({title:e,stats:t=[],variant:n="default",className:r="",...o}){const l="mg-stats-card",s=t.length,c=s>0?`mg-grid mg-grid__col-${s}`:"mg-grid",u=[l,n&&`${l}--${n}`,r].filter(Boolean).join(" ");return(0,a.jsxs)("section",{className:u,"aria-label":e||"Statistics",...o,children:[e&&(0,a.jsx)(i,{type:"2",children:e}),(0,a.jsx)("div",{className:c,children:t.map((e,t)=>(0,a.jsx)(le,{icon:e.icon,label:e.label,value:e.value,bottomLabel:e.bottomLabel,summaryText:e.summaryText,link:e.link},t))})]})}le.propTypes={icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string,className:o().string},se.propTypes={title:o().string,stats:o().arrayOf(o().shape({icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string})),variant:o().oneOf(["default","compact","highlighted","negative"]),className:o().string};const ce=se;export{se as StatsCard,ce as default};
6
+ import"react";var e={2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},4848(e,t,n){e.exports=n(9698)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(5556),o=n.n(r),a=n(4848);const i=({type:e=2,children:t,className:n,tabIndex:r,dataViewport:o,...i})=>{const l=`h${Math.min(Math.max(parseInt(e,10)||2,1),6)}`;return(0,a.jsx)(l,{className:n,tabIndex:r,"data-viewport":o,...i,children:t})},{entries:l,setPrototypeOf:s,isFrozen:c,getPrototypeOf:u,getOwnPropertyDescriptor:m}=Object;let{freeze:p,seal:f,create:d}=Object,{apply:h,construct:g}="undefined"!=typeof Reflect&&Reflect;p||(p=function(e){return e}),f||(f=function(e){return e}),h||(h=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),g||(g=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const T=C(Array.prototype.forEach),y=C(Array.prototype.lastIndexOf),b=C(Array.prototype.pop),_=C(Array.prototype.push),E=C(Array.prototype.splice),A=C(String.prototype.toLowerCase),N=C(String.prototype.toString),S=C(String.prototype.match),v=C(String.prototype.replace),x=C(String.prototype.indexOf),O=C(String.prototype.trim),R=C(Object.prototype.hasOwnProperty),D=C(RegExp.prototype.test),w=(k=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(k,t)});var k;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h(e,t,r)}}function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;s&&s(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(c(t)||(t[r]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++)R(e,t)||(e[t]=null);return e}function M(e){const t=d(null);for(const[n,r]of l(e))R(e,n)&&(Array.isArray(r)?t[n]=I(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=M(r):t[n]=r);return t}function P(e,t){for(;null!==e;){const n=m(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=u(e)}return function(){return null}}const U=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),z=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=p(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),j=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),W=p(["#text"]),G=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Y=p(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=f(/<%[\w\W]*|[\w\W]*%>/gm),K=f(/\$\{[\w\W]*/gm),Z=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),J=f(/^aria-[\-\w]+$/),Q=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=f(/^(?:\w+script|data):/i),te=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=f(/^html$/i),re=f(/^[a-z][.\w]*(-[.\w]+)+$/i);var oe=Object.freeze({__proto__:null,ARIA_ATTR:J,ATTR_WHITESPACE:te,CUSTOM_ELEMENT:re,DATA_ATTR:Z,DOCTYPE_NAME:ne,ERB_EXPR:V,IS_ALLOWED_URI:Q,IS_SCRIPT_OR_DATA:ee,MUSTACHE_EXPR:X,TMPLIT_EXPR:K});const ae=function(){return"undefined"==typeof window?null:window};var ie=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae();const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:m,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:g,trustedTypes:k}=t,C=u.prototype,I=P(C,"cloneNode"),X=P(C,"remove"),V=P(C,"nextSibling"),K=P(C,"childNodes"),Z=P(C,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:re,createDocumentFragment:ie,getElementsByTagName:le}=r,{importNode:se}=o;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof l&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=oe;let{IS_ALLOWED_URI:ye}=oe,be=null;const _e=L({},[...U,...z,...F,...j,...W]);let Ee=null;const Ae=L({},[...G,...Y,...$,...q]);let Ne=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,ve=null;const xe=Object.seal(d(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,Re=!0,De=!1,we=!0,ke=!1,Ce=!0,Le=!1,Ie=!1,Me=!1,Pe=!1,Ue=!1,ze=!1,Fe=!0,He=!1,je=!0,Be=!1,We={},Ge=null;const Ye=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const qe=L({},["audio","video","img","source","image","track"]);let Xe=null;const Ve=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=L({},[Ke,Ze,Je],N);let rt=L({},["mi","mo","mn","ms","mtext"]),ot=L({},["annotation-xml"]);const at=L({},["title","style","font","a","script"]);let it=null;const lt=["application/xhtml+xml","text/html"];let st=null,ct=null;const ut=r.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=M(e),it=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,st="application/xhtml+xml"===it?N:A,be=R(e,"ALLOWED_TAGS")?L({},e.ALLOWED_TAGS,st):_e,Ee=R(e,"ALLOWED_ATTR")?L({},e.ALLOWED_ATTR,st):Ae,tt=R(e,"ALLOWED_NAMESPACES")?L({},e.ALLOWED_NAMESPACES,N):nt,Xe=R(e,"ADD_URI_SAFE_ATTR")?L(M(Ve),e.ADD_URI_SAFE_ATTR,st):Ve,$e=R(e,"ADD_DATA_URI_TAGS")?L(M(qe),e.ADD_DATA_URI_TAGS,st):qe,Ge=R(e,"FORBID_CONTENTS")?L({},e.FORBID_CONTENTS,st):Ye,Se=R(e,"FORBID_TAGS")?L({},e.FORBID_TAGS,st):M({}),ve=R(e,"FORBID_ATTR")?L({},e.FORBID_ATTR,st):M({}),We=!!R(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ue=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||Q,Qe=e.NAMESPACE||Je,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Ne=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Re=!1),Ue&&(Pe=!0),We&&(be=L({},W),Ee=d(null),!0===We.html&&(L(be,U),L(Ee,G)),!0===We.svg&&(L(be,z),L(Ee,Y),L(Ee,q)),!0===We.svgFilters&&(L(be,F),L(Ee,Y),L(Ee,q)),!0===We.mathMl&&(L(be,j),L(Ee,$),L(Ee,q))),R(e,"ADD_TAGS")||(xe.tagCheck=null),R(e,"ADD_ATTR")||(xe.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(be===_e&&(be=M(be)),L(be,e.ADD_TAGS,st))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Ee===Ae&&(Ee=M(Ee)),L(Ee,e.ADD_ATTR,st))),e.ADD_URI_SAFE_ATTR&&L(Xe,e.ADD_URI_SAFE_ATTR,st),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=M(Ge)),L(Ge,e.FORBID_CONTENTS,st)),e.ADD_FORBID_CONTENTS&&(Ge===Ye&&(Ge=M(Ge)),L(Ge,e.ADD_FORBID_CONTENTS,st)),je&&(be["#text"]=!0),Le&&L(be,["html","head","body"]),be.table&&(L(be,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(k,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));p&&p(e),ct=e}},ft=L({},[...z,...F,...H]),dt=L({},[...j,...B]),ht=function(e){_(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){X(e)}},gt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=S(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Qe===Je)try{t=(new g).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?ee:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Qe===Je?le.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},yt=function(e){return re.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof c&&e instanceof c};function Et(e,t,r){T(e,e=>{e.call(n,t,r,ct)})}const At=function(e){let t=null;if(Et(ce.beforeSanitizeElements,e,null),bt(e))return ht(e),!0;const r=st(e.nodeName);if(Et(ce.uponSanitizeElement,e,{tagName:r,allowedTags:be}),Ce&&e.hasChildNodes()&&!_t(e.firstElementChild)&&D(/<[/\w!]/g,e.innerHTML)&&D(/<[/\w!]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(Ce&&8===e.nodeType&&D(/<[/\w]/g,e.data))return ht(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(r))&&(!be[r]||Se[r])){if(!Se[r]&&St(r)){if(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,r))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(r))return!1}if(je&&!Ge[r]){const t=Z(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=I(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,V(e))}}return ht(e),!0}return e instanceof u&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=A(e.tagName),r=A(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&ot[r]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!ot[r])&&!(t.namespaceURI===Ke&&!rt[r])&&!dt[n]&&(at[n]||!ft[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!D(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&3===e.nodeType&&(t=e.textContent,T([ue,me,pe],e=>{t=v(t,e," ")}),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(ce.afterSanitizeElements,e,null),!1):(ht(e),!0)},Nt=function(e,t,n){if(ve[t])return!1;if(Fe&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Re&&!ve[t]&&D(fe,t));else if(Oe&&D(de,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Ee[t]||ve[t]){if(!(St(e)&&(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&D(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t,e))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&D(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Xe[t]);else if(D(ye,v(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==x(n,"data:")||!$e[e])if(De&&!D(he,v(n,ge,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&S(e,Te)},vt=function(e){Et(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:s}=a,c=st(i),u=s;let m="value"===i?u:O(u);if(r.attrName=c,r.attrValue=m,r.keepAttr=!0,r.forceKeepAttr=void 0,Et(ce.uponSanitizeAttribute,e,r),m=r.attrValue,!He||"id"!==c&&"name"!==c||(gt(i,e),m="user-content-"+m),Ce&&D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)){gt(i,e);continue}if("attributename"===c&&S(m,"href")){gt(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(i,e);continue}if(!we&&D(/\/>/i,m)){gt(i,e);continue}ke&&T([ue,me,pe],e=>{m=v(m,e," ")});const p=st(e.nodeName);if(Nt(p,c,m)){if(J&&"object"==typeof k&&"function"==typeof k.getAttributeType)if(l);else switch(k.getAttributeType(p,c)){case"TrustedHTML":m=J.createHTML(m);break;case"TrustedScriptURL":m=J.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,i,m):e.setAttribute(i,m),bt(e)?ht(e):b(n.removed)}catch(t){gt(i,e)}}else gt(i,e)}Et(ce.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const r=yt(t);for(Et(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Et(ce.uponSanitizeShadowNode,n,null),At(n),vt(n),n.content instanceof i&&e(n.content);Et(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,l=null,s=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||pt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=st(e.nodeName);if(!be[t]||Se[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=Tt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Pe&&!ke&&!Le&&-1===e.indexOf("<"))return J&&ze?J.createHTML(e):e;if(r=Tt(e),!r)return Pe?null:ze?ee:""}r&&Me&&ht(r.firstChild);const u=yt(Be?e:r);for(;l=u.nextNode();)At(l),vt(l),l.content instanceof i&&xt(l.content);if(Be)return e;if(Pe){if(Ue)for(s=ie.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Ee.shadowroot||Ee.shadowrootmode)&&(s=se.call(o,s,!0)),s}let m=Le?r.outerHTML:r.innerHTML;return Le&&be["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&D(ne,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),ke&&T([ue,me,pe],e=>{m=v(m,e," ")}),J&&ze?J.createHTML(m):m},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){ct=null,Ie=!1},n.isValidAttribute=function(e,t,n){ct||pt({});const r=st(e),o=st(t);return Nt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&_(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=y(ce[e],t);return-1===n?void 0:E(ce[e],n,1)[0]}return b(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function le({icon:e,label:t,value:n,bottomLabel:r,summaryText:o,link:i,className:l="",...s}){const c="mg-stats-card-item",u=["mg-card",c,i&&`${c}--linked`,l].filter(Boolean).join(" "),m=i?(0,a.jsx)("a",{href:i,className:`${c}__value`,children:n}):(0,a.jsx)("data",{className:`${c}__value`,value:n,children:n});return(0,a.jsxs)("article",{className:u,...s,children:[e&&(0,a.jsx)("span",{className:`${c}__icon`,"aria-hidden":"true",children:(0,a.jsx)("span",{className:e})}),t&&(0,a.jsx)("span",{className:`${c}__label`,children:t}),m,r&&(0,a.jsx)("strong",{className:`${c}__bottom-label`,children:r}),o&&(0,a.jsx)("p",{className:`${c}__summary`,dangerouslySetInnerHTML:{__html:ie.sanitize(o)}})]})}function se({title:e,stats:t=[],variant:n="default",className:r="",...o}){const l="mg-stats-card",s=t.length,c=s>0?`mg-grid mg-grid__col-${s}`:"mg-grid",u=[l,n&&`${l}--${n}`,r].filter(Boolean).join(" ");return(0,a.jsxs)("section",{className:u,"aria-label":e||"Statistics",...o,children:[e&&(0,a.jsx)(i,{type:"2",children:e}),(0,a.jsx)("div",{className:c,children:t.map((e,t)=>(0,a.jsx)(le,{icon:e.icon,label:e.label,value:e.value,bottomLabel:e.bottomLabel,summaryText:e.summaryText,link:e.link},t))})]})}le.propTypes={icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string,className:o().string},se.propTypes={title:o().string,stats:o().arrayOf(o().shape({icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string})),variant:o().oneOf(["default","compact","highlighted","negative"]),className:o().string};const ce=se;function ue(e){const{dataset:t}=e,n={title:t.title||void 0,variant:t.variant||"default",className:t.className||""};try{n.stats=t.stats?JSON.parse(t.stats):[]}catch{n.stats=[]}return n}export{se as StatsCard,ce as default,ue as fromElement};