contour-ds 1.7.2 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +244 -326
- package/dist/agent-cookbook.json +960 -0
- package/dist/agent-examples.json +65 -0
- package/dist/agent-map-wiring.json +152 -0
- package/dist/agent-rules.json +16 -0
- package/dist/build-manifest.json +344 -126
- package/dist/contour-wc-content.esm.js +1939 -0
- package/dist/contour-wc-content.esm.min.js +1 -0
- package/dist/contour-wc-core.esm.js +3724 -0
- package/dist/contour-wc-core.esm.min.js +1 -0
- package/dist/contour-wc-dashboard.esm.js +6986 -0
- package/dist/contour-wc-dashboard.esm.min.js +1 -0
- package/dist/contour-wc-data.esm.js +6572 -0
- package/dist/contour-wc-data.esm.min.js +1 -0
- package/dist/contour-wc-docs.esm.js +976 -0
- package/dist/contour-wc-docs.esm.min.js +1 -0
- package/dist/contour-wc-feedback.esm.js +1742 -0
- package/dist/contour-wc-feedback.esm.min.js +1 -0
- package/dist/contour-wc-forms.esm.js +2437 -0
- package/dist/contour-wc-forms.esm.min.js +1 -0
- package/dist/contour-wc-interaction.esm.js +1343 -0
- package/dist/contour-wc-interaction.esm.min.js +1 -0
- package/dist/contour-wc-layout.esm.js +845 -0
- package/dist/contour-wc-layout.esm.min.js +1 -0
- package/dist/contour-wc-map.esm.js +2411 -0
- package/dist/contour-wc-map.esm.min.js +1 -0
- package/dist/contour-wc-misc.esm.js +945 -0
- package/dist/contour-wc-misc.esm.min.js +1 -0
- package/dist/contour-wc-navigation.esm.js +2842 -0
- package/dist/contour-wc-navigation.esm.min.js +1 -0
- package/dist/contour-wc-ui.esm.js +6519 -0
- package/dist/contour-wc-ui.esm.min.js +1 -0
- package/dist/contour-wc.esm.js +14435 -5723
- package/dist/contour-wc.esm.min.js +1 -1
- package/dist/contour-wc.js +14436 -5725
- package/dist/contour-wc.min.js +1 -1
- package/dist/contour.a11y.json +402 -0
- package/dist/contour.code-snippets +4534 -0
- package/dist/contour.components.json +4870 -1222
- package/dist/contour.css +6672 -4711
- package/dist/contour.d.ts +753 -1085
- package/dist/contour.esm.js +440 -18
- package/dist/contour.esm.min.js +1 -1
- package/dist/contour.html-data.json +11343 -0
- package/dist/contour.js +440 -18
- package/dist/contour.min.css +1 -1
- package/dist/contour.min.js +1 -1
- package/dist/contour.react.d.ts +422 -0
- package/dist/contour.single.html +17 -0
- package/dist/contour.single.min.css +1 -0
- package/dist/contour.themes.json +56 -12
- package/dist/contour.tokens.json +1318 -1053
- package/dist/contour.vue.d.ts +420 -0
- package/dist/contour.web-types.json +11703 -0
- package/dist/custom-elements.json +36120 -0
- package/dist/docs/actions.md +16 -6
- package/dist/docs/affordances.md +21 -85
- package/dist/docs/apireference.md +9 -5
- package/dist/docs/colour.md +10 -4
- package/dist/docs/componentindex.md +9 -22
- package/dist/docs/data.md +39 -58
- package/dist/docs/docs.md +12 -7
- package/dist/docs/feedback.md +30 -12
- package/dist/docs/field.md +28 -13
- package/dist/docs/forms.md +35 -19
- package/dist/docs/index.json +70 -61
- package/dist/docs/install.md +12 -7
- package/dist/docs/landing.md +7 -4
- package/dist/docs/mapengine.md +30 -8
- package/dist/docs/motion.md +12 -6
- package/dist/docs/navigation.md +31 -7
- package/dist/docs/overlays.md +32 -25
- package/dist/docs/overview.md +3 -2
- package/dist/docs/patterns.md +20 -10
- package/dist/docs/playground.md +11 -4
- package/dist/docs/principles.md +8 -6
- package/dist/docs/recipes.md +117 -13
- package/dist/docs/space.md +10 -6
- package/dist/docs/status.md +13 -14
- package/dist/docs/surfaces.md +17 -22
- package/dist/docs/theming.md +18 -32
- package/dist/docs/type.md +12 -5
- package/dist/docs/webcomponents.md +75 -33
- package/dist/hljs.css +1 -20
- package/dist/map-chrome.mapbox.css +68 -92
- package/dist/map-chrome.maplibre.css +68 -92
- package/dist/registry/items/contour-core.json +2 -2
- package/dist/registry/items/contour-data.json +2 -2
- package/dist/registry/items/contour-docs.json +2 -2
- package/dist/registry/items/contour-landing.json +2 -2
- package/dist/registry/registry.json +8 -8
- package/dist/surfaces/contour-core.min.css +1 -1
- package/dist/surfaces/contour-data.min.css +1 -1
- package/dist/surfaces/contour-docs.min.css +1 -1
- package/dist/surfaces/contour-landing.min.css +1 -1
- package/dist/svg/icons.svg +367 -0
- package/dist/wc/behaviours.mjs +222 -192
- package/dist/wc/content.mjs +486 -142
- package/dist/wc/core.mjs +917 -395
- package/dist/wc/dashboard.mjs +252 -25
- package/dist/wc/data-chart.mjs +1333 -0
- package/dist/wc/data-export.mjs +391 -0
- package/dist/wc/data-gauge.mjs +779 -0
- package/dist/wc/data-geo.mjs +696 -0
- package/dist/wc/data-glyphs.mjs +133 -0
- package/dist/wc/data-legend.mjs +431 -0
- package/dist/wc/data-readout.mjs +227 -0
- package/dist/wc/data-series.mjs +1004 -0
- package/dist/wc/data-table.mjs +751 -0
- package/dist/wc/data.mjs +15 -3707
- package/dist/wc/docs.mjs +113 -19
- package/dist/wc/feedback.mjs +320 -116
- package/dist/wc/forms-controls.mjs +635 -0
- package/dist/wc/forms-field.mjs +547 -0
- package/dist/wc/forms-groups.mjs +347 -0
- package/dist/wc/forms-input.mjs +292 -0
- package/dist/wc/forms.mjs +10 -1122
- package/dist/wc/glyph.mjs +204 -0
- package/dist/wc/index.mjs +16 -7
- package/dist/wc/interaction.mjs +322 -75
- package/dist/wc/layout.mjs +100 -29
- package/dist/wc/map.mjs +888 -285
- package/dist/wc/misc.mjs +137 -26
- package/dist/wc/navigation-menu.mjs +735 -0
- package/dist/wc/navigation-shell.mjs +495 -0
- package/dist/wc/navigation-tree.mjs +995 -0
- package/dist/wc/navigation.mjs +9 -1636
- package/dist/wc/registration.mjs +1 -8
- package/dist/wc/shadow.mjs +285 -113
- package/dist/wc/states.mjs +75 -78
- package/dist/wc/svg.mjs +209 -34
- package/dist/wc/ui-atoms.mjs +608 -0
- package/dist/wc/ui-data.mjs +1404 -0
- package/dist/wc/ui-feedback.mjs +419 -0
- package/dist/wc/ui-inputs.mjs +1570 -0
- package/dist/wc/ui-menus.mjs +307 -0
- package/dist/wc/ui-overlays.mjs +1605 -0
- package/integrations/README.md +25 -5
- package/integrations/ai/CLAUDE.md +6 -3
- package/integrations/ai/COPILOT.md +14 -0
- package/integrations/ai/GEMINI.md +14 -0
- package/integrations/ai/WINDSURF.md +14 -0
- package/integrations/ai/v0-prompt.md +13 -1
- package/integrations/frameworks/README.md +235 -0
- package/integrations/native/README.md +0 -3
- package/integrations/native/style-dictionary.config.json +1 -1
- package/integrations/tailwind/contour-theme.css +71 -13
- package/integrations/validate-markup.mjs +172 -0
- package/package.json +103 -39
- package/dist/wc/ui.mjs +0 -3560
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CLASS_ONLY,CONTOUR_EVENTS,ContourBase,MERCATOR_MAX_LAT,MODS,OBSERVED,REGISTERED,applyLabel,bearing,clampLat,contourId,cssLength,define,flagOn,flagOnValue,formatValue,haversine,headingTag,iconMarkup,isRtl,labelText,levelFromAttributes,mercatorResolution,navKey,normaliseLng,onDispose,safeColor,safeHref,sanitizeHtml,setHTML,simple,statusIcon,supportsUntilFound,unwrapBounds,warnBadJson,wcEmitOverlay,withBrownout,MARKER_SHAPES,arcPath,assignMarkers,barRects,compassNeedle,contourPaths,donutSlices,isMissing,marchingSquares,markerStyles,niceTicks,polylinePoints,scaleBarTicks,smoothPath,modalContain,wcReset,wireCombobox,wireCopy,wireMenu,wirePagination,wireRemovable,wireSegmented,wireTabs,wireTree,STATE_FALLBACK,loadRemote,parseArrayAttr,remoteData,remoteInvalidate,remoteRefresh,remoteVisible,renderEmpty,renderStates,stateLabel,watchViewport,wireStates}from"./contour-wc-core.esm.js";define("contour-box",simple(["c-box"])),define("contour-cluster",simple(["c-cluster"])),define("contour-container",simple(["c-container"])),define("contour-row",simple(["c-row"])),define("contour-scrim",simple(["c-scrim"])),define("contour-stack",simple(["c-stack"]));const assignedText=t=>{const e=t.querySelector("slot");return(e?e.assignedElements({flatten:!0}):[]).map(t=>(t.textContent||"").trim()).join(" ").trim()||(t.textContent||"").trim()};let ADOPTED=null,ADOPTED_KEY="";const _hashCss=t=>{let e=2166136261;for(let s=0;s<t.length;s++)e^=t.charCodeAt(s),e=Math.imul(e,16777619);return(e>>>0).toString(36)};export const adoptedSheets=()=>{let t=document.styleSheets.length+":";for(const e of document.styleSheets){let s="-1";try{const t=e.cssRules;let i="";for(let e=0;e<t.length;e++)i+=t[e].cssText+"\n";s=t.length+":"+_hashCss(i)}catch(t){}t+=(e.href||"inline")+"~"+s+"|"}if(ADOPTED&&t===ADOPTED_KEY)return ADOPTED;ADOPTED_KEY=t,ADOPTED=[];const e=(t,s)=>{let i;try{i=t.cssRules}catch(t){return}if(i)for(const t of i)if(t instanceof CSSImportRule)t.styleSheet&&e(t.styleSheet,s);else try{s.push(t.cssText)}catch(t){}};for(const t of document.styleSheets)try{if(!t.href||new URL(t.href).origin===location.origin){const s=[];e(t,s);const i=new CSSStyleSheet;s.length&&i.replaceSync(s.join("\n")),ADOPTED.push(i)}}catch(t){}return ADOPTED};const _ShadowParent="undefined"!=typeof HTMLElement?HTMLElement:Object;class ContourShadow extends _ShadowParent{static get observedAttributes(){return MODS.concat("labels")}constructor(){super();let t=this.shadowRoot;t||(t=this.attachShadow({mode:"open"}),this.constructor.contourTemplate&&t.appendChild(this.constructor.contourTemplate.content.cloneNode(!0)));const e=adoptedSheets();if(e.length)try{t.adoptedStyleSheets=e}catch(t){}this._shadowBase=t.firstElementChild?t.firstElementChild.className:""}enhance(t){t||(t=this.shadowRoot),t&&(t.querySelectorAll("details").forEach(t=>{const e=t.querySelector("summary");e&&!e.hasAttribute("aria-expanded")&&(e.setAttribute("aria-expanded",String(t.open)),t.addEventListener("toggle",()=>{e.setAttribute("aria-expanded",String(t.open))}))}),t.querySelectorAll("[data-live]").forEach(t=>{t.hasAttribute("role")||t.setAttribute("role","status"),t.hasAttribute("aria-live")||t.setAttribute("aria-live","polite")}),t.querySelectorAll(".c-spinner").forEach(t=>{t.hasAttribute("role")||t.setAttribute("role","status"),t.hasAttribute("aria-live")||t.setAttribute("aria-live","polite")}),t.querySelectorAll(".c-toast, .c-toast-host").forEach(t=>{t.hasAttribute("role")||t.setAttribute("role","status"),t.hasAttribute("aria-live")||t.setAttribute("aria-live","polite"),t.hasAttribute("aria-atomic")||t.setAttribute("aria-atomic","true")}),t.querySelectorAll("[role='tab']").forEach(e=>{const s=e.getAttribute("aria-controls");if(s){const i=t.querySelector("#"+CSS.escape(s))||document.getElementById(s);i&&!i.hasAttribute("aria-labelledby")&&(e.id||(e.id=contourId("tab")),i.setAttribute("aria-labelledby",e.id))}}),t.querySelectorAll("input, textarea, select").forEach(t=>{if(t.hasAttribute("aria-describedby"))return;const e=t.closest(".c-field");if(e){const s=e.querySelector(".c-field__hint");s&&(s.id||(s.id=contourId("hint")),t.setAttribute("aria-describedby",s.id));const i=e.querySelector(".c-field__error");if(i){i.id||(i.id=contourId("err"));const e=t.getAttribute("aria-describedby")||"";t.setAttribute("aria-describedby",(e+" "+i.id).trim())}}}),t.querySelectorAll(".c-alert").forEach(t=>{const e=t.classList.contains("c-alert--warning")||t.classList.contains("c-alert--danger"),s=e?"alert":"status",i=e?"assertive":"polite";t.hasAttribute("role")&&!t.dataset.contourAutoRole||(t.setAttribute("role",s),t.dataset.contourAutoRole=s),t.hasAttribute("aria-live")&&!t.dataset.contourAutoLive||(t.setAttribute("aria-live",i),t.dataset.contourAutoLive=i)}),t.querySelectorAll("input[required], textarea[required], select[required]").forEach(t=>{t.hasAttribute("aria-required")||t.setAttribute("aria-required","true")}),this._wireLabels(t),this._wireClose(t))}_wireClose(t){if(!t||this._wiredShadowClose)return;const e=t.querySelectorAll(".c-callout__close, .c-alert__close, .c-tag__remove, .c-filter-pill__remove");if(e.length){this._wiredShadowClose=!0;for(const t of e)t.addEventListener("click",()=>{this.hidden=!0,this.dispatchEvent(new CustomEvent("contour:close",{bubbles:!0,composed:!0}))})}}_wireLabels(t){t&&t.querySelectorAll("label").forEach(t=>{const e=t.querySelector("slot"),s=t.closest(".c-field")||t.parentElement,i=[];if(e)for(const t of e.assignedElements({flatten:!0}))t.matches("input, textarea, select")&&i.push(t);if(!i.length&&s){const t=s.querySelector('slot[name="input"]');if(t)for(const e of t.assignedElements({flatten:!0}))e.matches("input, textarea, select")&&i.push(e)}for(const e of i){if(e.id||(e.id=contourId("shadow-input")),t.hasAttribute("for")||t.setAttribute("for",e.id),!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")){const s=assignedText(t);s&&e.setAttribute("aria-label",s)}if(e._contourLabelWired||(e._contourLabelWired=!0,t.addEventListener("click",t=>{if(!t.target.closest("a, button, input, textarea, select"))try{e.click()}catch(t){}})),s&&!e.hasAttribute("aria-describedby")){const t=s.querySelector(".c-field__hint"),i=s.querySelector(".c-field__error"),r=[];t&&(t.id||(t.id=contourId("hint")),r.push(t.id)),i&&(i.id||(i.id=contourId("err")),r.push(i.id)),r.length&&e.setAttribute("aria-describedby",r.join(" "))}}})}connectedCallback(){this.applyMods();try{this.enhance(this.shadowRoot)}catch(t){}this._applyLabels();try{wcReset(this),wireTabs(this),wireSegmented(this),wireCombobox(this),wireTree(this),wireMenu(this),wirePagination(this),wireCopy(this),wireRemovable(this)}catch(t){}this.shadowRoot&&!this._wiredSlotchange&&(this._wiredSlotchange=!0,this.shadowRoot.addEventListener("slotchange",()=>{try{this.enhance(this.shadowRoot),this._applyLabels(),wireTabs(this),wireSegmented(this),wireCombobox(this),wireTree(this),wireMenu(this),wirePagination(this),wireCopy(this),wireRemovable(this)}catch(t){}}))}attributeChangedCallback(){this.applyMods(),this._applyLabels()}_applyLabels(){const t=this.shadowRoot;if(!t)return;const e=(e,s,i)=>{const r=t.querySelector(e);r&&r.setAttribute("aria-label",labelText(this,s,i))};e(".c-callout__close","close","Close"),e(".c-alert__close","close","Close"),e(".c-tag__remove","remove","Remove"),e(".c-filter-pill__remove","remove-filter","Remove filter"),e(".c-breadcrumb","breadcrumb","Breadcrumb"),e(".c-spinner","loading","Loading"),e(".c-install__copy","copy-command","Copy command");const s=t.querySelector(".c-install__copy, .c-code__copy");s&&"Copy"===s.textContent.trim()&&(s.textContent=labelText(this,"copy","Copy"))}applyMods(){const t=this.shadowRoot.firstElementChild;if(!t||!this._shadowBase)return;const e=[];for(const t of MODS){const s=this.getAttribute(t);if(s)for(const t of this._shadowBase.split(/\s+/))t&&e.push("c-"+t.replace(/^c-/,"")+"--"+s)}if(t.className=(this._shadowBase+" "+e.join(" ")).trim(),t.classList.contains("c-alert")){const e=t.classList.contains("c-alert--warning")||t.classList.contains("c-alert--danger"),s=e?"alert":"status",i=e?"assertive":"polite";t.hasAttribute("role")&&!t.dataset.contourAutoRole||(t.setAttribute("role",s),t.dataset.contourAutoRole=s),t.hasAttribute("aria-live")&&!t.dataset.contourAutoLive||(t.setAttribute("aria-live",i),t.dataset.contourAutoLive=i)}}}const SHADOW_PARTS_PUBLIC={},SHADOW_MARKUP={},recordParts=(t,e)=>{SHADOW_PARTS_PUBLIC[t]=[...e.matchAll(/part="([^"]+)"/g)].flatMap(t=>t[1].split(/\s+/)).filter(Boolean)},shadow=(t,e)=>{if(SHADOW_MARKUP[t]=e,recordParts(t,e),"undefined"==typeof document)return;const s=document.createElement("template");setHTML(s,e);const i=class extends ContourShadow{};i.contourTemplate=s,define(t,i)},slotWrapper=(t,e,s)=>"<"+t+' class="c-'+e+'" part="'+(s||e)+'"'+("button"===t?' type="button"':"")+"><slot></slot></"+t+">",SHADOW_SLOTS={div:["accordion","activity","advanced","affordance","affordances","anchor","app","app-body","box","btn-group","chart-grid","catchment","cluster","command","compare","comparison","compass","contour-plot","cta","dash-freshness","dash-kpi-row","dash-shell","dash-toolbar","datamark","delta","draggable","drag-handle","drop-indicator","drop-zone","destructive-hint","docs-shell","drawer","elevation","filter-bar","flow-map","heatmap","hexbin","icon-badge","input-group","instrument","range-scale","resizable","table-wrap","time-range","toast-host","scroll-area","isochrone","landing-features","landing-hero","layer-panel","layer-switch","legend","logos","map-area","map-footer","map-panel","map-slot","measure","metrics","minimap","pager","pagination","panel","plate","price","pricing","progress","prose","pullquote","radio-list","range","readout","recipe","reserved","resize-handle","row","row-action","scale-bar","scrim","segmented","sheet","shortcut-list","shortcut-overlay","shortcut-panel","shortcut-row","showcase","sidebar","skeleton","sparkline","stack","steps","streaming-chart","survey","theme-scope","time-slider","timeline","toast","toolbar","tooltip","tree","version","version-banner"],button:["btn","pressable"],span:["avatar","badge","chip","dot","flag","live-badge","mark","pill"],a:["link","linkish"],kbd:["kbd"],label:["check","radio","switch"],nav:["docs-nav"]},SHADOW_PARTS={"version-banner":"banner","contour-plot":"plot"};for(const[t,e]of Object.entries(SHADOW_SLOTS))for(const s of e){shadow("contour-shadow-"+s,slotWrapper(t,s,SHADOW_PARTS[s]||s))}shadow("contour-shadow-callout",'<div class="c-callout" part="callout"><div class="c-callout__title" part="title"><slot name="title"></slot></div><div class="c-callout__body" part="body"><slot></slot></div><button class="c-callout__close" part="close" type="button" aria-label="Close">×</button></div>'),shadow("contour-shadow-empty",'<div class="c-empty" part="empty"><div class="c-empty__illustration" part="illustration"><slot name="illustration"></slot></div><div class="c-empty__title" part="title"><slot name="title"></slot></div><div class="c-empty__text" part="body"><slot></slot></div><div><slot name="action"></slot></div></div>'),shadow("contour-shadow-feature",'<div class="c-feature" part="feature"><span class="c-feature__index" part="index"><slot name="index"></slot></span><div class="c-feature__title" part="title"><slot name="title"></slot></div><div class="c-feature__body" part="body"><slot></slot></div></div>'),shadow("contour-shadow-kpi",'<div class="c-kpi" part="kpi"><div class="c-kpi__value" part="value"><slot name="value"></slot></div><div class="c-kpi__label" part="label"><slot name="label"></slot></div><div class="c-kpi__foot" part="foot"><slot name="delta"></slot><slot name="note"></slot></div></div>'),shadow("contour-shadow-stat",'<div class="c-stat" part="stat"><div class="c-stat__value" part="value"><slot name="value"></slot></div><div class="c-stat__label" part="label"><slot name="label"></slot></div><div class="c-stat__delta" part="delta"><slot name="delta"></slot></div></div>'),shadow("contour-shadow-meter",'<div class="c-meter" part="meter"><span class="c-meter__core" part="core"><span class="c-meter__value" part="value"><slot name="value"></slot></span><span class="c-meter__label" part="label"><slot name="label"></slot></span></span></div>'),shadow("contour-shadow-brownout",'<div class="c-brownout" part="brownout" data-level="0"><slot></slot></div>'),shadow("contour-shadow-widget-state",'<div class="c-widget-state" part="widget-state"><slot></slot></div>'),shadow("contour-shadow-donut",'<div class="c-donut" part="donut"><svg class="c-donut__ring" part="ring" viewBox="0 0 32 32"></svg><div class="c-donut__center" part="center"><slot name="value"></slot></div><div class="c-donut__list" part="list"><slot></slot></div></div>'),shadow("contour-shadow-axis",'<div class="c-axis" part="axis"><slot></slot></div>'),shadow("contour-shadow-brush",'<div class="c-brush" part="brush"><div class="c-brush__selection" part="selection"></div></div>'),shadow("contour-shadow-stacked-bar",'<div class="c-stacked-bar" part="bar"><slot></slot></div>'),shadow("contour-shadow-category",'<div class="c-category" part="category" role="listbox"><slot></slot></div>'),shadow("contour-shadow-gauge",'<div class="c-gauge" part="gauge"><svg class="c-gauge__dial" part="dial" aria-hidden="true" viewBox="0 0 100 100"><path class="c-gauge__track" part="track" d="M 10 90 A 40 40 0 0 1 90 90"></path><g class="c-gauge__zones"></g><line class="c-gauge__needle" part="needle" x1="50" y1="50" x2="50" y2="15"></line><circle class="c-gauge__hub" part="hub" cx="50" cy="50" r="4"></circle></svg><div class="c-gauge__value" part="value"><slot name="value"></slot></div><div class="c-gauge__band" part="band"><slot name="band"></slot></div></div>'),shadow("contour-shadow-diff",'<div class="c-diff" part="diff"><div class="c-diff__line c-diff__line--del" part="before"><span class="c-diff__sign">−</span><span><slot name="before"></slot></span></div><div class="c-diff__line c-diff__line--add" part="after"><span class="c-diff__sign">+</span><span><slot name="after"></slot></span></div></div>'),shadow("contour-shadow-do-dont",'<div class="c-do-dont" part="do-dont"><div class="c-do-dont__item c-do-dont__item--do" part="do"><slot name="do"></slot></div><div class="c-do-dont__item c-do-dont__item--dont" part="dont"><slot name="dont"></slot></div></div>'),shadow("contour-shadow-threshold",'<div class="c-threshold" part="threshold"><span class="c-threshold__fill" part="value"></span><span class="c-threshold__target" part="target"></span></div>'),shadow("contour-shadow-coordinate",'<div class="c-coordinate" part="coordinate"><span class="c-coordinate__value" part="value"><slot name="value"></slot></span></div>'),shadow("contour-shadow-install",'<div class="c-install" part="install"><span class="c-install__prompt" part="prompt"><slot name="prompt"></slot></span><span class="c-install__command" part="command"><slot name="command"></slot></span><button class="c-btn c-btn--ghost c-btn--sm c-install__copy" part="copy" type="button" aria-label="Copy command">Copy</button></div>'),shadow("contour-shadow-toc",'<div class="c-toc" part="toc"><div class="c-toc__title" part="title"><slot name="title"></slot></div><nav class="c-toc__list" part="list"><slot></slot></nav></div>'),shadow("contour-shadow-testimonial",'<div class="c-testimonial" part="testimonial"><blockquote class="c-testimonial__quote" part="quote"><slot name="quote"></slot></blockquote><div class="c-testimonial__byline" part="byline"><span class="c-testimonial__name" part="name"><slot name="name"></slot></span><span class="c-testimonial__role" part="role"><slot name="role"></slot></span></div></div>'),shadow("contour-shadow-search-trigger",'<button class="c-search-trigger" part="trigger"><span><slot name="label"></slot></span><kbd class="c-search-trigger__kbd"><slot name="shortcut"></slot></kbd></button>'),shadow("contour-shadow-brand",'<a class="c-brand" part="brand"><span class="c-mark" part="mark"><slot name="mark"></slot></span><span class="c-brand__name" part="name"><slot name="name"></slot></span></a>'),shadow("contour-shadow-section-head",'<div class="c-section-head" part="head"><h2 class="c-section-head__title" part="title"><slot name="title"></slot></h2><p class="c-section-head__desc" part="desc"><slot name="desc"></slot></p></div>'),shadow("contour-shadow-loading",'<div class="c-loading" part="loading"><span class="c-spinner" part="spinner"></span><slot></slot></div>'),shadow("contour-shadow-tabs",'<div class="c-tabs" part="tabs"><div class="c-tabs__list" part="list" role="tablist"><slot name="tabs"></slot></div><div class="c-tabs__panels" role="presentation"><slot></slot></div></div>'),shadow("contour-shadow-breadcrumb",'<nav class="c-breadcrumb" part="breadcrumb" aria-label="Breadcrumb"><ol><slot></slot></ol></nav>'),shadow("contour-shadow-menu",'<div class="c-menu" part="menu" role="menu"><slot></slot></div>'),shadow("contour-shadow-combobox",'<div class="c-combobox" part="combobox"><input class="c-combobox__input" part="input" type="text" /><ul class="c-combobox__list" part="list" hidden><slot></slot></ul></div>'),shadow("contour-shadow-chart",'<div class="c-chart" part="chart"><div class="c-chart__plot" part="plot"><slot></slot></div></div>'),shadow("contour-shadow-bivariate",'<div class="c-bivariate" part="bivariate"><div class="c-bivariate__matrix" part="matrix"><slot></slot></div></div>'),shadow("contour-shadow-bivariate-legend",'<div class="c-bivariate-legend" part="legend"><div class="c-bivariate-legend__matrix" part="matrix"><slot></slot></div></div>'),shadow("contour-shadow-expandable",'<details class="c-expandable" part="expandable"><summary class="c-expandable__summary"><slot name="summary"></slot></summary><div class="c-expandable__body" part="body"><slot></slot></div></details>'),shadow("contour-shadow-disclosure",'<details class="c-disclosure" part="disclosure"><summary><slot name="summary"></slot></summary><div class="c-disclosure__body" part="body"><slot></slot></div></details>'),shadow("contour-shadow-faq",'<div class="c-faq" part="faq"><div class="c-faq__question" part="question"><slot name="question"></slot></div><div class="c-faq__answer" part="answer"><slot name="answer"></slot></div></div>'),shadow("contour-shadow-code-tabs",'<div class="c-code-tabs" part="code-tabs"><div class="c-code-tabs__list" part="list" role="tablist"><slot name="tabs"></slot></div><div class="c-code-tabs__panels"><slot></slot></div></div>'),shadow("contour-shadow-header",'<header class="c-header" part="header"><div class="container c-header__inner" part="inner"><a class="c-brand" part="brand"><slot name="brand"></slot></a><nav class="c-header__nav" part="nav"><slot name="nav"></slot></nav><div class="c-header__actions" part="actions"><slot name="actions"></slot></div></div></header>'),shadow("contour-shadow-footer",'<footer class="c-footer" part="footer"><div class="container c-footer__grid" part="grid"><div class="c-footer__brand" part="brand"><slot name="brand"></slot></div><div class="c-footer__links" part="links"><slot name="links"></slot></div></div></footer>'),shadow("contour-shadow-container",'<div class="container" part="container"><slot></slot></div>'),shadow("contour-shadow-spinner",'<span class="c-spinner" part="spinner" aria-label="Loading"></span>'),shadow("contour-shadow-code",'<pre class="c-code" part="code"><code><slot></slot></code><button class="c-code__copy" part="copy" type="button">Copy</button></pre>'),shadow("contour-shadow-card",'<div class="c-card" part="card"> <div class="c-card__title" part="head"><slot name="title">Untitled</slot></div> <div class="c-card__body" part="body"><slot></slot></div> <div class="c-card__foot" part="foot"><slot name="foot"></slot></div> </div>'),shadow("contour-shadow-field",'<div class="c-field" part="field"> <label class="c-field__label" part="label"><slot name="label">Label</slot></label> <slot name="input"></slot> <span class="c-field__hint" part="hint"><slot name="hint"></slot></span> </div>'),shadow("contour-shadow-alert",'<div class="c-alert" part="alert"> <div class="c-alert__title" part="title"><slot name="title"></slot></div> <div class="c-alert__body" part="body"><slot></slot></div> <div class="c-alert__actions" part="actions"><slot name="action"></slot></div> <button class="c-alert__close" part="close" type="button" aria-label="Close">×</button> </div>'),shadow("contour-shadow-tag",'<span class="c-tag" part="tag"><slot></slot><button class="c-tag__remove" part="remove" type="button" aria-label="Remove">×</button></span>'),shadow("contour-shadow-filter-pill",'<span class="c-filter-pill" part="filter-pill"><slot></slot><button class="c-filter-pill__remove" part="remove" type="button" aria-label="Remove filter">×</button></span>');const DIALOG_MARKUP='<dialog class="c-dialog" part="dialog"> <div class="c-dialog__head" part="head"> <slot name="title"></slot> <button class="c-btn c-btn--icon c-btn--ghost" part="close" type="button" aria-label="Close"> <svg aria-hidden="true" viewBox="0 0 24 24"><path d="m18 6-12 12M6 6l12 12" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg> </button> </div> <div class="c-dialog__body" part="body"><slot></slot></div> <div class="c-dialog__foot" part="foot"><slot name="foot"></slot></div> </dialog>';SHADOW_MARKUP["contour-shadow-dialog"]=DIALOG_MARKUP,recordParts("contour-shadow-dialog",DIALOG_MARKUP);class ContourShadowDialog extends ContourShadow{static contourTemplate="undefined"!=typeof document?(()=>{const t=document.createElement("template");return setHTML(t,DIALOG_MARKUP),t})():null;enhance(t){if(super.enhance(t),this._wiredShadowDialog)return;this._wiredShadowDialog=!0;const e=t.querySelector("dialog"),s=t.querySelector('[part="close"]');if(s&&s.addEventListener("click",()=>e?.close()),e){let t=null;e.addEventListener("beforetoggle",s=>{if("open"===s.newState){t=document.activeElement,this._syncingOpenAttr=!0,this.hasAttribute("open")||this.setAttribute("open",""),this._syncingOpenAttr=!1,this.dispatchEvent(new CustomEvent("contour:open",{bubbles:!0,composed:!0}));const i=e.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])");if(i)try{i.focus()}catch(s){}}else if("closed"===s.newState&&(this._syncingOpenAttr=!0,this.hasAttribute("open")&&this.removeAttribute("open"),this._syncingOpenAttr=!1,this.dispatchEvent(new CustomEvent("contour:close",{bubbles:!0,composed:!0})),t&&"function"==typeof t.focus))try{t.focus()}catch(s){}});const s=()=>{const t="button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])",s=Array.from(e.querySelectorAll(t));for(const i of e.querySelectorAll("slot"))for(const e of i.assignedElements({flatten:!0})){e.matches(t)&&s.push(e);for(const i of e.querySelectorAll(t))s.push(i)}return s},i=()=>this.shadowRoot&&this.shadowRoot.activeElement||document.activeElement;e.addEventListener("keydown",t=>{if("Tab"!==t.key)return;const e=s();if(!e.length)return;const r=e[0],a=e[e.length-1];t.shiftKey&&i()===r?(t.preventDefault(),a.focus()):t.shiftKey||i()!==a||(t.preventDefault(),r.focus())})}}static get observedAttributes(){return[...super.observedAttributes,"open"]}attributeChangedCallback(t,e,s){if(super.attributeChangedCallback(t,e,s),"open"===t&&this.shadowRoot&&!this._syncingOpenAttr){const t=this.shadowRoot.querySelector("dialog");t&&(null===s||t.open?null===s&&t.open&&this.close():this.show())}}connectedCallback(){super.connectedCallback(),this.hasAttribute("open")&&this.show()}show(){if(!this.isConnected)return void(this.hasAttribute("open")||this.setAttribute("open",""));const t=this.shadowRoot?.querySelector("dialog");t&&!t.open&&t.showModal()}close(){const t=this.shadowRoot?.querySelector("dialog");t&&t.open&&t.close()}showModal(){this.show()}get open(){return!!this.shadowRoot?.querySelector("dialog")?.open}set open(t){t?this.show():this.close()}get returnValue(){return this.shadowRoot?.querySelector("dialog")?.returnValue??""}set returnValue(t){const e=this.shadowRoot?.querySelector("dialog");e&&(e.returnValue=String(t))}}define("contour-shadow-dialog",ContourShadowDialog);const renderShadowDSD=(t,e="",s="")=>{const i=SHADOW_MARKUP[t];if("string"!=typeof i)return null;return`<${t}${e?e.startsWith(" ")?e:" "+e:""}><template shadowrootmode="open">${i}</template>${s}</${t}>`},FROZEN_SHADOW_MARKUP=Object.freeze({...SHADOW_MARKUP});if("undefined"!=typeof globalThis&&(globalThis.ContourShadowTemplates=FROZEN_SHADOW_MARKUP),"undefined"!=typeof window){window.ContourShadowParts=Object.freeze(Object.fromEntries(Object.entries(SHADOW_PARTS_PUBLIC).map(([t,e])=>[t,Object.freeze([...new Set(e)])]))),window.Contour||(window.Contour={});try{window.Contour.shadowTemplates=FROZEN_SHADOW_MARKUP}catch{}}export{SHADOW_MARKUP,renderShadowDSD};class ContourCombobox extends ContourBase{static get observed(){return["options","items","placeholder","label","value","multiple","loading","error","retry","src","lazy","refresh","timeout","empty","skeleton","virtual","disabled","required","name","cache-key","no-cache"]}static get formAssociated(){return!0}static get properties(){return{options:{attribute:"options"},items:{attribute:"items"},placeholder:{attribute:"placeholder"},label:{attribute:"label"},value:{attribute:"value"},multiple:{attribute:"multiple",type:Boolean},virtual:{attribute:"virtual",type:Boolean},src:{attribute:"src"},disabled:{attribute:"disabled",type:Boolean},required:{attribute:"required",type:Boolean},name:{attribute:"name"}}}render(){if(this.classList.add("c-combobox"),void 0===this._comboboxDefault&&(this._comboboxDefault=this.getAttribute("value")),wireStates(this),loadRemote(this,"options"),renderStates(this,"combobox"))return;const t=remoteData(this,"options")||this.getAttribute("options")||this.getAttribute("items"),e=Array.from(this.children).filter(t=>!t.classList||!t.classList.contains("c-combobox__input")&&!t.classList.contains("c-combobox__list"));if(t&&!e.length)try{const e=t?JSON.parse(t):[];this._comboboxOptions=e;const s=this.ensure(".c-combobox__input",()=>{const t=document.createElement("input");return t.className="c-input c-combobox__input",t.type="text",t});s.type="text",s.placeholder=this.getAttribute("placeholder")||labelText(this,"search","Search…"),s.setAttribute("aria-label",this.getAttribute("label")||labelText(this,"search","Search")),this.hasAttribute("disabled")?(s.setAttribute("disabled",""),this.classList.add("is-disabled")):(s.removeAttribute("disabled"),this.classList.remove("is-disabled")),this.hasAttribute("required")?(s.setAttribute("required",""),s.setAttribute("aria-required","true")):(s.removeAttribute("required"),s.removeAttribute("aria-required")),this.hasAttribute("name")&&s.setAttribute("name",this.getAttribute("name"));const i=this.getAttribute("value");if(null!==i){const t=String(i).split(",").map(t=>t.trim()).filter(Boolean).map(t=>{const s=e.find(e=>String("string"==typeof e?e:e.value)===t);return s?String("string"==typeof s?s:s.label):t});if(this.hasAttribute("multiple"))s.value="",s.placeholder=t.join(", ")||this.getAttribute("placeholder")||labelText(this,"search","Search…");else{const t=e.find(t=>String("string"==typeof t?t:t.value)===String(i));s.value=t?String("string"==typeof t?t:t.label):i}}const r=this.ensure(".c-combobox__list",()=>{const t=document.createElement("ul");return t.className="c-combobox__list",t.setAttribute("hidden",""),t});r.innerHTML="",r.setAttribute("hidden",""),this._comboboxVirtual=this.hasAttribute("virtual")&&e.length>100,this._comboboxVirtual?(r.classList.add("c-combobox__list--virtual"),r.style.maxBlockSize="20rem",r.style.overflow="auto",this._renderComboboxWindow("",!0)):(r.classList.remove("c-combobox__list--virtual"),r.style.maxBlockSize="",r.style.overflow="",this._renderComboboxWindow("",!0))}catch(t){warnBadJson(this,"attribute",t)}else if(e.length||t){if(e.length){const t=this.ensure(".c-combobox__input",()=>{const t=document.createElement("input");return t.className="c-input c-combobox__input",t.type="text",t});t.type="text",t.placeholder=this.getAttribute("placeholder")||labelText(this,"search","Search…"),t.setAttribute("aria-label",this.getAttribute("label")||labelText(this,"search","Search")),this.hasAttribute("required")?(t.setAttribute("required",""),t.setAttribute("aria-required","true")):(t.removeAttribute("required"),t.removeAttribute("aria-required")),this.hasAttribute("name")&&t.setAttribute("name",this.getAttribute("name"));const s=this.ensure(".c-combobox__list",()=>{const t=document.createElement("ul");return t.className="c-combobox__list",t.setAttribute("hidden",""),t});for(const t of e)"LI"===t.tagName&&(s.appendChild(t),t.setAttribute("role","option"));this._comboboxOptions=Array.from(s.querySelectorAll("li")).map(t=>({label:t.textContent.trim(),value:null!=t.dataset.value?t.dataset.value:t.textContent.trim()}))}}else renderEmpty(this,"combobox");if(this.getAttribute("value"))this.ensure(".c-combobox__clear",()=>{const t=document.createElement("button");return t.className="c-combobox__clear",t.type="button",t.setAttribute("aria-label",labelText(this,"clear","Clear")),t.textContent="×",t});else{const t=this.querySelector(".c-combobox__clear");t&&t.remove()}}_renderComboboxWindow(t="",e=!1){const s=this.querySelector(".c-combobox__list"),i=this._comboboxOptions||[];if(!s)return;const r=String(t||"").toLowerCase(),a=i.map((t,e)=>({opt:t,index:e,label:"string"==typeof t?t:t.label,value:"string"==typeof t?t:t.value})).filter(t=>!r||String(t.label).toLowerCase().includes(r));this._comboboxFiltered=a;const o=cssLength("--combobox-row-height",32),l=s.scrollTop,n=this._comboboxVirtual&&!e?Math.min(Math.max(0,a.length-20),Math.max(0,Math.floor(l/o)-6)):0;this._comboboxWindowStart=n;const c=this._comboboxVirtual?Math.min(a.length,n+20+12):a.length,u=(this.getAttribute("value")||"").split(",").map(t=>t.trim()).filter(Boolean);s.innerHTML="";const d=t=>{const e=document.createElement("li");e.setAttribute("aria-hidden","true"),e.style.blockSize=`${t}px`,s.appendChild(e)};if(this._comboboxVirtual&&d(n*o),!a.length){const t=document.createElement("li");t.className="c-combobox__empty",t.setAttribute("role","option"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-selected","false"),t.textContent=this.getAttribute("empty")||labelText(this,"no-matches","No matches"),s.appendChild(t)}this.hasAttribute("multiple")?s.setAttribute("aria-multiselectable","true"):s.removeAttribute("aria-multiselectable"),a.slice(n,c).forEach(e=>{const i=document.createElement("li");i.className="c-combobox__option",i.dataset.optionIndex=String(e.index),i.dataset.optionValue=String(null!=e.value?e.value:e.label),i.setAttribute("role","option");const r=String(e.label),a=String(t||"").toLowerCase();if(a&&r.toLowerCase().includes(a)){const t=r.toLowerCase().indexOf(a),e=r.slice(0,t),s=r.slice(t,t+a.length),o=r.slice(t+a.length);i.innerHTML="",e&&i.appendChild(document.createTextNode(e));const l=document.createElement("mark");l.className="c-combobox__match",l.textContent=s,i.appendChild(l),o&&i.appendChild(document.createTextNode(o))}else i.textContent=r;const o=this.hasAttribute("multiple")&&u.includes(String(e.value));i.setAttribute("aria-selected",String(o)),o&&i.classList.add("c-combobox__option--selected"),s.appendChild(i)}),this._comboboxVirtual&&d(Math.max(0,a.length-c)*o),this._comboboxVirtual&&!e&&(s.scrollTop=l)}_syncFormValue(){if(!this._internals)return;const t=this.getAttribute("value"),e=null!=t&&""!==t?t:null;this._internals.setFormValue(e),this._syncValidity(this.hasAttribute("required")&&!e)}enhance(){wireCombobox(this),this._internals&&!this._wiredComboboxForm&&(this._wiredComboboxForm=!0,this._syncFormValue(),this.addEventListener("contour:select",t=>{const e=t&&t.detail&&(t.detail.value||t.detail.label);null!=e&&this.setAttribute("value",String(e)),this._syncFormValue()})),this._wiredComboboxClear||(this._wiredComboboxClear=!0,this.addEventListener("click",t=>{const e=t.target&&t.target.closest?t.target.closest(".c-combobox__clear"):null;if(!e||!this.contains(e))return;t.preventDefault(),this.removeAttribute("value");const s=this.querySelector(".c-combobox__input");s&&(s.value=""),this._syncFormValue(),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{name:this.getAttribute("name"),value:null,checked:null}}))}))}formResetCallback(){this._contourResetting=!0;try{const t=this._comboboxDefault??null;null===t?this.removeAttribute("value"):this.setAttribute("value",t),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-combobox",ContourCombobox);class ContourField extends ContourBase{static get observed(){return["label","hint","error","placeholder","type","required","name","value","disabled","custom-error"]}static get formAssociated(){return!0}static get properties(){return{label:{attribute:"label"},hint:{attribute:"hint"},error:{attribute:"error"},placeholder:{attribute:"placeholder"},type:{attribute:"type"},required:{attribute:"required",type:Boolean},name:{attribute:"name"},value:{attribute:"value"},disabled:{attribute:"disabled",type:Boolean},customError:{attribute:"custom-error"}}}render(){this.classList.add("c-field");const t=this.getAttribute("label"),e=this.getAttribute("hint"),s=this.getAttribute("error"),i=this.getAttribute("placeholder")||"";if(t){this.ensure(".c-field__label",()=>{const t=document.createElement("label");return t.className="c-field__label",t}).textContent=t}else{const t=this.querySelector(".c-field__label");t&&t.remove()}const r=Array.from(this.children).find(t=>t.constructor&&t.constructor.formAssociated)?null:this.ensure("input.c-input, textarea, select",()=>{const t=document.createElement("input");return t.className="c-input",t});if(r){r.type=this.getAttribute("type")||"text",r.placeholder=i,r.id||(r.id=this._fieldInputId||(this._fieldInputId=contourId("contour-field")));const t=this.querySelector(".c-field__label");if(t?(r.id||(r.id=contourId("contour-field")),t.setAttribute("for",r.id),r.setAttribute("aria-label",t.textContent)):r.hasAttribute("aria-label")||r.setAttribute("aria-label",labelText(this,"field","Field")),e){this.ensure(".c-field__hint",()=>{const t=document.createElement("span");return t.className="c-field__hint",t}).textContent=e}else{const t=this.querySelector(".c-field__hint");t&&t.remove()}if(s){this.ensure(".c-field__error",()=>{const t=document.createElement("span");return t.className="c-field__error",t}).textContent=s}else{const t=this.querySelector(".c-field__error");t&&t.remove()}const a=this.getAttribute("custom-error");if(null!==a){r.setAttribute("aria-invalid","true"),this.classList.add("is-invalid"),this.setAttribute("data-invalid","");let t=this.querySelector(".c-field__error");t||(t=document.createElement("span"),t.className="c-field__error",this.appendChild(t)),t.textContent=a,t.id||(t.id=contourId("err")),r.setAttribute("aria-describedby",(r.getAttribute("aria-describedby")||"").split(" ").filter(e=>e&&e!==t.id).concat(t.id).join(" "))}const o=this.querySelector(".c-field__hint"),l=this.querySelector(".c-field__error"),n=[];o&&(o.id||(o.id=contourId("hint")),n.push(o.id)),l&&(l.id||(l.id=contourId("err")),n.push(l.id)),n.length&&r.setAttribute("aria-describedby",n.join(" ")),this.hasAttribute("required")?(r.setAttribute("aria-required","true"),r.setAttribute("required","")):(r.removeAttribute("aria-required"),r.removeAttribute("required")),this.hasAttribute("name")&&r.setAttribute("name",this.getAttribute("name")),this.hasAttribute("value")&&(r.value=this.getAttribute("value")),this.hasAttribute("disabled")?(r.setAttribute("disabled",""),this.classList.add("is-disabled")):(r.removeAttribute("disabled"),this.classList.remove("is-disabled"))}}}ContourField.prototype.enhance=function(){if(this._wiredField)return;this._wiredField=!0;const t=()=>{const t=this.querySelector("input, textarea, select");t&&this._internals&&(this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value))};this.addEventListener("input",e=>{const s=this.querySelector("input, textarea, select");s&&e.target===s&&(t(),this._emitForm("contour:input"))}),this.addEventListener("change",e=>{const s=this.querySelector("input, textarea, select");s&&e.target===s&&(t(),this._emitForm("contour:change"))}),this.addEventListener("focusout",e=>{const s=this.querySelector("input, textarea, select");if(!s||e.target!==s)return;if(s.checkValidity()){if(s.setAttribute("aria-invalid","false"),this.classList.remove("is-invalid"),this.removeAttribute("data-invalid"),!this.getAttribute("error")){const t=this.querySelector(".c-field__error");if(t){const e=t.id;t.remove(),e&&s.setAttribute("aria-describedby",(s.getAttribute("aria-describedby")||"").split(" ").filter(t=>t&&t!==e).join(" "))}}}else{s.setAttribute("aria-invalid","true"),this.classList.add("is-invalid"),this.setAttribute("data-invalid","");const t=new CustomEvent("contour:invalid",{bubbles:!0,composed:!0,cancelable:!0,detail:{field:this,input:s,message:s.validationMessage||"Invalid value"}});if(this.dispatchEvent(t)&&!this.getAttribute("error")&&!this.getAttribute("custom-error")){const t=s.validationMessage||"Invalid value";let e=this.querySelector(".c-field__error");e||(e=document.createElement("span"),e.className="c-field__error",this.appendChild(e)),e.textContent=t,e.id||(e.id=contourId("err")),s.setAttribute("aria-describedby",(s.getAttribute("aria-describedby")||"").split(" ").filter(t=>t&&t!==e.id).concat(e.id).join(" "))}}t()},!0),t()},define("contour-field",ContourField);class ContourFieldGroup extends ContourBase{static get observed(){return["label","hint","error","required"]}static get properties(){return{label:{attribute:"label"},hint:{attribute:"hint"},error:{attribute:"error"},required:{attribute:"required",type:Boolean}}}render(){this.classList.add("c-field-group"),this.setAttribute("role","group");const t=this.getAttribute("label");if(t){this.ensure(".c-field-group__label",()=>{const t=document.createElement("div");return t.className="c-field-group__label",t}).textContent=t}else{const t=this.querySelector(".c-field-group__label");t&&t.remove()}const e=this.getAttribute("hint");if(e){this.ensure(".c-field-group__hint",()=>{const t=document.createElement("span");return t.className="c-field-group__hint",t}).textContent=e}else{const t=this.querySelector(".c-field-group__hint");t&&t.remove()}const s=this.getAttribute("error");if(s){this.ensure(".c-field-group__error",()=>{const t=document.createElement("span");return t.className="c-field-group__error",t}).textContent=s}else{const t=this.querySelector(".c-field-group__error");t&&t.remove()}s?this.classList.add("is-error"):this.classList.remove("is-error");const i=this.hasAttribute("required");this.querySelectorAll("input, select, textarea").forEach(t=>{i?t.hasAttribute("aria-required")||t.setAttribute("aria-required","true"):"true"===t.getAttribute("aria-required")&&t.removeAttribute("aria-required")})}enhance(){this._wiredFieldGroup||(this._wiredFieldGroup=!0)}}define("contour-field-group",ContourFieldGroup);class ContourForm extends ContourBase{static get observed(){return["submitting","error","summary","title","submit-label"]}static get properties(){return{submitting:{attribute:"submitting",type:Boolean},error:{attribute:"error"},summary:{attribute:"summary"},title:{attribute:"title"},submitLabel:{attribute:"submit-label"}}}render(){this.classList.add("c-form"),this.hasAttribute("submitting")?this.classList.add("is-submitting"):this.classList.remove("is-submitting");const t=this.getAttribute("title");let e=this.querySelector(".c-form__title");t?(e||(e=document.createElement("h2"),e.className="c-form__title",this.prepend(e)),e.textContent=t):e&&e.remove();const s=this.getAttribute("summary")||this.getAttribute("error");let i=this.querySelector(".c-form__summary");s?(i||(i=document.createElement("div"),i.className="c-form__summary",i.setAttribute("role","alert"),this.prepend(i)),i.textContent=s,i.removeAttribute("hidden")):i&&i.setAttribute("hidden","");const r=this.getAttribute("submit-label");let a=this.querySelector(".c-form__submit");a||(a=document.createElement("button"),a.type="submit",a.className="c-btn c-btn--primary c-form__submit",this.appendChild(a)),r?(a.textContent=r,a.dataset&&delete a.dataset.contourLabel):applyLabel(a,this,"submit","Submit"),this.hasAttribute("submitting")?a.setAttribute("disabled",""):a.removeAttribute("disabled")}enhance(){if(this._wiredForm)return;this._wiredForm=!0;const t=this.closest("form")||this,e=t=>{const e=t.target;if(t.preventDefault(),e&&"function"==typeof e.checkValidity&&!e.checkValidity()){const t=Array.from(e.querySelectorAll(":invalid")).map(t=>t.getAttribute("aria-label")||t.name||t.id||"field").join(", ");let s=this.querySelector(".c-form__summary");return s||(s=document.createElement("div"),s.className="c-form__summary",s.setAttribute("role","alert"),this.prepend(s)),s.textContent=labelText(this,"validation-summary","Please fix")+": "+(t||labelText(this,"invalid-fields","invalid fields")),void s.removeAttribute("hidden")}this._submit()};this.addEventListener("click",t=>{const e=t.target&&t.target.closest?t.target.closest(".c-form__submit"):null;e&&this.contains(e)&&(t.target.closest("form")||(t.preventDefault(),this._submit()))}),t.addEventListener("submit",e),onDispose(this,()=>{t!==this&&t.removeEventListener("submit",e)})}_submit(){this.classList.add("is-submitting");const t=this.querySelector("[type='submit'], .c-form__submit");t&&t.setAttribute("disabled",""),this.dispatchEvent(new CustomEvent("contour:submit",{bubbles:!0,composed:!0,detail:{submitting:!0}}))}}define("contour-form",ContourForm);class ContourRange extends ContourBase{static get observed(){return["min","max","value","low","high","range","sparkline","label","disabled","error","help","name","step"]}static get formAssociated(){return!0}static get properties(){return{min:{attribute:"min"},max:{attribute:"max"},value:{attribute:"value"},label:{attribute:"label"},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"},name:{attribute:"name"},step:{attribute:"step"}}}render(){this.classList.add("c-range");const t=this.getAttribute("min")||"0",e=this.getAttribute("max")||"100",s=this.hasAttribute("range")||this.hasAttribute("low")||this.hasAttribute("high"),i=this.getAttribute("sparkline");if(i){let t=this.querySelector(".c-range__sparkline");t||(t=document.createElement("canvas"),t.className="c-range__sparkline",t.setAttribute("part","sparkline-canvas"),t.setAttribute("aria-hidden","true"),this.insertBefore(t,this.firstChild)),this._drawRangeSpark(t,i)}else{const t=this.querySelector(".c-range__sparkline");t&&t.remove()}if(s){this.querySelector("input.c-range:not(.c-range__low):not(.c-range__high)");let s=this.querySelector("input.c-range__low");s||(s=document.createElement("input"),s.type="range",s.className="c-range c-range__low",s.setAttribute("part","input"),this.appendChild(s));let i=this.querySelector("input.c-range__high");i||(i=document.createElement("input"),i.type="range",i.className="c-range c-range__high",i.setAttribute("part","input"),this.appendChild(i)),s.min=t,s.max=e,i.min=t,i.max=e;const r=this.getAttribute("step");r?(s.step=r,i.step=r):(s.removeAttribute("step"),i.removeAttribute("step")),this.hasAttribute("disabled")?(s.setAttribute("disabled",""),i.setAttribute("disabled","")):(s.removeAttribute("disabled"),i.removeAttribute("disabled"));const a=this.getAttribute("low")||t,o=this.getAttribute("high")||e;null!==this._rangeUserLow&&this._rangeAttrLowAtDirty===(this.getAttribute("low")||t)?s.value=this._rangeUserLow:(s.value=a,this._rangeUserLow=null,this._rangeAttrLowAtDirty=null),null!==this._rangeUserHigh&&this._rangeAttrHighAtDirty===(this.getAttribute("high")||e)?i.value=this._rangeUserHigh:(i.value=o,this._rangeUserHigh=null,this._rangeAttrHighAtDirty=null);const l=this.getAttribute("label");l&&(s.setAttribute("aria-label",l+" low"),i.setAttribute("aria-label",l+" high"))}else{Array.from(this.querySelectorAll("input.c-range__low, input.c-range__high, input[type='hidden'][data-range]")).forEach(t=>t.remove());const s=this.ensure("input.c-range",()=>{const t=document.createElement("input");return t.type="range",t.setAttribute("part","input"),t});s.className="c-range",s.type="range",s.min=t,s.max=e;const i=this.getAttribute("step");i?s.step=i:s.removeAttribute("step"),this.hasAttribute("disabled")?s.setAttribute("disabled",""):s.removeAttribute("disabled");const r=this.getAttribute("value")||"50";null!==this._rangeUserValue&&this._rangeAttrAtDirty===(this.getAttribute("value")||"50")?s.value=this._rangeUserValue:(s.value=r,this._rangeUserValue=null,this._rangeAttrAtDirty=null);const a=this.getAttribute("label");a?s.setAttribute("aria-label",a):s.hasAttribute("aria-label")||s.setAttribute("aria-label",labelText(this,"range","Range"));const o=()=>{const t=Number(s.min)||0,e=Number(s.max)||100,i=Number(s.value)||0,r=e>t?(i-t)/(e-t)*100:0;s.style.setProperty("--fill",r+"%")};o(),s._fillWired||(s._fillWired=!0,s.addEventListener("input",o))}}_drawRangeSpark(t,e){let s=[];try{const t=JSON.parse(e);Array.isArray(t)&&(s=t.map(Number).filter(Number.isFinite))}catch(t){}if(s.length<2)return;const i=()=>{if(!t.isConnected)return;const e=t.clientWidth,i=t.clientHeight;if(!e||!i)return;const r="undefined"!=typeof window&&window.devicePixelRatio||1;t.width=Math.round(e*r),t.height=Math.round(i*r);const a=t.getContext&&t.getContext("2d");if(!a)return;a.setTransform(r,0,0,r,0,0),a.clearRect(0,0,e,i);const o=Math.min.apply(null,s),l=Math.max.apply(null,s)-o||1;let n="";try{n=getComputedStyle(this).getPropertyValue("--chart-1").trim()}catch(t){}n&&!/^(var|light-dark)\(/.test(n)||(n="#1f77b4"),a.beginPath(),a.lineWidth=1.5,a.strokeStyle=n,s.forEach((t,r)=>{const n=(t=>t/(s.length-1)*(e-4)+2)(r),c=(t=>i-2-(t-o)/l*(i-4))(t);0===r?a.moveTo(n,c):a.lineTo(n,c)}),a.stroke()};"function"==typeof requestAnimationFrame?requestAnimationFrame(i):i()}}const _origRangeRender=ContourRange.prototype.render;ContourRange.prototype.attributeChangedCallback=function(t,e,s){return"value"===t&&(this._rangeUserValue=null,this._rangeAttrAtDirty=null),"low"===t&&(this._rangeUserLow=null,this._rangeAttrLowAtDirty=null),"high"===t&&(this._rangeUserHigh=null,this._rangeAttrHighAtDirty=null),ContourBase.prototype.attributeChangedCallback.call(this,t,e,s)},ContourRange.prototype._syncFormValue=function(){if(!this._internals)return;const t=this.querySelector("input.c-range__low"),e=this.querySelector("input.c-range__high");if(t&&e){const s=this.getAttribute("name");if(s){const i=new FormData;i.append(s,t.value),i.append(s,e.value),this._internals.setFormValue(i)}else this._internals.setFormValue(null)}else{const t=this.querySelector("input.c-range:not(.c-range__low):not(.c-range__high)");t&&this._internals.setFormValue(t.value)}},ContourRange.prototype.formResetCallback=function(){this._contourResetting=!0;try{this._rangeUserValue=null,this._rangeAttrAtDirty=null,this._rangeUserLow=null,this._rangeAttrLowAtDirty=null,this._rangeUserHigh=null,this._rangeAttrHighAtDirty=null,this.isConnected&&this._contourAuthored&&this.attributeChangedCallback("__rerender__",null,""),this._syncFormValue()}finally{this._contourResetting=!1}},ContourRange.prototype.formStateRestoreCallback=function(t){if(!this._internals||null==t)return;const e=this.querySelector("input.c-range__low"),s=this.querySelector("input.c-range__high");if(e&&s&&t instanceof FormData){const i=t.getAll(this.getAttribute("name"));i.length>=2&&(e.value=String(i[0]),s.value=String(i[1]))}else{const e=this.querySelector("input.c-range:not(.c-range__low):not(.c-range__high)");e&&(e.value=String(t))}this._syncFormValue()},ContourRange.prototype.enhance=function(){if(this._wiredRange)return;this._wiredRange=!0,this._syncFormValue();const t=()=>{this._syncFormValue()};this.addEventListener("input",e=>{const s=this.querySelector("input.c-range__low"),i=this.querySelector("input.c-range__high"),r=this.querySelector("input.c-range:not(.c-range__low):not(.c-range__high)");s&&i&&(e.target===s||e.target===i)?(this._rangeUserLow=s.value,this._rangeUserHigh=i.value,this._rangeAttrLowAtDirty=this.getAttribute("low")||this.getAttribute("min")||"0",this._rangeAttrHighAtDirty=this.getAttribute("high")||this.getAttribute("max")||"100",t(),this._emitForm("contour:input",{low:Number(s.value),high:Number(i.value)}),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{low:Number(s.value),high:Number(i.value)}}))):r&&e.target===r&&(this._rangeUserValue=r.value,this._rangeAttrAtDirty=this.getAttribute("value")||"50",t(),this._emitForm("contour:input"))}),this.addEventListener("change",e=>{const s=this.querySelector("input.c-range__low"),i=this.querySelector("input.c-range__high"),r=this.querySelector("input.c-range:not(.c-range__low):not(.c-range__high)");s&&i&&(e.target===s||e.target===i)?(t(),this._emitForm("contour:change",{low:Number(s.value),high:Number(i.value)}),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{low:Number(s.value),high:Number(i.value)}}))):r&&e.target===r&&(t(),this._emitForm("contour:change"))}),t()},define("contour-range",ContourRange);class ContourSwitch extends ContourBase{static get observed(){return["label","required","checked","disabled","error","help"]}static get properties(){return{label:{attribute:"label"},required:{attribute:"required",type:Boolean},checked:{attribute:"checked",type:Boolean},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"}}}static get formAssociated(){return!0}render(){this.classList.add("c-switch"),void 0===this._switchDefaultChecked&&(this._switchDefaultChecked=this.hasAttribute("checked"));const t=this.getAttribute("label"),e=this.ensure("input.c-switch__input",()=>{const t=document.createElement("input");return t.className="c-switch__input",t.type="checkbox",t});e.checked=this.hasAttribute("checked"),e.setAttribute("role","switch"),e.setAttribute("aria-checked",String(e.checked)),this._setCustomState("data-checked",e.checked),this.hasAttribute("disabled")?(e.setAttribute("disabled",""),this.classList.add("is-disabled")):(e.removeAttribute("disabled"),this.classList.remove("is-disabled"));const s=this.getAttribute("error"),i=this.getAttribute("help");let r=this.querySelector(".c-switch__message");if(s||i?(r||(r=document.createElement("div"),r.className="c-switch__message",this.appendChild(r)),r.textContent=s||i||"",r.classList.toggle("c-switch__message--error",!!s)):r&&r.remove(),s?this.classList.add("is-error"):this.classList.remove("is-error"),t){e.setAttribute("aria-label",t);(this.querySelector(":scope > span:not([class])")||(()=>{const t=document.createElement("span");return this.appendChild(t),t})()).textContent=t}e.hasAttribute("aria-label")||e.setAttribute("aria-label",labelText(this,"switch","Switch"))}enhance(){const t=this.querySelector("input");t&&this._internals&&(t.setAttribute("aria-checked",String(t.checked)),this._setCustomState("data-checked",t.checked),this._internals.setFormValue(t.checked?t.value||"on":null),this._syncValidity(this.hasAttribute("required")&&!t.checked)),this._wiredSwitch||(this._wiredSwitch=!0,this.addEventListener("click",t=>{if(t.target&&t.target.closest&&t.target.closest("input"))return;const e=this.querySelector("input");e&&!e.disabled&&(t.preventDefault(),e.click())}),this.addEventListener("change",t=>{const e=this.querySelector("input");e&&t.target===e&&this._internals&&(e.setAttribute("aria-checked",String(e.checked)),this._setCustomState("data-checked",e.checked),this._setCustomState("data-indeterminate",!1),this.removeAttribute("indeterminate"),this.toggleAttribute("checked",e.checked),this._internals.setFormValue(e.checked?e.value||"on":null),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.checked))}))}formResetCallback(){this._contourResetting=!0;try{this.toggleAttribute("checked",!!this._switchDefaultChecked);const t=this.querySelector("input");t&&(t.checked=this.hasAttribute("checked")),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-switch",ContourSwitch);class ContourCheck extends ContourBase{static get observed(){return["label","name","value","required","type","checked","indeterminate","disabled","error","help"]}static get properties(){return{label:{attribute:"label"},name:{attribute:"name"},value:{attribute:"value"},required:{attribute:"required",type:Boolean},type:{attribute:"type"},checked:{attribute:"checked",type:Boolean},indeterminate:{attribute:"indeterminate",type:Boolean},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"}}}static get formAssociated(){return!0}render(){this.classList.add("c-check"),void 0===this._checkDefaultChecked&&(this._checkDefaultChecked=this.hasAttribute("checked"));const t=this.getAttribute("label"),e=this.ensure("input.c-check__input",()=>{const t=document.createElement("input");return t.className="c-check__input",t.type="radio"===this.getAttribute("type")?"radio":"checkbox",t});if(e.checked=this.hasAttribute("checked"),e.indeterminate=this.hasAttribute("indeterminate")&&!e.checked,t){e.setAttribute("aria-label",t);(this.querySelector(":scope > span:not([class])")||(()=>{const t=document.createElement("span");return this.appendChild(t),t})()).textContent=t}e.hasAttribute("aria-label")||e.setAttribute("aria-label",labelText(this,"checkbox","Checkbox")),this.hasAttribute("name")&&(e.name=this.getAttribute("name")),this.hasAttribute("value")&&(e.value=this.getAttribute("value")),this.hasAttribute("disabled")?(e.setAttribute("disabled",""),this.classList.add("is-disabled")):(e.removeAttribute("disabled"),this.classList.remove("is-disabled"));const s=this.getAttribute("error"),i=this.getAttribute("help");let r=this.querySelector(".c-check__message");s||i?(r||(r=document.createElement("div"),r.className="c-check__message",this.appendChild(r)),r.textContent=s||i||"",r.classList.toggle("c-check__message--error",!!s)):r&&r.remove(),s?this.classList.add("is-error"):this.classList.remove("is-error")}enhance(){const t=this.querySelector("input");t&&this._internals&&(this._setCustomState("data-checked",t.checked),this._setCustomState("data-indeterminate",t.indeterminate),this._internals.setFormValue(t.checked?t.value||"on":null),this._syncValidity(this.hasAttribute("required")&&!t.checked)),this._wiredCheck||(this._wiredCheck=!0,this.addEventListener("click",t=>{if(t.target&&t.target.closest&&t.target.closest("input"))return;const e=this.querySelector("input");e&&!e.disabled&&(t.preventDefault(),e.click())}),this.addEventListener("change",t=>{const e=this.querySelector("input");e&&t.target===e&&this._internals&&(this._setCustomState("data-checked",e.checked),this._setCustomState("data-indeterminate",!1),this.removeAttribute("indeterminate"),this.toggleAttribute("checked",e.checked),this._internals.setFormValue(e.checked?e.value||"on":null),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.checked))}))}formResetCallback(){this._contourResetting=!0;try{this.toggleAttribute("checked",!!this._checkDefaultChecked);const t=this.querySelector("input");t&&(t.checked=this.hasAttribute("checked")),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-check",ContourCheck);class ContourRadio extends ContourBase{static get observed(){return["label","name","value","required","checked","disabled","error","help"]}static get properties(){return{label:{attribute:"label"},name:{attribute:"name"},value:{attribute:"value"},required:{attribute:"required",type:Boolean},checked:{attribute:"checked",type:Boolean},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"}}}static get formAssociated(){return!0}render(){this.classList.add("c-radio");const t=this.getAttribute("label"),e=this.ensure("input.c-radio__input",()=>{const t=document.createElement("input");return t.className="c-radio__input",t.type="radio",t});e.checked=this.hasAttribute("checked"),this.hasAttribute("name")&&(e.name=this.getAttribute("name")),this.hasAttribute("value")&&(e.value=this.getAttribute("value")),this.hasAttribute("disabled")?(e.setAttribute("disabled",""),this.classList.add("is-disabled")):(e.removeAttribute("disabled"),this.classList.remove("is-disabled"));const s=this.getAttribute("error"),i=this.getAttribute("help");let r=this.querySelector(".c-radio__message");if(s||i?(r||(r=document.createElement("div"),r.className="c-radio__message",this.appendChild(r)),r.textContent=s||i||"",r.classList.toggle("c-radio__message--error",!!s)):r&&r.remove(),s?this.classList.add("is-error"):this.classList.remove("is-error"),t){e.setAttribute("aria-label",t);(this.querySelector(":scope > span:not([class])")||(()=>{const t=document.createElement("span");return this.appendChild(t),t})()).textContent=t}e.hasAttribute("aria-label")||e.setAttribute("aria-label",labelText(this,"radio","Radio"))}enhance(){const t=this.querySelector("input");t&&this._internals&&(this._setCustomState("data-checked",t.checked),this._setCustomState("data-indeterminate",t.indeterminate),this._internals.setFormValue(t.checked?t.value||"on":null),this._syncValidity(this.hasAttribute("required")&&!t.checked)),this._wiredRadio||(this._wiredRadio=!0,this.addEventListener("click",t=>{if(t.target&&t.target.closest&&t.target.closest("input"))return;const e=this.querySelector("input");e&&!e.disabled&&(t.preventDefault(),e.click())}),this.addEventListener("change",t=>{const e=this.querySelector("input");e&&t.target===e&&this._internals&&(this._setCustomState("data-checked",e.checked),this._internals.setFormValue(e.checked?e.value||"on":null),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.checked))}))}}define("contour-radio",ContourRadio);class ContourSelect extends ContourBase{static get observed(){return["options","items","required","label","placeholder","disabled","error","help","value","name","multiple","autocomplete"]}static get properties(){return{options:{attribute:"options"},items:{attribute:"items"},required:{attribute:"required",type:Boolean},label:{attribute:"label"},placeholder:{attribute:"placeholder"},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"},value:{attribute:"value"},name:{attribute:"name"},multiple:{attribute:"multiple",type:Boolean},autocomplete:{attribute:"autocomplete"}}}static get formAssociated(){return!0}render(){this.classList.add("c-select"),void 0===this._selectDefault&&(this._selectDefault=this.getAttribute("value"));const t=this.getAttribute("options")||this.getAttribute("items"),e=new Set(this._contourGenerated||[]),s=Array.from(this.children).filter(t=>!e.has(t));if(t&&!s.length)try{const e=JSON.parse(t),s=this.ensure("select.c-select",()=>{const t=document.createElement("select");return t.className="c-select",t});s.innerHTML="";const i=this.getAttribute("label");i&&s.setAttribute("aria-label",i);const r=this.getAttribute("placeholder");if(r){const t=document.createElement("option");t.value="",t.textContent=r,t.disabled=!0,t.selected=!0,s.appendChild(t)}const a={};e.forEach(t=>{const e="object"==typeof t&&null!==t?t.group:null;if(e){a[e]||(a[e]=document.createElement("optgroup"),a[e].label=e,s.appendChild(a[e]));const i=document.createElement("option");i.value="string"==typeof t?t:t.value,i.textContent="string"==typeof t?t:t.label,a[e].appendChild(i)}else{const e=document.createElement("option");e.value="string"==typeof t?t:t.value,e.textContent="string"==typeof t?t:t.label,s.appendChild(e)}}),s.parentNode!==this&&this.appendChild(s),this.classList.remove("c-select"),s.classList.add("c-select")}catch(t){warnBadJson(this,"attribute",t)}const i=this.querySelector("select");i&&!i.classList.contains("c-select")&&(i.classList.add("c-select"),this.classList.remove("c-select"));const r=this.querySelector("select");if(r){this.hasAttribute("disabled")?(r.setAttribute("disabled",""),this.classList.add("is-disabled")):(r.removeAttribute("disabled"),this.classList.remove("is-disabled")),this.hasAttribute("name")&&r.setAttribute("name",this.getAttribute("name")),this.hasAttribute("multiple")?r.setAttribute("multiple",""):r.removeAttribute("multiple"),this.hasAttribute("autocomplete")&&r.setAttribute("autocomplete",this.getAttribute("autocomplete")),this.hasAttribute("required")?r.setAttribute("required",""):r.removeAttribute("required");const t=this.getAttribute("value");if(null!==t)if(r.multiple){const e=new Set(String(t).split(",").map(t=>t.trim()).filter(Boolean));Array.from(r.options).forEach(t=>{t.selected=e.has(t.value)})}else r.value=t}const a=this.getAttribute("label");if(a){let t=this.querySelector("label.c-select__label");t||(t=document.createElement("label"),t.className="c-select__label",this.insertBefore(t,r||this.firstChild)),t.textContent=a,r&&(r.id||(r.id=contourId("contour-select")),t.setAttribute("for",r.id),r.setAttribute("aria-label",a))}if(!this.querySelector("select")?.hasAttribute("aria-label")){const t=this.querySelector("select");t&&t.setAttribute("aria-label",labelText(this,"select","Select"))}const o=this.getAttribute("error"),l=this.getAttribute("help");let n=this.querySelector(".c-select__message");o||l?(n||(n=document.createElement("div"),n.className="c-select__message",this.appendChild(n)),n.textContent=o||l||"",n.classList.toggle("c-select__message--error",!!o)):n&&n.remove(),o?this.classList.add("is-error"):this.classList.remove("is-error")}enhance(){this._internals&&this._syncFormValue(),this._wiredSelect||(this._wiredSelect=!0,this.addEventListener("input",t=>{const e=this.querySelector("select");e&&t.target===e&&this._emitForm("contour:input")}),this.addEventListener("change",t=>{const e=this.querySelector("select");if(!e||t.target!==e||!this._internals)return;const s=e.multiple?Array.from(e.selectedOptions).map(t=>t.value).join(","):e.value;this.setAttribute("value",s),this._syncFormValue(),this._emitForm("contour:change")}))}_syncFormValue(){if(!this._internals)return;const t=this.querySelector("select");if(t)if(t.multiple){const e=Array.from(t.selectedOptions).map(t=>t.value),s=this.getAttribute("name");if(s&&e.length){const t=new FormData;for(const i of e)t.append(s,i);this._internals.setFormValue(t)}else this._internals.setFormValue(null);this._syncValidity(this.hasAttribute("required")&&!e.length)}else this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value)}formResetCallback(){this._contourResetting=!0;try{const t=this._selectDefault??null;null===t?this.removeAttribute("value"):this.setAttribute("value",t),this._syncFormValue()}finally{this._contourResetting=!1}}formStateRestoreCallback(t){const e=this.querySelector("select");if(!e||!this._internals)return;const s=t instanceof FormData?Array.from(t.getAll(this.getAttribute("name"))).map(String):null==t?[]:String(t).split(",").map(t=>t.trim()).filter(Boolean);this._contourResetting=!0;try{if(e.multiple){const t=new Set(s);for(const s of e.options)s.selected=t.has(s.value);this.setAttribute("value",s.join(","))}else e.value=s[0]||"",this.setAttribute("value",e.value);this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-select",ContourSelect);class ContourVersionControl extends ContourBase{static get observed(){return["options","items","value","name"]}static get formAssociated(){return!0}static get properties(){return{options:{attribute:"options"},items:{attribute:"items"},value:{attribute:"value"},name:{attribute:"name"}}}render(){this.classList.add("c-version"),void 0===this._versionDefault&&(this._versionDefault=this.getAttribute("value"));const t=this.getAttribute("options")||this.getAttribute("items"),e=new Set(this._contourGenerated||[]),s=Array.from(this.children).filter(t=>!e.has(t));if(t&&!s.length)try{const e=JSON.parse(t),s=this.ensure("select.c-version",()=>{const t=document.createElement("select");return t.className="c-version",t});s.innerHTML="",s.hasAttribute("aria-label")||s.setAttribute("aria-label",labelText(this,"version","Version")),e.forEach(t=>{const e=document.createElement("option");"string"==typeof t?(e.value=t,e.textContent=t):(e.value=t.value||t.label,e.textContent=t.label||t.value,t.selected&&(e.selected=!0)),s.appendChild(e)}),s.parentNode!==this&&this.appendChild(s),this.classList.remove("c-version"),s.classList.add("c-version")}catch(t){warnBadJson(this,"attribute",t)}const i=this.querySelector("select");if(i){this.hasAttribute("name")&&i.setAttribute("name",this.getAttribute("name"));const t=this.getAttribute("value");null!==t&&(i.value=t)}}enhance(){const t=()=>{const t=this.querySelector("select");t&&this._internals&&this._internals.setFormValue(t.value)};t(),this._wiredVersion||(this._wiredVersion=!0,this.addEventListener("change",e=>{const s=this.querySelector("select");s&&e.target===s&&(this.setAttribute("value",s.value),t(),this._emitForm("contour:change"))}))}formResetCallback(){this._contourResetting=!0;try{const t=this._versionDefault??null;null===t?this.removeAttribute("value"):this.setAttribute("value",t),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-version",ContourVersionControl);class ContourTextarea extends ContourBase{static get observed(){return["placeholder","required","disabled","error","help","value","name","label"]}static get properties(){return{placeholder:{attribute:"placeholder"},required:{attribute:"required",type:Boolean},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"},value:{attribute:"value"},name:{attribute:"name"},label:{attribute:"label"}}}static get formAssociated(){return!0}render(){const t=this.ensure("textarea",()=>{const t=document.createElement("textarea");return t.className="c-textarea",t});t.className="c-textarea",this.hasAttribute("name")?t.name=this.getAttribute("name"):t.removeAttribute("name"),this.hasAttribute("value")&&(t.value=this.getAttribute("value")),this.hasAttribute("aria-label")&&!t.hasAttribute("aria-label")&&t.setAttribute("aria-label",this.getAttribute("aria-label")),this.hasAttribute("label")&&!t.hasAttribute("aria-label")&&t.setAttribute("aria-label",this.getAttribute("label")),t.hasAttribute("aria-label")||t.setAttribute("aria-label",labelText(this,"textarea","Textarea")),this.hasAttribute("placeholder")?t.placeholder=this.getAttribute("placeholder"):t.removeAttribute("placeholder"),this.hasAttribute("required")?t.setAttribute("required",""):t.removeAttribute("required"),this.hasAttribute("disabled")?(t.setAttribute("disabled",""),this.classList.add("is-disabled")):(t.removeAttribute("disabled"),this.classList.remove("is-disabled"));const e=this.getAttribute("error"),s=this.getAttribute("help");let i=this.querySelector(".c-textarea__message");e||s?(i||(i=document.createElement("div"),i.className="c-textarea__message",this.appendChild(i)),i.textContent=e||s||"",i.classList.toggle("c-textarea__message--error",!!e)):i&&i.remove(),e?this.classList.add("is-error"):this.classList.remove("is-error")}enhance(){const t=this.querySelector("textarea");t&&this._internals&&(this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value.trim())),this._wiredTextarea||(this._wiredTextarea=!0,this.addEventListener("input",t=>{const e=this.querySelector("textarea");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:input"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}),this.addEventListener("change",t=>{const e=this.querySelector("textarea");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}))}}define("contour-textarea",ContourTextarea);class ContourInputFull extends ContourBase{static get observed(){return["type","placeholder","required","value","disabled","error","help","label","name"]}static get properties(){return{type:{attribute:"type"},placeholder:{attribute:"placeholder"},required:{attribute:"required",type:Boolean},value:{attribute:"value"},disabled:{attribute:"disabled",type:Boolean},error:{attribute:"error"},help:{attribute:"help"},label:{attribute:"label"},name:{attribute:"name"}}}static get formAssociated(){return!0}render(){this.classList.add("c-input");const t=this.ensure("input",()=>{const t=document.createElement("input");return t.className="c-input",t});t.className="c-input",t.type=this.getAttribute("type")||"text",t.placeholder=this.getAttribute("placeholder")||"",this.hasAttribute("name")?t.name=this.getAttribute("name"):t.removeAttribute("name");let e=this.getAttribute("label");if(!e){const t=this.closest("contour-field");t&&(e=t.getAttribute("label"))}e?t.setAttribute("aria-label",e):t.getAttribute("aria-label")||t.setAttribute("aria-label",labelText(this,"input","Input")),this.hasAttribute("value")&&(t.value=this.getAttribute("value")),this.hasAttribute("required")?t.setAttribute("required",""):t.removeAttribute("required"),this.hasAttribute("disabled")?(t.setAttribute("disabled",""),this.classList.add("is-disabled")):(t.removeAttribute("disabled"),this.classList.remove("is-disabled"));const s=this.getAttribute("error"),i=this.getAttribute("help");let r=this.querySelector(".c-input__message");s||i?(r||(r=document.createElement("div"),r.className="c-input__message",this.appendChild(r)),r.textContent=s||i||"",r.classList.toggle("c-input__message--error",!!s)):r&&r.remove(),s?this.classList.add("is-error"):this.classList.remove("is-error")}enhance(){const t=this.querySelector("input");t&&this._internals&&(this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value.trim())),this._wiredInput||(this._wiredInput=!0,this.addEventListener("input",t=>{const e=this.querySelector("input");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:input"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}),this.addEventListener("change",t=>{const e=this.querySelector("input");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}))}}define("contour-input",ContourInputFull);class ContourInputGroup extends ContourBase{static get observed(){return["label","placeholder","clearable","submit","value","name","required","disabled"]}static get properties(){return{label:{attribute:"label"},placeholder:{attribute:"placeholder"},clearable:{attribute:"clearable",type:Boolean},submit:{attribute:"submit",type:Boolean},value:{attribute:"value"},name:{attribute:"name"},required:{attribute:"required",type:Boolean},disabled:{attribute:"disabled",type:Boolean}}}static get formAssociated(){return!0}render(){this.classList.add("c-input-group");this.ensure("svg",()=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("aria-hidden","true");const e=document.createElementNS("http://www.w3.org/2000/svg","use");return e.setAttribute("href","#i-search"),t.appendChild(e),t});const t=this.ensure("input.c-input",()=>{const t=document.createElement("input");return t.className="c-input",t.type="text",t});t.placeholder=this.getAttribute("placeholder")||this.getAttribute("label")||"",this.hasAttribute("name")?t.name=this.getAttribute("name"):t.removeAttribute("name"),this.hasAttribute("value")&&(t.value=this.getAttribute("value")),this.hasAttribute("required")?t.setAttribute("required",""):t.removeAttribute("required"),this.hasAttribute("disabled")?(t.setAttribute("disabled",""),this.classList.add("is-disabled")):(t.removeAttribute("disabled"),this.classList.remove("is-disabled"));const e=this.getAttribute("label");t.hasAttribute("aria-label")||t.setAttribute("aria-label",e||"Search");const s=this.querySelector(".c-input-group__clear");if(s&&s.remove(),this.hasAttribute("clearable")){const t=document.createElement("button");t.className="c-input-group__clear",t.type="button",t.setAttribute("aria-label",labelText(this,"clear","Clear")),t.textContent="×",this.appendChild(t)}const i=this.querySelector(".c-input-group__submit");if(i&&i.remove(),this.hasAttribute("submit")){const t=document.createElement("button");t.className="c-input-group__submit",t.type="submit",t.setAttribute("aria-label",labelText(this,"submit","Submit")),t.textContent="→",this.appendChild(t)}}enhance(){const t=this.querySelector("input.c-input");t&&this._internals&&(this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value.trim())),this._wiredInputGroup||(this._wiredInputGroup=!0,this.addEventListener("input",t=>{const e=this.querySelector("input.c-input");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:input"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}),this.addEventListener("change",t=>{const e=this.querySelector("input.c-input");e&&t.target===e&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}),this.addEventListener("click",t=>{const e=t.target&&t.target.closest?t.target.closest(".c-input-group__clear"):null;if(e&&this.contains(e)){t.preventDefault();const e=this.querySelector("input.c-input");e&&(e.value="",e.focus()),this._internals&&(this._internals.setFormValue(""),this._syncValidity(this.hasAttribute("required"))),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{value:""}}))}}))}}define("contour-input-group",ContourInputGroup);class ContourRadioList extends ContourBase{static get observed(){return["items","options","name","value","required","empty","loading","error","retry","src","lazy","refresh","timeout","skeleton","cache-key","dir","no-cache"]}static get properties(){return{items:{attribute:"items"},options:{attribute:"options"},name:{attribute:"name"},value:{attribute:"value"},required:{attribute:"required",type:Boolean},src:{attribute:"src"}}}static get formAssociated(){return!0}attributeChangedCallback(t,e,s){"value"===t&&this._radioSync||super.attributeChangedCallback(t,e,s)}render(){if(this.classList.add("c-radio-list"),this.setAttribute("role","radiogroup"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.getAttribute("name")||"Options"),this.hasAttribute("required")?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required"),wireStates(this),loadRemote(this,"items"),renderStates(this,"radio-list"))return;const t=remoteData(this,"items")||this.getAttribute("options")||this.getAttribute("items"),e=this.querySelector("input.c-radio__input:checked"),s=this.hasAttribute("value")?this.getAttribute("value"):e?e.value:null;if(Array.from(this.querySelectorAll("label.c-radio")).forEach(t=>t.remove()),t)try{const e=JSON.parse(t),i=this.getAttribute("name")||contourId("radio-list");e.forEach(t=>{const e=document.createElement("label");e.className="c-radio";const r=document.createElement("input");if(r.type="radio",r.className="c-radio__input",r.name=i,r.tabIndex=-1,"string"==typeof t)r.value=t,t===s&&(r.checked=!0),e.appendChild(r),e.appendChild(document.createTextNode(" "+t));else{r.value=t.value||t.label,(t.checked||null!=s&&String(t.value||t.label)===String(s))&&(r.checked=!0),e.appendChild(r);const i=document.createElement("span");i.textContent=t.label||t.value,e.appendChild(i)}this.appendChild(e)});const r=Array.from(this.querySelectorAll("input.c-radio__input")),a=r.find(t=>t.checked)||r[0];a&&(a.tabIndex=0)}catch(t){warnBadJson(this,"attribute",t)}else renderEmpty(this,"radio-list")}enhance(){const t=()=>{const t=this.querySelector("input.c-radio__input:checked"),e=t?t.value:null;if(this._internals&&this._internals.setFormValue(e),null!=e&&this.getAttribute("value")!==e){this._radioSync=!0;try{this.setAttribute("value",e)}finally{this._radioSync=!1}}this._syncValidity(this.hasAttribute("required")&&null==e)};t(),this._wiredRadioList||(this._wiredRadioList=!0,this.addEventListener("change",e=>{const s=e.target&&e.target.closest?e.target.closest("input.c-radio__input"):null;s&&this.contains(s)&&(t(),this._emitForm("contour:change"))}),this.addEventListener("keydown",e=>{const s=Array.from(this.querySelectorAll("input.c-radio__input"));if(!s.length)return;const i=s.indexOf(e.target);if(-1===i)return;const r="rtl"===(this.getAttribute("dir")||document.documentElement.getAttribute("dir")||"").toLowerCase();let a=-1;if("ArrowDown"===e.key)a=(i+1)%s.length;else if("ArrowUp"===e.key)a=(i-1+s.length)%s.length;else if("ArrowRight"===e.key)a=r?(i-1+s.length)%s.length:(i+1)%s.length;else if("ArrowLeft"===e.key)a=r?(i+1)%s.length:(i-1+s.length)%s.length;else if("Home"===e.key)a=0;else{if("End"!==e.key)return;a=s.length-1}e.preventDefault();const o=s.find(t=>t.checked);for(const t of s)t.tabIndex=-1;s[a].tabIndex=0,s[a].checked=!0,s[a].focus(),t(),o!==s[a]&&this._emitForm("contour:change")}))}formResetCallback(){this._contourResetting=!0;try{this.isConnected&&this._contourAuthored&&this.attributeChangedCallback("__rerender__",null,""),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-radio-list",ContourRadioList);class ContourFieldset extends ContourBase{static get observed(){return["legend","disabled"]}static get properties(){return{legend:{attribute:"legend"},disabled:{attribute:"disabled",type:Boolean}}}render(){const t=this.ensure("fieldset",()=>{const t=document.createElement("fieldset");return t.className="c-fieldset",t});this.hasAttribute("disabled")?t.setAttribute("disabled",""):t.removeAttribute("disabled");const e=this.getAttribute("legend");let s=t.querySelector("legend");e?(s||(s=document.createElement("legend"),s.className="c-fieldset__legend",t.prepend(s)),s.textContent=e):s&&s.remove();const i=Array.from(this.children).filter(e=>e!==t);i.length&&i.forEach(e=>t.appendChild(e))}}define("contour-fieldset",ContourFieldset);class ContourCheckboxGroup extends ContourBase{static get observed(){return["legend","name","options","items","value","required","disabled"]}static get properties(){return{legend:{attribute:"legend"},name:{attribute:"name"},options:{attribute:"options"},items:{attribute:"items"},value:{attribute:"value"},required:{attribute:"required",type:Boolean},disabled:{attribute:"disabled",type:Boolean}}}static get formAssociated(){return!0}render(){this.classList.add("c-checkbox-group"),void 0===this._checkboxGroupDefault&&(this._checkboxGroupDefault=this.getAttribute("value"));const t=this.ensure("fieldset",()=>{const t=document.createElement("fieldset");return t.className="c-checkbox-group__fieldset",t});this.hasAttribute("disabled")?t.setAttribute("disabled",""):t.removeAttribute("disabled"),this.hasAttribute("required")?t.setAttribute("aria-required","true"):t.removeAttribute("aria-required");const e=this.getAttribute("legend");let s=t.querySelector("legend");e?(s||(s=document.createElement("legend"),s.className="c-checkbox-group__legend",t.prepend(s)),s.textContent=e):s&&s.remove();const i=this.getAttribute("name")||"group",r=this.getAttribute("options")||this.getAttribute("items"),a=(this.getAttribute("value")||"").split(",").map(t=>t.trim()).filter(Boolean);if(r)try{const e=JSON.parse(r);Array.from(t.querySelectorAll(".c-check")).forEach(t=>t.remove()),e.forEach(e=>{const s="string"==typeof e?e:e.label||e.value||"",r="string"==typeof e?e:e.value||e.label||"",o=document.createElement("label");o.className="c-check";const l=document.createElement("input");l.type="checkbox",l.className="c-check__input",l.name=i,l.value=r,l.setAttribute("data-contour-preserve-key",r),a.includes(r)&&(l.checked=!0);const n=document.createElement("span");n.textContent=s,o.appendChild(l),o.appendChild(n),t.appendChild(o)})}catch(t){warnBadJson(this,"attribute",t)}if(a.length){const t=()=>{if(this.isConnected){for(const t of this.querySelectorAll("input[type=checkbox]"))a.includes(t.value)&&(t.checked=!0);this._internals&&this._syncFormValue()}};t(),"function"==typeof queueMicrotask&&queueMicrotask(t),"function"==typeof requestAnimationFrame&&requestAnimationFrame(t)}}enhance(){this._internals&&this._syncFormValue(),this._wiredCheckboxGroup||(this._wiredCheckboxGroup=!0,this.addEventListener("change",t=>{const e=t.target;if(e&&e.matches&&e.matches("input[type=checkbox]")){const t=Array.from(this.querySelectorAll("input[type=checkbox]:checked")).map(t=>t.value);this.setAttribute("value",t.join(",")),this._syncFormValue(),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{value:t.join(","),values:t}}))}}))}_syncFormValue(){if(!this._internals)return;const t=Array.from(this.querySelectorAll("input[type=checkbox]:checked")),e=this.getAttribute("name");if(e&&t.length){const s=new FormData;for(const i of t)s.append(e,i.value);this._internals.setFormValue(s)}else this._internals.setFormValue(null);this._syncValidity(this.hasAttribute("required")&&!t.length)}formResetCallback(){this._contourResetting=!0;try{const t=this._checkboxGroupDefault??null;null===t?this.removeAttribute("value"):this.setAttribute("value",t),this._syncFormValue()}finally{this._contourResetting=!1}}formStateRestoreCallback(t){const e=t instanceof FormData?Array.from(t.getAll(this.getAttribute("name"))).map(String):null==t?[]:String(t).split(",").map(t=>t.trim()).filter(Boolean);this._contourResetting=!0;try{this.setAttribute("value",e.join(",")),this._syncFormValue()}finally{this._contourResetting=!1}}}define("contour-checkbox-group",ContourCheckboxGroup);class ContourSearchField extends ContourBase{static get observed(){return["value","placeholder","label","name","required","disabled"]}static get properties(){return{value:{attribute:"value"},placeholder:{attribute:"placeholder"},label:{attribute:"label"},name:{attribute:"name"},required:{attribute:"required",type:Boolean},disabled:{attribute:"disabled",type:Boolean}}}static get formAssociated(){return!0}render(){this.classList.add("c-search-field");const t=this.ensure("input",()=>{const t=document.createElement("input");return t.type="search",t.className="c-search-field__input",t});t.placeholder=this.getAttribute("placeholder")||"Search",null!==this.getAttribute("value")&&(t.value=this.getAttribute("value")),this.hasAttribute("name")&&(t.name=this.getAttribute("name")),this.hasAttribute("required")?t.setAttribute("required",""):t.removeAttribute("required"),this.hasAttribute("disabled")?(t.setAttribute("disabled",""),this.classList.add("is-disabled")):(t.removeAttribute("disabled"),this.classList.remove("is-disabled"));const e=this.getAttribute("label");e?t.setAttribute("aria-label",e):t.hasAttribute("aria-label")||t.setAttribute("aria-label",labelText(this,"search","Search"))}enhance(){const t=this.querySelector("input");t&&this._internals&&(this._internals.setFormValue(t.value),this._syncValidity(this.hasAttribute("required")&&!t.value.trim())),this._wiredSearchField||(this._wiredSearchField=!0,this.addEventListener("input",t=>{const e=t.target;e&&e.matches&&e.matches("input")&&(this._internals&&(this._internals.setFormValue(e.value),this._syncValidity(this.hasAttribute("required")&&!e.value.trim())),this._emitForm("contour:input"))}),this.addEventListener("change",t=>{const e=t.target;e&&e.matches&&e.matches("input")&&this._internals&&(this._internals.setFormValue(e.value),this._emitForm("contour:change"),this._syncValidity(this.hasAttribute("required")&&!e.value.trim()))}))}}define("contour-search-field",ContourSearchField);class ContourDensityToggle extends ContourBase{static get observed(){return["value","label"]}static get properties(){return{value:{attribute:"value"},label:{attribute:"label"}}}render(){this.classList.add("c-density-toggle");const t=this.getAttribute("value")||"comfortable";this.setAttribute("data-density",t);const e=this.ensure("button",()=>{const t=document.createElement("button");return t.className="c-btn c-btn--sm c-density-toggle__btn",t.type="button",t}),s=this.getAttribute("label")||("compact"===t?"Compact":"Comfortable");e.textContent=s,e.setAttribute("aria-pressed","compact"===t?"true":"false")}enhance(){this._wiredDensityToggle||(this._wiredDensityToggle=!0,this.addEventListener("click",()=>{const t="compact"===this.getAttribute("data-density")?"comfortable":"compact";this.setAttribute("value",t),this.setAttribute("data-density",t);const e=this.querySelector(".c-density-toggle__btn");e&&(e.textContent="compact"===t?"Compact":"Comfortable",e.setAttribute("aria-pressed","compact"===t?"true":"false")),this.dispatchEvent(new CustomEvent("contour:change",{bubbles:!0,composed:!0,detail:{value:t}}))}))}}define("contour-density-toggle",ContourDensityToggle);
|