luxen-ui 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/cdn/chunks/decorate.js +1 -1
  2. package/cdn/chunks/floating-ui.dom.js +2 -0
  3. package/cdn/chunks/floating-ui.dom.js.map +1 -0
  4. package/cdn/chunks/lit.js +1 -1
  5. package/cdn/chunks/module.js +717 -0
  6. package/cdn/chunks/module.js.map +1 -0
  7. package/cdn/chunks/native.js +2 -0
  8. package/cdn/chunks/native.js.map +1 -0
  9. package/cdn/custom-elements.json +10269 -7939
  10. package/cdn/elements/avatar/avatar.js +7 -7
  11. package/cdn/elements/avatar/avatar.js.map +1 -1
  12. package/cdn/elements/carousel/carousel.js +5 -5
  13. package/cdn/elements/carousel-item/carousel-item.js +1 -1
  14. package/cdn/elements/dialog/dialog.js +1 -1
  15. package/cdn/elements/dialog/dialog.styles.js +1 -1
  16. package/cdn/elements/drawer/drawer.js +1 -1
  17. package/cdn/elements/dropdown/dropdown.js +1 -1
  18. package/cdn/elements/dropdown-item/dropdown-item.js +5 -5
  19. package/cdn/elements/icon/icon.js +1 -1
  20. package/cdn/elements/popover/popover.js +2 -2
  21. package/cdn/elements/prose-editor/index.d.ts +2 -0
  22. package/cdn/elements/prose-editor/index.d.ts.map +1 -0
  23. package/cdn/elements/prose-editor/index.js +2 -0
  24. package/cdn/elements/prose-editor/index.js.map +1 -0
  25. package/cdn/elements/prose-editor/prose-editor.d.ts +110 -0
  26. package/cdn/elements/prose-editor/prose-editor.d.ts.map +1 -0
  27. package/cdn/elements/prose-editor/prose-editor.js +180 -0
  28. package/cdn/elements/prose-editor/prose-editor.js.map +1 -0
  29. package/cdn/elements/rating/rating.js +5 -5
  30. package/cdn/elements/spinner/spinner.js +1 -1
  31. package/cdn/elements/sticky-bar/sticky-bar.js +1 -1
  32. package/cdn/elements/stories-viewer/stories-viewer.js +7 -7
  33. package/cdn/elements/story/story.js +1 -1
  34. package/cdn/elements/tooltip/tooltip.js +2 -2
  35. package/cdn/elements/tree/tree.js +1 -1
  36. package/cdn/elements/tree-item/tree-item.js +4 -4
  37. package/cdn/registry.d.ts +1 -1
  38. package/cdn/registry.d.ts.map +1 -1
  39. package/cdn/registry.js.map +1 -1
  40. package/cdn/shared/controllers/popover.js +1 -1
  41. package/cdn/shared/controllers/popover.js.map +1 -1
  42. package/cdn/shared/styles/host.styles.js +1 -1
  43. package/cdn/standalone.css +132 -1
  44. package/cdn/standalone.js +25567 -149
  45. package/cdn/standalone.js.map +1 -1
  46. package/cdn/styles/elements/prose-editor.css +129 -0
  47. package/cdn/styles/elements/toast.css +1 -1
  48. package/dist/css/elements/prose-editor.css +129 -0
  49. package/dist/css/elements/toast.css +1 -1
  50. package/dist/custom-elements.json +10269 -7939
  51. package/dist/elements/prose-editor/index.d.ts +2 -0
  52. package/dist/elements/prose-editor/index.d.ts.map +1 -0
  53. package/dist/elements/prose-editor/index.js +4 -0
  54. package/dist/elements/prose-editor/prose-editor.css +133 -0
  55. package/dist/elements/prose-editor/prose-editor.d.ts +111 -0
  56. package/dist/elements/prose-editor/prose-editor.d.ts.map +1 -0
  57. package/dist/elements/prose-editor/prose-editor.js +475 -0
  58. package/dist/registry.d.ts +1 -1
  59. package/dist/registry.d.ts.map +1 -1
  60. package/dist/templates/elements/prose-editor.md +216 -0
  61. package/elements.json +7 -0
  62. package/package.json +8 -1
@@ -1,18 +1,18 @@
1
- import{a as e,c as t,i as n,n as r}from"../../chunks/lit.js";import{LuxenElement as i}from"../../shared/luxen-element.js";import{i as a,r as o,t as s}from"../../chunks/decorate.js";import c from"../../shared/styles/host.styles.js";var l=Symbol.for(``),u=e=>{if(e?.r===l)return e?._$litStatic$},d=(e,...t)=>({_$litStatic$:t.reduce((t,n,r)=>t+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]),r:l}),f=new Map,p=(e=>(t,...n)=>{let r=n.length,i,a,o=[],s=[],c,l=0,d=!1;for(;l<r;){for(c=t[l];l<r&&(a=n[l],i=u(a))!==void 0;)c+=i+t[++l],d=!0;l!==r&&s.push(a),o.push(c),l++}if(l===r&&o.push(t[r]),d){let e=o.join(`$$lit$$`);(t=f.get(e))===void 0&&(o.raw=o,f.set(e,t=o)),n=s}return e(t,...n)})(n),m=t(`:host{--_size:40px;--_font-size:1rem;width:var(--_size);height:var(--_size);border-radius:calc(var(--_size) * .2);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--_size:24px;--_font-size:.75rem}:host([size=sm]){--_size:32px;--_font-size:.875rem}:host([size=lg]){--_size:48px;--_font-size:1.25rem}:host([size=xl]){--_size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;font-size:.625rem;font-weight:500;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--_size) * .2);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));width:100%;height:100%;color:oklch(from var(--color) calc(.65 - .2 * sign(l - .5)) calc(c * (1.75 + .25 * sign(l - .5))) h);font-size:var(--_font-size);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;font-weight:500;line-height:1;display:inline-flex}@supports (color:contrast-color(red vs black, white)){.base{color:contrast-color(var(--color,var(--l-color-bg-fill-neutral-soft)) vs oklch(from var(--color) .45 calc(c * 2) h), oklch(from var(--color) .85 calc(c * 1.5) h) to AA)}}button.base{cursor:pointer}button.base:focus-visible{outline:2px solid var(--l-focus-ring);outline-offset:2px}button.base:hover{box-shadow:inset 0 0 0 1.5px var(--l-color-border-interactive)}@container style(--appearance:circle){.base{border-radius:50%}}`);function h(e){return e.match(/(\b\S)?/g).join(``).match(/(^\S|\S$)?/g).join(``).toUpperCase()}var g=e`<svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
1
+ import{a as e,l as t,n,o as r}from"../../chunks/lit.js";import{LuxenElement as i}from"../../shared/luxen-element.js";import{i as a,r as o,t as s}from"../../chunks/decorate.js";import c from"../../shared/styles/host.styles.js";var l=Symbol.for(``),u=e=>{if(e?.r===l)return e?._$litStatic$},d=(e,...t)=>({_$litStatic$:t.reduce((t,n,r)=>t+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]),r:l}),f=new Map,p=(e=>(t,...n)=>{let r=n.length,i,a,o=[],s=[],c,l=0,d=!1;for(;l<r;){for(c=t[l];l<r&&(a=n[l],i=u(a))!==void 0;)c+=i+t[++l],d=!0;l!==r&&s.push(a),o.push(c),l++}if(l===r&&o.push(t[r]),d){let e=o.join(`$$lit$$`);(t=f.get(e))===void 0&&(o.raw=o,f.set(e,t=o)),n=s}return e(t,...n)})(e),m=t(`:host{--_size:40px;--_font-size:1rem;width:var(--_size);height:var(--_size);border-radius:calc(var(--_size) * .2);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--_size:24px;--_font-size:.75rem}:host([size=sm]){--_size:32px;--_font-size:.875rem}:host([size=lg]){--_size:48px;--_font-size:1.25rem}:host([size=xl]){--_size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;font-size:.625rem;font-weight:500;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--_size) * .2);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));width:100%;height:100%;color:oklch(from var(--color) calc(.65 - .2 * sign(l - .5)) calc(c * (1.75 + .25 * sign(l - .5))) h);font-size:var(--_font-size);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;font-weight:500;line-height:1;display:inline-flex}@supports (color:contrast-color(red vs black, white)){.base{color:contrast-color(var(--color,var(--l-color-bg-fill-neutral-soft)) vs oklch(from var(--color) .45 calc(c * 2) h), oklch(from var(--color) .85 calc(c * 1.5) h) to AA)}}button.base{cursor:pointer}button.base:focus-visible{outline:2px solid var(--l-focus-ring);outline-offset:2px}button.base:hover{box-shadow:inset 0 0 0 1.5px var(--l-color-border-interactive)}@container style(--appearance:circle){.base{border-radius:50%}}`);function h(e){return e.match(/(\b\S)?/g).join(``).match(/(^\S|\S$)?/g).join(``).toUpperCase()}var g=r`<svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
2
2
  <path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" />
3
- </svg>`,_=class extends i{constructor(...e){super(...e),this.src=``,this.name=``,this.size=`md`,this.badge=0,this.interactive=!1,this._hasError=!1,this._onError=()=>{this._hasError=!0}}static{this.styles=[c,m]}willUpdate(e){e.has(`src`)&&(this._hasError=!1)}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`img`)}updated(){this.name&&this.setAttribute(`aria-label`,this.name);let e=getComputedStyle(this).getPropertyValue(`--appearance`).trim()===`circle`;this.style.borderRadius=e?`50%`:``}get _tag(){return this.interactive?d`button`:d`div`}render(){let e=this.src&&!this._hasError?n`<img
3
+ </svg>`,_=class extends i{constructor(...e){super(...e),this.src=``,this.name=``,this.size=`md`,this.badge=0,this.interactive=!1,this._hasError=!1,this._onError=()=>{this._hasError=!0}}static{this.styles=[c,m]}willUpdate(e){e.has(`src`)&&(this._hasError=!1)}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`img`)}updated(){this.name&&this.setAttribute(`aria-label`,this.name);let e=getComputedStyle(this).getPropertyValue(`--appearance`).trim()===`circle`;this.style.borderRadius=e?`50%`:``}get _tag(){return this.interactive?d`button`:d`div`}render(){let t=this.src&&!this._hasError?e`<img
4
4
  src=${this.src}
5
5
  alt=${this.name||``}
6
6
  @error=${this._onError}
7
- />`:this.name?n`<span class="initials">${h(this.name)}</span>`:n`<slot>${g}</slot>`;return p`
8
- <${this._tag} class="base" type=${this.interactive?`button`:r}>
9
- ${e}
7
+ />`:this.name?e`<span class="initials">${h(this.name)}</span>`:e`<slot>${g}</slot>`;return p`
8
+ <${this._tag} class="base" type=${this.interactive?`button`:n}>
9
+ ${t}
10
10
  </${this._tag}>
11
- ${this.badge?n`<div
11
+ ${this.badge?e`<div
12
12
  class="badge"
13
13
  aria-hidden="true"
14
14
  >
15
15
  ${this.badge}
16
- </div>`:r}
16
+ </div>`:n}
17
17
  `}};s([a()],_.prototype,`src`,void 0),s([a()],_.prototype,`name`,void 0),s([a({reflect:!0})],_.prototype,`size`,void 0),s([a({type:Number})],_.prototype,`badge`,void 0),s([a({type:Boolean,reflect:!0})],_.prototype,`interactive`,void 0),s([o()],_.prototype,`_hasError`,void 0);export{_ as Avatar};
18
18
  //# sourceMappingURL=avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":["t","r","e"],"sources":["../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js","../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":["import{html as t,svg as r,mathml as e}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst a=Symbol.for(\"\"),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++}if($===a&&n.push(r[a]),f){const t=n.join(\"$$lit$$\");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u}return t(r,...e)},u=n(t),c=n(r),$=n(e);export{u as html,i as literal,$ as mathml,c as svg,s as unsafeStatic,n as withStatic};\n//# sourceMappingURL=static.js.map\n",":host {\n --_size: 40px;\n --_font-size: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--_size);\n height: var(--_size);\n border-radius: calc(var(--_size) * 0.2);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --_size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --_size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --_size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --_size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--_size) * 0.2);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n color: oklch(\n from var(--color) calc(0.65 - 0.2 * sign(l - 0.5)) calc(c * (1.75 + 0.25 * sign(l - 0.5))) h\n );\n font-size: var(--_font-size);\n font-weight: 500;\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n@supports (color: contrast-color(red vs black, white)) {\n .base {\n color: contrast-color(\n var(--color, var(--l-color-bg-fill-neutral-soft)) vs\n oklch(from var(--color) 0.45 calc(c * 2) h),\n oklch(from var(--color) 0.85 calc(c * 1.5) h) to AA\n );\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: 2px solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\nfunction getInitials(name: string): string {\n return name\n .match(/(\\b\\S)?/g)!\n .join('')\n .match(/(^\\S|\\S$)?/g)!\n .join('')\n .toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n @property()\n src = '';\n\n @property()\n name = '';\n\n @property({ reflect: true })\n size = 'md';\n\n @property({ type: Number })\n badge = 0;\n\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n if (this.name) {\n this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag} class=\"base\" type=${this.interactive ? 'button' : nothing}>\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"uOAMA,IAAM,EAAE,OAAO,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,EAAE,OAAO,GAAG,cAA0C,GAAG,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,IAAI,GAAG,GAAG,CAAC,GAAY,EAAE,eAAX,IAAK,GAAmB,OAAO,EAAE,aAAa,MAAM,MAAM,kEAAkE,EAAE,sGAAsG,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,IAAyS,GAAnS,IAAI,EAAE,GAAG,IAAI,CAAC,IAAM,EAAE,EAAE,OAAW,EAAE,EAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAK,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAvB,IAAK,IAAqB,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,IAAM,EAAE,EAAE,KAAK,UAAU,EAAW,EAAE,EAAE,IAAI,EAAE,IAApB,IAAK,KAAmB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAMA,EAAE,CEChsB,EAAS,EAAU,okEAAU,CAEnC,SAAS,EAAY,EAAsB,CACzC,OAAO,EACJ,MAAM,WAAW,CACjB,KAAK,GAAG,CACR,MAAM,cAAc,CACpB,KAAK,GAAG,CACR,aAAa,CAGlB,IAAM,EAAc,CAAG;;QAQV,EAAb,cAA4B,CAAa,wCAIjC,aAGC,aAGA,gBAGC,mBAGM,kBAEe,qBAyDJ,CACvB,KAAK,UAAY,uBA3EH,CAAC,EAAY,EAAO,CAmBpC,WAAW,EAA+B,CACpC,EAAQ,IAAI,MAAM,GACpB,KAAK,UAAY,IAIrB,mBAAoB,CAClB,MAAM,mBAAmB,CACpB,KAAK,aAAa,OAAO,EAC5B,KAAK,aAAa,OAAQ,MAAM,CAIpC,SAAU,CACJ,KAAK,MACP,KAAK,aAAa,aAAc,KAAK,KAAK,CAG5C,IAAM,EAAW,iBAAiB,KAAK,CAAC,iBAAiB,eAAe,CAAC,MAAM,GAAK,SACpF,KAAK,MAAM,aAAe,EAAW,MAAQ,GAG/C,IAAY,MAAO,CACjB,OAAO,KAAK,YAAc,CAAO,SAAW,CAAO,MAGrD,QAAS,CACP,IAAM,EACJ,KAAK,KAAO,CAAC,KAAK,UACd,CAAI;kBACI,KAAK,IAAI;kBACT,KAAK,MAAQ,GAAG;qBACb,KAAK,SAAS;cAEzB,KAAK,KACH,CAAI,0BAA0B,EAAY,KAAK,KAAK,CAAC,SACrD,CAAI,SAAS,EAAY,SAEjC,MAAO,EAAU;SACZ,KAAK,KAAK,qBAAqB,KAAK,YAAc,SAAW,EAAQ;UACpE,EAAQ;UACR,KAAK,KAAK;QAEZ,KAAK,MACD,CAAI;;;;gBAIA,KAAK,MAAM;oBAEf,EACL;WApEJ,GAAU,CAAA,CAAA,EAAA,UAAA,MAAA,IAAA,GAAA,IAGV,GAAU,CAAA,CAAA,EAAA,UAAA,OAAA,IAAA,GAAA,IAGV,EAAS,CAAE,QAAS,GAAM,CAAC,CAAA,CAAA,EAAA,UAAA,OAAA,IAAA,GAAA,IAG3B,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,CAAA,EAAA,UAAA,QAAA,IAAA,GAAA,IAG1B,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,CAAC,CAAA,CAAA,EAAA,UAAA,cAAA,IAAA,GAAA,IAG1C,GAAO,CAAA,CAAA,EAAA,UAAA,YAAA,IAAA,GAAA"}
1
+ {"version":3,"file":"avatar.js","names":["t","r","e"],"sources":["../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js","../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":["import{html as t,svg as r,mathml as e}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst a=Symbol.for(\"\"),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++}if($===a&&n.push(r[a]),f){const t=n.join(\"$$lit$$\");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u}return t(r,...e)},u=n(t),c=n(r),$=n(e);export{u as html,i as literal,$ as mathml,c as svg,s as unsafeStatic,n as withStatic};\n//# sourceMappingURL=static.js.map\n",":host {\n --_size: 40px;\n --_font-size: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--_size);\n height: var(--_size);\n border-radius: calc(var(--_size) * 0.2);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --_size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --_size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --_size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --_size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--_size) * 0.2);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n color: oklch(\n from var(--color) calc(0.65 - 0.2 * sign(l - 0.5)) calc(c * (1.75 + 0.25 * sign(l - 0.5))) h\n );\n font-size: var(--_font-size);\n font-weight: 500;\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n@supports (color: contrast-color(red vs black, white)) {\n .base {\n color: contrast-color(\n var(--color, var(--l-color-bg-fill-neutral-soft)) vs\n oklch(from var(--color) 0.45 calc(c * 2) h),\n oklch(from var(--color) 0.85 calc(c * 1.5) h) to AA\n );\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: 2px solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\nfunction getInitials(name: string): string {\n return name\n .match(/(\\b\\S)?/g)!\n .join('')\n .match(/(^\\S|\\S$)?/g)!\n .join('')\n .toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n @property()\n src = '';\n\n @property()\n name = '';\n\n @property({ reflect: true })\n size = 'md';\n\n @property({ type: Number })\n badge = 0;\n\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n if (this.name) {\n this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag} class=\"base\" type=${this.interactive ? 'button' : nothing}>\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"kOAMA,IAAM,EAAE,OAAO,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,EAAE,OAAO,GAAG,cAA0C,GAAG,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,IAAI,GAAG,GAAG,CAAC,GAAY,EAAE,eAAX,IAAK,GAAmB,OAAO,EAAE,aAAa,MAAM,MAAM,kEAAkE,EAAE,sGAAsG,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,IAAyS,GAAnS,IAAI,EAAE,GAAG,IAAI,CAAC,IAAM,EAAE,EAAE,OAAW,EAAE,EAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAK,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAvB,IAAK,IAAqB,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,IAAM,EAAE,EAAE,KAAK,UAAU,EAAW,EAAE,EAAE,IAAI,EAAE,IAApB,IAAK,KAAmB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAMA,EAAE,CEChsB,EAAS,EAAU,okEAAU,CAEnC,SAAS,EAAY,EAAsB,CACzC,OAAO,EACJ,MAAM,WAAW,CACjB,KAAK,GAAG,CACR,MAAM,cAAc,CACpB,KAAK,GAAG,CACR,aAAa,CAGlB,IAAM,EAAc,CAAG;;QAQV,EAAb,cAA4B,CAAa,wCAIjC,aAGC,aAGA,gBAGC,mBAGM,kBAEe,qBAyDJ,CACvB,KAAK,UAAY,uBA3EH,CAAC,EAAY,EAAO,CAmBpC,WAAW,EAA+B,CACpC,EAAQ,IAAI,MAAM,GACpB,KAAK,UAAY,IAIrB,mBAAoB,CAClB,MAAM,mBAAmB,CACpB,KAAK,aAAa,OAAO,EAC5B,KAAK,aAAa,OAAQ,MAAM,CAIpC,SAAU,CACJ,KAAK,MACP,KAAK,aAAa,aAAc,KAAK,KAAK,CAG5C,IAAM,EAAW,iBAAiB,KAAK,CAAC,iBAAiB,eAAe,CAAC,MAAM,GAAK,SACpF,KAAK,MAAM,aAAe,EAAW,MAAQ,GAG/C,IAAY,MAAO,CACjB,OAAO,KAAK,YAAc,CAAO,SAAW,CAAO,MAGrD,QAAS,CACP,IAAM,EACJ,KAAK,KAAO,CAAC,KAAK,UACd,CAAI;kBACI,KAAK,IAAI;kBACT,KAAK,MAAQ,GAAG;qBACb,KAAK,SAAS;cAEzB,KAAK,KACH,CAAI,0BAA0B,EAAY,KAAK,KAAK,CAAC,SACrD,CAAI,SAAS,EAAY,SAEjC,MAAO,EAAU;SACZ,KAAK,KAAK,qBAAqB,KAAK,YAAc,SAAW,EAAQ;UACpE,EAAQ;UACR,KAAK,KAAK;QAEZ,KAAK,MACD,CAAI;;;;gBAIA,KAAK,MAAM;oBAEf,EACL;WApEJ,GAAU,CAAA,CAAA,EAAA,UAAA,MAAA,IAAA,GAAA,IAGV,GAAU,CAAA,CAAA,EAAA,UAAA,OAAA,IAAA,GAAA,IAGV,EAAS,CAAE,QAAS,GAAM,CAAC,CAAA,CAAA,EAAA,UAAA,OAAA,IAAA,GAAA,IAG3B,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,CAAA,EAAA,UAAA,QAAA,IAAA,GAAA,IAG1B,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,CAAC,CAAA,CAAA,EAAA,UAAA,cAAA,IAAA,GAAA,IAG1C,GAAO,CAAA,CAAA,EAAA,UAAA,YAAA,IAAA,GAAA"}
@@ -1,4 +1,4 @@
1
- import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,n as a,r as o,t as s}from"../../chunks/decorate.js";import c from"../../shared/styles/host.styles.js";import{t as l}from"../../chunks/map.js";function u(e){return typeof e==`number`}function d(e){return typeof e==`string`}function f(e){return typeof e==`boolean`}function p(e){return Object.prototype.toString.call(e)===`[object Object]`}function m(e){return Math.abs(e)}function h(e){return Math.sign(e)}function g(e,t){return m(e-t)}function _(e,t){return e===0||t===0||m(e)<=m(t)?0:m(g(m(e),m(t))/e)}function v(e){return Math.round(e*100)/100}function y(e){return w(e).map(Number)}function b(e){return e[x(e)]}function x(e){return Math.max(0,e.length-1)}function S(e,t){return t===x(e)}function C(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function w(e){return Object.keys(e)}function T(e,t){return[e,t].reduce((e,t)=>(w(t).forEach(n=>{let r=e[n],i=t[n];e[n]=p(r)&&p(i)?T(r,i):i}),e),{})}function E(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function D(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return d(e)?n[e](r):e(t,r,i)}return{measure:o}}function O(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function k(e,t,n,r){let i=O(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function A(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function j(e=0,t=0){let n=m(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function M(e,t,n){let{constrain:r}=j(0,e),i=e+1,a=o(t);function o(e){return n?m((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return M(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function ee(e,t,n,r,i,a,o,s,c,l,u,d,p,v,y,b,x,S,C){let{cross:w,direction:T}=e,D=[`INPUT`,`SELECT`,`TEXTAREA`],k={passive:!1},A=O(),M=O(),ee=j(50,225).constrain(v.measure(20)),te={mouse:300,touch:400},ne={mouse:500,touch:600},re=y?43:25,ie=!1,ae=0,N=0,P=!1,F=!1,I=!1,L=!1;function oe(e){if(!C)return;function n(t){(f(C)||C(e,t))&&ue(t)}let r=t;A.add(r,`dragstart`,e=>e.preventDefault(),k).add(r,`touchmove`,()=>void 0,k).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,B).add(r,`contextmenu`,B).add(r,`click`,fe,!0)}function se(){A.clear(),M.clear()}function ce(){let e=L?n:t;M.add(e,`touchmove`,de,k).add(e,`touchend`,B).add(e,`mousemove`,de,k).add(e,`mouseup`,B)}function le(e){let t=e.nodeName||``;return D.includes(t)}function R(){return(y?ne:te)[L?`mouse`:`touch`]}function z(e,t){let n=d.add(h(e)*-1),r=u.byDistance(e,!y).distance;return y||m(e)<ee?r:x&&t?r*.5:u.byIndex(n.get(),0).distance}function ue(e){let t=E(e,r);L=t,I=y&&t&&!e.buttons&&ie,ie=g(i.get(),o.get())>=2,!(t&&e.button!==0)&&(le(e.target)||(P=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),ce(),ae=a.readPoint(e),N=a.readPoint(e,w),p.emit(`pointerDown`)))}function de(e){if(!E(e,r)&&e.touches.length>=2)return B(e);let t=a.readPoint(e),n=a.readPoint(e,w),o=g(t,ae),c=g(n,N);if(!F&&!L&&(!e.cancelable||(F=o>c,!F)))return B(e);let u=a.pointerMove(e);o>b&&(I=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(T(u)),e.preventDefault()}function B(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*R(),r=z(T(n),t),i=_(n,r),o=re-10*i,s=S+i/50;F=!1,P=!1,M.clear(),l.useDuration(o).useFriction(s),c.distance(r,!y),L=!1,p.emit(`pointerUp`)}function fe(e){I&&=(e.stopPropagation(),e.preventDefault(),!1)}function pe(){return P}return{init:oe,destroy:se,pointerDown:pe}}function te(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(E(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&m(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function ne(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function re(e){function t(t){return t/100*e}return{measure:t}}function ie(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function p(e){return i.measureSize(o.measure(e))}function h(i){if(!a)return;l=p(e),u=r.map(p);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(m(p(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(f(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function g(){d=!0,c&&c.disconnect()}return{init:h,destroy:g}}function ae(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=h(a),d=u,C}function p(){return m(r.get()-t.get())<.001}function g(){return c}function _(){return s}function v(){return o}function y(){return x(i)}function b(){return S(a)}function x(e){return c=e,C}function S(e){return l=e,C}let C={direction:_,duration:g,velocity:v,seek:f,settled:p,useBaseFriction:b,useBaseDuration:y,useFriction:S,useDuration:x};return C}function N(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=j(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=m(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&m(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function P(e,t,n,r,i){let a=j(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return g(e,t)<=1}function u(){let e=o[0],t=b(o);return j(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=S(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function F(e,t,n){let r=t[0];return{limit:j(n?r-e:b(t),r)}}function I(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=j(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function L(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function oe(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>b(e)[o]-e[0][a]).map(m)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-m(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function se(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=S(n,t);return r?C(b(n[0])+1):i?C(x(a)-b(n)[0]+1,b(n)[0]):e})}return{slideRegistry:l}}function ce(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>m(e)-m(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>m(e.diff)-m(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>h(e)===r);return a.length?c(a):b(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function le(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function R(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function d(d){if(!s)return;function m(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));u(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,p,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(f(s)||s(d,e))&&m(t)},c)})}function p(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:d}}function z(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return u(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function ue(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=v(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function de(e,t,n,r,i,a,o,s,c){let l=.5,u=y(i),d=y(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:z(-1),translate:ue(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function b(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function x(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function S(){f.forEach(e=>e.translate.clear())}return{canLoop:b,clear:S,loop:x,loopPoints:f}}function B(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(f(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function fe(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return w(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function pe(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=h(),d=g(),f=n.map(o),p=_();function h(){if(!l)return 0;let e=n[0];return m(t[s]-e[s])}function g(){if(!l)return 0;let e=a.getComputedStyle(b(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function _(){return n.map((e,t,n)=>{let r=!t,i=S(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(m)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function me(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:d,direction:f}=e,p=u(n);function h(e,t){return y(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function g(e){return e.length?y(e).reduce((n,u,p)=>{let h=b(n)||0,g=h===0,_=u===x(e),v=i[l]-a[h][l],y=i[l]-a[u][d],S=!r&&g?f(o):0,C=m(y-(!r&&_?f(s):0)-(v+S));return p&&C>t+c&&n.push(u),_&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function _(e){return p?h(e,n):g(e)}return{groupSlides:_}}function V(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:S,watchSlides:C,watchDrag:w,watchFocus:T}=a,E=ne(),j=E.measure(t),V=n.map(E.measure),H=A(c,l),U=H.measureSize(j),he=re(U),ge=D(s,U),W=!d&&!!v,{slideSizes:_e,slideSizesWithGaps:ve,startGap:ye,endGap:be}=pe(H,j,V,n,d||!!v,i),xe=me(H,U,g,d,j,V,ye,be,2),{snaps:G,snapsAligned:Se}=oe(H,ge,j,V,xe),K=-b(G)+b(ve),{snapsContained:Ce,scrollContainLimit:we}=P(U,K,Se,v,2),q=W?Ce:Se,{limit:J}=F(K,q,d),Y=M(x(q),u,d),Te=Y.clone(),Ee=y(n),De=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},Oe=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ke=k(r,i,()=>De(Be),e=>Oe(Be,e)),Ae=.68,X=q[Y.get()],je=z(X),Me=z(X),Z=z(X),Q=z(X),$=ae(je,Z,Me,Q,f,Ae),Ne=ce(d,q,K,J,Q),Pe=le(ke,Y,Te,$,Ne,Q,o),Fe=L(J),Ie=O(),Le=fe(t,n,o,h),{slideRegistry:Re}=se(W,v,q,we,xe,Ee),ze=R(e,n,Re,Pe,$,Ie,o,T),Be={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:j,slideRects:V,animation:ke,axis:H,dragHandler:ee(H,e,r,i,Q,te(H,i),je,ke,Pe,$,Ne,Y,o,he,p,m,_,Ae,w),eventStore:Ie,percentOfView:he,index:Y,indexPrevious:Te,limit:J,location:je,offsetLocation:Z,previousLocation:Me,options:a,resizeHandler:ie(t,o,i,n,H,S,E),scrollBody:$,scrollBounds:N(J,Z,Q,$,he),scrollLooper:I(K,J,Z,[je,Z,Me,Q]),scrollProgress:Fe,scrollSnapList:q.map(Fe.get),scrollSnaps:q,scrollTarget:Ne,scrollTo:Pe,slideLooper:de(H,U,K,_e,ve,G,q,Z,n),slideFocus:ze,slidesHandler:B(t,o,C),slidesInView:Le,slideIndexes:Ee,slideRegistry:Re,slidesToScroll:xe,target:Q,translate:ue(H,t)};return Be}function H(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var U={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function he(e){function t(e,t){return T(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,w(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>w(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function ge(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function W(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=he(i),o=ge(a),s=O(),c=H(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:f}=a,{on:p,off:m,emit:h}=c,g=k,_=!1,v,y=l(U,W.globalOptions),b=l(y),x=[],S,C,w;function T(){let{container:t,slides:n}=b;C=(d(t)?e.querySelector(t):t)||e.children[0];let r=d(n)?C.querySelectorAll(n):n;w=[].slice.call(r||C.children)}function E(t){let n=V(e,C,w,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):n}function D(e,t){_||(y=l(y,e),b=u(y),x=t||x,T(),v=E(b),f([y,...x.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,k)),b.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(R),v.eventHandler.init(R),v.resizeHandler.init(R),v.slidesHandler.init(R),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(R),S=o.init(R,x)))}function k(e,t){let n=N();A(),D(l({startIndex:n},e),t),c.emit(`reInit`)}function A(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),o.destroy(),s.clear()}function j(){_||(_=!0,s.clear(),A(),c.emit(`destroy`),c.clear())}function M(e,t,n){!b.active||_||(v.scrollBody.useBaseFriction().useDuration(t===!0?0:b.duration),v.scrollTo.index(e,n||0))}function ee(e){M(v.index.add(1).get(),e,-1)}function te(e){M(v.index.add(-1).get(),e,1)}function ne(){return v.index.add(1).get()!==N()}function re(){return v.index.add(-1).get()!==N()}function ie(){return v.scrollSnapList}function ae(){return v.scrollProgress.get(v.offsetLocation.get())}function N(){return v.index.get()}function P(){return v.indexPrevious.get()}function F(){return v.slidesInView.get()}function I(){return v.slidesInView.get(!1)}function L(){return S}function oe(){return v}function se(){return e}function ce(){return C}function le(){return w}let R={canScrollNext:ne,canScrollPrev:re,containerNode:ce,internalEngine:oe,destroy:j,off:m,on:p,emit:h,plugins:L,previousScrollSnap:P,reInit:g,rootNode:se,scrollNext:ee,scrollPrev:te,scrollProgress:ae,scrollSnapList:ie,scrollTo:M,selectedScrollSnap:N,slideNodes:le,slidesInView:F,slidesNotInView:I};return D(t,n),setTimeout(()=>c.emit(`init`),0),R}W.globalOptions=void 0;var _e={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function ve(e,t){let n=e.scrollSnapList();return typeof t==`number`?n.map(()=>t):t(n,e)}function ye(e,t){let n=e.rootNode();return t&&t(n)||n}function be(e={}){let t,n,r,i,a=null,o=0,s=!1,c=!1,l=!1,u=!1;function d(a,o){n=a;let{mergeOptions:s,optionsAtMedia:c}=o;if(t=c(s(s(_e,be.globalOptions),e)),n.scrollSnapList().length<=1)return;u=t.jump,r=!1,i=ve(n,t.delay);let{eventStore:l,ownerDocument:d}=n.internalEngine(),f=!!n.internalEngine().options.watchDrag,p=ye(n,t.rootNode);l.add(d,`visibilitychange`,_),f&&n.on(`pointerDown`,y),f&&!t.stopOnInteraction&&n.on(`pointerUp`,b),t.stopOnMouseEnter&&l.add(p,`mouseenter`,x),t.stopOnMouseEnter&&!t.stopOnInteraction&&l.add(p,`mouseleave`,S),t.stopOnFocusIn&&n.on(`slideFocusStart`,g),t.stopOnFocusIn&&!t.stopOnInteraction&&l.add(n.containerNode(),`focusout`,h),t.playOnInit&&h()}function f(){n.off(`pointerDown`,y).off(`pointerUp`,b).off(`slideFocusStart`,g),g(),r=!0,s=!1}function p(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=e.setTimeout(D,i[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit(`autoplay:timerset`)}function m(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=0,a=null,n.emit(`autoplay:timerstopped`)}function h(){if(!r){if(v()){l=!0;return}s||n.emit(`autoplay:play`),p(),s=!0}}function g(){r||(s&&n.emit(`autoplay:stop`),m(),s=!1)}function _(){if(v())return l=s,g();l&&h()}function v(){let{ownerDocument:e}=n.internalEngine();return e.visibilityState===`hidden`}function y(){c||g()}function b(){c||h()}function x(){c=!0,g()}function S(){c=!1,h()}function C(e){e!==void 0&&(u=e),h()}function w(){s&&g()}function T(){s&&h()}function E(){return s}function D(){let{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1,a=t.stopOnLastSnap&&r===i;if(n.canScrollNext()?n.scrollNext(u):n.scrollTo(0,u),n.emit(`autoplay:select`),a)return g();h()}function O(){return a?i[n.selectedScrollSnap()]-(new Date().getTime()-a):null}return{name:`autoplay`,options:e,init:d,destroy:f,play:C,stop:w,reset:T,isPlaying:E,timeUntilNext:O}}be.globalOptions=void 0;var xe=e(`:host{--slide-height:19rem;--slide-size:100%;--slide-gap:0;--button-size:48px;--button-arrow-size:20px;--button-arrow-color:#4b5563;--button-offset:8px;--button-border-color:#e5e7eb;--button-border-radius:8px;--button-bg:#fffc;--button-color:inherit;--button-box-shadow-hover:0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;--dot-color:#9ca3af;--dot-color-active:#111827;--dot-margin:.5rem 0;--dot-edge-scale:.5;--scrollbar-color:#d1d5db transparent;display:block;position:relative;container-type:inline-size}:host([single]){--slide-size:100%;--slide-gap:0}:host([axis=y]) .container{max-height:var(--slide-height);flex-direction:column}:host([axis=y]) .viewport{max-height:var(--slide-height)}.viewport{overflow:hidden}:host([with-scrollbar]) .viewport{scrollbar-color:var(--scrollbar-color);scrollbar-gutter:stable both-edges;scrollbar-width:thin;overflow-x:scroll}.container{backface-visibility:hidden;gap:var(--slide-gap);touch-action:pan-y pinch-zoom;display:flex}::slotted(l-carousel-item){flex:0 0 var(--slide-size);min-width:0}.scroll-buttons--inside{pointer-events:none;position:absolute;inset:0}.scroll-buttons--outside{justify-content:end;gap:8px;padding-block:8px;display:flex}.scroll-buttons--disabled,.inactive .scroll-buttons{display:none}.button-next,.button-previous,.button-fullscreen{appearance:none;touch-action:manipulation;border:1px solid var(--button-border-color);border-radius:var(--button-border-radius);width:var(--button-size);height:var(--button-size);background-color:var(--button-bg);color:var(--button-color);cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:#31313180;justify-content:center;align-items:center;display:flex}.scroll-buttons--inside .button-previous,.scroll-buttons--inside .button-next,.button-fullscreen{top:calc(50% - (var(--button-size) / 2));z-index:1;position:absolute}.scroll-buttons--inside .button-previous{left:var(--button-offset)}.scroll-buttons--inside .button-next{right:var(--button-offset)}.scroll-buttons--inside .button:disabled{visibility:hidden}.button:disabled{cursor:not-allowed;pointer-events:none;opacity:.4}.button-fullscreen{right:var(--button-offset);top:var(--button-offset);width:calc(var(--button-size) * .75);height:calc(var(--button-size) * .75);border-radius:4px}@container (width>=640px){.button-fullscreen{width:var(--button-size);height:var(--button-size)}}@media (hover:hover){.button:hover:not(:disabled){box-shadow:var(--button-box-shadow-hover)}}.button svg{width:var(--button-arrow-size);height:var(--button-arrow-size);color:var(--button-arrow-color)}.dots{margin:var(--dot-margin);justify-content:center;display:flex}.dot{appearance:none;touch-action:manipulation;cursor:pointer;transform-origin:50%;background:0 0;border:0;place-items:center;padding-block:.5rem;padding-inline:.25rem;transition:transform .18s;display:inline-flex}.dot[data-edge]{transform:scale(var(--dot-edge-scale))}.dot--bar i{background:var(--dot-color);width:1rem;height:.125rem}.dot--selected i{background:var(--dot-color-active)}.dot--circle i{border:2px solid var(--dot-color-active);border-radius:8px;width:10px;height:10px;display:inline-block}.dot--circle.dot--selected i{width:30px}`),G=class extends r{constructor(...e){super(...e),this.#e=0,this.#n=`x`,this.#r=`start`,this.#i={},this.#a=!1,this.#o=!1,this.#s=20,this.#c=!1,this.#l=1,this.#u=0,this.#d=`trimSnaps`,this.#f=!1,this.#p=!1,this.#m=!1,this.#h=!1,this.#g=`bar`,this.#_=0,this.#v=`inside`,this.#y=0,this.onSlidesInView=()=>{this.emit(`slides-in-view`,{detail:{indexes:this.embla.slidesInView()}})},this.onInit=()=>{this.updateNavigation()},this.onReInit=()=>{this.updateNavigation(),this.requestUpdate()},this.onSelect=()=>{this.emit(`select`,{detail:{index:this.embla.selectedScrollSnap()}}),this.updateNavigation()},this.onResize=()=>{this.requestUpdate()},this.detachEventListeners=()=>{this.previousBtn.removeEventListener(`click`,this.previous),this.nextBtn.removeEventListener(`click`,this.next)},this.handleSlotChange=e=>{e.target.assignedElements().length>0&&this.embla.reInit(this.options())},this.handleDotClick=e=>{let t=e.currentTarget;this.goToSlide(Number(t.dataset.index))},this.next=()=>{this.embla.scrollNext()},this.previous=()=>{this.embla.scrollPrev()}}static{this.styles=[c,xe]}#e;get autoplay(){return this.#e}set autoplay(e){this.#e=e}#t;get autoplayOptions(){return this.#t}set autoplayOptions(e){this.#t=e}#n;get axis(){return this.#n}set axis(e){this.#n=e}#r;get align(){return this.#r}set align(e){this.#r=e}#i;get breakpoints(){return this.#i}set breakpoints(e){this.#i=e}#a;get loop(){return this.#a}set loop(e){this.#a=e}#o;get dragFree(){return this.#o}set dragFree(e){this.#o=e}#s;get duration(){return this.#s}set duration(e){this.#s=e}#c;get skipSnaps(){return this.#c}set skipSnaps(e){this.#c=e}#l;get slidesToScroll(){return this.#l}set slidesToScroll(e){this.#l=e}#u;get startIndex(){return this.#u}set startIndex(e){this.#u=e}#d;get containScroll(){return this.#d}set containScroll(e){this.#d=e}#f;get single(){return this.#f}set single(e){this.#f=e}#p;get withDots(){return this.#p}set withDots(e){this.#p=e}#m;get withScrollbar(){return this.#m}set withScrollbar(e){this.#m=e}#h;get withFullscreen(){return this.#h}set withFullscreen(e){this.#h=e}#g;get dotAppearance(){return this.#g}set dotAppearance(e){this.#g=e}#_;get maxVisibleDots(){return this.#_}set maxVisibleDots(e){this.#_=e}#v;get scrollButtonsPosition(){return this.#v}set scrollButtonsPosition(e){this.#v=e}#y;get _selectedSnap(){return this.#y}set _selectedSnap(e){this.#y=e}connectedCallback(){super.connectedCallback(),this.createEmbla()}disconnectedCallback(){super.disconnectedCallback(),this.embla&&this.embla.destroy()}firstUpdated(){this.attachEventListeners()}createEmbla(){this.embla=W(this,this.options()),this.embla.on(`init`,this.onInit).on(`reInit`,this.onReInit).on(`resize`,this.onResize).on(`slidesInView`,this.onSlidesInView).on(`select`,this.onSelect).on(`destroy`,this.detachEventListeners)}attachEventListeners(){this.previousBtn.addEventListener(`click`,this.previous),this.nextBtn.addEventListener(`click`,this.next)}updateNavigation(){let e=this.embla.canScrollPrev()||this.embla.canScrollNext();this.previousBtn.toggleAttribute(`disabled`,!this.embla.canScrollPrev()),this.nextBtn.toggleAttribute(`disabled`,!this.embla.canScrollNext()),this.scrollButtons.classList.toggle(`scroll-buttons--disabled`,!e),this._selectedSnap=this.embla.selectedScrollSnap()}async updated(e){e.has(`autoplay`)&&this.autoplay&&this.initAutoplay()}initAutoplay(){this.embla.reInit(this.options(),[be(this.autoplayOptions||{delay:this.autoplay})])}options(){let e=this.shadowRoot.querySelector(`slot`);return e?{container:e,slides:e.assignedElements(),containScroll:this.containScroll,breakpoints:this.breakpoints,axis:this.axis,align:this.align,dragFree:this.dragFree,duration:this.duration,loop:this.loop,slidesToScroll:this.slidesToScroll,skipSnaps:this.skipSnaps,startIndex:this.startIndex}:{container:this,slides:[]}}goToSlide(e,t){this.embla.scrollTo(e,t)}slideNodes(){this.embla.slideNodes()}slidesInView(){this.embla.slidesInView()}isActive(){return this.embla?.internalEngine().options.active}renderFullscreenButton(){return t`<button
1
+ import{a as e,l as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,n as a,r as o,t as s}from"../../chunks/decorate.js";import c from"../../shared/styles/host.styles.js";import{t as l}from"../../chunks/map.js";function u(e){return typeof e==`number`}function d(e){return typeof e==`string`}function f(e){return typeof e==`boolean`}function p(e){return Object.prototype.toString.call(e)===`[object Object]`}function m(e){return Math.abs(e)}function h(e){return Math.sign(e)}function g(e,t){return m(e-t)}function _(e,t){return e===0||t===0||m(e)<=m(t)?0:m(g(m(e),m(t))/e)}function v(e){return Math.round(e*100)/100}function y(e){return w(e).map(Number)}function b(e){return e[x(e)]}function x(e){return Math.max(0,e.length-1)}function S(e,t){return t===x(e)}function C(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function w(e){return Object.keys(e)}function T(e,t){return[e,t].reduce((e,t)=>(w(t).forEach(n=>{let r=e[n],i=t[n];e[n]=p(r)&&p(i)?T(r,i):i}),e),{})}function E(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function D(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return d(e)?n[e](r):e(t,r,i)}return{measure:o}}function O(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function k(e,t,n,r){let i=O(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function A(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function j(e=0,t=0){let n=m(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function M(e,t,n){let{constrain:r}=j(0,e),i=e+1,a=o(t);function o(e){return n?m((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return M(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function ee(e,t,n,r,i,a,o,s,c,l,u,d,p,v,y,b,x,S,C){let{cross:w,direction:T}=e,D=[`INPUT`,`SELECT`,`TEXTAREA`],k={passive:!1},A=O(),M=O(),ee=j(50,225).constrain(v.measure(20)),te={mouse:300,touch:400},ne={mouse:500,touch:600},re=y?43:25,ie=!1,ae=0,N=0,P=!1,F=!1,I=!1,L=!1;function oe(e){if(!C)return;function n(t){(f(C)||C(e,t))&&ue(t)}let r=t;A.add(r,`dragstart`,e=>e.preventDefault(),k).add(r,`touchmove`,()=>void 0,k).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,B).add(r,`contextmenu`,B).add(r,`click`,fe,!0)}function se(){A.clear(),M.clear()}function ce(){let e=L?n:t;M.add(e,`touchmove`,de,k).add(e,`touchend`,B).add(e,`mousemove`,de,k).add(e,`mouseup`,B)}function le(e){let t=e.nodeName||``;return D.includes(t)}function R(){return(y?ne:te)[L?`mouse`:`touch`]}function z(e,t){let n=d.add(h(e)*-1),r=u.byDistance(e,!y).distance;return y||m(e)<ee?r:x&&t?r*.5:u.byIndex(n.get(),0).distance}function ue(e){let t=E(e,r);L=t,I=y&&t&&!e.buttons&&ie,ie=g(i.get(),o.get())>=2,!(t&&e.button!==0)&&(le(e.target)||(P=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),ce(),ae=a.readPoint(e),N=a.readPoint(e,w),p.emit(`pointerDown`)))}function de(e){if(!E(e,r)&&e.touches.length>=2)return B(e);let t=a.readPoint(e),n=a.readPoint(e,w),o=g(t,ae),c=g(n,N);if(!F&&!L&&(!e.cancelable||(F=o>c,!F)))return B(e);let u=a.pointerMove(e);o>b&&(I=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(T(u)),e.preventDefault()}function B(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*R(),r=z(T(n),t),i=_(n,r),o=re-10*i,s=S+i/50;F=!1,P=!1,M.clear(),l.useDuration(o).useFriction(s),c.distance(r,!y),L=!1,p.emit(`pointerUp`)}function fe(e){I&&=(e.stopPropagation(),e.preventDefault(),!1)}function pe(){return P}return{init:oe,destroy:se,pointerDown:pe}}function te(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(E(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&m(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function ne(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function re(e){function t(t){return t/100*e}return{measure:t}}function ie(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function p(e){return i.measureSize(o.measure(e))}function h(i){if(!a)return;l=p(e),u=r.map(p);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(m(p(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(f(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function g(){d=!0,c&&c.disconnect()}return{init:h,destroy:g}}function ae(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=h(a),d=u,C}function p(){return m(r.get()-t.get())<.001}function g(){return c}function _(){return s}function v(){return o}function y(){return x(i)}function b(){return S(a)}function x(e){return c=e,C}function S(e){return l=e,C}let C={direction:_,duration:g,velocity:v,seek:f,settled:p,useBaseFriction:b,useBaseDuration:y,useFriction:S,useDuration:x};return C}function N(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=j(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=m(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&m(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function P(e,t,n,r,i){let a=j(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return g(e,t)<=1}function u(){let e=o[0],t=b(o);return j(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=S(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function F(e,t,n){let r=t[0];return{limit:j(n?r-e:b(t),r)}}function I(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=j(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function L(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function oe(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>b(e)[o]-e[0][a]).map(m)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-m(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function se(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=S(n,t);return r?C(b(n[0])+1):i?C(x(a)-b(n)[0]+1,b(n)[0]):e})}return{slideRegistry:l}}function ce(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>m(e)-m(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>m(e.diff)-m(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>h(e)===r);return a.length?c(a):b(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function le(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function R(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function d(d){if(!s)return;function m(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));u(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,p,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(f(s)||s(d,e))&&m(t)},c)})}function p(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:d}}function z(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return u(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function ue(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=v(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function de(e,t,n,r,i,a,o,s,c){let l=.5,u=y(i),d=y(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:z(-1),translate:ue(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function b(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function x(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function S(){f.forEach(e=>e.translate.clear())}return{canLoop:b,clear:S,loop:x,loopPoints:f}}function B(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(f(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function fe(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return w(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function pe(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=h(),d=g(),f=n.map(o),p=_();function h(){if(!l)return 0;let e=n[0];return m(t[s]-e[s])}function g(){if(!l)return 0;let e=a.getComputedStyle(b(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function _(){return n.map((e,t,n)=>{let r=!t,i=S(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(m)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function me(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:d,direction:f}=e,p=u(n);function h(e,t){return y(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function g(e){return e.length?y(e).reduce((n,u,p)=>{let h=b(n)||0,g=h===0,_=u===x(e),v=i[l]-a[h][l],y=i[l]-a[u][d],S=!r&&g?f(o):0,C=m(y-(!r&&_?f(s):0)-(v+S));return p&&C>t+c&&n.push(u),_&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function _(e){return p?h(e,n):g(e)}return{groupSlides:_}}function V(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:S,watchSlides:C,watchDrag:w,watchFocus:T}=a,E=ne(),j=E.measure(t),V=n.map(E.measure),H=A(c,l),U=H.measureSize(j),he=re(U),ge=D(s,U),W=!d&&!!v,{slideSizes:_e,slideSizesWithGaps:ve,startGap:ye,endGap:be}=pe(H,j,V,n,d||!!v,i),xe=me(H,U,g,d,j,V,ye,be,2),{snaps:G,snapsAligned:Se}=oe(H,ge,j,V,xe),K=-b(G)+b(ve),{snapsContained:Ce,scrollContainLimit:we}=P(U,K,Se,v,2),q=W?Ce:Se,{limit:J}=F(K,q,d),Y=M(x(q),u,d),Te=Y.clone(),Ee=y(n),De=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},Oe=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ke=k(r,i,()=>De(Be),e=>Oe(Be,e)),Ae=.68,X=q[Y.get()],je=z(X),Me=z(X),Z=z(X),Q=z(X),$=ae(je,Z,Me,Q,f,Ae),Ne=ce(d,q,K,J,Q),Pe=le(ke,Y,Te,$,Ne,Q,o),Fe=L(J),Ie=O(),Le=fe(t,n,o,h),{slideRegistry:Re}=se(W,v,q,we,xe,Ee),ze=R(e,n,Re,Pe,$,Ie,o,T),Be={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:j,slideRects:V,animation:ke,axis:H,dragHandler:ee(H,e,r,i,Q,te(H,i),je,ke,Pe,$,Ne,Y,o,he,p,m,_,Ae,w),eventStore:Ie,percentOfView:he,index:Y,indexPrevious:Te,limit:J,location:je,offsetLocation:Z,previousLocation:Me,options:a,resizeHandler:ie(t,o,i,n,H,S,E),scrollBody:$,scrollBounds:N(J,Z,Q,$,he),scrollLooper:I(K,J,Z,[je,Z,Me,Q]),scrollProgress:Fe,scrollSnapList:q.map(Fe.get),scrollSnaps:q,scrollTarget:Ne,scrollTo:Pe,slideLooper:de(H,U,K,_e,ve,G,q,Z,n),slideFocus:ze,slidesHandler:B(t,o,C),slidesInView:Le,slideIndexes:Ee,slideRegistry:Re,slidesToScroll:xe,target:Q,translate:ue(H,t)};return Be}function H(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var U={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function he(e){function t(e,t){return T(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,w(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>w(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function ge(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function W(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=he(i),o=ge(a),s=O(),c=H(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:f}=a,{on:p,off:m,emit:h}=c,g=k,_=!1,v,y=l(U,W.globalOptions),b=l(y),x=[],S,C,w;function T(){let{container:t,slides:n}=b;C=(d(t)?e.querySelector(t):t)||e.children[0];let r=d(n)?C.querySelectorAll(n):n;w=[].slice.call(r||C.children)}function E(t){let n=V(e,C,w,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):n}function D(e,t){_||(y=l(y,e),b=u(y),x=t||x,T(),v=E(b),f([y,...x.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,k)),b.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(R),v.eventHandler.init(R),v.resizeHandler.init(R),v.slidesHandler.init(R),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(R),S=o.init(R,x)))}function k(e,t){let n=N();A(),D(l({startIndex:n},e),t),c.emit(`reInit`)}function A(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),o.destroy(),s.clear()}function j(){_||(_=!0,s.clear(),A(),c.emit(`destroy`),c.clear())}function M(e,t,n){!b.active||_||(v.scrollBody.useBaseFriction().useDuration(t===!0?0:b.duration),v.scrollTo.index(e,n||0))}function ee(e){M(v.index.add(1).get(),e,-1)}function te(e){M(v.index.add(-1).get(),e,1)}function ne(){return v.index.add(1).get()!==N()}function re(){return v.index.add(-1).get()!==N()}function ie(){return v.scrollSnapList}function ae(){return v.scrollProgress.get(v.offsetLocation.get())}function N(){return v.index.get()}function P(){return v.indexPrevious.get()}function F(){return v.slidesInView.get()}function I(){return v.slidesInView.get(!1)}function L(){return S}function oe(){return v}function se(){return e}function ce(){return C}function le(){return w}let R={canScrollNext:ne,canScrollPrev:re,containerNode:ce,internalEngine:oe,destroy:j,off:m,on:p,emit:h,plugins:L,previousScrollSnap:P,reInit:g,rootNode:se,scrollNext:ee,scrollPrev:te,scrollProgress:ae,scrollSnapList:ie,scrollTo:M,selectedScrollSnap:N,slideNodes:le,slidesInView:F,slidesNotInView:I};return D(t,n),setTimeout(()=>c.emit(`init`),0),R}W.globalOptions=void 0;var _e={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function ve(e,t){let n=e.scrollSnapList();return typeof t==`number`?n.map(()=>t):t(n,e)}function ye(e,t){let n=e.rootNode();return t&&t(n)||n}function be(e={}){let t,n,r,i,a=null,o=0,s=!1,c=!1,l=!1,u=!1;function d(a,o){n=a;let{mergeOptions:s,optionsAtMedia:c}=o;if(t=c(s(s(_e,be.globalOptions),e)),n.scrollSnapList().length<=1)return;u=t.jump,r=!1,i=ve(n,t.delay);let{eventStore:l,ownerDocument:d}=n.internalEngine(),f=!!n.internalEngine().options.watchDrag,p=ye(n,t.rootNode);l.add(d,`visibilitychange`,_),f&&n.on(`pointerDown`,y),f&&!t.stopOnInteraction&&n.on(`pointerUp`,b),t.stopOnMouseEnter&&l.add(p,`mouseenter`,x),t.stopOnMouseEnter&&!t.stopOnInteraction&&l.add(p,`mouseleave`,S),t.stopOnFocusIn&&n.on(`slideFocusStart`,g),t.stopOnFocusIn&&!t.stopOnInteraction&&l.add(n.containerNode(),`focusout`,h),t.playOnInit&&h()}function f(){n.off(`pointerDown`,y).off(`pointerUp`,b).off(`slideFocusStart`,g),g(),r=!0,s=!1}function p(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=e.setTimeout(D,i[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit(`autoplay:timerset`)}function m(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=0,a=null,n.emit(`autoplay:timerstopped`)}function h(){if(!r){if(v()){l=!0;return}s||n.emit(`autoplay:play`),p(),s=!0}}function g(){r||(s&&n.emit(`autoplay:stop`),m(),s=!1)}function _(){if(v())return l=s,g();l&&h()}function v(){let{ownerDocument:e}=n.internalEngine();return e.visibilityState===`hidden`}function y(){c||g()}function b(){c||h()}function x(){c=!0,g()}function S(){c=!1,h()}function C(e){e!==void 0&&(u=e),h()}function w(){s&&g()}function T(){s&&h()}function E(){return s}function D(){let{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1,a=t.stopOnLastSnap&&r===i;if(n.canScrollNext()?n.scrollNext(u):n.scrollTo(0,u),n.emit(`autoplay:select`),a)return g();h()}function O(){return a?i[n.selectedScrollSnap()]-(new Date().getTime()-a):null}return{name:`autoplay`,options:e,init:d,destroy:f,play:C,stop:w,reset:T,isPlaying:E,timeUntilNext:O}}be.globalOptions=void 0;var xe=t(`:host{--slide-height:19rem;--slide-size:100%;--slide-gap:0;--button-size:48px;--button-arrow-size:20px;--button-arrow-color:#4b5563;--button-offset:8px;--button-border-color:#e5e7eb;--button-border-radius:8px;--button-bg:#fffc;--button-color:inherit;--button-box-shadow-hover:0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;--dot-color:#9ca3af;--dot-color-active:#111827;--dot-margin:.5rem 0;--dot-edge-scale:.5;--scrollbar-color:#d1d5db transparent;display:block;position:relative;container-type:inline-size}:host([single]){--slide-size:100%;--slide-gap:0}:host([axis=y]) .container{max-height:var(--slide-height);flex-direction:column}:host([axis=y]) .viewport{max-height:var(--slide-height)}.viewport{overflow:hidden}:host([with-scrollbar]) .viewport{scrollbar-color:var(--scrollbar-color);scrollbar-gutter:stable both-edges;scrollbar-width:thin;overflow-x:scroll}.container{backface-visibility:hidden;gap:var(--slide-gap);touch-action:pan-y pinch-zoom;display:flex}::slotted(l-carousel-item){flex:0 0 var(--slide-size);min-width:0}.scroll-buttons--inside{pointer-events:none;position:absolute;inset:0}.scroll-buttons--outside{justify-content:end;gap:8px;padding-block:8px;display:flex}.scroll-buttons--disabled,.inactive .scroll-buttons{display:none}.button-next,.button-previous,.button-fullscreen{appearance:none;touch-action:manipulation;border:1px solid var(--button-border-color);border-radius:var(--button-border-radius);width:var(--button-size);height:var(--button-size);background-color:var(--button-bg);color:var(--button-color);cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:#31313180;justify-content:center;align-items:center;display:flex}.scroll-buttons--inside .button-previous,.scroll-buttons--inside .button-next,.button-fullscreen{top:calc(50% - (var(--button-size) / 2));z-index:1;position:absolute}.scroll-buttons--inside .button-previous{left:var(--button-offset)}.scroll-buttons--inside .button-next{right:var(--button-offset)}.scroll-buttons--inside .button:disabled{visibility:hidden}.button:disabled{cursor:not-allowed;pointer-events:none;opacity:.4}.button-fullscreen{right:var(--button-offset);top:var(--button-offset);width:calc(var(--button-size) * .75);height:calc(var(--button-size) * .75);border-radius:4px}@container (width>=640px){.button-fullscreen{width:var(--button-size);height:var(--button-size)}}@media (hover:hover){.button:hover:not(:disabled){box-shadow:var(--button-box-shadow-hover)}}.button svg{width:var(--button-arrow-size);height:var(--button-arrow-size);color:var(--button-arrow-color)}.dots{margin:var(--dot-margin);justify-content:center;display:flex}.dot{appearance:none;touch-action:manipulation;cursor:pointer;transform-origin:50%;background:0 0;border:0;place-items:center;padding-block:.5rem;padding-inline:.25rem;transition:transform .18s;display:inline-flex}.dot[data-edge]{transform:scale(var(--dot-edge-scale))}.dot--bar i{background:var(--dot-color);width:1rem;height:.125rem}.dot--selected i{background:var(--dot-color-active)}.dot--circle i{border:2px solid var(--dot-color-active);border-radius:8px;width:10px;height:10px;display:inline-block}.dot--circle.dot--selected i{width:30px}`),G=class extends r{constructor(...e){super(...e),this.#e=0,this.#n=`x`,this.#r=`start`,this.#i={},this.#a=!1,this.#o=!1,this.#s=20,this.#c=!1,this.#l=1,this.#u=0,this.#d=`trimSnaps`,this.#f=!1,this.#p=!1,this.#m=!1,this.#h=!1,this.#g=`bar`,this.#_=0,this.#v=`inside`,this.#y=0,this.onSlidesInView=()=>{this.emit(`slides-in-view`,{detail:{indexes:this.embla.slidesInView()}})},this.onInit=()=>{this.updateNavigation()},this.onReInit=()=>{this.updateNavigation(),this.requestUpdate()},this.onSelect=()=>{this.emit(`select`,{detail:{index:this.embla.selectedScrollSnap()}}),this.updateNavigation()},this.onResize=()=>{this.requestUpdate()},this.detachEventListeners=()=>{this.previousBtn.removeEventListener(`click`,this.previous),this.nextBtn.removeEventListener(`click`,this.next)},this.handleSlotChange=e=>{e.target.assignedElements().length>0&&this.embla.reInit(this.options())},this.handleDotClick=e=>{let t=e.currentTarget;this.goToSlide(Number(t.dataset.index))},this.next=()=>{this.embla.scrollNext()},this.previous=()=>{this.embla.scrollPrev()}}static{this.styles=[c,xe]}#e;get autoplay(){return this.#e}set autoplay(e){this.#e=e}#t;get autoplayOptions(){return this.#t}set autoplayOptions(e){this.#t=e}#n;get axis(){return this.#n}set axis(e){this.#n=e}#r;get align(){return this.#r}set align(e){this.#r=e}#i;get breakpoints(){return this.#i}set breakpoints(e){this.#i=e}#a;get loop(){return this.#a}set loop(e){this.#a=e}#o;get dragFree(){return this.#o}set dragFree(e){this.#o=e}#s;get duration(){return this.#s}set duration(e){this.#s=e}#c;get skipSnaps(){return this.#c}set skipSnaps(e){this.#c=e}#l;get slidesToScroll(){return this.#l}set slidesToScroll(e){this.#l=e}#u;get startIndex(){return this.#u}set startIndex(e){this.#u=e}#d;get containScroll(){return this.#d}set containScroll(e){this.#d=e}#f;get single(){return this.#f}set single(e){this.#f=e}#p;get withDots(){return this.#p}set withDots(e){this.#p=e}#m;get withScrollbar(){return this.#m}set withScrollbar(e){this.#m=e}#h;get withFullscreen(){return this.#h}set withFullscreen(e){this.#h=e}#g;get dotAppearance(){return this.#g}set dotAppearance(e){this.#g=e}#_;get maxVisibleDots(){return this.#_}set maxVisibleDots(e){this.#_=e}#v;get scrollButtonsPosition(){return this.#v}set scrollButtonsPosition(e){this.#v=e}#y;get _selectedSnap(){return this.#y}set _selectedSnap(e){this.#y=e}connectedCallback(){super.connectedCallback(),this.createEmbla()}disconnectedCallback(){super.disconnectedCallback(),this.embla&&this.embla.destroy()}firstUpdated(){this.attachEventListeners()}createEmbla(){this.embla=W(this,this.options()),this.embla.on(`init`,this.onInit).on(`reInit`,this.onReInit).on(`resize`,this.onResize).on(`slidesInView`,this.onSlidesInView).on(`select`,this.onSelect).on(`destroy`,this.detachEventListeners)}attachEventListeners(){this.previousBtn.addEventListener(`click`,this.previous),this.nextBtn.addEventListener(`click`,this.next)}updateNavigation(){let e=this.embla.canScrollPrev()||this.embla.canScrollNext();this.previousBtn.toggleAttribute(`disabled`,!this.embla.canScrollPrev()),this.nextBtn.toggleAttribute(`disabled`,!this.embla.canScrollNext()),this.scrollButtons.classList.toggle(`scroll-buttons--disabled`,!e),this._selectedSnap=this.embla.selectedScrollSnap()}async updated(e){e.has(`autoplay`)&&this.autoplay&&this.initAutoplay()}initAutoplay(){this.embla.reInit(this.options(),[be(this.autoplayOptions||{delay:this.autoplay})])}options(){let e=this.shadowRoot.querySelector(`slot`);return e?{container:e,slides:e.assignedElements(),containScroll:this.containScroll,breakpoints:this.breakpoints,axis:this.axis,align:this.align,dragFree:this.dragFree,duration:this.duration,loop:this.loop,slidesToScroll:this.slidesToScroll,skipSnaps:this.skipSnaps,startIndex:this.startIndex}:{container:this,slides:[]}}goToSlide(e,t){this.embla.scrollTo(e,t)}slideNodes(){this.embla.slideNodes()}slidesInView(){this.embla.slidesInView()}isActive(){return this.embla?.internalEngine().options.active}renderFullscreenButton(){return e`<button
2
2
  type="button"
3
3
  part="button button-fullscreen"
4
4
  class="button button-fullscreen"
@@ -14,7 +14,7 @@ import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from".
14
14
  d="M295 183c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135 0 86.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-144c0-13.3-10.7-24-24-24L344 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l86.1 0-135 135zM217 329c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L48 430.1 48 344c0-13.3-10.7-24-24-24S0 330.7 0 344L0 488c0 13.3 10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-86.1 0 135-135z"
15
15
  />
16
16
  </svg>
17
- </button>`}renderNextPreviousButtons(){return t`<div
17
+ </button>`}renderNextPreviousButtons(){return e`<div
18
18
  class="scroll-buttons scroll-buttons--${this.scrollButtonsPosition}"
19
19
  part="scroll-buttons"
20
20
  >
@@ -51,12 +51,12 @@ import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from".
51
51
  />
52
52
  </svg>
53
53
  </button>
54
- </div>`}renderDots(){if(!this.embla)return n;let e=this.embla.scrollSnapList(),r=e.length;if(r===0)return n;let i=this._selectedSnap,a=this.maxVisibleDots,o=0,s=r;if(a>0&&a<r){let e=Math.floor((a-1)/2);o=Math.max(0,i-e),s=Math.min(r,o+a),s-o<a&&(o=Math.max(0,s-a))}let c=o>0,u=s<r;return t`<div
54
+ </div>`}renderDots(){if(!this.embla)return n;let t=this.embla.scrollSnapList(),r=t.length;if(r===0)return n;let i=this._selectedSnap,a=this.maxVisibleDots,o=0,s=r;if(a>0&&a<r){let e=Math.floor((a-1)/2);o=Math.max(0,i-e),s=Math.min(r,o+a),s-o<a&&(o=Math.max(0,s-a))}let c=o>0,u=s<r;return e`<div
55
55
  class="dots"
56
56
  part="dots"
57
57
  role="tablist"
58
58
  >
59
- ${l(e.slice(o,s),(e,r)=>{let a=o+r,l=r===0,d=r===s-o-1,f=a===i,p=!f&&(l&&c||d&&u);return t`<button
59
+ ${l(t.slice(o,s),(t,r)=>{let a=o+r,l=r===0,d=r===s-o-1,f=a===i,p=!f&&(l&&c||d&&u);return e`<button
60
60
  part="button-dot"
61
61
  type="button"
62
62
  role="tab"
@@ -69,7 +69,7 @@ import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from".
69
69
  >
70
70
  <i></i>
71
71
  </button>`})}
72
- </div>`}render(){return t`
72
+ </div>`}render(){return e`
73
73
  <div class="wrapper ${this.isActive()?``:`inactive`}">
74
74
  <div
75
75
  part="viewport"
@@ -1,2 +1,2 @@
1
- import{c as e,i as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import r from"../../shared/styles/host.styles.js";var i=e(`:host{--aspect-ratio:inherit;width:100%;max-height:100%;aspect-ratio:var(--aspect-ratio);flex-direction:column;justify-content:start;align-items:center;display:flex}`),a=class extends n{static{this.styles=[r,i]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`group`)}render(){return t` <slot></slot> `}};export{a as CarouselItem};
1
+ import{a as e,l as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import r from"../../shared/styles/host.styles.js";var i=t(`:host{--aspect-ratio:inherit;width:100%;max-height:100%;aspect-ratio:var(--aspect-ratio);flex-direction:column;justify-content:start;align-items:center;display:flex}`),a=class extends n{static{this.styles=[r,i]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`group`)}render(){return e` <slot></slot> `}};export{a as CarouselItem};
2
2
  //# sourceMappingURL=carousel-item.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import{i as r,n as i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";import s from"./dialog.styles.js";var c=typeof HTMLDialogElement<`u`&&`closedBy`in HTMLDialogElement.prototype,l=Symbol.for(`luxen-dialog-scroll-lock`);if(typeof document<`u`&&!(l in document)){let e=new CSSStyleSheet;e.replaceSync(`
1
+ import{a as e,n as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import{i as r,n as i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";import s from"./dialog.styles.js";var c=typeof HTMLDialogElement<`u`&&`closedBy`in HTMLDialogElement.prototype,l=Symbol.for(`luxen-dialog-scroll-lock`);if(typeof document<`u`&&!(l in document)){let e=new CSSStyleSheet;e.replaceSync(`
2
2
  html:has([data-modal]) { overflow: hidden; }
3
3
  html:has([data-modal="centered"]) { scrollbar-gutter: stable; }
4
4
  `),document.adoptedStyleSheets.push(e),Object.defineProperty(document,l,{value:e})}var u=class extends n{constructor(...e){super(...e),this.title=``,this.open=!1,this.lightDismiss=!1,this.withoutHeader=!1,this._modalKind=`centered`,this._mouseDownTarget=null,this._commandListener={handleEvent:e=>this._onCommand(e)}}static{this.styles=[o,s]}connectedCallback(){super.connectedCallback(),this.addEventListener(`command`,this._commandListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`command`,this._commandListener)}firstUpdated(){this.dialog.addEventListener(`cancel`,e=>this._onCancel(e)),this.dialog.addEventListener(`close`,()=>this._onNativeClose()),this.dialog.addEventListener(`mousedown`,e=>{this._mouseDownTarget=e.target}),this.dialog.addEventListener(`click`,e=>this._onDialogClick(e))}updated(e){if(e.has(`open`)){if(this.open&&!this.dialog.open)this.emit(`show`),this.setAttribute(`data-modal`,this._modalKind),this.dialog.showModal(),this._focusAutofocusTarget(),this._emitAfter(`after-show`);else if(!this.open&&this.dialog.open){if(!this.emit(`hide`,{cancelable:!0})){this.open=!0;return}this.dialog.close()}}}_onCommand(e){switch(e.command){case`--hide`:this.open=!1;break;case`--show`:this.open=!0;break}}_onCancel(e){this.emit(`hide`,{cancelable:!0})||e.preventDefault()}_onNativeClose(){this.open=!1,this.removeAttribute(`data-modal`),this._emitAfter(`after-hide`)}_onDialogClick(e){let t=e.target===this.dialog&&this._mouseDownTarget===this.dialog;if(this._mouseDownTarget=null,t){if(this.lightDismiss){c||(this.open=!1);return}this._nudgeDismiss()}}_nudgeDismiss(){matchMedia(`(prefers-reduced-motion: reduce)`).matches||(this._nudgeAnimation?.cancel(),this._nudgeAnimation=this.dialog.animate([{transform:`scale(1)`},{transform:`scale(1.02)`},{transform:`scale(1)`}],{duration:250,easing:`ease-in-out`}))}async _emitAfter(e){await new Promise(e=>requestAnimationFrame(()=>e(null)));let t=this.dialog.getAnimations({subtree:!1});await Promise.all(t.map(e=>e.finished.catch(()=>{}))),e===`after-show`===this.open&&this.emit(e)}_focusAutofocusTarget(){this.querySelector(`[autofocus]`)?.focus({preventScroll:!0})}render(){return e`
@@ -1,2 +1,2 @@
1
- import{c as e}from"../../chunks/lit.js";var t=e(`:host{--width:31rem;--border-radius:6px;--padding:1.5rem;--header-padding:var(--padding);--footer-padding:var(--padding);--show-duration:.2s;--hide-duration:.2s;--backdrop:var(--l-backdrop);--backdrop-blur:0;display:contents}dialog{box-sizing:border-box;width:var(--width);max-inline-size:min(90vw, var(--width));border-radius:var(--border-radius);background-color:var(--l-color-surface-overlay);max-block-size:min(80dvb,100%);color:var(--l-color-text-primary);opacity:0;transition-property:opacity,display,overlay;transition-duration:var(--hide-duration);transition-behavior:allow-discrete;border:0;margin:auto;padding:0;position:fixed;inset:0}dialog::backdrop{background:var(--backdrop);-webkit-backdrop-filter:blur(var(--backdrop-blur));backdrop-filter:blur(var(--backdrop-blur))}dialog[open]{opacity:1;transition-duration:var(--show-duration);grid-template-rows:auto minmax(0,1fr) auto;display:grid}@starting-style{dialog[open]{opacity:0}}[part=header]{padding:var(--header-padding);justify-content:space-between;align-items:center;gap:1rem;display:flex}[part=title]{margin:0;font-size:1.125rem;font-weight:600;line-height:1.4}[part=body]{padding-inline:var(--padding);grid-row:2;overflow-y:auto}[part=footer]{padding:var(--footer-padding);grid-row:3;place-content:end;gap:.5rem;display:flex}:host([without-header]) [part=body]{padding-block-start:var(--padding)}::slotted(menu[slot=footer]){display:contents}@media (prefers-reduced-motion:reduce){:host{--show-duration:0s;--hide-duration:0s}}`);export{t as default};
1
+ import{l as e}from"../../chunks/lit.js";var t=e(`:host{--width:31rem;--border-radius:6px;--padding:1.5rem;--header-padding:var(--padding);--footer-padding:var(--padding);--show-duration:.2s;--hide-duration:.2s;--backdrop:var(--l-backdrop);--backdrop-blur:0;display:contents}dialog{box-sizing:border-box;width:var(--width);max-inline-size:min(90vw, var(--width));border-radius:var(--border-radius);background-color:var(--l-color-surface-overlay);max-block-size:min(80dvb,100%);color:var(--l-color-text-primary);opacity:0;transition-property:opacity,display,overlay;transition-duration:var(--hide-duration);transition-behavior:allow-discrete;border:0;margin:auto;padding:0;position:fixed;inset:0}dialog::backdrop{background:var(--backdrop);-webkit-backdrop-filter:blur(var(--backdrop-blur));backdrop-filter:blur(var(--backdrop-blur))}dialog[open]{opacity:1;transition-duration:var(--show-duration);grid-template-rows:auto minmax(0,1fr) auto;display:grid}@starting-style{dialog[open]{opacity:0}}[part=header]{padding:var(--header-padding);justify-content:space-between;align-items:center;gap:1rem;display:flex}[part=title]{margin:0;font-size:1.125rem;font-weight:600;line-height:1.4}[part=body]{padding-inline:var(--padding);grid-row:2;overflow-y:auto}[part=footer]{padding:var(--footer-padding);grid-row:3;place-content:end;gap:.5rem;display:flex}:host([without-header]) [part=body]{padding-block-start:var(--padding)}::slotted(menu[slot=footer]){display:contents}@media (prefers-reduced-motion:reduce){:host{--show-duration:0s;--hide-duration:0s}}`);export{t as default};
2
2
  //# sourceMappingURL=dialog.styles.js.map
@@ -1,2 +1,2 @@
1
- import{c as e}from"../../chunks/lit.js";import{i as t,t as n}from"../../chunks/decorate.js";import r from"../../shared/styles/host.styles.js";import i from"../dialog/dialog.styles.js";import{Dialog as a}from"../dialog/dialog.js";var o=e(`:host{--size:320px;--border-radius:.375rem}dialog{width:min(var(--size), 100dvw);max-inline-size:100dvw;height:100dvh;border-radius:0 var(--border-radius) var(--border-radius) 0;opacity:1;max-block-size:100dvh;margin:0;transition-property:translate,display,overlay;inset:0;translate:-100%}dialog[open]{translate:0}@starting-style{dialog[open]{translate:-100%}}:host([placement=end]) dialog{border-radius:var(--border-radius) 0 0 var(--border-radius);margin-inline-start:auto;translate:100%}:host([placement=end]) dialog[open]{translate:0}@starting-style{:host([placement=end]) dialog[open]{translate:100%}}:host([placement=bottom]) dialog{width:100dvw;max-inline-size:100dvw;height:min(var(--size), 100dvh);border-radius:var(--border-radius) var(--border-radius) 0 0;max-block-size:100dvh;margin-block-start:auto;translate:0 100%}:host([placement=bottom]) dialog[open]{translate:0}@starting-style{:host([placement=bottom]) dialog[open]{translate:0 100%}}`),s=class extends a{constructor(...e){super(...e),this._modalKind=`edge`}static{this.styles=[r,i,o]}};n([t({reflect:!0})],s.prototype,`placement`,void 0);export{s as Drawer};
1
+ import{l as e}from"../../chunks/lit.js";import{i as t,t as n}from"../../chunks/decorate.js";import r from"../../shared/styles/host.styles.js";import i from"../dialog/dialog.styles.js";import{Dialog as a}from"../dialog/dialog.js";var o=e(`:host{--size:320px;--border-radius:.375rem}dialog{width:min(var(--size), 100dvw);max-inline-size:100dvw;height:100dvh;border-radius:0 var(--border-radius) var(--border-radius) 0;opacity:1;max-block-size:100dvh;margin:0;transition-property:translate,display,overlay;inset:0;translate:-100%}dialog[open]{translate:0}@starting-style{dialog[open]{translate:-100%}}:host([placement=end]) dialog{border-radius:var(--border-radius) 0 0 var(--border-radius);margin-inline-start:auto;translate:100%}:host([placement=end]) dialog[open]{translate:0}@starting-style{:host([placement=end]) dialog[open]{translate:100%}}:host([placement=bottom]) dialog{width:100dvw;max-inline-size:100dvw;height:min(var(--size), 100dvh);border-radius:var(--border-radius) var(--border-radius) 0 0;max-block-size:100dvh;margin-block-start:auto;translate:0 100%}:host([placement=bottom]) dialog[open]{translate:0}@starting-style{:host([placement=bottom]) dialog[open]{translate:0 100%}}`),s=class extends a{constructor(...e){super(...e),this._modalKind=`edge`}static{this.styles=[r,i,o]}};n([t({reflect:!0})],s.prototype,`placement`,void 0);export{s as Drawer};
2
2
  //# sourceMappingURL=drawer.js.map
@@ -1,4 +1,4 @@
1
- import{tagName as e}from"../../registry.js";import{c as t,i as n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";import{PopoverController as s}from"../../shared/controllers/popover.js";var c=t(`:host{--padding:.25rem;--background:var(--l-color-bg-surface,Canvas);--border-radius:6px;--shadow:0 4px 6px -1px #00000014, 0 2px 4px -2px #0000000f;--show-duration:150;--hide-duration:150;display:inline-block;position:relative}.trigger{display:contents}[popover]{inset:unset;box-sizing:border-box;width:max-content;min-width:anchor-size(width);padding:var(--padding);border:1px solid var(--l-color-border-overlay,var(--lightningcss-light,#e5e7eb)var(--lightningcss-dark,#374151));border-radius:var(--border-radius);background:var(--background);color:var(--l-color-text-primary,CanvasText);box-shadow:var(--shadow);margin:0;font-size:.875rem;line-height:1.5;overflow:visible}::slotted(hr){height:1px;margin-block:var(--padding);margin-inline:calc(var(--padding) * -1);background:var(--l-color-divider);border:0}`),l=class extends r{constructor(...t){super(...t),this._floating=new s(this,{getTriggerElement:()=>this._triggerEl,getFloatingElement:()=>this._panelEl,getArrowElement:()=>null}),this._typeaheadBuffer=``,this._typeaheadTimeout=0,this.#e=!1,this.#t=`bottom-start`,this.#n=4,this.#r=!1,this._onTriggerClick=e=>{this.disabled||(this.toggle(),this.open&&e.detail===0&&requestAnimationFrame(()=>this._focusFirstItem()))},this._onTriggerKeyDown=e=>{this.disabled||(e.key===`ArrowDown`?(e.preventDefault(),this.show(),requestAnimationFrame(()=>this._focusFirstItem())):e.key===`ArrowUp`&&(e.preventDefault(),this.show(),requestAnimationFrame(()=>this._focusLastItem())))},this._onPanelKeyDown=e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),this._focusNextItem();break;case`ArrowUp`:e.preventDefault(),this._focusPreviousItem();break;case`Home`:e.preventDefault(),this._focusFirstItem();break;case`End`:e.preventDefault(),this._focusLastItem();break;case`Escape`:e.preventDefault(),this.hide(),this._triggerEl?.focus();break;case`Enter`:case` `:e.preventDefault(),this._selectCurrentItem();break;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&this._handleTypeahead(e.key)}},this._onItemClick=t=>{let n=t.target.closest(e(`dropdown-item`));n&&!n.disabled&&this._selectItem(n)},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1,this._triggerEl?.setAttribute(`aria-expanded`,`false`))}}static{this.styles=[o,c]}#e;get open(){return this.#e}set open(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get disabled(){return this.#r}set disabled(e){this.#r=e}get _triggerEl(){return this.shadowRoot.querySelector(`.trigger slot`)?.assignedElements()[0]??null}get _panelEl(){return this.shadowRoot.querySelector(`[popover]`)}_getItems(){let t=this.shadowRoot.querySelector(`slot:not([name])`);return t?t.assignedElements().filter(t=>t.tagName===e(`dropdown-item`).toUpperCase()&&!t.disabled):[]}_getAllItems(){let t=this.shadowRoot.querySelector(`slot:not([name])`);return t?t.assignedElements().filter(t=>t.tagName===e(`dropdown-item`).toUpperCase()):[]}_getDuration(e){let t=parseFloat(getComputedStyle(this).getPropertyValue(e));return Number.isNaN(t)?150:t}show(){this.open||this.disabled||this.emit(`show`,{cancelable:!0})&&(this.open=!0)}hide(){this.open&&this.emit(`hide`,{cancelable:!0})&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}updated(e){e.has(`open`)&&this._handleOpenChange()}async _handleOpenChange(){let e=this._panelEl;if(!e)return;let t={placement:this.placement,distance:this.distance};if(this.open){if(e.showPopover(),await this._floating.updatePosition(t),!this.open)return;await this._floating.animateShow(e,this._getDuration(`--show-duration`)),this._floating.startPositioning(t),this._triggerEl?.setAttribute(`aria-expanded`,`true`),this.emit(`after-show`)}else this._floating.stopPositioning(),this._triggerEl?.setAttribute(`aria-expanded`,`false`),await this._floating.animateHide(e,this._getDuration(`--hide-duration`)),e.matches(`:popover-open`)&&e.hidePopover(),this.emit(`after-hide`)}_setActiveItem(e){let t=e.shadowRoot.querySelector(`.item`);if(t){for(let e of this._getAllItems())e.shadowRoot.querySelector(`.item`)?.setAttribute(`tabindex`,`-1`);t.setAttribute(`tabindex`,`0`),t.focus()}}_focusFirstItem(){let e=this._getItems();e.length&&this._setActiveItem(e[0])}_focusLastItem(){let e=this._getItems();e.length&&this._setActiveItem(e[e.length-1])}_getCurrentItem(){return this._getItems().find(e=>{let t=e.shadowRoot.querySelector(`.item`);return t?.getAttribute(`tabindex`)===`0`&&e.shadowRoot.activeElement===t})??null}_focusNextItem(){let e=this._getItems(),t=this._getCurrentItem(),n=e[((t?e.indexOf(t):-1)+1)%e.length];n&&this._setActiveItem(n)}_focusPreviousItem(){let e=this._getItems(),t=this._getCurrentItem(),n=e[((t?e.indexOf(t):0)-1+e.length)%e.length];n&&this._setActiveItem(n)}_handleTypeahead(e){clearTimeout(this._typeaheadTimeout),this._typeaheadBuffer+=e.toLowerCase(),this._typeaheadTimeout=window.setTimeout(()=>{this._typeaheadBuffer=``},500);let t=this._getItems().find(e=>e.getTextLabel().toLowerCase().startsWith(this._typeaheadBuffer));t&&this._setActiveItem(t)}_selectCurrentItem(){let e=this._getCurrentItem();e&&this._selectItem(e)}_selectItem(e){e.type===`checkbox`&&(e.checked=!e.checked),this.emit(`select`,{detail:{item:e}}),e.type!==`checkbox`&&(this.hide(),this._triggerEl?.focus())}render(){return n`
1
+ import{tagName as e}from"../../registry.js";import{a as t,l as n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";import{PopoverController as s}from"../../shared/controllers/popover.js";var c=n(`:host{--padding:.25rem;--background:var(--l-color-bg-surface,Canvas);--border-radius:6px;--shadow:0 4px 6px -1px #00000014, 0 2px 4px -2px #0000000f;--show-duration:150;--hide-duration:150;display:inline-block;position:relative}.trigger{display:contents}[popover]{inset:unset;box-sizing:border-box;width:max-content;min-width:anchor-size(width);padding:var(--padding);border:1px solid var(--l-color-border-overlay,var(--lightningcss-light,#e5e7eb)var(--lightningcss-dark,#374151));border-radius:var(--border-radius);background:var(--background);color:var(--l-color-text-primary,CanvasText);box-shadow:var(--shadow);margin:0;font-size:.875rem;line-height:1.5;overflow:visible}::slotted(hr){height:1px;margin-block:var(--padding);margin-inline:calc(var(--padding) * -1);background:var(--l-color-divider);border:0}`),l=class extends r{constructor(...t){super(...t),this._floating=new s(this,{getTriggerElement:()=>this._triggerEl,getFloatingElement:()=>this._panelEl,getArrowElement:()=>null}),this._typeaheadBuffer=``,this._typeaheadTimeout=0,this.#e=!1,this.#t=`bottom-start`,this.#n=4,this.#r=!1,this._onTriggerClick=e=>{this.disabled||(this.toggle(),this.open&&e.detail===0&&requestAnimationFrame(()=>this._focusFirstItem()))},this._onTriggerKeyDown=e=>{this.disabled||(e.key===`ArrowDown`?(e.preventDefault(),this.show(),requestAnimationFrame(()=>this._focusFirstItem())):e.key===`ArrowUp`&&(e.preventDefault(),this.show(),requestAnimationFrame(()=>this._focusLastItem())))},this._onPanelKeyDown=e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),this._focusNextItem();break;case`ArrowUp`:e.preventDefault(),this._focusPreviousItem();break;case`Home`:e.preventDefault(),this._focusFirstItem();break;case`End`:e.preventDefault(),this._focusLastItem();break;case`Escape`:e.preventDefault(),this.hide(),this._triggerEl?.focus();break;case`Enter`:case` `:e.preventDefault(),this._selectCurrentItem();break;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&this._handleTypeahead(e.key)}},this._onItemClick=t=>{let n=t.target.closest(e(`dropdown-item`));n&&!n.disabled&&this._selectItem(n)},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1,this._triggerEl?.setAttribute(`aria-expanded`,`false`))}}static{this.styles=[o,c]}#e;get open(){return this.#e}set open(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get disabled(){return this.#r}set disabled(e){this.#r=e}get _triggerEl(){return this.shadowRoot.querySelector(`.trigger slot`)?.assignedElements()[0]??null}get _panelEl(){return this.shadowRoot.querySelector(`[popover]`)}_getItems(){let t=this.shadowRoot.querySelector(`slot:not([name])`);return t?t.assignedElements().filter(t=>t.tagName===e(`dropdown-item`).toUpperCase()&&!t.disabled):[]}_getAllItems(){let t=this.shadowRoot.querySelector(`slot:not([name])`);return t?t.assignedElements().filter(t=>t.tagName===e(`dropdown-item`).toUpperCase()):[]}_getDuration(e){let t=parseFloat(getComputedStyle(this).getPropertyValue(e));return Number.isNaN(t)?150:t}show(){this.open||this.disabled||this.emit(`show`,{cancelable:!0})&&(this.open=!0)}hide(){this.open&&this.emit(`hide`,{cancelable:!0})&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}updated(e){e.has(`open`)&&this._handleOpenChange()}async _handleOpenChange(){let e=this._panelEl;if(!e)return;let t={placement:this.placement,distance:this.distance};if(this.open){if(e.showPopover(),await this._floating.updatePosition(t),!this.open)return;await this._floating.animateShow(e,this._getDuration(`--show-duration`)),this._floating.startPositioning(t),this._triggerEl?.setAttribute(`aria-expanded`,`true`),this.emit(`after-show`)}else this._floating.stopPositioning(),this._triggerEl?.setAttribute(`aria-expanded`,`false`),await this._floating.animateHide(e,this._getDuration(`--hide-duration`)),e.matches(`:popover-open`)&&e.hidePopover(),this.emit(`after-hide`)}_setActiveItem(e){let t=e.shadowRoot.querySelector(`.item`);if(t){for(let e of this._getAllItems())e.shadowRoot.querySelector(`.item`)?.setAttribute(`tabindex`,`-1`);t.setAttribute(`tabindex`,`0`),t.focus()}}_focusFirstItem(){let e=this._getItems();e.length&&this._setActiveItem(e[0])}_focusLastItem(){let e=this._getItems();e.length&&this._setActiveItem(e[e.length-1])}_getCurrentItem(){return this._getItems().find(e=>{let t=e.shadowRoot.querySelector(`.item`);return t?.getAttribute(`tabindex`)===`0`&&e.shadowRoot.activeElement===t})??null}_focusNextItem(){let e=this._getItems(),t=this._getCurrentItem(),n=e[((t?e.indexOf(t):-1)+1)%e.length];n&&this._setActiveItem(n)}_focusPreviousItem(){let e=this._getItems(),t=this._getCurrentItem(),n=e[((t?e.indexOf(t):0)-1+e.length)%e.length];n&&this._setActiveItem(n)}_handleTypeahead(e){clearTimeout(this._typeaheadTimeout),this._typeaheadBuffer+=e.toLowerCase(),this._typeaheadTimeout=window.setTimeout(()=>{this._typeaheadBuffer=``},500);let t=this._getItems().find(e=>e.getTextLabel().toLowerCase().startsWith(this._typeaheadBuffer));t&&this._setActiveItem(t)}_selectCurrentItem(){let e=this._getCurrentItem();e&&this._selectItem(e)}_selectItem(e){e.type===`checkbox`&&(e.checked=!e.checked),this.emit(`select`,{detail:{item:e}}),e.type!==`checkbox`&&(this.hide(),this._triggerEl?.focus())}render(){return t`
2
2
  <div
3
3
  class="trigger"
4
4
  @click=${this._onTriggerClick}
@@ -1,12 +1,12 @@
1
- import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";var s=e(`:host{display:block}:host([disabled]){pointer-events:none;opacity:.5}.item{cursor:pointer;color:var(--l-color-text-primary,CanvasText);white-space:nowrap;border-radius:4px;outline:none;align-items:center;gap:8px;padding:.375rem .5rem;font-size:.875rem;line-height:1.5;display:flex}.item:focus-visible{background:var(--l-color-bg-state-hover)}@media (hover:hover){.item:hover{background:var(--l-color-bg-state-hover)}}.check{flex-shrink:0;width:16px;display:flex}:host(:not([checked])) .check svg{visibility:hidden}::slotted([slot=prefix]),::slotted([slot=suffix]){flex-shrink:0;display:flex}.label{flex:1}`),c=class extends r{static{this.styles=[o,s]}#e=``;get value(){return this.#e}set value(e){this.#e=e}#t=!1;get disabled(){return this.#t}set disabled(e){this.#t=e}#n=`normal`;get type(){return this.#n}set type(e){this.#n=e}#r=!1;get checked(){return this.#r}set checked(e){this.#r=e}getTextLabel(){return(this.textContent??``).trim()}render(){let e=this.type===`checkbox`;return t`
1
+ import{a as e,l as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from"../../shared/luxen-element.js";import{i,t as a}from"../../chunks/decorate.js";import o from"../../shared/styles/host.styles.js";var s=t(`:host{display:block}:host([disabled]){pointer-events:none;opacity:.5}.item{cursor:pointer;color:var(--l-color-text-primary,CanvasText);white-space:nowrap;border-radius:4px;outline:none;align-items:center;gap:8px;padding:.375rem .5rem;font-size:.875rem;line-height:1.5;display:flex}.item:focus-visible{background:var(--l-color-bg-state-hover)}@media (hover:hover){.item:hover{background:var(--l-color-bg-state-hover)}}.check{flex-shrink:0;width:16px;display:flex}:host(:not([checked])) .check svg{visibility:hidden}::slotted([slot=prefix]),::slotted([slot=suffix]){flex-shrink:0;display:flex}.label{flex:1}`),c=class extends r{static{this.styles=[o,s]}#e=``;get value(){return this.#e}set value(e){this.#e=e}#t=!1;get disabled(){return this.#t}set disabled(e){this.#t=e}#n=`normal`;get type(){return this.#n}set type(e){this.#n=e}#r=!1;get checked(){return this.#r}set checked(e){this.#r=e}getTextLabel(){return(this.textContent??``).trim()}render(){let t=this.type===`checkbox`;return e`
2
2
  <div
3
3
  class="item"
4
- role=${e?`menuitemcheckbox`:`menuitem`}
5
- aria-checked=${e?String(this.checked):n}
4
+ role=${t?`menuitemcheckbox`:`menuitem`}
5
+ aria-checked=${t?String(this.checked):n}
6
6
  aria-disabled=${this.disabled?`true`:n}
7
7
  tabindex="-1"
8
8
  >
9
- ${e?t`
9
+ ${t?e`
10
10
  <span
11
11
  class="check"
12
12
  aria-hidden="true"
@@ -26,7 +26,7 @@ import{c as e,i as t,n}from"../../chunks/lit.js";import{LuxenElement as r}from".
26
26
  />
27
27
  </svg>
28
28
  </span>
29
- `:t` <slot name="prefix"></slot> `}
29
+ `:e` <slot name="prefix"></slot> `}
30
30
  <span class="label"><slot></slot></span>
31
31
  <slot name="suffix"></slot>
32
32
  </div>
@@ -1,4 +1,4 @@
1
- import{c as e,i as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import{i as r,t as i}from"../../chunks/decorate.js";import a from"../../shared/styles/host.styles.js";var o=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...o,...s}),l=Object.freeze({...c,body:``,hidden:!1}),u=Object.freeze({width:null,height:null}),d=Object.freeze({...u,...s});function f(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var p=/[\s,]+/;function m(e,t){t.split(p).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}var h={...d,preserveAspectRatio:``};function g(e){let t={...h},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=f(n(`rotate`,``)),m(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function _(e,t){for(let n in h)if(e[n]!==t[n])return!0;return!1}var v=/^[a-z0-9]+(-[a-z0-9]+)*$/,y=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!b(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!b(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!b(e,n)?null:e}return null},b=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function x(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function ee(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function te(e,t){let n=ee(e,t);for(let r in l)r in s?r in e&&!(r in n)&&(n[r]=s[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ne(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=te(r[e]||i[e],a)}return o(t),n.forEach(o),te(e,a)}function S(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=x(e);for(let i in r){let a=r[i];a&&(t(i,ne(e,i,a)),n.push(i))}return n}var re={provider:``,aliases:{},not_found:{},...o};function C(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ie(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!C(e,re))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!C(t,l))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!C(t,l))return null}return t}var w=Object.create(null);function ae(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function T(e,t){let n=w[e]||(w[e]=Object.create(null));return n[t]||(n[t]=ae(e,t))}function oe(e,t){return ie(t)?S(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function se(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function ce(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(w)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(w[e]||{})).forEach(t=>{let r=T(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var E=!1;function D(e){return typeof e==`boolean`&&(E=e),E}function O(e){let t=typeof e==`string`?y(e,!0,E):e;if(t){let e=T(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function le(e,t){let n=y(e,!0,E);if(!n)return!1;let r=T(n.provider,n.prefix);return t?se(r,n.name,t):(r.missing.add(n.name),!0)}function k(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),E&&!t&&!e.prefix){let t=!1;return ie(e)&&(e.prefix=``,S(e,(e,n)=>{le(e,n)&&(t=!0)})),t}let n=e.prefix;return b({prefix:n,name:`a`})?!!oe(T(t,n),e):!1}function ue(e){return!!O(e)}function de(e){let t=O(e);return t&&{...c,...t}}function A(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function fe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||A([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var pe=0;function me(e,t,n){let r=pe++,i=A.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function he(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=T(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}var j=Object.create(null);function ge(e,t){j[e]=t}function M(e){return j[e]||j[``]}function _e(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?y(e,t,n):e;i&&r.push(i)}),r}function N(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var P=Object.create(null),F=[`https://api.simplesvg.com`,`https://api.unisvg.com`],I=[];F.length>0;)F.length===1||Math.random()>.5?I.push(F.shift()):I.push(F.pop());P[``]=N({resources:[`https://api.iconify.design`].concat(I)});function ve(e,t){let n=N(t);return n===null?!1:(P[e]=n,!0)}function L(e){return P[e]}function ye(){return Object.keys(P)}var be={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function xe(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Se(e){let t={...be,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=xe(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Ce(){}var R=Object.create(null);function we(e){if(!R[e]){let t=L(e);if(!t)return;R[e]={config:t,redundancy:Se(t)}}return R[e]}function z(e,t,n){let r,i;if(typeof e==`string`){let t=M(e);if(!t)return n(void 0,424),Ce;i=t.send;let a=we(e);a&&(r=a.redundancy)}else{let t=N(e);if(t){r=Se(t);let n=M(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Ce):r.query(t,i,n)().abort}function B(){}function Te(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,fe(e)}))}function Ee(e){let t=[],n=[];return e.forEach(e=>{(e.match(v)?t:n).push(e)}),{valid:t,invalid:n}}function V(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!oe(e,n).length){r();return}}catch(e){console.error(e)}r(),Te(e)}function H(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function De(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){H(e.loadIcons(r,n,t),t=>{V(e,r,t)});return}if(i){r.forEach(r=>{H(i(r,n,t),t=>{V(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Ee(r);if(o.length&&V(e,o,null),!a.length)return;let s=n.match(v)?M(t):null;if(!s){V(e,a,null);return}s.prepare(t,n,a).forEach(n=>{z(t,n,t=>{V(e,n.icons,t)})})}))}var U=(e,t)=>{let n=he(_e(e,!0,D()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,B)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(T(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=T(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&De(e,t)}),t?me(t,n,i):B},Oe=e=>new Promise((t,n)=>{let r=typeof e==`string`?y(e,!0):e;if(!r){n(e);return}U([r||e],i=>{if(i.length&&r){let e=O(r);if(e){t({...c,...e});return}}n(e)})});function W(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function ke(e,t){if(typeof e==`object`)return{data:W(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=W(e);if(t)return{data:t,value:e}}let n=y(e,!0,!0);if(!n)return{value:e};let r=O(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:U([n],()=>t(e,n,O(n)))}}var G=!1;try{G=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ae(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(G||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Me=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function K(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(je);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Me.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Ne(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Pe(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Fe(e,t,n){let r=Ne(e);return Pe(r.defs,t+r.content+n)}var Ie=e=>e===`unset`||e===`undefined`||e===`none`;function Le(e,t){let n={...c,...e},r={...d,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Fe(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,l=i.width,u=i.height,f,p;o===null?(p=s===null?`1em`:s===`auto`?u:s,f=K(p,l/u)):(f=o===`auto`?l:o,p=s===null?K(f,u/l):s===`auto`?u:s);let m={},h=(e,t)=>{Ie(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,l,u];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}function q(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Re(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function ze(e){return`data:image/svg+xml,`+Re(e)}function Be(e){return`url("`+ze(e)+`")`}var J=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Ve(e){J=e}function He(){return J}function Ue(e,t){let n=L(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function We(e){return e===404}var Ge=(e,t,n)=>{let r=[],i=Ue(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Ke(e){if(typeof e==`string`){let t=L(e);if(t)return t.path}return`/`}var qe={prepare:Ge,send:(e,t,n)=>{if(!J){n(`abort`,424);return}let r=Ke(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;J(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(We(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Je(e,t,n){T(n||``,t).loadIcons=e}function Ye(e,t,n){T(n||``,t).loadIcon=e}var Y=`data-style`,Xe=``;function Ze(e){Xe=e}function Qe(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Y));n||(n=document.createElement(`style`),n.setAttribute(Y,Y),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Xe}function $e(){ge(``,qe),D(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!k(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;ve(e,r)||console.error(n)}catch{console.error(n)}}}}return{iconLoaded:ue,getIcon:de,listIcons:ce,addIcon:le,addCollection:k,calculateSize:K,buildIcon:Le,iconToHTML:q,svgToURL:Be,loadIcons:U,loadIcon:Oe,addAPIProvider:ve,setCustomIconLoader:Ye,setCustomIconsLoader:Je,appendCustomStyle:Ze,_api:{getAPIConfig:L,setAPIModule:ge,sendAPIQuery:z,setFetch:Ve,getFetch:He,listAPIProviders:ye}}}var X={"background-color":`currentColor`},et={"background-color":`transparent`},tt={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},nt={"-webkit-mask":X,mask:X,background:et};for(let e in nt){let t=nt[e];for(let n in tt)t[e+`-`+n]=tt[n]}function rt(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function it(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=Be(q(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:rt(a.width),height:rt(a.height),...n?X:et};for(let e in c)s.setProperty(e,c[e]);return r}var Z;function at(){try{Z=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{Z=null}}function ot(e){return Z===void 0&&at(),Z?Z.createHTML(e):e}function st(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=ot(q(e.body,n)),t.firstChild}function Q(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function ct(e,t){let n=t.icon.data,r=t.customisations,i=Le(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=st(i);break;default:o=it(i,{...c,...n},a===`mask`)}let s=Q(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function lt(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function ut(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Qe(e,t),this._state=lt({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Qe(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}ct(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=g(this);(e.attrMode!==n||_(e.customisations,r)||!Q(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=ke(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=lt(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=Q(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,g(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ae(e.data.body,n),i=this._state.inline;ct(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=$e();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{iconLoaded:dt,getIcon:ft,listIcons:pt,addIcon:mt,addCollection:ht,calculateSize:gt,buildIcon:_t,iconToHTML:vt,svgToURL:yt,loadIcons:bt,loadIcon:xt,setCustomIconLoader:St,setCustomIconsLoader:Ct,addAPIProvider:wt,_api:Tt}=ut()||$e(),Et=e(`:host{--color:currentColor;color:var(--color);display:contents}iconify-icon{color:inherit}`),$=class extends n{constructor(...e){super(...e),this.name=``}static{this.styles=[a,Et]}updated(e){e.has(`label`)&&(this.label?(this.setAttribute(`role`,`img`),this.setAttribute(`aria-label`,this.label)):(this.removeAttribute(`role`),this.removeAttribute(`aria-label`)))}render(){return t`
1
+ import{a as e,l as t}from"../../chunks/lit.js";import{LuxenElement as n}from"../../shared/luxen-element.js";import{i as r,t as i}from"../../chunks/decorate.js";import a from"../../shared/styles/host.styles.js";var o=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...o,...s}),l=Object.freeze({...c,body:``,hidden:!1}),u=Object.freeze({width:null,height:null}),d=Object.freeze({...u,...s});function f(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var p=/[\s,]+/;function m(e,t){t.split(p).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}var h={...d,preserveAspectRatio:``};function g(e){let t={...h},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=f(n(`rotate`,``)),m(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function _(e,t){for(let n in h)if(e[n]!==t[n])return!0;return!1}var v=/^[a-z0-9]+(-[a-z0-9]+)*$/,y=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!b(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!b(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!b(e,n)?null:e}return null},b=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function x(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function ee(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function te(e,t){let n=ee(e,t);for(let r in l)r in s?r in e&&!(r in n)&&(n[r]=s[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ne(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=te(r[e]||i[e],a)}return o(t),n.forEach(o),te(e,a)}function S(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=x(e);for(let i in r){let a=r[i];a&&(t(i,ne(e,i,a)),n.push(i))}return n}var re={provider:``,aliases:{},not_found:{},...o};function C(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ie(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!C(e,re))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!C(t,l))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!C(t,l))return null}return t}var w=Object.create(null);function ae(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function T(e,t){let n=w[e]||(w[e]=Object.create(null));return n[t]||(n[t]=ae(e,t))}function oe(e,t){return ie(t)?S(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function se(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function ce(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(w)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(w[e]||{})).forEach(t=>{let r=T(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var E=!1;function D(e){return typeof e==`boolean`&&(E=e),E}function O(e){let t=typeof e==`string`?y(e,!0,E):e;if(t){let e=T(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function le(e,t){let n=y(e,!0,E);if(!n)return!1;let r=T(n.provider,n.prefix);return t?se(r,n.name,t):(r.missing.add(n.name),!0)}function k(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),E&&!t&&!e.prefix){let t=!1;return ie(e)&&(e.prefix=``,S(e,(e,n)=>{le(e,n)&&(t=!0)})),t}let n=e.prefix;return b({prefix:n,name:`a`})?!!oe(T(t,n),e):!1}function ue(e){return!!O(e)}function de(e){let t=O(e);return t&&{...c,...t}}function A(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function fe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||A([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var pe=0;function me(e,t,n){let r=pe++,i=A.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function he(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=T(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}var j=Object.create(null);function ge(e,t){j[e]=t}function M(e){return j[e]||j[``]}function _e(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?y(e,t,n):e;i&&r.push(i)}),r}function N(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var P=Object.create(null),F=[`https://api.simplesvg.com`,`https://api.unisvg.com`],I=[];F.length>0;)F.length===1||Math.random()>.5?I.push(F.shift()):I.push(F.pop());P[``]=N({resources:[`https://api.iconify.design`].concat(I)});function ve(e,t){let n=N(t);return n===null?!1:(P[e]=n,!0)}function L(e){return P[e]}function ye(){return Object.keys(P)}var be={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function xe(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Se(e){let t={...be,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=xe(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Ce(){}var R=Object.create(null);function we(e){if(!R[e]){let t=L(e);if(!t)return;R[e]={config:t,redundancy:Se(t)}}return R[e]}function z(e,t,n){let r,i;if(typeof e==`string`){let t=M(e);if(!t)return n(void 0,424),Ce;i=t.send;let a=we(e);a&&(r=a.redundancy)}else{let t=N(e);if(t){r=Se(t);let n=M(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Ce):r.query(t,i,n)().abort}function B(){}function Te(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,fe(e)}))}function Ee(e){let t=[],n=[];return e.forEach(e=>{(e.match(v)?t:n).push(e)}),{valid:t,invalid:n}}function V(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!oe(e,n).length){r();return}}catch(e){console.error(e)}r(),Te(e)}function H(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function De(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){H(e.loadIcons(r,n,t),t=>{V(e,r,t)});return}if(i){r.forEach(r=>{H(i(r,n,t),t=>{V(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Ee(r);if(o.length&&V(e,o,null),!a.length)return;let s=n.match(v)?M(t):null;if(!s){V(e,a,null);return}s.prepare(t,n,a).forEach(n=>{z(t,n,t=>{V(e,n.icons,t)})})}))}var U=(e,t)=>{let n=he(_e(e,!0,D()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,B)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(T(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=T(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&De(e,t)}),t?me(t,n,i):B},Oe=e=>new Promise((t,n)=>{let r=typeof e==`string`?y(e,!0):e;if(!r){n(e);return}U([r||e],i=>{if(i.length&&r){let e=O(r);if(e){t({...c,...e});return}}n(e)})});function W(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function ke(e,t){if(typeof e==`object`)return{data:W(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=W(e);if(t)return{data:t,value:e}}let n=y(e,!0,!0);if(!n)return{value:e};let r=O(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:U([n],()=>t(e,n,O(n)))}}var G=!1;try{G=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ae(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(G||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Me=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function K(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(je);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Me.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Ne(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Pe(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Fe(e,t,n){let r=Ne(e);return Pe(r.defs,t+r.content+n)}var Ie=e=>e===`unset`||e===`undefined`||e===`none`;function Le(e,t){let n={...c,...e},r={...d,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Fe(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,l=i.width,u=i.height,f,p;o===null?(p=s===null?`1em`:s===`auto`?u:s,f=K(p,l/u)):(f=o===`auto`?l:o,p=s===null?K(f,u/l):s===`auto`?u:s);let m={},h=(e,t)=>{Ie(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,l,u];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}function q(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Re(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function ze(e){return`data:image/svg+xml,`+Re(e)}function Be(e){return`url("`+ze(e)+`")`}var J=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Ve(e){J=e}function He(){return J}function Ue(e,t){let n=L(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function We(e){return e===404}var Ge=(e,t,n)=>{let r=[],i=Ue(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Ke(e){if(typeof e==`string`){let t=L(e);if(t)return t.path}return`/`}var qe={prepare:Ge,send:(e,t,n)=>{if(!J){n(`abort`,424);return}let r=Ke(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;J(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(We(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Je(e,t,n){T(n||``,t).loadIcons=e}function Ye(e,t,n){T(n||``,t).loadIcon=e}var Y=`data-style`,Xe=``;function Ze(e){Xe=e}function Qe(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Y));n||(n=document.createElement(`style`),n.setAttribute(Y,Y),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Xe}function $e(){ge(``,qe),D(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!k(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;ve(e,r)||console.error(n)}catch{console.error(n)}}}}return{iconLoaded:ue,getIcon:de,listIcons:ce,addIcon:le,addCollection:k,calculateSize:K,buildIcon:Le,iconToHTML:q,svgToURL:Be,loadIcons:U,loadIcon:Oe,addAPIProvider:ve,setCustomIconLoader:Ye,setCustomIconsLoader:Je,appendCustomStyle:Ze,_api:{getAPIConfig:L,setAPIModule:ge,sendAPIQuery:z,setFetch:Ve,getFetch:He,listAPIProviders:ye}}}var X={"background-color":`currentColor`},et={"background-color":`transparent`},tt={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},nt={"-webkit-mask":X,mask:X,background:et};for(let e in nt){let t=nt[e];for(let n in tt)t[e+`-`+n]=tt[n]}function rt(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function it(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=Be(q(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:rt(a.width),height:rt(a.height),...n?X:et};for(let e in c)s.setProperty(e,c[e]);return r}var Z;function at(){try{Z=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{Z=null}}function ot(e){return Z===void 0&&at(),Z?Z.createHTML(e):e}function st(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=ot(q(e.body,n)),t.firstChild}function Q(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function ct(e,t){let n=t.icon.data,r=t.customisations,i=Le(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=st(i);break;default:o=it(i,{...c,...n},a===`mask`)}let s=Q(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function lt(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function ut(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Qe(e,t),this._state=lt({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Qe(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}ct(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=g(this);(e.attrMode!==n||_(e.customisations,r)||!Q(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=ke(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=lt(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=Q(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,g(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ae(e.data.body,n),i=this._state.inline;ct(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=$e();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{iconLoaded:dt,getIcon:ft,listIcons:pt,addIcon:mt,addCollection:ht,calculateSize:gt,buildIcon:_t,iconToHTML:vt,svgToURL:yt,loadIcons:bt,loadIcon:xt,setCustomIconLoader:St,setCustomIconsLoader:Ct,addAPIProvider:wt,_api:Tt}=ut()||$e(),Et=t(`:host{--color:currentColor;color:var(--color);display:contents}iconify-icon{color:inherit}`),$=class extends n{constructor(...e){super(...e),this.name=``}static{this.styles=[a,Et]}updated(e){e.has(`label`)&&(this.label?(this.setAttribute(`role`,`img`),this.setAttribute(`aria-label`,this.label)):(this.removeAttribute(`role`),this.removeAttribute(`aria-label`)))}render(){return e`
2
2
  <iconify-icon
3
3
  icon=${this.name}
4
4
  aria-hidden="true"
@@ -1,11 +1,11 @@
1
- import{uniqueId as e}from"../../registry.js";import{c as t,i as n,n as r}from"../../chunks/lit.js";import{LuxenElement as i}from"../../shared/luxen-element.js";import{i as a,t as o}from"../../chunks/decorate.js";import s from"../../shared/styles/host.styles.js";import{PopoverController as c}from"../../shared/controllers/popover.js";var l=t(`:host{--background:var(--l-color-bg-surface,Canvas);--color:inherit;--border-radius:6px;--max-width:320px;--shadow:0 4px 6px -1px #00000014, 0 2px 4px -2px #0000000f;--arrow-size:8px;--show-duration:.15s;--hide-duration:.15s;--_border-color:var(--l-color-border-overlay,var(--lightningcss-light,#e5e7eb)var(--lightningcss-dark,#374151));display:contents}[popover]{inset:unset;isolation:isolate;box-sizing:border-box;width:max-content;max-width:var(--max-width);border:1px solid var(--_border-color);border-radius:var(--border-radius);background:var(--background);color:var(--color);box-shadow:var(--shadow);font-size:.875rem;line-height:1.5;overflow:visible}:host([full-width]) [popover]{width:100vw;max-width:none}i{width:var(--arrow-size);height:var(--arrow-size);background:var(--background);z-index:-1;display:block;position:absolute;transform:rotate(45deg)}:host([data-placement^=top]) i{border-right:1px solid var(--_border-color);border-bottom:1px solid var(--_border-color)}:host([data-placement^=bottom]) i{border-top:1px solid var(--_border-color);border-left:1px solid var(--_border-color)}:host([data-placement^=left]) i{border-right:1px solid var(--_border-color);border-top:1px solid var(--_border-color)}:host([data-placement^=right]) i{border-left:1px solid var(--_border-color);border-bottom:1px solid var(--_border-color)}`),u=class extends i{constructor(...t){super(...t),this._popoverId=e(`popover`),this._floating=new c(this,{getTriggerElement:()=>this._trigger,getFloatingElement:()=>this._popoverEl,getArrowElement:()=>this._arrowEl,onPlacementChange:e=>{this.dataset.placement=e}}),this.#e=``,this.#t=`bottom`,this.#n=8,this.#r=!1,this.#i=!1,this.#a=!1,this.#o=`click`,this._onPointerEnter=()=>{this._hasTrigger(`hover`)&&(this._floating.cleanupSafePolygon(),this.show())},this._onPointerLeave=e=>{!this._hasTrigger(`hover`)||!this.open||this._floating.handlePointerLeave(e,()=>this.hide())},this._onFocusIn=()=>{this._hasTrigger(`focus`)&&this.show()},this._onFocusOut=()=>{this._hasTrigger(`focus`)&&this.hide()},this._onClick=()=>{this._hasTrigger(`click`)&&this.toggle()},this._onKeyDown=e=>{this.open&&e.key===`Escape`&&(e.stopPropagation(),this.hide())},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1)}}static{this.styles=[s,l]}#e;get for(){return this.#e}set for(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get open(){return this.#r}set open(e){this.#r=e}#i;get withoutArrow(){return this.#i}set withoutArrow(e){this.#i=e}#a;get fullWidth(){return this.#a}set fullWidth(e){this.#a=e}#o;get trigger(){return this.#o}set trigger(e){this.#o=e}_hasTrigger(e){return this.trigger.split(` `).includes(e)}get _trigger(){return this.for?this.getRootNode().getElementById(this.for):null}get _popoverEl(){return this.shadowRoot.querySelector(`[popover]`)}get _arrowEl(){return this.withoutArrow?null:this.shadowRoot.querySelector(`i`)}_getDuration(e){let t=parseFloat(getComputedStyle(this).getPropertyValue(e));return Number.isNaN(t)?150:t}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>this._addTriggerListeners())}disconnectedCallback(){super.disconnectedCallback(),this._removeTriggerListeners()}updated(e){e.has(`open`)&&this._handleOpenChange(),e.has(`for`)&&(this._removeTriggerListeners(e.get(`for`)),this._addTriggerListeners())}show(){this.open||=!0}hide(){this.open&&=!1}toggle(){this.open=!this.open}async _handleOpenChange(){let e=this._popoverEl;if(!e)return;let t={placement:this.placement,distance:this.distance,fullWidth:this.fullWidth};if(this.open){if(e.showPopover(),await this._floating.updatePosition(t),!this.open)return;await this._floating.animateShow(e,this._getDuration(`--show-duration`)),this._floating.startPositioning(t),this._trigger?.setAttribute(`aria-expanded`,`true`),this._trigger?.setAttribute(`aria-controls`,this._popoverId)}else this._floating.stopPositioning(),this._floating.cleanupSafePolygon(),this._trigger?.setAttribute(`aria-expanded`,`false`),this._trigger?.removeAttribute(`aria-controls`),await this._floating.animateHide(e,this._getDuration(`--hide-duration`)),e.matches(`:popover-open`)&&e.hidePopover()}_addTriggerListeners(){this._floating.addTriggerListeners({onPointerEnter:this._onPointerEnter,onPointerLeave:this._onPointerLeave,onFocusIn:this._onFocusIn,onFocusOut:this._onFocusOut,onClick:this._onClick,onKeyDown:this._onKeyDown})}_removeTriggerListeners(e){let t=e?this.getRootNode().getElementById(e):void 0;this._floating.removeTriggerListeners(t)}render(){return n`
1
+ import{uniqueId as e}from"../../registry.js";import{a as t,l as n,n as r}from"../../chunks/lit.js";import{LuxenElement as i}from"../../shared/luxen-element.js";import{i as a,t as o}from"../../chunks/decorate.js";import s from"../../shared/styles/host.styles.js";import{PopoverController as c}from"../../shared/controllers/popover.js";var l=n(`:host{--background:var(--l-color-bg-surface,Canvas);--color:inherit;--border-radius:6px;--max-width:320px;--shadow:0 4px 6px -1px #00000014, 0 2px 4px -2px #0000000f;--arrow-size:8px;--show-duration:.15s;--hide-duration:.15s;--_border-color:var(--l-color-border-overlay,var(--lightningcss-light,#e5e7eb)var(--lightningcss-dark,#374151));display:contents}[popover]{inset:unset;isolation:isolate;box-sizing:border-box;width:max-content;max-width:var(--max-width);border:1px solid var(--_border-color);border-radius:var(--border-radius);background:var(--background);color:var(--color);box-shadow:var(--shadow);font-size:.875rem;line-height:1.5;overflow:visible}:host([full-width]) [popover]{width:100vw;max-width:none}i{width:var(--arrow-size);height:var(--arrow-size);background:var(--background);z-index:-1;display:block;position:absolute;transform:rotate(45deg)}:host([data-placement^=top]) i{border-right:1px solid var(--_border-color);border-bottom:1px solid var(--_border-color)}:host([data-placement^=bottom]) i{border-top:1px solid var(--_border-color);border-left:1px solid var(--_border-color)}:host([data-placement^=left]) i{border-right:1px solid var(--_border-color);border-top:1px solid var(--_border-color)}:host([data-placement^=right]) i{border-left:1px solid var(--_border-color);border-bottom:1px solid var(--_border-color)}`),u=class extends i{constructor(...t){super(...t),this._popoverId=e(`popover`),this._floating=new c(this,{getTriggerElement:()=>this._trigger,getFloatingElement:()=>this._popoverEl,getArrowElement:()=>this._arrowEl,onPlacementChange:e=>{this.dataset.placement=e}}),this.#e=``,this.#t=`bottom`,this.#n=8,this.#r=!1,this.#i=!1,this.#a=!1,this.#o=`click`,this._onPointerEnter=()=>{this._hasTrigger(`hover`)&&(this._floating.cleanupSafePolygon(),this.show())},this._onPointerLeave=e=>{!this._hasTrigger(`hover`)||!this.open||this._floating.handlePointerLeave(e,()=>this.hide())},this._onFocusIn=()=>{this._hasTrigger(`focus`)&&this.show()},this._onFocusOut=()=>{this._hasTrigger(`focus`)&&this.hide()},this._onClick=()=>{this._hasTrigger(`click`)&&this.toggle()},this._onKeyDown=e=>{this.open&&e.key===`Escape`&&(e.stopPropagation(),this.hide())},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1)}}static{this.styles=[s,l]}#e;get for(){return this.#e}set for(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get open(){return this.#r}set open(e){this.#r=e}#i;get withoutArrow(){return this.#i}set withoutArrow(e){this.#i=e}#a;get fullWidth(){return this.#a}set fullWidth(e){this.#a=e}#o;get trigger(){return this.#o}set trigger(e){this.#o=e}_hasTrigger(e){return this.trigger.split(` `).includes(e)}get _trigger(){return this.for?this.getRootNode().getElementById(this.for):null}get _popoverEl(){return this.shadowRoot.querySelector(`[popover]`)}get _arrowEl(){return this.withoutArrow?null:this.shadowRoot.querySelector(`i`)}_getDuration(e){let t=parseFloat(getComputedStyle(this).getPropertyValue(e));return Number.isNaN(t)?150:t}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>this._addTriggerListeners())}disconnectedCallback(){super.disconnectedCallback(),this._removeTriggerListeners()}updated(e){e.has(`open`)&&this._handleOpenChange(),e.has(`for`)&&(this._removeTriggerListeners(e.get(`for`)),this._addTriggerListeners())}show(){this.open||=!0}hide(){this.open&&=!1}toggle(){this.open=!this.open}async _handleOpenChange(){let e=this._popoverEl;if(!e)return;let t={placement:this.placement,distance:this.distance,fullWidth:this.fullWidth};if(this.open){if(e.showPopover(),await this._floating.updatePosition(t),!this.open)return;await this._floating.animateShow(e,this._getDuration(`--show-duration`)),this._floating.startPositioning(t),this._trigger?.setAttribute(`aria-expanded`,`true`),this._trigger?.setAttribute(`aria-controls`,this._popoverId)}else this._floating.stopPositioning(),this._floating.cleanupSafePolygon(),this._trigger?.setAttribute(`aria-expanded`,`false`),this._trigger?.removeAttribute(`aria-controls`),await this._floating.animateHide(e,this._getDuration(`--hide-duration`)),e.matches(`:popover-open`)&&e.hidePopover()}_addTriggerListeners(){this._floating.addTriggerListeners({onPointerEnter:this._onPointerEnter,onPointerLeave:this._onPointerLeave,onFocusIn:this._onFocusIn,onFocusOut:this._onFocusOut,onClick:this._onClick,onKeyDown:this._onKeyDown})}_removeTriggerListeners(e){let t=e?this.getRootNode().getElementById(e):void 0;this._floating.removeTriggerListeners(t)}render(){return t`
2
2
  <div
3
3
  id=${this._popoverId}
4
4
  popover="auto"
5
5
  part="body"
6
6
  @toggle=${this._onToggle}
7
7
  >
8
- ${this.withoutArrow?r:n`
8
+ ${this.withoutArrow?r:t`
9
9
  <i
10
10
  part="arrow"
11
11
  role="presentation"
@@ -0,0 +1,2 @@
1
+ export * from './prose-editor.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/html/elements/prose-editor/index.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{define as e}from"../../define.js";import{ProseEditor as t}from"./prose-editor.js";e(`prose-editor`,t);
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/html/elements/prose-editor/index.ts"],"sourcesContent":["import { define } from '../../define.js';\nimport { ProseEditor } from './prose-editor.js';\nexport * from './prose-editor.js';\ndefine('prose-editor', ProseEditor);\n"],"mappings":"yFAGA,EAAO,eAAgB,EAAY"}