import{v as f,aX as _,at as z,i as n,q as d,aY as u,c as y,e as E,a as C,p as v,g as L,B as M,t as B,j as I,n as S,b as D,d as F,f as O,h as X,m as h,r as Y}from"../../custom-element.js";import{o as q}from"../../index-client.js";import{s as A}from"../../slot.js";import{b as G}from"../../this.js";import{c as H}from"../../custom-element-forward-events.js";import{u as p,a as g}from"../../accordion-list.state.svelte.js";var J=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],K=["difference","intersection","symmetricDifference","union"],w=!1;class m extends Set{#o=new Map;#e=f(0);#r=f(0);#t=_||-1;constructor(e){if(super(),e){for(var o of e)super.add(o);this.#r.v=super.size}w||this.#n()}#i(e){return _===this.#t?f(e):z(e)}#n(){w=!0;var e=m.prototype,o=Set.prototype;for(const t of J)e[t]=function(...r){return n(this.#e),o[t].apply(this,r)};for(const t of K)e[t]=function(...r){n(this.#e);var s=o[t].apply(this,r);return new m(s)}}has(e){var o=super.has(e),t=this.#o,r=t.get(e);if(r===void 0){if(!o)return n(this.#e),!1;r=this.#i(!0),t.set(e,r)}return n(r),o}add(e){return super.has(e)||(super.add(e),d(this.#r,super.size),u(this.#e)),this}delete(e){var o=super.delete(e),t=this.#o,r=t.get(e);return r!==void 0&&(t.delete(e),d(r,!1)),o&&(d(this.#r,super.size),u(this.#e)),o}clear(){if(super.size!==0){super.clear();var e=this.#o;for(var o of e.values())d(o,!1);e.clear(),d(this.#r,0),u(this.#e)}}keys(){return this.values()}values(){return n(this.#e),super.values()}entries(){return n(this.#e),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return n(this.#r)}}var N=O("<div><!></div>");const P={hash:"svelte-osf0jb",code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-accordion.svelte-osf0jb {border-radius:var(--border-radius-m, 0.5rem);background-color:var(--accordion-list-color-background-standard, #ffffff);color:var(--accordion-list-color-text-title, #000000);border:1px solid var(--accordion-list-color-border, #cccccc);box-sizing:border-box;overflow:hidden;}
@supports (interpolate-size: allow-keywords) {.mc-accordion.svelte-osf0jb {interpolate-size:allow-keywords;}
}.mc-accordion__item.svelte-osf0jb {border-bottom:1px solid var(--accordion-list-color-border, #cccccc);}
@media (prefers-reduced-motion: no-preference) {.mc-accordion__item.svelte-osf0jb {transition:border-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-accordion__item.svelte-osf0jb {transition:none;}
}.mc-accordion__item.svelte-osf0jb:last-child {border-bottom:none;}
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
  }
  @media (prefers-reduced-motion: reduce) {
  }
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-accordion__header.svelte-osf0jb {position:relative;background-color:var(--accordion-list-color-background-standard, #ffffff);}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-accordion__title.svelte-osf0jb {font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-semi-bold, 600);line-height:var(--line-height-m, 1.5);display:block;margin-block:0;padding:0;font-family:inherit;position:relative;z-index:1;}.mc-accordion__title-wrapper.svelte-osf0jb {display:flex;flex-direction:column;flex:1;min-width:0;}.mc-accordion__subtitle.svelte-osf0jb {font-size:var(--font-size-100, 0.875rem);font-weight:var(--font-weight-light, 300);line-height:var(--line-height-m, 1.5);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;text-overflow:ellipsis;margin-block:0;padding:0;color:var(--accordion-list-color-text-subtitle, #666666);position:relative;z-index:1;}
@media (prefers-reduced-motion: no-preference) {.mc-accordion__trigger.svelte-osf0jb {transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), box-shadow 200ms ease;}
}
@media (prefers-reduced-motion: reduce) {.mc-accordion__trigger.svelte-osf0jb {transition:none;}
}.mc-accordion__trigger.svelte-osf0jb:focus-visible {outline:none;}.mc-accordion__trigger.svelte-osf0jb:focus-visible::before {box-shadow:inset 0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-outer, #000000)), inset 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-mid, #ffffff));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-accordion__trigger.svelte-osf0jb:disabled {cursor:not-allowed;opacity:0.5;pointer-events:none;}.mc-accordion__trigger.svelte-osf0jb {display:flex;align-items:center;gap:0.5rem;padding:1rem 0.75rem;margin-block:0;background-color:transparent;border:0;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;position:relative;text-align:left;text-decoration:none;text-transform:none;vertical-align:baseline;appearance:none;}
@media (prefers-reduced-motion: no-preference) {.mc-accordion__trigger.svelte-osf0jb::before {transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), box-shadow 200ms ease;}
}
@media (prefers-reduced-motion: reduce) {.mc-accordion__trigger.svelte-osf0jb::before {transition:none;}
}.mc-accordion__trigger.svelte-osf0jb::before {content:"";position:absolute;inset:0.25rem;background-color:transparent;pointer-events:none;z-index:-1;outline:0 solid transparent;outline-offset:-0.125rem;border-radius:var(--border-radius-s, 0.25rem);}.mc-accordion__trigger.svelte-osf0jb:not(.mc-accordion__header:where(.svelte-osf0jb):is(summary) .mc-accordion__trigger:where(.svelte-osf0jb)) {padding-right:2.25rem;}
@media (prefers-reduced-motion: no-preference) {.mc-accordion__trigger.svelte-osf0jb:not(.mc-accordion__header:where(.svelte-osf0jb):is(summary) .mc-accordion__trigger:where(.svelte-osf0jb))::after {transition:transform 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-accordion__trigger.svelte-osf0jb:not(.mc-accordion__header:where(.svelte-osf0jb):is(summary) .mc-accordion__trigger:where(.svelte-osf0jb))::after {transition:none;}
}.mc-accordion__trigger.svelte-osf0jb:not(.mc-accordion__header:where(.svelte-osf0jb):is(summary) .mc-accordion__trigger:where(.svelte-osf0jb))::after {transform:translateY(-50%) rotateX(0deg);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;content:"";position:absolute;right:1rem;top:50%;flex-shrink:0;width:1rem;height:1rem;background-color:var(--accordion-list-color-text-title, #000000);z-index:1;}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-accordion__trigger.svelte-osf0jb:hover::before {background-color:var(--accordion-list-color-background-hover, rgba(0, 0, 0, 0.05));}.mc-accordion__trigger.svelte-osf0jb:hover::after {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-accordion__trigger.svelte-osf0jb:active::before {background-color:var(--accordion-list-color-background-hover, rgba(0, 0, 0, 0.05));}.mc-accordion__trigger.svelte-osf0jb:active::after {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-accordion__icon.svelte-osf0jb {flex-shrink:0;width:2rem;height:2rem;fill:currentcolor;}.mc-accordion__content.svelte-osf0jb {font-size:var(--font-size-100, 0.875rem);font-weight:var(--font-weight-regular, 400);line-height:var(--line-height-m, 1.5);background-color:var(--accordion-list-color-background-standard, #ffffff);overflow:hidden;padding:0 0.75rem;max-height:0;}
@media (prefers-reduced-motion: no-preference) {.mc-accordion__content.svelte-osf0jb {transition:max-height 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), padding 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-accordion__content.svelte-osf0jb {transition:none;}
}
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {.mc-accordion__content.svelte-osf0jb {transition:height 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), padding 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), content-visibility 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);transition-behavior:allow-discrete;}
  }
  @media (prefers-reduced-motion: reduce) {.mc-accordion__content.svelte-osf0jb {transition:none;}
  }.mc-accordion__content.svelte-osf0jb {height:0;max-height:none;padding-top:0;padding-bottom:0;}
}.mc-accordion--ghost.svelte-osf0jb {background-color:transparent;border:none;}`};function Q(b,e){E(e,!0),C(b,P);let o=v(e,"appearance",7,"standard"),t=v(e,"behavior",7,"multiple"),r=v(e,"value",31,()=>L([])),s;M(()=>{p([...r()])}),q(()=>{const i=k=>{const a=k.detail.id;if(t()==="single")p(g.openIds.includes(a)?[]:[a]),r([a]);else{const l=new m([...g.openIds]);l.has(a)?l.delete(a):l.add(a),p([...l]),r([...g.openIds])}};return s.addEventListener("update:open",i),()=>{s.removeEventListener("update:open",i)}});var x={get appearance(){return o()},set appearance(i="standard"){o(i),h()},get behavior(){return t()},set behavior(i="multiple"){t(i),h()},get value(){return r()},set value(i=[]){r(i),h()}},c=N(),j=X(c);return A(j,e,"default",{},null),Y(c),G(c,i=>s=i,()=>s),B(()=>I(c,1,S(["mc-accordion",`mc-accordion--${o()}`]),"svelte-osf0jb")),D(b,c),F(x)}customElements.define("m-accordion-list",y(Q,{appearance:{},behavior:{},value:{}},["default"],[],{mode:"open"},H));
//# sourceMappingURL=AccordionList.js.map
