@limetech/lime-elements 39.45.2 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-action-bar_3.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-code-diff.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-drag-handle.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-email-viewer.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-file-viewer.cjs.entry.js +701 -345
  15. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-form.cjs.entry.js +17 -43
  18. package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-picker.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +40 -40
  22. package/dist/cjs/limel-slider.cjs.entry.js +140 -16
  23. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  24. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  25. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +1 -1
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/cjs/{translations-Bnw00bkf.js → translations-Do_D3pxu.js} +39 -2
  28. package/dist/collection/components/slider/slider.css +95 -0
  29. package/dist/collection/components/slider/slider.js +174 -21
  30. package/dist/collection/global/translations.js +15 -2
  31. package/dist/collection/translations/da.js +3 -0
  32. package/dist/collection/translations/de.js +3 -0
  33. package/dist/collection/translations/en.js +3 -0
  34. package/dist/collection/translations/fi.js +3 -0
  35. package/dist/collection/translations/fr.js +3 -0
  36. package/dist/collection/translations/nl.js +3 -0
  37. package/dist/collection/translations/no.js +3 -0
  38. package/dist/collection/translations/sv.js +3 -0
  39. package/dist/esm/lime-elements.js +1 -1
  40. package/dist/esm/limel-action-bar_3.entry.js +1 -1
  41. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  42. package/dist/esm/limel-callout.entry.js +1 -1
  43. package/dist/esm/limel-chart.entry.js +1 -1
  44. package/dist/esm/limel-chip-set.entry.js +1 -1
  45. package/dist/esm/limel-chip_2.entry.js +1 -1
  46. package/dist/esm/limel-code-diff.entry.js +1 -1
  47. package/dist/esm/limel-code-editor.entry.js +1 -1
  48. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  49. package/dist/esm/limel-drag-handle.entry.js +1 -1
  50. package/dist/esm/limel-email-viewer.entry.js +1 -1
  51. package/dist/esm/limel-file-viewer.entry.js +701 -345
  52. package/dist/esm/limel-file.entry.js +1 -1
  53. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  54. package/dist/esm/limel-form.entry.js +17 -43
  55. package/dist/esm/limel-list-item.entry.js +1 -1
  56. package/dist/esm/limel-picker.entry.js +1 -1
  57. package/dist/esm/limel-profile-picture.entry.js +1 -1
  58. package/dist/esm/limel-prosemirror-adapter.entry.js +40 -40
  59. package/dist/esm/limel-slider.entry.js +140 -16
  60. package/dist/esm/limel-snackbar.entry.js +1 -1
  61. package/dist/esm/limel-table.entry.js +1 -1
  62. package/dist/esm/limel-text-editor-link-menu.entry.js +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/{translations-Cb9R_zmF.js → translations-DgqE77nk.js} +39 -2
  65. package/dist/lime-elements/lime-elements.esm.js +1 -1
  66. package/dist/lime-elements/{p-421612f9.entry.js → p-21b54196.entry.js} +4 -4
  67. package/dist/lime-elements/p-3e316685.entry.js +1 -0
  68. package/dist/lime-elements/{p-c8116a01.entry.js → p-565f688a.entry.js} +1 -1
  69. package/dist/lime-elements/{p-aa080a8f.entry.js → p-5dde5d72.entry.js} +1 -1
  70. package/dist/lime-elements/{p-31713caf.entry.js → p-5e432a44.entry.js} +1 -1
  71. package/dist/lime-elements/{p-4a09fb2e.entry.js → p-62a25deb.entry.js} +1 -1
  72. package/dist/lime-elements/{p-8aa4a38e.entry.js → p-72a1d432.entry.js} +1 -1
  73. package/dist/lime-elements/{p-9a04a686.entry.js → p-83bdbaf7.entry.js} +1 -1
  74. package/dist/lime-elements/{p-ca0b86ee.entry.js → p-8c3798ee.entry.js} +1 -1
  75. package/dist/lime-elements/{p-8aeeeb53.entry.js → p-8cf79fa1.entry.js} +1 -1
  76. package/dist/lime-elements/{p-7487d65d.entry.js → p-9ed9d0de.entry.js} +1 -1
  77. package/dist/lime-elements/p-DgqE77nk.js +1 -0
  78. package/dist/lime-elements/{p-2284caa7.entry.js → p-a6500046.entry.js} +1 -1
  79. package/dist/lime-elements/{p-e545c9e8.entry.js → p-b04c6602.entry.js} +1 -1
  80. package/dist/lime-elements/{p-d97df2cd.entry.js → p-b4b43404.entry.js} +1 -1
  81. package/dist/lime-elements/p-b6528083.entry.js +1 -0
  82. package/dist/lime-elements/{p-6722e6e2.entry.js → p-cafebc7d.entry.js} +1 -1
  83. package/dist/lime-elements/{p-2f223e46.entry.js → p-cdcd9880.entry.js} +1 -1
  84. package/dist/lime-elements/{p-2e5d5e79.entry.js → p-dd116bb1.entry.js} +1 -1
  85. package/dist/lime-elements/{p-d7bb4310.entry.js → p-dda63b8b.entry.js} +1 -1
  86. package/dist/lime-elements/{p-7f7e2180.entry.js → p-e8783848.entry.js} +1 -1
  87. package/dist/lime-elements/{p-19c81ded.entry.js → p-eeddce38.entry.js} +1 -1
  88. package/dist/lime-elements/{p-9ae7d11b.entry.js → p-f53d8bda.entry.js} +1 -1
  89. package/dist/lime-elements/{p-03fd2181.entry.js → p-fa4edcf5.entry.js} +1 -1
  90. package/dist/types/components/slider/slider.d.ts +67 -4
  91. package/dist/types/components.d.ts +25 -10
  92. package/dist/types/translations/da.d.ts +3 -0
  93. package/dist/types/translations/de.d.ts +3 -0
  94. package/dist/types/translations/en.d.ts +3 -0
  95. package/dist/types/translations/fi.d.ts +3 -0
  96. package/dist/types/translations/fr.d.ts +3 -0
  97. package/dist/types/translations/nl.d.ts +3 -0
  98. package/dist/types/translations/no.d.ts +3 -0
  99. package/dist/types/translations/sv.d.ts +3 -0
  100. package/package.json +9 -9
  101. package/dist/lime-elements/p-Cb9R_zmF.js +0 -1
  102. package/dist/lime-elements/p-ee58f0b4.entry.js +0 -1
  103. package/dist/lime-elements/p-f51b5651.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as r,a as o}from"./p-BGxJfR2f.js";import{I as s}from"./p-Dpg0OkbJ.js";import{g as a}from"./p-5KsJICvh.js";import{g as l}from"./p-CgNJbSP4.js";import{m as n,r as h}from"./p-BgTwPGeH.js";import{t as c}from"./p-Cb9R_zmF.js";import{D as d,B as m}from"./p-C4_9qUMP.js";import{i as p}from"./p-D8H5afYg.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";const b=class{constructor(r){e(this,r),this.remove=i(this,"remove"),this.menuItemSelected=i(this,"menuItemSelected"),this.language="en",this.disabled=!1,this.readonly=!1,this.selected=!1,this.invalid=!1,this.removable=!1,this.type="default",this.loading=!1,this.identifier=crypto.randomUUID(),this.size="default",this.menuItems=[],this.renderAsButton=()=>[t("button",{id:"chip-"+this.identifier,class:"chip",role:"button",disabled:this.disabled||this.readonly,"aria-busy":this.loading?"true":"false","aria-live":"polite",onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()],this.renderAsLink=()=>{var e,i;const r=a(null===(e=this.link)||void 0===e?void 0:e.target,null===(i=this.link)||void 0===i?void 0:i.rel);return[t("a",{id:"chip-"+this.identifier,class:"chip",href:this.link.href,title:this.link.title,target:this.link.target,rel:r,"aria-disabled":this.disabled||this.readonly,tabindex:this.disabled||this.readonly?-1:0,onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()]},this.renderLabel=()=>t("span",{class:"text"},this.text),this.filterClickWhenDisabled=e=>{(this.disabled||this.readonly)&&e.preventDefault()},this.handleRemoveClick=e=>{e.stopPropagation(),this.remove.emit(this.identifier)},this.handleDeleteKeyDown=e=>{this.removable&&[d,m].includes(e.key)&&this.handleRemoveClick(e)},this.removeChipLabel=()=>`${this.getTranslation("remove")} ${this.text}`,this.actionMenuLabel=()=>this.getTranslation("file-viewer.more-actions"),this.getTranslation=e=>c.get(e,this.language),this.handleActionMenuSelect=e=>{const i=e.detail;i&&("_remove"!==i.value?this.menuItemSelected.emit(i):this.remove.emit(this.identifier))},this.handleActionMenuCancel=e=>{e.stopPropagation()}}componentWillLoad(){n(this.host)}disconnectedCallback(){h(this.host)}render(){return t(r,{key:"a18828c21bced036d29fdde1fd94af6b168a3da9",onClick:this.filterClickWhenDisabled},this.link?this.renderAsLink():this.renderAsButton())}renderPicture(){var e,i;const r=l(this.icon);if(r||this.image)return p(this.image)?t("limel-icon",{badge:!0,name:r,style:{color:`${null===(e=this.icon)||void 0===e?void 0:e.color}`,"background-color":`${null===(i=this.icon)||void 0===i?void 0:i.backgroundColor}`}}):t(s,{image:this.image})}renderBadge(){if(this.badge)return t("limel-badge",{label:this.badge})}renderRemoveButton(){var e;if(this.removable&&!this.readonly&&!this.disabled&&!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return t("button",{class:"trailing-button remove-button",tabIndex:-1,"aria-label":this.removeChipLabel(),"aria-controls":"chip-"+this.identifier,innerHTML:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-width="2" d="m8 8 16 16M24 8 8 24"/></svg>',onClick:this.handleRemoveClick})}renderActionsMenu(){var e;if(!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return;const i=this.getMenuItems();return t("limel-menu",{items:i,onSelect:this.handleActionMenuSelect,openDirection:"bottom-end",onCancel:this.handleActionMenuCancel},t("button",{slot:"trigger",disabled:this.disabled,class:"trailing-button","aria-label":this.actionMenuLabel(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve"><circle fill="currentColor" cx="16" cy="16" r="2"/><circle fill="currentColor" cx="16" cy="24" r="2"/><circle fill="currentColor" cx="16" cy="8" r="2"/></svg>'}))}getMenuItems(){let e=[...this.menuItems];return this.removable&&(e=[...e,{separator:!0},{text:this.removeChipLabel(),icon:{name:"delete_sign",color:"rgb(var(--color-red-default))"},value:"_remove"}]),e}renderSpinner(){if(this.loading)return t("limel-linear-progress",{indeterminate:!0})}renderProgressBar(){if(this.progress)return t("div",{role:"progressbar","aria-label":"%","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":this.progress,style:{"--limel-chip-progress-percentage":this.progress+"%"}})}static get delegatesFocus(){return!0}get host(){return o(this)}};b.style='@charset "UTF-8";.text{transition:padding-left 0.4s ease}limel-linear-progress{position:absolute;z-index:1;margin:auto;left:0.25rem;width:1.25rem}:host(limel-chip[loading]) .chip:before{content:"";position:absolute;left:0;width:var(--limel-chip-height);height:var(--limel-chip-height);border-radius:50%;scale:0.9;background-color:rgba(var(--contrast-600), 0.8)}:host(limel-chip[loading]) .chip:not(:has(limel-icon)) .text{padding-left:calc(var(--limel-chip-height) + 0.25rem)}div[role=progressbar]{--limel-chip-progressbar-offset:0.1875rem;--limel-chip-progressbar-stripe-color:rgb(var(--contrast-100), 0.3);--limel-chip-progressbar-stripe-size:1.5rem;pointer-events:none;position:absolute;display:flex;align-items:center;justify-content:end;inset:var(--limel-chip-progressbar-offset);max-width:calc(100% - var(--limel-chip-progressbar-offset) * 2);border-radius:inherit;background-color:var(--chip-progress-color, rgb(var(--contrast-700)));width:var(--limel-chip-progress-percentage);opacity:0.8;mix-blend-mode:var(--limel-chip-progress-mix-blend-mode)}div[role=progressbar]:after{content:"";transform:translate3d(0, 0, 0);position:absolute;inset:1px;background-image:linear-gradient(-45deg, var(--limel-chip-progressbar-stripe-color) 25%, transparent 25%, transparent 50%, var(--limel-chip-progressbar-stripe-color) 50%, var(--limel-chip-progressbar-stripe-color) 75%, transparent 75%, transparent);z-index:1;background-size:var(--limel-chip-progressbar-stripe-size) var(--limel-chip-progressbar-stripe-size);animation:move 2.5s linear infinite;border-radius:inherit}@media (prefers-reduced-motion){div[role=progressbar]:after{animation:none}}@keyframes move{0%{background-position:0 0}100%{background-position:calc(var(--limel-chip-progressbar-stripe-size) * -1) calc(var(--limel-chip-progressbar-stripe-size) * -1)}}:host(limel-chip){--limel-chip-height:var(--limel-chip-size, 1.75rem);--limel-chip-gap:0.5rem;isolation:isolate;display:inline-flex;align-items:center;min-width:0;max-width:min(var(--chip-max-width, 100%), 25rem)}:host(limel-chip)::before{content:"​";align-self:baseline;line-height:var(--limel-chip-height);font-size:var(--limel-theme-default-font-size, 0.875rem)}:host(limel-chip[size=small]){--limel-chip-height:1.5rem;--limel-chip-gap:0.25rem}:host(limel-chip[size=small]) .text{font-size:var(--limel-theme-default-small-font-size)}*{box-sizing:border-box}.chip{all:unset;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:100%;height:var(--limel-chip-height);border-radius:var(--limel-chip-height);font-size:clamp(0.8125rem, var(--limel-chip-height) - 0.875rem, 1rem);padding:0 0.125rem}.chip:has(limel-icon) .text,.chip:has(img) .text{padding-left:0}.chip:not([disabled]):focus{outline:none}.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.chip:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.chip:not([disabled]):hover,.chip:not([disabled]):focus,.chip:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}.chip:not([disabled]):hover,.chip:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.chip:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}.chip:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.chip:not([disabled]):hover,.chip:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.chip:has(limel-badge){padding-right:0.375rem}.chip:has(limel-badge) .text{padding-right:0}.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}.chip:has(+limel-menu),.chip:has(+.trailing-button){padding-right:calc(var(--limel-chip-height) + 0.125rem)}.chip:has(+limel-menu) .text,.chip:has(+.trailing-button) .text{padding-right:0}:host(limel-chip[disabled]:not([disabled=false])) .chip{color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1);box-shadow:none}:host(limel-chip[readonly]:not([readonly=false])) .chip{box-shadow:0 0 0 1px var(--chip-readonly-border-color, rgb(var(--contrast-800), 0.5))}:host(limel-chip[selected]:not([selected=false])) .chip{box-shadow:var(--button-shadow-inset)}:host(limel-chip[selected]:not([selected=false])) .chip:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}:host(limel-chip[selected]:not([selected=false])) .chip:active{box-shadow:var(--button-shadow-inset-pressed)}:host(limel-chip[selected]:not([selected=false])) .text{color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host([aria-expanded=true]) .chip,:host([aria-expanded]:not([aria-expanded=false])) .chip{box-shadow:var(--button-shadow-inset-pressed) !important}:host(limel-chip[type=filter]) .chip{border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem}:host(limel-chip[type=filter]) .chip:after{content:"";transition:background-color 0.4s ease 0.2s, box-shadow 0.6s ease 0.2s;box-sizing:border-box;position:absolute;bottom:0.125rem;left:0.125rem;width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--contrast-800), 0.8);box-shadow:0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[type=filter][selected]) .chip:after{background-color:rgb(var(--color-green-default));box-shadow:0 0 0.375rem 0 rgb(var(--color-green-light)), 0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[invalid]) .chip{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns=\'http://www.w3.org/2000/svg\'%20viewBox=\'0%200%208%208\'%20style=\'fill-rule:evenodd;\'%3E%3Cpath%20fill=\'rgba(186,186,192,0.16)\'%20d=\'M0%200h4v4H0zM4%204h4v4H4z\'/%3E%3C/svg%3E");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limel-chip[invalid]) .text{color:rgb(var(--color-white))}img,limel-icon{flex-shrink:0;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem)}img{object-fit:cover;border-radius:50%}limel-icon{padding:0.0625rem}limel-badge{pointer-events:none}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem;font-size:var(--limel-theme-default-font-size)}button.trailing-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.trailing-button:hover,button.trailing-button:focus,button.trailing-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.trailing-button:hover,button.trailing-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.trailing-button:hover{box-shadow:var(--button-shadow-hovered)}button.trailing-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.trailing-button:hover,button.trailing-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.trailing-button{z-index:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--limel-chip-height) * -1 + 0.125rem);margin-right:0.125rem;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);border-radius:50%}button.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}button.trailing-button.remove-button:hover{color:rgb(var(--color-red-dark))}button.trailing-button.remove-button:hover svg{transform:scale(0.8)}limel-menu button[slot=trigger]:focus{outline:none}limel-menu button[slot=trigger]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-menu[open] button[slot=trigger]{box-shadow:var(--button-shadow-inset)}';const g=class{constructor(i){e(this,i),this.language="en",this.value=0,this.indeterminate=!1}render(){if(!this.isFinite(this.value))return;const e=c.get("loading",this.language),i=c.get("progress-bar",this.language);return t(r,{role:"progressbar","aria-label":this.accessibleLabel||i,"aria-live":"polite","aria-valuemin":"0","aria-valuemax":"1","aria-valuenow":this.indeterminate?void 0:this.value,"aria-valuetext":this.indeterminate?e:void 0,style:{"--percentage":100*this.value+"%"}},t("div",{class:"progress"}))}watchValue(e){this.isFinite(e)&&this.updateProgress(e)}updateProgress(e){this.host&&this.host.style.setProperty("--percentage",100*e+"%")}isFinite(e){return Number.isFinite(e)}get host(){return o(this)}static get watchers(){return{value:[{watchValue:0}]}}};g.style=':host(limel-linear-progress){isolation:isolate;position:relative;overflow:hidden;display:flex;width:100%;height:0.25rem;border-radius:0.25rem;background-color:var(--background-color, rgb(var(--contrast-800), 0.5))}.progress{height:100%;width:var(--percentage, 0%);border-radius:0.25rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress{background-color:transparent;width:100%}:host(limel-linear-progress[indeterminate]) .progress:before,:host(limel-linear-progress[indeterminate]) .progress:after{will-change:left, right, opacity;content:"";position:absolute;inset:0;height:100%;border-radius:0.25rem;opacity:0;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress:before{animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}:host(limel-linear-progress[indeterminate]) .progress:after{animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite 1.15s}@keyframes indeterminate{0%{left:-35%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:100%;right:-90%}100%{left:100%;right:-90%;opacity:0}}@keyframes indeterminate-short{0%{left:-200%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:107%;right:-8%}100%{left:107%;right:-8%;opacity:0}}';export{b as limel_chip,g as limel_linear_progress}
1
+ import{r as e,c as i,h as t,H as r,a as o}from"./p-BGxJfR2f.js";import{I as s}from"./p-Dpg0OkbJ.js";import{g as a}from"./p-5KsJICvh.js";import{g as l}from"./p-CgNJbSP4.js";import{m as n,r as h}from"./p-BgTwPGeH.js";import{t as c}from"./p-DgqE77nk.js";import{D as d,B as m}from"./p-C4_9qUMP.js";import{i as p}from"./p-D8H5afYg.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";const b=class{constructor(r){e(this,r),this.remove=i(this,"remove"),this.menuItemSelected=i(this,"menuItemSelected"),this.language="en",this.disabled=!1,this.readonly=!1,this.selected=!1,this.invalid=!1,this.removable=!1,this.type="default",this.loading=!1,this.identifier=crypto.randomUUID(),this.size="default",this.menuItems=[],this.renderAsButton=()=>[t("button",{id:"chip-"+this.identifier,class:"chip",role:"button",disabled:this.disabled||this.readonly,"aria-busy":this.loading?"true":"false","aria-live":"polite",onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()],this.renderAsLink=()=>{var e,i;const r=a(null===(e=this.link)||void 0===e?void 0:e.target,null===(i=this.link)||void 0===i?void 0:i.rel);return[t("a",{id:"chip-"+this.identifier,class:"chip",href:this.link.href,title:this.link.title,target:this.link.target,rel:r,"aria-disabled":this.disabled||this.readonly,tabindex:this.disabled||this.readonly?-1:0,onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()]},this.renderLabel=()=>t("span",{class:"text"},this.text),this.filterClickWhenDisabled=e=>{(this.disabled||this.readonly)&&e.preventDefault()},this.handleRemoveClick=e=>{e.stopPropagation(),this.remove.emit(this.identifier)},this.handleDeleteKeyDown=e=>{this.removable&&[d,m].includes(e.key)&&this.handleRemoveClick(e)},this.removeChipLabel=()=>`${this.getTranslation("remove")} ${this.text}`,this.actionMenuLabel=()=>this.getTranslation("file-viewer.more-actions"),this.getTranslation=e=>c.get(e,this.language),this.handleActionMenuSelect=e=>{const i=e.detail;i&&("_remove"!==i.value?this.menuItemSelected.emit(i):this.remove.emit(this.identifier))},this.handleActionMenuCancel=e=>{e.stopPropagation()}}componentWillLoad(){n(this.host)}disconnectedCallback(){h(this.host)}render(){return t(r,{key:"a18828c21bced036d29fdde1fd94af6b168a3da9",onClick:this.filterClickWhenDisabled},this.link?this.renderAsLink():this.renderAsButton())}renderPicture(){var e,i;const r=l(this.icon);if(r||this.image)return p(this.image)?t("limel-icon",{badge:!0,name:r,style:{color:`${null===(e=this.icon)||void 0===e?void 0:e.color}`,"background-color":`${null===(i=this.icon)||void 0===i?void 0:i.backgroundColor}`}}):t(s,{image:this.image})}renderBadge(){if(this.badge)return t("limel-badge",{label:this.badge})}renderRemoveButton(){var e;if(this.removable&&!this.readonly&&!this.disabled&&!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return t("button",{class:"trailing-button remove-button",tabIndex:-1,"aria-label":this.removeChipLabel(),"aria-controls":"chip-"+this.identifier,innerHTML:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-width="2" d="m8 8 16 16M24 8 8 24"/></svg>',onClick:this.handleRemoveClick})}renderActionsMenu(){var e;if(!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return;const i=this.getMenuItems();return t("limel-menu",{items:i,onSelect:this.handleActionMenuSelect,openDirection:"bottom-end",onCancel:this.handleActionMenuCancel},t("button",{slot:"trigger",disabled:this.disabled,class:"trailing-button","aria-label":this.actionMenuLabel(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve"><circle fill="currentColor" cx="16" cy="16" r="2"/><circle fill="currentColor" cx="16" cy="24" r="2"/><circle fill="currentColor" cx="16" cy="8" r="2"/></svg>'}))}getMenuItems(){let e=[...this.menuItems];return this.removable&&(e=[...e,{separator:!0},{text:this.removeChipLabel(),icon:{name:"delete_sign",color:"rgb(var(--color-red-default))"},value:"_remove"}]),e}renderSpinner(){if(this.loading)return t("limel-linear-progress",{indeterminate:!0})}renderProgressBar(){if(this.progress)return t("div",{role:"progressbar","aria-label":"%","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":this.progress,style:{"--limel-chip-progress-percentage":this.progress+"%"}})}static get delegatesFocus(){return!0}get host(){return o(this)}};b.style='@charset "UTF-8";.text{transition:padding-left 0.4s ease}limel-linear-progress{position:absolute;z-index:1;margin:auto;left:0.25rem;width:1.25rem}:host(limel-chip[loading]) .chip:before{content:"";position:absolute;left:0;width:var(--limel-chip-height);height:var(--limel-chip-height);border-radius:50%;scale:0.9;background-color:rgba(var(--contrast-600), 0.8)}:host(limel-chip[loading]) .chip:not(:has(limel-icon)) .text{padding-left:calc(var(--limel-chip-height) + 0.25rem)}div[role=progressbar]{--limel-chip-progressbar-offset:0.1875rem;--limel-chip-progressbar-stripe-color:rgb(var(--contrast-100), 0.3);--limel-chip-progressbar-stripe-size:1.5rem;pointer-events:none;position:absolute;display:flex;align-items:center;justify-content:end;inset:var(--limel-chip-progressbar-offset);max-width:calc(100% - var(--limel-chip-progressbar-offset) * 2);border-radius:inherit;background-color:var(--chip-progress-color, rgb(var(--contrast-700)));width:var(--limel-chip-progress-percentage);opacity:0.8;mix-blend-mode:var(--limel-chip-progress-mix-blend-mode)}div[role=progressbar]:after{content:"";transform:translate3d(0, 0, 0);position:absolute;inset:1px;background-image:linear-gradient(-45deg, var(--limel-chip-progressbar-stripe-color) 25%, transparent 25%, transparent 50%, var(--limel-chip-progressbar-stripe-color) 50%, var(--limel-chip-progressbar-stripe-color) 75%, transparent 75%, transparent);z-index:1;background-size:var(--limel-chip-progressbar-stripe-size) var(--limel-chip-progressbar-stripe-size);animation:move 2.5s linear infinite;border-radius:inherit}@media (prefers-reduced-motion){div[role=progressbar]:after{animation:none}}@keyframes move{0%{background-position:0 0}100%{background-position:calc(var(--limel-chip-progressbar-stripe-size) * -1) calc(var(--limel-chip-progressbar-stripe-size) * -1)}}:host(limel-chip){--limel-chip-height:var(--limel-chip-size, 1.75rem);--limel-chip-gap:0.5rem;isolation:isolate;display:inline-flex;align-items:center;min-width:0;max-width:min(var(--chip-max-width, 100%), 25rem)}:host(limel-chip)::before{content:"​";align-self:baseline;line-height:var(--limel-chip-height);font-size:var(--limel-theme-default-font-size, 0.875rem)}:host(limel-chip[size=small]){--limel-chip-height:1.5rem;--limel-chip-gap:0.25rem}:host(limel-chip[size=small]) .text{font-size:var(--limel-theme-default-small-font-size)}*{box-sizing:border-box}.chip{all:unset;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:100%;height:var(--limel-chip-height);border-radius:var(--limel-chip-height);font-size:clamp(0.8125rem, var(--limel-chip-height) - 0.875rem, 1rem);padding:0 0.125rem}.chip:has(limel-icon) .text,.chip:has(img) .text{padding-left:0}.chip:not([disabled]):focus{outline:none}.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.chip:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.chip:not([disabled]):hover,.chip:not([disabled]):focus,.chip:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}.chip:not([disabled]):hover,.chip:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.chip:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}.chip:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.chip:not([disabled]):hover,.chip:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.chip:has(limel-badge){padding-right:0.375rem}.chip:has(limel-badge) .text{padding-right:0}.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}.chip:has(+limel-menu),.chip:has(+.trailing-button){padding-right:calc(var(--limel-chip-height) + 0.125rem)}.chip:has(+limel-menu) .text,.chip:has(+.trailing-button) .text{padding-right:0}:host(limel-chip[disabled]:not([disabled=false])) .chip{color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1);box-shadow:none}:host(limel-chip[readonly]:not([readonly=false])) .chip{box-shadow:0 0 0 1px var(--chip-readonly-border-color, rgb(var(--contrast-800), 0.5))}:host(limel-chip[selected]:not([selected=false])) .chip{box-shadow:var(--button-shadow-inset)}:host(limel-chip[selected]:not([selected=false])) .chip:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}:host(limel-chip[selected]:not([selected=false])) .chip:active{box-shadow:var(--button-shadow-inset-pressed)}:host(limel-chip[selected]:not([selected=false])) .text{color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host([aria-expanded=true]) .chip,:host([aria-expanded]:not([aria-expanded=false])) .chip{box-shadow:var(--button-shadow-inset-pressed) !important}:host(limel-chip[type=filter]) .chip{border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem}:host(limel-chip[type=filter]) .chip:after{content:"";transition:background-color 0.4s ease 0.2s, box-shadow 0.6s ease 0.2s;box-sizing:border-box;position:absolute;bottom:0.125rem;left:0.125rem;width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--contrast-800), 0.8);box-shadow:0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[type=filter][selected]) .chip:after{background-color:rgb(var(--color-green-default));box-shadow:0 0 0.375rem 0 rgb(var(--color-green-light)), 0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[invalid]) .chip{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns=\'http://www.w3.org/2000/svg\'%20viewBox=\'0%200%208%208\'%20style=\'fill-rule:evenodd;\'%3E%3Cpath%20fill=\'rgba(186,186,192,0.16)\'%20d=\'M0%200h4v4H0zM4%204h4v4H4z\'/%3E%3C/svg%3E");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limel-chip[invalid]) .text{color:rgb(var(--color-white))}img,limel-icon{flex-shrink:0;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem)}img{object-fit:cover;border-radius:50%}limel-icon{padding:0.0625rem}limel-badge{pointer-events:none}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem;font-size:var(--limel-theme-default-font-size)}button.trailing-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.trailing-button:hover,button.trailing-button:focus,button.trailing-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.trailing-button:hover,button.trailing-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.trailing-button:hover{box-shadow:var(--button-shadow-hovered)}button.trailing-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.trailing-button:hover,button.trailing-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.trailing-button{z-index:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--limel-chip-height) * -1 + 0.125rem);margin-right:0.125rem;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);border-radius:50%}button.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}button.trailing-button.remove-button:hover{color:rgb(var(--color-red-dark))}button.trailing-button.remove-button:hover svg{transform:scale(0.8)}limel-menu button[slot=trigger]:focus{outline:none}limel-menu button[slot=trigger]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-menu[open] button[slot=trigger]{box-shadow:var(--button-shadow-inset)}';const g=class{constructor(i){e(this,i),this.language="en",this.value=0,this.indeterminate=!1}render(){if(!this.isFinite(this.value))return;const e=c.get("loading",this.language),i=c.get("progress-bar",this.language);return t(r,{role:"progressbar","aria-label":this.accessibleLabel||i,"aria-live":"polite","aria-valuemin":"0","aria-valuemax":"1","aria-valuenow":this.indeterminate?void 0:this.value,"aria-valuetext":this.indeterminate?e:void 0,style:{"--percentage":100*this.value+"%"}},t("div",{class:"progress"}))}watchValue(e){this.isFinite(e)&&this.updateProgress(e)}updateProgress(e){this.host&&this.host.style.setProperty("--percentage",100*e+"%")}isFinite(e){return Number.isFinite(e)}get host(){return o(this)}static get watchers(){return{value:[{watchValue:0}]}}};g.style=':host(limel-linear-progress){isolation:isolate;position:relative;overflow:hidden;display:flex;width:100%;height:0.25rem;border-radius:0.25rem;background-color:var(--background-color, rgb(var(--contrast-800), 0.5))}.progress{height:100%;width:var(--percentage, 0%);border-radius:0.25rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress{background-color:transparent;width:100%}:host(limel-linear-progress[indeterminate]) .progress:before,:host(limel-linear-progress[indeterminate]) .progress:after{will-change:left, right, opacity;content:"";position:absolute;inset:0;height:100%;border-radius:0.25rem;opacity:0;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress:before{animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}:host(limel-linear-progress[indeterminate]) .progress:after{animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite 1.15s}@keyframes indeterminate{0%{left:-35%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:100%;right:-90%}100%{left:100%;right:-90%;opacity:0}}@keyframes indeterminate-short{0%{left:-200%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:107%;right:-8%}100%{left:107%;right:-8%;opacity:0}}';export{b as limel_chip,g as limel_linear_progress}
@@ -1 +1 @@
1
- import{r as e,h as t,H as n,a as o}from"./p-BGxJfR2f.js";import{t as r}from"./p-Cb9R_zmF.js";class i{diff(e,t,n={}){let o;"function"==typeof n?(o=n,n={}):"callback"in n&&(o=n.callback);const r=this.castInput(e,n),i=this.castInput(t,n),s=this.removeEmpty(this.tokenize(r,n)),l=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(s,l,n,o)}diffWithOptionsObj(e,t,n,o){var r;const i=e=>(e=this.postProcess(e,n),o?void setTimeout((function(){o(e)}),0):e),s=t.length,l=e.length;let a=1,d=s+l;null!=n.maxEditLength&&(d=Math.min(d,n.maxEditLength));const c=null!==(r=n.timeout)&&void 0!==r?r:1/0,f=Date.now()+c,u=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(u[0],t,e,0,n);if(u[0].oldPos+1>=l&&h+1>=s)return i(this.buildValues(u[0].lastComponent,t,e));let b=-1/0,v=1/0;const p=()=>{for(let o=Math.max(b,-a);o<=Math.min(v,a);o+=2){let r;const a=u[o-1],d=u[o+1];a&&(u[o-1]=void 0);let c=!1;if(d){const e=d.oldPos-o;c=d&&0<=e&&e<s}const f=a&&a.oldPos+1<l;if(c||f){if(r=!f||c&&a.oldPos<d.oldPos?this.addToPath(d,!0,!1,0,n):this.addToPath(a,!1,!0,1,n),h=this.extractCommon(r,t,e,o,n),r.oldPos+1>=l&&h+1>=s)return i(this.buildValues(r.lastComponent,t,e))||!0;u[o]=r,r.oldPos+1>=l&&(v=Math.min(v,o-1)),h+1>=s&&(b=Math.max(b,o+1))}else u[o]=void 0}a++};if(o)!function e(){setTimeout((function(){if(a>d||Date.now()>f)return o(void 0);p()||e()}),0)}();else for(;a<=d&&Date.now()<=f;){const e=p();if(e)return e}}addToPath(e,t,n,o,r){const i=e.lastComponent;return i&&!r.oneChangePerToken&&i.added===t&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}}extractCommon(e,t,n,o,r){const i=t.length,s=n.length;let l=e.oldPos,a=l-o,d=0;for(;a+1<i&&l+1<s&&this.equals(n[l+1],t[a+1],r);)a++,l++,d++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return d&&!r.oneChangePerToken&&(e.lastComponent={count:d,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,a}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const o=[];let r;for(;e;)o.push(e),r=e.previousComponent,delete e.previousComponent,e=r;o.reverse();const i=o.length;let s=0,l=0,a=0;for(;s<i;s++){const e=o[s];if(e.removed)e.value=this.join(n.slice(a,a+e.count)),a+=e.count;else{if(!e.added&&this.useLongestToken){let o=t.slice(l,l+e.count);o=o.map((function(e,t){const o=n[a+t];return o.length>e.length?o:e})),e.value=this.join(o)}else e.value=this.join(t.slice(l,l+e.count));l+=e.count,e.added||(a+=e.count)}}return o}}function s(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function l(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function a(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function d(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function c(e,t){return a(e,t,"")}function f(e,t){return d(e,t,"")}function u(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let o=t.length;e.length<t.length&&(o=e.length);const r=Array(o);let i=0;r[0]=0;for(let e=1;e<o;e++){for(r[e]=t[e]==t[i]?r[i]:i;i>0&&t[e]!=t[i];)i=r[i];t[e]==t[i]&&i++}i=0;for(let o=n;o<e.length;o++){for(;i>0&&e[o]!=t[i];)i=r[i];e[o]==t[i]&&i++}return i}(e,t))}function h(e,t){const n=[];for(const o of Array.from(t.segment(e))){const e=o.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function b(e,t){if(t)return p(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function v(e,t){if(t)return p(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function p(e,t){if(!t)return[v(e),b(e)];if("word"!=t.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');const n=h(e,t),o=n[0],r=n[n.length-1];return[/\s/.test(o)?o:"",/\s/.test(r)?r:""]}const m="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",g=new RegExp(`[${m}]+|\\s+|[^${m}]`,"ug"),x=new class extends i{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){const o=t.intlSegmenter;if("word"!=o.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');n=h(e,o)}else n=e.match(g)||[];const o=[];let r=null;return n.forEach((e=>{/\s/.test(e)?o.push(null==r?e:o.pop()+e):null!=r&&/\s/.test(r)?o.push(o[o.length-1]==r?o.pop()+e:r+e):o.push(e),r=e})),o}join(e){return e.map(((e,t)=>0==t?e:e.replace(/^\s+/,""))).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,o=null,r=null;return e.forEach((e=>{e.added?o=e:e.removed?r=e:((o||r)&&y(n,r,o,e,t.intlSegmenter),n=e,o=null,r=null)})),(o||r)&&y(n,r,o,null,t.intlSegmenter),e}};function y(e,t,n,o,r){if(t&&n){const[i,u]=p(t.value,r),[h,b]=p(n.value,r);if(e){const o=s(i,h);e.value=d(e.value,h,o),t.value=c(t.value,o),n.value=c(n.value,o)}if(o){const e=l(u,b);o.value=a(o.value,b,e),t.value=f(t.value,e),n.value=f(n.value,e)}}else if(n){if(e){const e=v(n.value,r);n.value=n.value.substring(e.length)}if(o){const e=v(o.value,r);o.value=o.value.substring(e.length)}}else if(e&&o){const n=v(o.value,r),[i,u]=p(t.value,r),h=s(n,i);t.value=c(t.value,h);const b=l(c(n,h),u);t.value=f(t.value,b),o.value=a(o.value,n,b),e.value=d(e.value,n,n.slice(0,n.length-b.length))}else if(o){const e=v(o.value,r),n=u(b(t.value,r),e);t.value=f(t.value,n)}else if(e){const n=u(b(e.value,r),v(t.value,r));t.value=c(t.value,n)}}const w=new class extends i{constructor(){super(...arguments),this.tokenize=k}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function k(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));const n=[],o=e.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let e=0;e<o.length;e++){const r=o[e];e%2&&!t.newlineIsToken?n[n.length-1]+=r:n.push(r)}return n}function _(e,t,n){const o=[];for(;t<e.length&&"removed"===e[t].type;)o.push(e[t]),t++;const r=[];for(;t<e.length&&"added"===e[t].type;)r.push(e[t]),t++;const i=Math.max(o.length,r.length);for(let e=0;e<i;e++)n.push({left:e<o.length?o[e]:void 0,right:e<r.length?r[e]:void 0});return t}function C(e,t=!1){if("object"==typeof e&&null!==e)return JSON.stringify(S(e),null,4);if("string"==typeof e&&t)try{const t=JSON.parse(e);return JSON.stringify(S(t),null,4)}catch(t){return e}return String(null!=e?e:"")}function S(e){if(Array.isArray(e))return e.map(S);if(null!==e&&"object"==typeof e){const t={},n=Object.keys(e).sort(((e,t)=>e.localeCompare(t)));for(const o of n)t[o]=S(e[o]);return t}return e}function j(e){if(!e)return[];const t=e.split("\n");return t.length>0&&""===t.at(-1)&&t.pop(),t}function D(e,t){const n=x.diff(e,t,undefined);const o=[],r=[];for(const e of n)e.added?r.push({value:e.value,type:"added"}):e.removed?o.push({value:e.value,type:"removed"}):(o.push({value:e.value,type:"equal"}),r.push({value:e.value,type:"equal"}));return[o,r]}const O=[[/"(?:[^"\\]|\\.)*"/,"string"],[/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/,"number"],[/\b(?:true|false)\b/,"boolean"],[/\bnull\b/,"null"],[/[{}[\]:,]/,"punctuation"]],M=new RegExp(O.map((([e])=>`(${e.source})`)).join("|"),"g");function $(e){for(const[t,[,n]]of O.entries())if(void 0!==e[t+1])return n;return"plain"}const A=class{constructor(t){e(this,t),this.oldValue="",this.newValue="",this.layout="unified",this.contextLines=3,this.lineWrapping=!0,this.reformatJson=!1,this.translationLanguage="en",this.diffResult={hunks:[],additions:0,deletions:0,allLines:[]},this.liveAnnouncement="",this.copyState="idle",this.searchVisible=!1,this.searchTerm="",this.currentMatchIndex=0,this.focusedRowIndex=-1,this.normalizedOldText="",this.searchMatchCounter=0,this.totalSearchMatches=0,this.isRenderingRemovedLine=!1,this.activeSearchRegex=null,this.prevSearchVisible=!1}componentWillLoad(){this.recomputeDiff()}componentDidRender(){var e,t;if(this.searchVisible&&!this.prevSearchVisible&&(null===(e=this.searchInputEl)||void 0===e||e.focus()),this.prevSearchVisible=this.searchVisible,this.searchTerm&&this.totalSearchMatches>0){const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".search-match--current");null==e||e.scrollIntoView({block:"center",behavior:"smooth"})}}render(){var e;this.searchMatchCounter=0,this.activeSearchRegex=(e=this.searchTerm)?new RegExp(`(${function(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}(e)})`,"gi"):null;const o=this.renderDiff();this.totalSearchMatches=this.searchMatchCounter;const r=this.computeLineNumberWidth();return t(n,{key:"b96c5b9625e734cd951697360efd2ca9637d4c3c",style:{"--limel-line-number-min-width":r}},this.renderHeader(),this.renderScreenReaderSummary(),this.searchVisible&&this.renderSearchBar(),t("div",{key:"6a53529bee76c32d996b766118df5ebdb767bb7e",class:"diff-body",role:"table","aria-label":this.getTranslation("code-diff.table-label"),tabindex:"0",onKeyDown:e=>this.handleKeyDown(e)},o),t("div",{key:"f1c882328e8b6144c004150f0237010744e46b94",class:"screen-reader-only",role:"status","aria-live":"polite","aria-atomic":"true"},this.liveAnnouncement))}watchInputs(){this.recomputeDiff()}recomputeDiff(){const e=C(this.oldValue,this.reformatJson),t=C(this.newValue,this.reformatJson);this.normalizedOldText=e,this.diffResult=function(e,t,n=3){const o=function(e,t){const n=w.diff(e,t,void 0),o=[];let r=1,i=1;for(const e of n){const t=j(e.value);for(const n of t)o.push(e.added?{type:"added",content:n,newLineNumber:i++}:e.removed?{type:"removed",content:n,oldLineNumber:r++}:{type:"context",content:n,oldLineNumber:r++,newLineNumber:i++})}return function(e){let t=0;for(;t<e.length;){const n=t;for(;t<e.length&&"removed"===e[t].type;)t++;const o=t,r=t;for(;t<e.length&&"added"===e[t].type;)t++;const i=o-n,s=t-r;if(i>0&&s>0){const t=Math.min(i,s);for(let o=0;o<t;o++){const t=e[n+o],i=e[r+o],[s,l]=D(t.content,i.content);t.segments=s,i.segments=l}}t===n&&t++}}(o),o}(e,t);return function(e,t){if(0===e.length)return{hunks:[],additions:0,deletions:0,allLines:e};let n=0,o=0;for(const t of e)"added"===t.type?n++:"removed"===t.type&&o++;if(0===n&&0===o)return{hunks:[],additions:0,deletions:0,allLines:e};const r=[];for(const[t,n]of e.entries())"context"!==n.type&&r.push(t);const i=function(e,t,n){if(0===e.length)return[];const o=[];let r=Math.max(0,e[0]-n),i=Math.min(t,e[0]+n+1);for(let s=1;s<e.length;s++){const l=Math.max(0,e[s]-n),a=Math.min(t,e[s]+n+1);l<=i?i=Math.max(i,a):(o.push({start:r,end:i}),r=l,i=a)}return o.push({start:r,end:i}),o}(r,e.length,t),s=[];let l=0;for(const t of i){const n=e.slice(t.start,t.end),o=t.start-l;s.push({lines:n,collapsedBefore:o>0?o:void 0,startIndex:t.start}),l=t.end}const a=i.at(-1);return{hunks:s,additions:n,deletions:o,collapsedAfter:a.end<e.length?e.length-a.end:void 0,allLines:e}}(o,n)}(e,t,this.contextLines),this.focusedRowIndex=-1}formatSrSummary(){const{additions:e,deletions:t}=this.diffResult;if(0===e&&0===t)return null;const n=[];return e>0&&n.push(this.getTranslation(1===e?"code-diff.diff-addition":"code-diff.diff-additions",{count:e})),t>0&&n.push(this.getTranslation(1===t?"code-diff.diff-deletion":"code-diff.diff-deletions",{count:t})),this.getTranslation("code-diff.diff-summary",{parts:n.join(", ")})}renderScreenReaderSummary(){const e=this.formatSrSummary();return t("div",{class:"screen-reader-only",role:"status","aria-live":"polite"},null!=e?e:this.getTranslation("code-diff.no-differences-found"))}handleKeyDown(e){if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const t=this.getDiffRows();0!==t.length&&(this.focusedRowIndex="ArrowDown"===e.key?Math.min(this.focusedRowIndex+1,t.length-1):Math.max(this.focusedRowIndex-1,0),this.updateRowFocus(t))}getDiffRows(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(".diff-body");return t?[...t.querySelectorAll(".diff-line:not(.diff-line--collapsed)")]:[]}updateRowFocus(e){for(const t of e)t.removeAttribute("tabindex"),t.classList.remove("diff-line--focused");const t=e[this.focusedRowIndex];t&&(t.setAttribute("tabindex","-1"),t.classList.add("diff-line--focused"),t.focus(),this.announceLine(t))}announceLine(e){var t,n;let o=this.getTranslation("code-diff.line-context");e.classList.contains("diff-line--added")?o=this.getTranslation("code-diff.line-added"):e.classList.contains("diff-line--removed")&&(o=this.getTranslation("code-diff.line-removed"));const r=null!==(n=null===(t=e.querySelector(".line-content, .split-content"))||void 0===t?void 0:t.textContent)&&void 0!==n?n:"",i=r.length>80?r.slice(0,80)+"…":r;this.liveAnnouncement=`${o}: ${i}`}renderHeader(){var e,n;const o=null!==(e=this.oldHeading)&&void 0!==e?e:this.getTranslation("code-diff.old-heading"),r=null!==(n=this.newHeading)&&void 0!==n?n:this.getTranslation("code-diff.new-heading"),{additions:i,deletions:s}=this.diffResult,l=i>0||s>0;return t("div",{class:"diff-header"},t("div",{class:"diff-header__labels"},t("span",{class:"diff-header__old"},o),t("span",{class:"diff-header__new"},r)),t("div",{class:"diff-header__actions"},t("div",{class:"diff-header__stats"},i>0&&t("span",{class:"stat stat--added"},"+",i),s>0&&t("span",{class:"stat stat--removed"},"-",s)),l&&this.renderCopyButton(),s>0&&this.renderSearchToggle()))}renderCopyButton(){const e=this.getTranslation("copied"===this.copyState?"code-diff.copied":"code-diff.copy-old-version");return t("limel-icon-button",{label:e,icon:"copied"===this.copyState?"checkmark":"copy",onClick:()=>this.copyToClipboard(this.normalizedOldText)})}async copyToClipboard(e){try{await navigator.clipboard.writeText(e),this.copyState="copied",this.liveAnnouncement=this.getTranslation("code-diff.copied-to-clipboard"),setTimeout((()=>{this.copyState="idle"}),2e3)}catch(e){}}renderSearchToggle(){return t("limel-icon-button",{class:{"search-toggle--active":this.searchVisible},label:this.getTranslation("code-diff.search"),icon:"search",onClick:()=>this.toggleSearch()})}renderSearchBar(){const e=0===this.totalSearchMatches?this.getTranslation("code-diff.no-matches"):this.getTranslation("code-diff.match-count",{current:this.currentMatchIndex+1,total:this.totalSearchMatches});return t("div",{class:"search-bar"},t("limel-input-field",{class:"search-bar__input",type:"search",placeholder:this.getTranslation("code-diff.search")+"…",value:this.searchTerm,onChange:e=>this.onSearchInput(e),onKeyDown:e=>this.onSearchKeyDown(e),ref:e=>this.searchInputEl=e}),t("span",{class:"search-bar__count"},e),t("limel-action-bar",{actions:this.getSearchActions(),onItemSelected:e=>this.onSearchAction(e)}))}toggleSearch(){this.searchVisible=!this.searchVisible,this.searchVisible||(this.searchTerm="",this.currentMatchIndex=0)}onSearchInput(e){this.searchTerm=e.detail,this.currentMatchIndex=0}onSearchKeyDown(e){"Enter"===e.key?(e.preventDefault(),this.navigateSearch(e.shiftKey?-1:1)):"Escape"===e.key&&this.toggleSearch()}computeLineNumberWidth(){return`calc(${String(this.diffResult.allLines.length).length}ch + 2 * var(--limel-code-diff-line-number-padding))`}getSearchActions(){const e=0===this.totalSearchMatches;return[{text:this.getTranslation("code-diff.previous-match"),icon:"-lime-caret-top",iconOnly:!0,disabled:e,value:"prev"},{text:this.getTranslation("code-diff.next-match"),icon:"-lime-caret-bottom",iconOnly:!0,disabled:e,value:"next"},{text:this.getTranslation("code-diff.close-search"),icon:"cancel",iconOnly:!0,value:"close"}]}onSearchAction(e){const{value:t}=e.detail;"prev"===t?this.navigateSearch(-1):"next"===t?this.navigateSearch(1):"close"===t&&this.toggleSearch()}navigateSearch(e){this.currentMatchIndex=function(e,t,n){return 0===n?0:(e+t+n)%n}(this.currentMatchIndex,e,this.totalSearchMatches)}renderDiff(){const{hunks:e,collapsedAfter:n}=this.diffResult;return 0===e.length?t("div",{class:"diff-empty"},this.getTranslation("code-diff.no-differences")):this.renderHunks(e,n,"split"===this.layout?e=>this.renderSplitHunkRows(e):e=>this.renderHunkLines(e))}renderHunks(e,t,n){const o=[];for(const[t,r]of e.entries())r.collapsedBefore&&o.push(this.renderCollapsedRow(r.collapsedBefore,t)),o.push(...n(r));return t&&o.push(this.renderCollapsedAfterRow(t)),o}renderHunkLines(e){const t=[];let n=0;for(;n<e.lines.length;){const o=e.lines[n];if("context"===o.type){t.push(this.renderLine(o)),n++;continue}const r=[];for(;n<e.lines.length&&"context"!==e.lines[n].type;)r.push(e.lines[n]),n++;t.push(this.renderChangeBlock(r))}return t}renderChangeBlock(e){const n=function(e){return e.filter((e=>"removed"===e.type)).map((e=>e.content)).join("\n")}(e);return t("div",{class:"change-group"},e.map((e=>this.renderLine(e))),n&&this.renderBlockCopyButton(n))}renderLine(e){var n,o;const r={added:"+",removed:"-",context:" "}[e.type];return t("div",{class:{"diff-line":!0,[`diff-line--${e.type}`]:!0},role:"row"},t("span",{class:"line-number line-number--old",role:"cell","aria-label":e.oldLineNumber?this.getTranslation("code-diff.old-line",{number:e.oldLineNumber}):void 0},null!==(n=e.oldLineNumber)&&void 0!==n?n:""),t("span",{class:"line-number line-number--new",role:"cell","aria-label":e.newLineNumber?this.getTranslation("code-diff.new-line",{number:e.newLineNumber}):void 0},null!==(o=e.newLineNumber)&&void 0!==o?o:""),t("span",{class:"line-indicator",role:"cell"},r),t("span",{class:"line-content",role:"cell"},this.renderContent(e)))}renderSplitHunkRows(e){var t,n,o,r;const i=function(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];"context"!==o.type?n=_(e,n,t):(t.push({left:o,right:o}),n++)}return t}(e.lines),s=[];let l=0;for(;l<i.length;){const e=i[l];if("context"===(null===(t=e.left)||void 0===t?void 0:t.type)&&"context"===(null===(n=e.right)||void 0===n?void 0:n.type)){s.push(this.renderSplitRow(e)),l++;continue}const a=[];for(;l<i.length;){const e=i[l];if("context"===(null===(o=e.left)||void 0===o?void 0:o.type)&&"context"===(null===(r=e.right)||void 0===r?void 0:r.type))break;a.push(e),l++}s.push(this.renderSplitChangeBlock(a))}return s}renderSplitChangeBlock(e){const n=function(e){return e.filter((e=>{var t;return"removed"===(null===(t=e.left)||void 0===t?void 0:t.type)})).map((e=>e.left.content)).join("\n")}(e);return t("div",{class:"change-group"},e.map((e=>this.renderSplitRow(e))),n&&this.renderBlockCopyButton(n))}renderSplitRow(e){var n,o,r,i,s,l,a,d,c,f;const u=null!==(o=null===(n=e.left)||void 0===n?void 0:n.type)&&void 0!==o?o:"empty",h=null!==(i=null===(r=e.right)||void 0===r?void 0:r.type)&&void 0!==i?i:"empty",b=(null===(s=e.left)||void 0===s?void 0:s.oldLineNumber)?this.getTranslation("code-diff.old-line",{number:e.left.oldLineNumber}):void 0,v=(null===(l=e.right)||void 0===l?void 0:l.newLineNumber)?this.getTranslation("code-diff.new-line",{number:e.right.newLineNumber}):void 0;return t("div",{class:"diff-line diff-line--split",role:"row"},t("span",{class:"line-number line-number--old",role:"cell","aria-label":b},null!==(d=null===(a=e.left)||void 0===a?void 0:a.oldLineNumber)&&void 0!==d?d:""),t("span",{class:`split-content split-content--left split-content--${u}`,role:"cell"},e.left?this.renderContent(e.left):""),t("span",{class:"line-number line-number--new",role:"cell","aria-label":v},null!==(f=null===(c=e.right)||void 0===c?void 0:c.newLineNumber)&&void 0!==f?f:""),t("span",{class:`split-content split-content--right split-content--${h}`,role:"cell"},e.right?this.renderContent(e.right):""))}renderBlockCopyButton(e){return t("limel-icon-button",{class:"change-group__copy",elevated:!0,label:this.getTranslation("code-diff.copy-change"),icon:"copy",onClick:()=>this.copyToClipboard(e)})}renderContent(e){return this.isRenderingRemovedLine="removed"===e.type&&this.searchTerm.length>0,e.segments&&0!==e.segments.length?e.segments.map((t=>this.renderSegment(t,e.type))):this.renderSyntaxTokens(e.content)}renderSegment(e,n){const o=this.renderSyntaxTokens(e.value);return"equal"===e.type?o:t("mark",{class:"removed"===n?"segment--removed":"segment--added"},o)}renderSyntaxTokens(e){const t=function(e,t){return t&&0!==e.length&&"json"===t?function(e){const t=[];let n=0;M.lastIndex=0;let o=M.exec(e);for(;null!==o;){o.index>n&&t.push({value:e.slice(n,o.index),type:"plain"});const r=$(o),i=o[0];if("string"===r){const n=e.slice(o.index+i.length);/^\s*:/.test(n)?t.push({value:i,type:"key"}):t.push({value:i,type:"string"})}else t.push({value:i,type:r});n=o.index+i.length,o=M.exec(e)}return n<e.length&&t.push({value:e.slice(n),type:"plain"}),t}(e):[{value:e,type:"plain"}]}(e,this.language);return 1===t.length&&"plain"===t[0].type?this.renderSearchableText(e):t.map((e=>this.renderSyntaxToken(e)))}renderSyntaxToken(e){const n=this.renderSearchableText(e.value);return"plain"===e.type?n:t("span",{class:`syntax--${e.type}`},n)}renderSearchableText(e){if(!this.isRenderingRemovedLine||!this.activeSearchRegex)return e;const n=e.split(this.activeSearchRegex);return 1===n.length?e:n.map(((e,n)=>{if(n%2==0)return e;const o=this.searchMatchCounter++;return t("mark",{key:`match-${o}`,class:{"search-match":!0,"search-match--current":o===this.currentMatchIndex}},e)}))}renderCollapsedRow(e,n){return t("div",{class:"diff-line diff-line--collapsed",role:"row"},t("button",{class:"expand-button",type:"button",onClick:()=>this.expandHunk(n),"aria-label":this.getTranslation("code-diff.show-hidden-lines",{count:e})},this.getTranslation("code-diff.hidden-lines",{count:e})))}renderCollapsedAfterRow(e){return t("div",{class:"diff-line diff-line--collapsed",role:"row"},t("button",{class:"expand-button",type:"button",onClick:()=>this.expandAfter(),"aria-label":this.getTranslation("code-diff.show-hidden-lines",{count:e})},this.getTranslation("code-diff.hidden-lines",{count:e})))}expandHunk(e){const t=[...this.diffResult.hunks],n=t[e],o=e>0?t[e-1].startIndex+t[e-1].lines.length:0,r=this.diffResult.allLines.slice(o,n.startIndex);t[e]=Object.assign(Object.assign({},n),{lines:[...r,...n.lines],collapsedBefore:void 0,startIndex:o}),this.diffResult=Object.assign(Object.assign({},this.diffResult),{hunks:t}),this.liveAnnouncement=this.getTranslation("code-diff.expanded-lines")}expandAfter(){const e=[...this.diffResult.hunks],t=e.length-1,n=e[t],o=this.diffResult.allLines.slice(n.startIndex+n.lines.length);e[t]=Object.assign(Object.assign({},n),{lines:[...n.lines,...o]}),this.diffResult=Object.assign(Object.assign({},this.diffResult),{hunks:e,collapsedAfter:void 0}),this.liveAnnouncement=this.getTranslation("code-diff.expanded-lines-end")}getTranslation(e,t){return r.get(e,this.translationLanguage,t)}get host(){return o(this)}static get watchers(){return{oldValue:[{watchInputs:0}],newValue:[{watchInputs:0}],contextLines:[{watchInputs:0}],reformatJson:[{watchInputs:0}],layout:[{watchInputs:0}]}}};A.style='@charset "UTF-8";*,*::before,*::after{box-sizing:border-box;min-width:0;min-height:0}:host(limel-code-diff){--diff-added-bg:rgb(var(--color-green-default), 0.1);--diff-added-bg-hover:rgb(var(--color-green-default), 0.3);--diff-added-highlight-bg:rgb(var(--color-green-default), 0.3);--diff-removed-bg:rgb(var(--color-red-default), 0.1);--diff-removed-bg-hover:rgb(var(--color-red-default), 0.3);--diff-removed-highlight-bg:rgb(var(--color-red-default), 0.3);--diff-context-bg:transparent;--diff-indicator-added-color:rgb(var(--color-green-default));--diff-indicator-removed-color:rgb(var(--color-red-default));--diff-stat-added-color:rgb(var(--color-green-default));--diff-stat-removed-color:rgb(var(--color-red-default));--search-match-bg:rgb(var(--color-amber-default), 0.3);--search-match-current-bg:rgb(var(--color-amber-default), 0.6);--diff-line-hover-bg:rgb(var(--contrast-800), 0.08);--diff-gutter-bg:rgb(var(--contrast-200));--diff-gutter-text-color:rgb(var(--contrast-700));--diff-text-color:rgb(var(--contrast-1100));--diff-border-color:rgb(var(--contrast-400));--diff-collapsed-bg:rgb(var(--contrast-200));--diff-collapsed-text-color:rgb(var(--contrast-800));--diff-header-bg:rgb(var(--contrast-200));--diff-empty-text-color:rgb(var(--contrast-700));--diff-split-divider-color:rgb(var(--contrast-400));--diff-empty-cell-bg:rgb(var(--contrast-100));--syntax-string-color:rgb(var(--color-green-dark));--syntax-number-color:rgb(var(--color-blue-default));--syntax-boolean-color:rgb(var(--color-amber-darker));--syntax-key-color:rgb(var(--color-sky-dark));--syntax-null-color:rgb(var(--contrast-700));--syntax-punctuation-color:rgb(var(--contrast-700));--search-bar-bg:rgb(var(--contrast-100));--search-bar-border:rgb(var(--contrast-400));--limel-code-diff-line-number-padding:0.25rem;font-family:ui-sans-serif, system-ui, sans-serif;display:flex;flex-direction:column;width:100%;height:100%;color:var(--diff-text-color);border:1px solid var(--diff-border-color);border-radius:0.5rem;max-height:var(--code-diff-max-height, none)}.screen-reader-only{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}.diff-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0.125rem 0.125rem 0.125rem 0.5rem;background:var(--diff-header-bg);border-bottom:1px solid var(--diff-border-color);font-family:ui-sans-serif, system-ui, sans-serif;font-size:0.75rem;border-radius:0.5rem 0.5rem 0 0}.diff-header__labels{display:flex;gap:0.75rem;font-weight:500}.diff-header__old,.diff-header__new{padding:0.125rem 0.25rem;border-radius:0.25rem;box-shadow:var(--shadow-brighten-edges-outside)}.diff-header__old{background-color:var(--diff-removed-bg)}.diff-header__new{background-color:var(--diff-added-bg)}.diff-header__actions{display:flex;align-items:center;gap:0.25rem}.search-toggle--active{--limel-theme-on-surface-color:var(--mdc-theme-primary)}.diff-header__stats{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;display:flex;gap:0.5rem;margin-right:0.5rem}.stat{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.8125rem;font-weight:600}.stat--added{color:var(--diff-stat-added-color)}.stat--removed{color:var(--diff-stat-removed-color)}.search-bar{flex-shrink:0;display:flex;align-items:center;gap:0.25rem;padding:0.25rem 0 0.25rem 0.25rem;background:var(--search-bar-bg);border-bottom:1px solid var(--search-bar-border)}.search-bar limel-action-bar{--action-bar-background-color:transparent;min-width:2.5rem;flex-shrink:0}.search-bar limel-input-field{flex-grow:1}.search-bar__count{color:var(--diff-collapsed-text-color);white-space:nowrap;min-width:4rem;text-align:center;font-size:0.75rem}.search-match{background:var(--search-match-bg);color:inherit;border-radius:0.125rem}.search-match--current{background:var(--search-match-current-bg);outline:1px solid rgb(var(--color-amber-dark), 0.5)}.change-group{position:relative}.change-group__copy{--icon-background-color:rgb(var(--contrast-100));scale:0.9;position:absolute;top:0.125rem;right:0.5rem;display:none}.change-group:hover .change-group__copy{display:inline-flex}.diff-body{flex-grow:1;overflow-x:auto;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--code-diff-font-size, 0.75rem)}.diff-body:focus{outline:none}.diff-body:focus-visible{outline:0.125rem solid rgb(var(--color-blue-default));outline-offset:0.125rem;border-radius:0.25rem}.diff-line{display:flex;align-items:stretch;min-height:1.25rem;line-height:1.25rem}.diff-line:hover .line-content{transition-duration:0.2s;background:var(--diff-line-hover-bg)}.diff-line--added .line-content{background:var(--diff-added-bg)}.diff-line--added .line-indicator{color:var(--diff-indicator-added-color)}.diff-line--added:hover .line-content{background:var(--diff-added-bg-hover)}.diff-line--removed .line-content{background:var(--diff-removed-bg)}.diff-line--removed .line-indicator{color:var(--diff-indicator-removed-color)}.diff-line--removed:hover .line-content{background:var(--diff-removed-bg-hover)}.diff-line--context .line-content{background:var(--diff-context-bg)}.diff-line--collapsed{display:flex;justify-content:center;background:var(--diff-collapsed-bg);border-top:1px solid var(--diff-border-color);border-bottom:1px solid var(--diff-border-color)}.diff-line--focused{outline:0.125rem solid rgb(var(--color-blue-default));outline-offset:-0.125rem;z-index:1}.line-number{display:inline-flex;align-items:center;justify-content:flex-end;min-width:calc(1ch + 2 * var(--limel-code-diff-line-number-padding));width:var(--limel-line-number-min-width);padding:0 var(--limel-code-diff-line-number-padding);background:var(--diff-gutter-bg);color:var(--diff-gutter-text-color);user-select:none;text-align:right;flex-shrink:0}.line-number--old{border-right:1px solid var(--diff-border-color)}.line-indicator{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;flex-shrink:0;user-select:none;font-weight:600;background:var(--diff-gutter-bg)}.line-content{flex:1;padding:0 0.75rem;white-space:pre;overflow-x:visible;min-width:0;transition:background-color 0.6s ease}mark{background:transparent;color:inherit;border-radius:0.125rem}mark.segment--added{background:var(--diff-added-highlight-bg)}mark.segment--removed{background:var(--diff-removed-highlight-bg)}.syntax--string{color:var(--syntax-string-color)}.syntax--number{color:var(--syntax-number-color)}.syntax--boolean{color:var(--syntax-boolean-color)}.syntax--null{color:var(--syntax-null-color);font-style:italic}.syntax--key{color:var(--syntax-key-color)}.syntax--punctuation{color:var(--syntax-punctuation-color)}button.expand-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.expand-button:hover,button.expand-button:focus,button.expand-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-button:hover,button.expand-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.expand-button:hover{box-shadow:var(--button-shadow-hovered)}button.expand-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-button:hover,button.expand-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.expand-button:focus{outline:none}button.expand-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.expand-button{padding:0 0.75rem;border-radius:0.25rem;margin:0.125rem;width:calc(100% - 0.25rem);text-align:center}.diff-empty{padding:2rem;text-align:center;color:var(--diff-empty-text-color);font-style:italic}.diff-line--split{display:flex;align-items:stretch;min-height:1.25rem;line-height:1.25rem}.diff-line--split:hover .split-content--removed{background:var(--diff-removed-bg-hover)}.diff-line--split:hover .split-content--added{background:var(--diff-added-bg-hover)}.diff-line--split:hover .split-content--context{background:var(--diff-line-hover-bg)}.split-content{flex:1;padding:0 0.75rem;white-space:pre;overflow-x:visible;min-width:0}.split-content--left{border-right:1px solid var(--diff-split-divider-color)}.split-content--removed{background:var(--diff-removed-bg)}.split-content--added{background:var(--diff-added-bg)}.split-content--context{background:var(--diff-context-bg)}.split-content--empty{background:var(--diff-empty-cell-bg)}.split-content--left{overflow-x:hidden;text-overflow:ellipsis}.change-group:has(.diff-line--split)>.change-group__copy{right:calc(50% - var(--limel-line-number-min-width))}:host(limel-code-diff[line-wrapping]) .diff-body{overflow-x:hidden}:host(limel-code-diff[line-wrapping]) .line-content,:host(limel-code-diff[line-wrapping]) .split-content{white-space:pre-wrap;overflow-wrap:break-word;word-break:break-all}:host(limel-code-diff[line-wrapping]) .diff-line--split .split-content{flex:1 1 0%;max-width:calc(50% - var(--limel-line-number-min-width))}';export{A as limel_code_diff}
1
+ import{r as e,h as t,H as n,a as o}from"./p-BGxJfR2f.js";import{t as r}from"./p-DgqE77nk.js";class i{diff(e,t,n={}){let o;"function"==typeof n?(o=n,n={}):"callback"in n&&(o=n.callback);const r=this.castInput(e,n),i=this.castInput(t,n),s=this.removeEmpty(this.tokenize(r,n)),l=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(s,l,n,o)}diffWithOptionsObj(e,t,n,o){var r;const i=e=>(e=this.postProcess(e,n),o?void setTimeout((function(){o(e)}),0):e),s=t.length,l=e.length;let a=1,d=s+l;null!=n.maxEditLength&&(d=Math.min(d,n.maxEditLength));const c=null!==(r=n.timeout)&&void 0!==r?r:1/0,f=Date.now()+c,u=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(u[0],t,e,0,n);if(u[0].oldPos+1>=l&&h+1>=s)return i(this.buildValues(u[0].lastComponent,t,e));let b=-1/0,v=1/0;const p=()=>{for(let o=Math.max(b,-a);o<=Math.min(v,a);o+=2){let r;const a=u[o-1],d=u[o+1];a&&(u[o-1]=void 0);let c=!1;if(d){const e=d.oldPos-o;c=d&&0<=e&&e<s}const f=a&&a.oldPos+1<l;if(c||f){if(r=!f||c&&a.oldPos<d.oldPos?this.addToPath(d,!0,!1,0,n):this.addToPath(a,!1,!0,1,n),h=this.extractCommon(r,t,e,o,n),r.oldPos+1>=l&&h+1>=s)return i(this.buildValues(r.lastComponent,t,e))||!0;u[o]=r,r.oldPos+1>=l&&(v=Math.min(v,o-1)),h+1>=s&&(b=Math.max(b,o+1))}else u[o]=void 0}a++};if(o)!function e(){setTimeout((function(){if(a>d||Date.now()>f)return o(void 0);p()||e()}),0)}();else for(;a<=d&&Date.now()<=f;){const e=p();if(e)return e}}addToPath(e,t,n,o,r){const i=e.lastComponent;return i&&!r.oneChangePerToken&&i.added===t&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}}extractCommon(e,t,n,o,r){const i=t.length,s=n.length;let l=e.oldPos,a=l-o,d=0;for(;a+1<i&&l+1<s&&this.equals(n[l+1],t[a+1],r);)a++,l++,d++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return d&&!r.oneChangePerToken&&(e.lastComponent={count:d,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,a}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const o=[];let r;for(;e;)o.push(e),r=e.previousComponent,delete e.previousComponent,e=r;o.reverse();const i=o.length;let s=0,l=0,a=0;for(;s<i;s++){const e=o[s];if(e.removed)e.value=this.join(n.slice(a,a+e.count)),a+=e.count;else{if(!e.added&&this.useLongestToken){let o=t.slice(l,l+e.count);o=o.map((function(e,t){const o=n[a+t];return o.length>e.length?o:e})),e.value=this.join(o)}else e.value=this.join(t.slice(l,l+e.count));l+=e.count,e.added||(a+=e.count)}}return o}}function s(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function l(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function a(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function d(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function c(e,t){return a(e,t,"")}function f(e,t){return d(e,t,"")}function u(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let o=t.length;e.length<t.length&&(o=e.length);const r=Array(o);let i=0;r[0]=0;for(let e=1;e<o;e++){for(r[e]=t[e]==t[i]?r[i]:i;i>0&&t[e]!=t[i];)i=r[i];t[e]==t[i]&&i++}i=0;for(let o=n;o<e.length;o++){for(;i>0&&e[o]!=t[i];)i=r[i];e[o]==t[i]&&i++}return i}(e,t))}function h(e,t){const n=[];for(const o of Array.from(t.segment(e))){const e=o.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function b(e,t){if(t)return p(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function v(e,t){if(t)return p(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function p(e,t){if(!t)return[v(e),b(e)];if("word"!=t.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');const n=h(e,t),o=n[0],r=n[n.length-1];return[/\s/.test(o)?o:"",/\s/.test(r)?r:""]}const m="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",g=new RegExp(`[${m}]+|\\s+|[^${m}]`,"ug"),x=new class extends i{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){const o=t.intlSegmenter;if("word"!=o.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');n=h(e,o)}else n=e.match(g)||[];const o=[];let r=null;return n.forEach((e=>{/\s/.test(e)?o.push(null==r?e:o.pop()+e):null!=r&&/\s/.test(r)?o.push(o[o.length-1]==r?o.pop()+e:r+e):o.push(e),r=e})),o}join(e){return e.map(((e,t)=>0==t?e:e.replace(/^\s+/,""))).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,o=null,r=null;return e.forEach((e=>{e.added?o=e:e.removed?r=e:((o||r)&&y(n,r,o,e,t.intlSegmenter),n=e,o=null,r=null)})),(o||r)&&y(n,r,o,null,t.intlSegmenter),e}};function y(e,t,n,o,r){if(t&&n){const[i,u]=p(t.value,r),[h,b]=p(n.value,r);if(e){const o=s(i,h);e.value=d(e.value,h,o),t.value=c(t.value,o),n.value=c(n.value,o)}if(o){const e=l(u,b);o.value=a(o.value,b,e),t.value=f(t.value,e),n.value=f(n.value,e)}}else if(n){if(e){const e=v(n.value,r);n.value=n.value.substring(e.length)}if(o){const e=v(o.value,r);o.value=o.value.substring(e.length)}}else if(e&&o){const n=v(o.value,r),[i,u]=p(t.value,r),h=s(n,i);t.value=c(t.value,h);const b=l(c(n,h),u);t.value=f(t.value,b),o.value=a(o.value,n,b),e.value=d(e.value,n,n.slice(0,n.length-b.length))}else if(o){const e=v(o.value,r),n=u(b(t.value,r),e);t.value=f(t.value,n)}else if(e){const n=u(b(e.value,r),v(t.value,r));t.value=c(t.value,n)}}const w=new class extends i{constructor(){super(...arguments),this.tokenize=k}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function k(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));const n=[],o=e.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let e=0;e<o.length;e++){const r=o[e];e%2&&!t.newlineIsToken?n[n.length-1]+=r:n.push(r)}return n}function _(e,t,n){const o=[];for(;t<e.length&&"removed"===e[t].type;)o.push(e[t]),t++;const r=[];for(;t<e.length&&"added"===e[t].type;)r.push(e[t]),t++;const i=Math.max(o.length,r.length);for(let e=0;e<i;e++)n.push({left:e<o.length?o[e]:void 0,right:e<r.length?r[e]:void 0});return t}function C(e,t=!1){if("object"==typeof e&&null!==e)return JSON.stringify(S(e),null,4);if("string"==typeof e&&t)try{const t=JSON.parse(e);return JSON.stringify(S(t),null,4)}catch(t){return e}return String(null!=e?e:"")}function S(e){if(Array.isArray(e))return e.map(S);if(null!==e&&"object"==typeof e){const t={},n=Object.keys(e).sort(((e,t)=>e.localeCompare(t)));for(const o of n)t[o]=S(e[o]);return t}return e}function j(e){if(!e)return[];const t=e.split("\n");return t.length>0&&""===t.at(-1)&&t.pop(),t}function D(e,t){const n=x.diff(e,t,undefined);const o=[],r=[];for(const e of n)e.added?r.push({value:e.value,type:"added"}):e.removed?o.push({value:e.value,type:"removed"}):(o.push({value:e.value,type:"equal"}),r.push({value:e.value,type:"equal"}));return[o,r]}const O=[[/"(?:[^"\\]|\\.)*"/,"string"],[/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/,"number"],[/\b(?:true|false)\b/,"boolean"],[/\bnull\b/,"null"],[/[{}[\]:,]/,"punctuation"]],M=new RegExp(O.map((([e])=>`(${e.source})`)).join("|"),"g");function $(e){for(const[t,[,n]]of O.entries())if(void 0!==e[t+1])return n;return"plain"}const A=class{constructor(t){e(this,t),this.oldValue="",this.newValue="",this.layout="unified",this.contextLines=3,this.lineWrapping=!0,this.reformatJson=!1,this.translationLanguage="en",this.diffResult={hunks:[],additions:0,deletions:0,allLines:[]},this.liveAnnouncement="",this.copyState="idle",this.searchVisible=!1,this.searchTerm="",this.currentMatchIndex=0,this.focusedRowIndex=-1,this.normalizedOldText="",this.searchMatchCounter=0,this.totalSearchMatches=0,this.isRenderingRemovedLine=!1,this.activeSearchRegex=null,this.prevSearchVisible=!1}componentWillLoad(){this.recomputeDiff()}componentDidRender(){var e,t;if(this.searchVisible&&!this.prevSearchVisible&&(null===(e=this.searchInputEl)||void 0===e||e.focus()),this.prevSearchVisible=this.searchVisible,this.searchTerm&&this.totalSearchMatches>0){const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".search-match--current");null==e||e.scrollIntoView({block:"center",behavior:"smooth"})}}render(){var e;this.searchMatchCounter=0,this.activeSearchRegex=(e=this.searchTerm)?new RegExp(`(${function(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}(e)})`,"gi"):null;const o=this.renderDiff();this.totalSearchMatches=this.searchMatchCounter;const r=this.computeLineNumberWidth();return t(n,{key:"b96c5b9625e734cd951697360efd2ca9637d4c3c",style:{"--limel-line-number-min-width":r}},this.renderHeader(),this.renderScreenReaderSummary(),this.searchVisible&&this.renderSearchBar(),t("div",{key:"6a53529bee76c32d996b766118df5ebdb767bb7e",class:"diff-body",role:"table","aria-label":this.getTranslation("code-diff.table-label"),tabindex:"0",onKeyDown:e=>this.handleKeyDown(e)},o),t("div",{key:"f1c882328e8b6144c004150f0237010744e46b94",class:"screen-reader-only",role:"status","aria-live":"polite","aria-atomic":"true"},this.liveAnnouncement))}watchInputs(){this.recomputeDiff()}recomputeDiff(){const e=C(this.oldValue,this.reformatJson),t=C(this.newValue,this.reformatJson);this.normalizedOldText=e,this.diffResult=function(e,t,n=3){const o=function(e,t){const n=w.diff(e,t,void 0),o=[];let r=1,i=1;for(const e of n){const t=j(e.value);for(const n of t)o.push(e.added?{type:"added",content:n,newLineNumber:i++}:e.removed?{type:"removed",content:n,oldLineNumber:r++}:{type:"context",content:n,oldLineNumber:r++,newLineNumber:i++})}return function(e){let t=0;for(;t<e.length;){const n=t;for(;t<e.length&&"removed"===e[t].type;)t++;const o=t,r=t;for(;t<e.length&&"added"===e[t].type;)t++;const i=o-n,s=t-r;if(i>0&&s>0){const t=Math.min(i,s);for(let o=0;o<t;o++){const t=e[n+o],i=e[r+o],[s,l]=D(t.content,i.content);t.segments=s,i.segments=l}}t===n&&t++}}(o),o}(e,t);return function(e,t){if(0===e.length)return{hunks:[],additions:0,deletions:0,allLines:e};let n=0,o=0;for(const t of e)"added"===t.type?n++:"removed"===t.type&&o++;if(0===n&&0===o)return{hunks:[],additions:0,deletions:0,allLines:e};const r=[];for(const[t,n]of e.entries())"context"!==n.type&&r.push(t);const i=function(e,t,n){if(0===e.length)return[];const o=[];let r=Math.max(0,e[0]-n),i=Math.min(t,e[0]+n+1);for(let s=1;s<e.length;s++){const l=Math.max(0,e[s]-n),a=Math.min(t,e[s]+n+1);l<=i?i=Math.max(i,a):(o.push({start:r,end:i}),r=l,i=a)}return o.push({start:r,end:i}),o}(r,e.length,t),s=[];let l=0;for(const t of i){const n=e.slice(t.start,t.end),o=t.start-l;s.push({lines:n,collapsedBefore:o>0?o:void 0,startIndex:t.start}),l=t.end}const a=i.at(-1);return{hunks:s,additions:n,deletions:o,collapsedAfter:a.end<e.length?e.length-a.end:void 0,allLines:e}}(o,n)}(e,t,this.contextLines),this.focusedRowIndex=-1}formatSrSummary(){const{additions:e,deletions:t}=this.diffResult;if(0===e&&0===t)return null;const n=[];return e>0&&n.push(this.getTranslation(1===e?"code-diff.diff-addition":"code-diff.diff-additions",{count:e})),t>0&&n.push(this.getTranslation(1===t?"code-diff.diff-deletion":"code-diff.diff-deletions",{count:t})),this.getTranslation("code-diff.diff-summary",{parts:n.join(", ")})}renderScreenReaderSummary(){const e=this.formatSrSummary();return t("div",{class:"screen-reader-only",role:"status","aria-live":"polite"},null!=e?e:this.getTranslation("code-diff.no-differences-found"))}handleKeyDown(e){if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const t=this.getDiffRows();0!==t.length&&(this.focusedRowIndex="ArrowDown"===e.key?Math.min(this.focusedRowIndex+1,t.length-1):Math.max(this.focusedRowIndex-1,0),this.updateRowFocus(t))}getDiffRows(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(".diff-body");return t?[...t.querySelectorAll(".diff-line:not(.diff-line--collapsed)")]:[]}updateRowFocus(e){for(const t of e)t.removeAttribute("tabindex"),t.classList.remove("diff-line--focused");const t=e[this.focusedRowIndex];t&&(t.setAttribute("tabindex","-1"),t.classList.add("diff-line--focused"),t.focus(),this.announceLine(t))}announceLine(e){var t,n;let o=this.getTranslation("code-diff.line-context");e.classList.contains("diff-line--added")?o=this.getTranslation("code-diff.line-added"):e.classList.contains("diff-line--removed")&&(o=this.getTranslation("code-diff.line-removed"));const r=null!==(n=null===(t=e.querySelector(".line-content, .split-content"))||void 0===t?void 0:t.textContent)&&void 0!==n?n:"",i=r.length>80?r.slice(0,80)+"…":r;this.liveAnnouncement=`${o}: ${i}`}renderHeader(){var e,n;const o=null!==(e=this.oldHeading)&&void 0!==e?e:this.getTranslation("code-diff.old-heading"),r=null!==(n=this.newHeading)&&void 0!==n?n:this.getTranslation("code-diff.new-heading"),{additions:i,deletions:s}=this.diffResult,l=i>0||s>0;return t("div",{class:"diff-header"},t("div",{class:"diff-header__labels"},t("span",{class:"diff-header__old"},o),t("span",{class:"diff-header__new"},r)),t("div",{class:"diff-header__actions"},t("div",{class:"diff-header__stats"},i>0&&t("span",{class:"stat stat--added"},"+",i),s>0&&t("span",{class:"stat stat--removed"},"-",s)),l&&this.renderCopyButton(),s>0&&this.renderSearchToggle()))}renderCopyButton(){const e=this.getTranslation("copied"===this.copyState?"code-diff.copied":"code-diff.copy-old-version");return t("limel-icon-button",{label:e,icon:"copied"===this.copyState?"checkmark":"copy",onClick:()=>this.copyToClipboard(this.normalizedOldText)})}async copyToClipboard(e){try{await navigator.clipboard.writeText(e),this.copyState="copied",this.liveAnnouncement=this.getTranslation("code-diff.copied-to-clipboard"),setTimeout((()=>{this.copyState="idle"}),2e3)}catch(e){}}renderSearchToggle(){return t("limel-icon-button",{class:{"search-toggle--active":this.searchVisible},label:this.getTranslation("code-diff.search"),icon:"search",onClick:()=>this.toggleSearch()})}renderSearchBar(){const e=0===this.totalSearchMatches?this.getTranslation("code-diff.no-matches"):this.getTranslation("code-diff.match-count",{current:this.currentMatchIndex+1,total:this.totalSearchMatches});return t("div",{class:"search-bar"},t("limel-input-field",{class:"search-bar__input",type:"search",placeholder:this.getTranslation("code-diff.search")+"…",value:this.searchTerm,onChange:e=>this.onSearchInput(e),onKeyDown:e=>this.onSearchKeyDown(e),ref:e=>this.searchInputEl=e}),t("span",{class:"search-bar__count"},e),t("limel-action-bar",{actions:this.getSearchActions(),onItemSelected:e=>this.onSearchAction(e)}))}toggleSearch(){this.searchVisible=!this.searchVisible,this.searchVisible||(this.searchTerm="",this.currentMatchIndex=0)}onSearchInput(e){this.searchTerm=e.detail,this.currentMatchIndex=0}onSearchKeyDown(e){"Enter"===e.key?(e.preventDefault(),this.navigateSearch(e.shiftKey?-1:1)):"Escape"===e.key&&this.toggleSearch()}computeLineNumberWidth(){return`calc(${String(this.diffResult.allLines.length).length}ch + 2 * var(--limel-code-diff-line-number-padding))`}getSearchActions(){const e=0===this.totalSearchMatches;return[{text:this.getTranslation("code-diff.previous-match"),icon:"-lime-caret-top",iconOnly:!0,disabled:e,value:"prev"},{text:this.getTranslation("code-diff.next-match"),icon:"-lime-caret-bottom",iconOnly:!0,disabled:e,value:"next"},{text:this.getTranslation("code-diff.close-search"),icon:"cancel",iconOnly:!0,value:"close"}]}onSearchAction(e){const{value:t}=e.detail;"prev"===t?this.navigateSearch(-1):"next"===t?this.navigateSearch(1):"close"===t&&this.toggleSearch()}navigateSearch(e){this.currentMatchIndex=function(e,t,n){return 0===n?0:(e+t+n)%n}(this.currentMatchIndex,e,this.totalSearchMatches)}renderDiff(){const{hunks:e,collapsedAfter:n}=this.diffResult;return 0===e.length?t("div",{class:"diff-empty"},this.getTranslation("code-diff.no-differences")):this.renderHunks(e,n,"split"===this.layout?e=>this.renderSplitHunkRows(e):e=>this.renderHunkLines(e))}renderHunks(e,t,n){const o=[];for(const[t,r]of e.entries())r.collapsedBefore&&o.push(this.renderCollapsedRow(r.collapsedBefore,t)),o.push(...n(r));return t&&o.push(this.renderCollapsedAfterRow(t)),o}renderHunkLines(e){const t=[];let n=0;for(;n<e.lines.length;){const o=e.lines[n];if("context"===o.type){t.push(this.renderLine(o)),n++;continue}const r=[];for(;n<e.lines.length&&"context"!==e.lines[n].type;)r.push(e.lines[n]),n++;t.push(this.renderChangeBlock(r))}return t}renderChangeBlock(e){const n=function(e){return e.filter((e=>"removed"===e.type)).map((e=>e.content)).join("\n")}(e);return t("div",{class:"change-group"},e.map((e=>this.renderLine(e))),n&&this.renderBlockCopyButton(n))}renderLine(e){var n,o;const r={added:"+",removed:"-",context:" "}[e.type];return t("div",{class:{"diff-line":!0,[`diff-line--${e.type}`]:!0},role:"row"},t("span",{class:"line-number line-number--old",role:"cell","aria-label":e.oldLineNumber?this.getTranslation("code-diff.old-line",{number:e.oldLineNumber}):void 0},null!==(n=e.oldLineNumber)&&void 0!==n?n:""),t("span",{class:"line-number line-number--new",role:"cell","aria-label":e.newLineNumber?this.getTranslation("code-diff.new-line",{number:e.newLineNumber}):void 0},null!==(o=e.newLineNumber)&&void 0!==o?o:""),t("span",{class:"line-indicator",role:"cell"},r),t("span",{class:"line-content",role:"cell"},this.renderContent(e)))}renderSplitHunkRows(e){var t,n,o,r;const i=function(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];"context"!==o.type?n=_(e,n,t):(t.push({left:o,right:o}),n++)}return t}(e.lines),s=[];let l=0;for(;l<i.length;){const e=i[l];if("context"===(null===(t=e.left)||void 0===t?void 0:t.type)&&"context"===(null===(n=e.right)||void 0===n?void 0:n.type)){s.push(this.renderSplitRow(e)),l++;continue}const a=[];for(;l<i.length;){const e=i[l];if("context"===(null===(o=e.left)||void 0===o?void 0:o.type)&&"context"===(null===(r=e.right)||void 0===r?void 0:r.type))break;a.push(e),l++}s.push(this.renderSplitChangeBlock(a))}return s}renderSplitChangeBlock(e){const n=function(e){return e.filter((e=>{var t;return"removed"===(null===(t=e.left)||void 0===t?void 0:t.type)})).map((e=>e.left.content)).join("\n")}(e);return t("div",{class:"change-group"},e.map((e=>this.renderSplitRow(e))),n&&this.renderBlockCopyButton(n))}renderSplitRow(e){var n,o,r,i,s,l,a,d,c,f;const u=null!==(o=null===(n=e.left)||void 0===n?void 0:n.type)&&void 0!==o?o:"empty",h=null!==(i=null===(r=e.right)||void 0===r?void 0:r.type)&&void 0!==i?i:"empty",b=(null===(s=e.left)||void 0===s?void 0:s.oldLineNumber)?this.getTranslation("code-diff.old-line",{number:e.left.oldLineNumber}):void 0,v=(null===(l=e.right)||void 0===l?void 0:l.newLineNumber)?this.getTranslation("code-diff.new-line",{number:e.right.newLineNumber}):void 0;return t("div",{class:"diff-line diff-line--split",role:"row"},t("span",{class:"line-number line-number--old",role:"cell","aria-label":b},null!==(d=null===(a=e.left)||void 0===a?void 0:a.oldLineNumber)&&void 0!==d?d:""),t("span",{class:`split-content split-content--left split-content--${u}`,role:"cell"},e.left?this.renderContent(e.left):""),t("span",{class:"line-number line-number--new",role:"cell","aria-label":v},null!==(f=null===(c=e.right)||void 0===c?void 0:c.newLineNumber)&&void 0!==f?f:""),t("span",{class:`split-content split-content--right split-content--${h}`,role:"cell"},e.right?this.renderContent(e.right):""))}renderBlockCopyButton(e){return t("limel-icon-button",{class:"change-group__copy",elevated:!0,label:this.getTranslation("code-diff.copy-change"),icon:"copy",onClick:()=>this.copyToClipboard(e)})}renderContent(e){return this.isRenderingRemovedLine="removed"===e.type&&this.searchTerm.length>0,e.segments&&0!==e.segments.length?e.segments.map((t=>this.renderSegment(t,e.type))):this.renderSyntaxTokens(e.content)}renderSegment(e,n){const o=this.renderSyntaxTokens(e.value);return"equal"===e.type?o:t("mark",{class:"removed"===n?"segment--removed":"segment--added"},o)}renderSyntaxTokens(e){const t=function(e,t){return t&&0!==e.length&&"json"===t?function(e){const t=[];let n=0;M.lastIndex=0;let o=M.exec(e);for(;null!==o;){o.index>n&&t.push({value:e.slice(n,o.index),type:"plain"});const r=$(o),i=o[0];if("string"===r){const n=e.slice(o.index+i.length);/^\s*:/.test(n)?t.push({value:i,type:"key"}):t.push({value:i,type:"string"})}else t.push({value:i,type:r});n=o.index+i.length,o=M.exec(e)}return n<e.length&&t.push({value:e.slice(n),type:"plain"}),t}(e):[{value:e,type:"plain"}]}(e,this.language);return 1===t.length&&"plain"===t[0].type?this.renderSearchableText(e):t.map((e=>this.renderSyntaxToken(e)))}renderSyntaxToken(e){const n=this.renderSearchableText(e.value);return"plain"===e.type?n:t("span",{class:`syntax--${e.type}`},n)}renderSearchableText(e){if(!this.isRenderingRemovedLine||!this.activeSearchRegex)return e;const n=e.split(this.activeSearchRegex);return 1===n.length?e:n.map(((e,n)=>{if(n%2==0)return e;const o=this.searchMatchCounter++;return t("mark",{key:`match-${o}`,class:{"search-match":!0,"search-match--current":o===this.currentMatchIndex}},e)}))}renderCollapsedRow(e,n){return t("div",{class:"diff-line diff-line--collapsed",role:"row"},t("button",{class:"expand-button",type:"button",onClick:()=>this.expandHunk(n),"aria-label":this.getTranslation("code-diff.show-hidden-lines",{count:e})},this.getTranslation("code-diff.hidden-lines",{count:e})))}renderCollapsedAfterRow(e){return t("div",{class:"diff-line diff-line--collapsed",role:"row"},t("button",{class:"expand-button",type:"button",onClick:()=>this.expandAfter(),"aria-label":this.getTranslation("code-diff.show-hidden-lines",{count:e})},this.getTranslation("code-diff.hidden-lines",{count:e})))}expandHunk(e){const t=[...this.diffResult.hunks],n=t[e],o=e>0?t[e-1].startIndex+t[e-1].lines.length:0,r=this.diffResult.allLines.slice(o,n.startIndex);t[e]=Object.assign(Object.assign({},n),{lines:[...r,...n.lines],collapsedBefore:void 0,startIndex:o}),this.diffResult=Object.assign(Object.assign({},this.diffResult),{hunks:t}),this.liveAnnouncement=this.getTranslation("code-diff.expanded-lines")}expandAfter(){const e=[...this.diffResult.hunks],t=e.length-1,n=e[t],o=this.diffResult.allLines.slice(n.startIndex+n.lines.length);e[t]=Object.assign(Object.assign({},n),{lines:[...n.lines,...o]}),this.diffResult=Object.assign(Object.assign({},this.diffResult),{hunks:e,collapsedAfter:void 0}),this.liveAnnouncement=this.getTranslation("code-diff.expanded-lines-end")}getTranslation(e,t){return r.get(e,this.translationLanguage,t)}get host(){return o(this)}static get watchers(){return{oldValue:[{watchInputs:0}],newValue:[{watchInputs:0}],contextLines:[{watchInputs:0}],reformatJson:[{watchInputs:0}],layout:[{watchInputs:0}]}}};A.style='@charset "UTF-8";*,*::before,*::after{box-sizing:border-box;min-width:0;min-height:0}:host(limel-code-diff){--diff-added-bg:rgb(var(--color-green-default), 0.1);--diff-added-bg-hover:rgb(var(--color-green-default), 0.3);--diff-added-highlight-bg:rgb(var(--color-green-default), 0.3);--diff-removed-bg:rgb(var(--color-red-default), 0.1);--diff-removed-bg-hover:rgb(var(--color-red-default), 0.3);--diff-removed-highlight-bg:rgb(var(--color-red-default), 0.3);--diff-context-bg:transparent;--diff-indicator-added-color:rgb(var(--color-green-default));--diff-indicator-removed-color:rgb(var(--color-red-default));--diff-stat-added-color:rgb(var(--color-green-default));--diff-stat-removed-color:rgb(var(--color-red-default));--search-match-bg:rgb(var(--color-amber-default), 0.3);--search-match-current-bg:rgb(var(--color-amber-default), 0.6);--diff-line-hover-bg:rgb(var(--contrast-800), 0.08);--diff-gutter-bg:rgb(var(--contrast-200));--diff-gutter-text-color:rgb(var(--contrast-700));--diff-text-color:rgb(var(--contrast-1100));--diff-border-color:rgb(var(--contrast-400));--diff-collapsed-bg:rgb(var(--contrast-200));--diff-collapsed-text-color:rgb(var(--contrast-800));--diff-header-bg:rgb(var(--contrast-200));--diff-empty-text-color:rgb(var(--contrast-700));--diff-split-divider-color:rgb(var(--contrast-400));--diff-empty-cell-bg:rgb(var(--contrast-100));--syntax-string-color:rgb(var(--color-green-dark));--syntax-number-color:rgb(var(--color-blue-default));--syntax-boolean-color:rgb(var(--color-amber-darker));--syntax-key-color:rgb(var(--color-sky-dark));--syntax-null-color:rgb(var(--contrast-700));--syntax-punctuation-color:rgb(var(--contrast-700));--search-bar-bg:rgb(var(--contrast-100));--search-bar-border:rgb(var(--contrast-400));--limel-code-diff-line-number-padding:0.25rem;font-family:ui-sans-serif, system-ui, sans-serif;display:flex;flex-direction:column;width:100%;height:100%;color:var(--diff-text-color);border:1px solid var(--diff-border-color);border-radius:0.5rem;max-height:var(--code-diff-max-height, none)}.screen-reader-only{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}.diff-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0.125rem 0.125rem 0.125rem 0.5rem;background:var(--diff-header-bg);border-bottom:1px solid var(--diff-border-color);font-family:ui-sans-serif, system-ui, sans-serif;font-size:0.75rem;border-radius:0.5rem 0.5rem 0 0}.diff-header__labels{display:flex;gap:0.75rem;font-weight:500}.diff-header__old,.diff-header__new{padding:0.125rem 0.25rem;border-radius:0.25rem;box-shadow:var(--shadow-brighten-edges-outside)}.diff-header__old{background-color:var(--diff-removed-bg)}.diff-header__new{background-color:var(--diff-added-bg)}.diff-header__actions{display:flex;align-items:center;gap:0.25rem}.search-toggle--active{--limel-theme-on-surface-color:var(--mdc-theme-primary)}.diff-header__stats{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;display:flex;gap:0.5rem;margin-right:0.5rem}.stat{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.8125rem;font-weight:600}.stat--added{color:var(--diff-stat-added-color)}.stat--removed{color:var(--diff-stat-removed-color)}.search-bar{flex-shrink:0;display:flex;align-items:center;gap:0.25rem;padding:0.25rem 0 0.25rem 0.25rem;background:var(--search-bar-bg);border-bottom:1px solid var(--search-bar-border)}.search-bar limel-action-bar{--action-bar-background-color:transparent;min-width:2.5rem;flex-shrink:0}.search-bar limel-input-field{flex-grow:1}.search-bar__count{color:var(--diff-collapsed-text-color);white-space:nowrap;min-width:4rem;text-align:center;font-size:0.75rem}.search-match{background:var(--search-match-bg);color:inherit;border-radius:0.125rem}.search-match--current{background:var(--search-match-current-bg);outline:1px solid rgb(var(--color-amber-dark), 0.5)}.change-group{position:relative}.change-group__copy{--icon-background-color:rgb(var(--contrast-100));scale:0.9;position:absolute;top:0.125rem;right:0.5rem;display:none}.change-group:hover .change-group__copy{display:inline-flex}.diff-body{flex-grow:1;overflow-x:auto;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--code-diff-font-size, 0.75rem)}.diff-body:focus{outline:none}.diff-body:focus-visible{outline:0.125rem solid rgb(var(--color-blue-default));outline-offset:0.125rem;border-radius:0.25rem}.diff-line{display:flex;align-items:stretch;min-height:1.25rem;line-height:1.25rem}.diff-line:hover .line-content{transition-duration:0.2s;background:var(--diff-line-hover-bg)}.diff-line--added .line-content{background:var(--diff-added-bg)}.diff-line--added .line-indicator{color:var(--diff-indicator-added-color)}.diff-line--added:hover .line-content{background:var(--diff-added-bg-hover)}.diff-line--removed .line-content{background:var(--diff-removed-bg)}.diff-line--removed .line-indicator{color:var(--diff-indicator-removed-color)}.diff-line--removed:hover .line-content{background:var(--diff-removed-bg-hover)}.diff-line--context .line-content{background:var(--diff-context-bg)}.diff-line--collapsed{display:flex;justify-content:center;background:var(--diff-collapsed-bg);border-top:1px solid var(--diff-border-color);border-bottom:1px solid var(--diff-border-color)}.diff-line--focused{outline:0.125rem solid rgb(var(--color-blue-default));outline-offset:-0.125rem;z-index:1}.line-number{display:inline-flex;align-items:center;justify-content:flex-end;min-width:calc(1ch + 2 * var(--limel-code-diff-line-number-padding));width:var(--limel-line-number-min-width);padding:0 var(--limel-code-diff-line-number-padding);background:var(--diff-gutter-bg);color:var(--diff-gutter-text-color);user-select:none;text-align:right;flex-shrink:0}.line-number--old{border-right:1px solid var(--diff-border-color)}.line-indicator{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;flex-shrink:0;user-select:none;font-weight:600;background:var(--diff-gutter-bg)}.line-content{flex:1;padding:0 0.75rem;white-space:pre;overflow-x:visible;min-width:0;transition:background-color 0.6s ease}mark{background:transparent;color:inherit;border-radius:0.125rem}mark.segment--added{background:var(--diff-added-highlight-bg)}mark.segment--removed{background:var(--diff-removed-highlight-bg)}.syntax--string{color:var(--syntax-string-color)}.syntax--number{color:var(--syntax-number-color)}.syntax--boolean{color:var(--syntax-boolean-color)}.syntax--null{color:var(--syntax-null-color);font-style:italic}.syntax--key{color:var(--syntax-key-color)}.syntax--punctuation{color:var(--syntax-punctuation-color)}button.expand-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.expand-button:hover,button.expand-button:focus,button.expand-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-button:hover,button.expand-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.expand-button:hover{box-shadow:var(--button-shadow-hovered)}button.expand-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-button:hover,button.expand-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.expand-button:focus{outline:none}button.expand-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.expand-button{padding:0 0.75rem;border-radius:0.25rem;margin:0.125rem;width:calc(100% - 0.25rem);text-align:center}.diff-empty{padding:2rem;text-align:center;color:var(--diff-empty-text-color);font-style:italic}.diff-line--split{display:flex;align-items:stretch;min-height:1.25rem;line-height:1.25rem}.diff-line--split:hover .split-content--removed{background:var(--diff-removed-bg-hover)}.diff-line--split:hover .split-content--added{background:var(--diff-added-bg-hover)}.diff-line--split:hover .split-content--context{background:var(--diff-line-hover-bg)}.split-content{flex:1;padding:0 0.75rem;white-space:pre;overflow-x:visible;min-width:0}.split-content--left{border-right:1px solid var(--diff-split-divider-color)}.split-content--removed{background:var(--diff-removed-bg)}.split-content--added{background:var(--diff-added-bg)}.split-content--context{background:var(--diff-context-bg)}.split-content--empty{background:var(--diff-empty-cell-bg)}.split-content--left{overflow-x:hidden;text-overflow:ellipsis}.change-group:has(.diff-line--split)>.change-group__copy{right:calc(50% - var(--limel-line-number-min-width))}:host(limel-code-diff[line-wrapping]) .diff-body{overflow-x:hidden}:host(limel-code-diff[line-wrapping]) .line-content,:host(limel-code-diff[line-wrapping]) .split-content{white-space:pre-wrap;overflow-wrap:break-word;word-break:break-all}:host(limel-code-diff[line-wrapping]) .diff-line--split .split-content{flex:1 1 0%;max-width:calc(50% - var(--limel-line-number-min-width))}';export{A as limel_code_diff}
@@ -1 +1 @@
1
- import{r as i,c as t,h as e,H as s}from"./p-BGxJfR2f.js";import{t as n}from"./p-Cb9R_zmF.js";import{g as r,a,b as o,c as l}from"./p-BCq5M9TE.js";import{f as h}from"./p-u_sd2HMb.js";import{r as d}from"./p-BTSG--2-.js";import"./p-Bu_YRgCL.js";import"./p-CgNJbSP4.js";const p={id:null,text:null,removable:!0},c=class{constructor(e){i(this,e),this.change=t(this,"change"),this.interact=t(this,"interact"),this.required=!1,this.disabled=!1,this.readonly=!1,this.invalid=!1,this.loading=!1,this.accept="*",this.language="en",this.dropZoneTip=()=>this.getTranslation("file.drag-and-drop-tips"),this.handleNewFiles=async i=>{this.preventAndStop(i);const t=i.detail[0];let e=t;const s=null==t?void 0:t.fileContent;if(this.resizeImage&&s instanceof Blob&&this.isResizableImage(s)){const i=Object.assign(Object.assign({},t),{loading:!0,statusText:this.getTranslation("file.optimizing")});this.resizingFile=i;try{const i=await d(s,this.resizeImage);e=Object.assign(Object.assign({},t),{filename:i.name,size:i.size,contentType:i.type,fileContent:i})}catch(i){}if(this.resizingFile!==i)return;this.resizingFile=e}this.change.emit(e)},this.handleChipSetChange=i=>{i.stopPropagation();const t=0===i.detail.length?i.detail[0]:null;t||(this.resizingFile=void 0,this.change.emit(t))},this.handleChipInteract=i=>{this.preventAndStop(i),this.interact.emit(i.detail.id)}}get displayedFile(){var i;return null!==(i=this.value)&&void 0!==i?i:this.resizingFile}handleValueChange(){this.resizingFile=void 0}render(){return e(s,{key:"3f314e0a075c61a8b1e2b4a51451193abc53e12f","aria-busy":this.isBusy?"true":"false"},e("limel-file-dropzone",{key:"8374175635679e2082b4f80d431686f8fd76af61",disabled:this.disabled||this.readonly||!!this.displayedFile,accept:this.accept,onFilesSelected:this.handleNewFiles},this.renderChipset()),this.renderDragAndDropTip(),this.renderSpinner())}get statusText(){var i,t,e;return null!==(e=null===(t=null===(i=this.displayedFile)||void 0===i?void 0:i.statusText)||void 0===t?void 0:t.trim())&&void 0!==e?e:""}get isBusy(){var i,t;return this.loading||Boolean(null===(i=this.displayedFile)||void 0===i?void 0:i.loading)||void 0!==(null===(t=this.displayedFile)||void 0===t?void 0:t.progress)}renderSpinner(){if(this.isBusy)return e("limel-spinner",null)}renderDragAndDropTip(){if(!(this.displayedFile||this.disabled||this.readonly||this.isBusy))return e("div",{class:"drag-and-drop-tip"},e("span",{class:"invisible-label-mock",role:"presentation"},this.label),e("span",{class:"tip"},this.dropZoneTip()))}isResizableImage(i){var t;return Boolean(null===(t=i.type)||void 0===t?void 0:t.startsWith("image/"))&&"image/svg+xml"!==i.type}getChipArray(){const i=this.displayedFile;return i?[Object.assign(Object.assign({},p),{text:i.filename,id:i.id,icon:{name:l(i),title:o(i),color:a(i),backgroundColor:r(i)},badge:this.getBadge(),href:i.href,menuItems:i.menuItems,loading:i.loading,progress:i.progress,invalid:i.invalid})]:[]}getBadge(){var i;return this.statusText?this.statusText:"number"==typeof(null===(i=this.displayedFile)||void 0===i?void 0:i.size)?h(this.displayedFile.size):void 0}renderChipset(){const i=e("limel-chip-set",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,clearAllButton:!1,label:this.label,helperText:this.helperText,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onInteract:this.handleChipInteract,required:this.required,type:"input",value:this.getChipArray()});return this.value?i:e("limel-file-input",{accept:this.accept,disabled:this.disabled||this.readonly},i)}preventAndStop(i){i.stopPropagation(),i.preventDefault()}getTranslation(i){return n.get(i,this.language)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style='@charset "UTF-8";:host(limel-file){--badge-max-width:auto;position:relative}.drag-and-drop-tip{pointer-events:none;position:absolute;box-sizing:border-box;margin:0.25rem;inset:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;border-radius:0.25rem;border:1px dashed rgb(var(--contrast-700));padding:0 0.5rem}.drag-and-drop-tip .invisible-label-mock{flex-shrink:0;opacity:0;padding-right:1rem;padding-left:1.5rem}.drag-and-drop-tip .tip{font-size:smaller;color:var(--limel-theme-text-secondary-on-background-color);height:auto;max-height:3rem;line-height:1;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}limel-spinner{pointer-events:none;position:absolute;inset:0 0.375rem 0 auto;margin:auto}';export{c as limel_file}
1
+ import{r as i,c as t,h as e,H as s}from"./p-BGxJfR2f.js";import{t as n}from"./p-DgqE77nk.js";import{g as r,a,b as o,c as l}from"./p-BCq5M9TE.js";import{f as h}from"./p-u_sd2HMb.js";import{r as d}from"./p-BTSG--2-.js";import"./p-Bu_YRgCL.js";import"./p-CgNJbSP4.js";const p={id:null,text:null,removable:!0},c=class{constructor(e){i(this,e),this.change=t(this,"change"),this.interact=t(this,"interact"),this.required=!1,this.disabled=!1,this.readonly=!1,this.invalid=!1,this.loading=!1,this.accept="*",this.language="en",this.dropZoneTip=()=>this.getTranslation("file.drag-and-drop-tips"),this.handleNewFiles=async i=>{this.preventAndStop(i);const t=i.detail[0];let e=t;const s=null==t?void 0:t.fileContent;if(this.resizeImage&&s instanceof Blob&&this.isResizableImage(s)){const i=Object.assign(Object.assign({},t),{loading:!0,statusText:this.getTranslation("file.optimizing")});this.resizingFile=i;try{const i=await d(s,this.resizeImage);e=Object.assign(Object.assign({},t),{filename:i.name,size:i.size,contentType:i.type,fileContent:i})}catch(i){}if(this.resizingFile!==i)return;this.resizingFile=e}this.change.emit(e)},this.handleChipSetChange=i=>{i.stopPropagation();const t=0===i.detail.length?i.detail[0]:null;t||(this.resizingFile=void 0,this.change.emit(t))},this.handleChipInteract=i=>{this.preventAndStop(i),this.interact.emit(i.detail.id)}}get displayedFile(){var i;return null!==(i=this.value)&&void 0!==i?i:this.resizingFile}handleValueChange(){this.resizingFile=void 0}render(){return e(s,{key:"3f314e0a075c61a8b1e2b4a51451193abc53e12f","aria-busy":this.isBusy?"true":"false"},e("limel-file-dropzone",{key:"8374175635679e2082b4f80d431686f8fd76af61",disabled:this.disabled||this.readonly||!!this.displayedFile,accept:this.accept,onFilesSelected:this.handleNewFiles},this.renderChipset()),this.renderDragAndDropTip(),this.renderSpinner())}get statusText(){var i,t,e;return null!==(e=null===(t=null===(i=this.displayedFile)||void 0===i?void 0:i.statusText)||void 0===t?void 0:t.trim())&&void 0!==e?e:""}get isBusy(){var i,t;return this.loading||Boolean(null===(i=this.displayedFile)||void 0===i?void 0:i.loading)||void 0!==(null===(t=this.displayedFile)||void 0===t?void 0:t.progress)}renderSpinner(){if(this.isBusy)return e("limel-spinner",null)}renderDragAndDropTip(){if(!(this.displayedFile||this.disabled||this.readonly||this.isBusy))return e("div",{class:"drag-and-drop-tip"},e("span",{class:"invisible-label-mock",role:"presentation"},this.label),e("span",{class:"tip"},this.dropZoneTip()))}isResizableImage(i){var t;return Boolean(null===(t=i.type)||void 0===t?void 0:t.startsWith("image/"))&&"image/svg+xml"!==i.type}getChipArray(){const i=this.displayedFile;return i?[Object.assign(Object.assign({},p),{text:i.filename,id:i.id,icon:{name:l(i),title:o(i),color:a(i),backgroundColor:r(i)},badge:this.getBadge(),href:i.href,menuItems:i.menuItems,loading:i.loading,progress:i.progress,invalid:i.invalid})]:[]}getBadge(){var i;return this.statusText?this.statusText:"number"==typeof(null===(i=this.displayedFile)||void 0===i?void 0:i.size)?h(this.displayedFile.size):void 0}renderChipset(){const i=e("limel-chip-set",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,clearAllButton:!1,label:this.label,helperText:this.helperText,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onInteract:this.handleChipInteract,required:this.required,type:"input",value:this.getChipArray()});return this.value?i:e("limel-file-input",{accept:this.accept,disabled:this.disabled||this.readonly},i)}preventAndStop(i){i.stopPropagation(),i.preventDefault()}getTranslation(i){return n.get(i,this.language)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style='@charset "UTF-8";:host(limel-file){--badge-max-width:auto;position:relative}.drag-and-drop-tip{pointer-events:none;position:absolute;box-sizing:border-box;margin:0.25rem;inset:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;border-radius:0.25rem;border:1px dashed rgb(var(--contrast-700));padding:0 0.5rem}.drag-and-drop-tip .invisible-label-mock{flex-shrink:0;opacity:0;padding-right:1rem;padding-left:1.5rem}.drag-and-drop-tip .tip{font-size:smaller;color:var(--limel-theme-text-secondary-on-background-color);height:auto;max-height:3rem;line-height:1;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}limel-spinner{pointer-events:none;position:absolute;inset:0 0.375rem 0 auto;margin:auto}';export{c as limel_file}
@@ -1 +1 @@
1
- import{r as t,c as e,h as a}from"./p-BGxJfR2f.js";import{t as i}from"./p-Cb9R_zmF.js";import{c as r}from"./p-JbKhhoXs.js";const l=class{constructor(a){t(this,a),this.interact=e(this,"interact"),this.language="en",this.displayAxisLabels=!1,this.displayItemText=!1,this.displayItemValue=!1,this.type="stacked-bar",this.orientation="landscape",this.loading=!1,this.handleClick=t=>{const e=this.getClickableItem(t.currentTarget);e&&(t.stopPropagation(),this.interact.emit(e))},this.handleKeyDown=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this.getClickableItem(t.currentTarget);e&&(t.preventDefault(),this.interact.emit(e))}}componentWillLoad(){this.recalculateRangeData()}render(){return this.loading?a("limel-spinner",{limeBranded:!1}):a("table",{"aria-busy":this.loading?"true":"false","aria-live":"polite",style:{"--limel-chart-number-of-items":this.items.length.toString()}},this.renderCaption(),this.renderTableHeader(),this.renderAxises(),a("tbody",{class:"chart"},this.renderItems()))}renderCaption(){if(this.accessibleLabel)return a("caption",null,this.accessibleLabel)}renderTableHeader(){var t,e;return a("thead",null,a("tr",null,a("th",{scope:"col"},null!==(t=this.accessibleItemsLabel)&&void 0!==t?t:i.get("items",this.language)),a("th",{scope:"col"},null!==(e=this.accessibleValuesLabel)&&void 0!==e?e:i.get("value",this.language))))}renderAxises(){if(["bar","dot","area","line","scatter"].includes(this.type))return"scatter"===this.type?this.renderScatterAxises():this.renderAxisLines(this.range)}renderScatterAxises(){const t="portrait"===this.orientation,e=t?this.range:this.secondaryAxisRange;return[this.renderAxisLines(t?this.secondaryAxisRange:this.range,"horizontal-lines"),this.renderAxisLines(e,"vertical-lines")]}renderAxisLines(t,e){const{minValue:i,maxValue:r,increment:l}=t,o=[];for(let t=i;t<=r;t+=l)o.push(a("div",{class:{"axis-line":!0,"zero-line":0===t},role:"presentation"},a("limel-badge",{label:t})));const s={axises:!0};return e&&(s[e]=!0),a("div",{class:s,role:"presentation",key:e},o)}renderItems(){var t;if(!(null===(t=this.items)||void 0===t?void 0:t.length))return;let e=0;return this.items.map(((t,i)=>{const l=r(),o=this.calculateSizeAndOffset(t),s=o.size;let n=o.offset;return"pie"!==this.type&&"doughnut"!==this.type||(n=e,e+=s),a("tr",{style:this.getItemStyle(t,i,s,n),class:this.getItemClass(t),key:l,id:l,"data-index":i,tabIndex:0,role:t.clickable?"button":null,onClick:this.handleClick,onKeyDown:this.handleKeyDown},a("td",{class:"text"},this.getItemText(t)),a("td",{class:"value"},this.getFormattedValue(t)),this.renderTooltip(t,l,s))}))}getItemStyle(t,e,a,i){if("scatter"===this.type)return this.getScatterItemStyle(t,e);const r={"--limel-chart-item-offset":`${i}`,"--limel-chart-item-size":`${a}`,"--limel-chart-item-index":`${e}`,"--limel-chart-item-value":`${t.value}`};if(t.color&&(r["--limel-chart-item-color"]=t.color),"line"===this.type||"area"===this.type){const t=this.calculateSizeAndOffset(this.items[e+1]);r["--limel-chart-next-item-size"]=`${t.size}`,r["--limel-chart-next-item-offset"]=`${t.offset}`}return r}getScatterItemStyle(t,e){const a={"--limel-chart-item-offset-x":`${this.normalize(this.getXValue(t),this.secondaryAxisRange)}`,"--limel-chart-item-offset-y":`${this.normalize(this.getYValue(t),this.range)}`,"--limel-chart-item-index":`${e}`};return t.color&&(a["--limel-chart-item-color"]=t.color),a}getItemClass(t){return{item:!0,"has-start-value":"scatter"!==this.type&&Array.isArray(t.value),"has-negative-value-only":this.getMaximumValue(t)<0&&!this.isRangeItem(t),"has-value-zero":"scatter"!==this.type&&0===this.getMaximumValue(t)}}calculateSizeAndOffset(t){const{minValue:e,totalRange:a}=this.range;if(!t)return{size:0,offset:0};let i=0;this.isRangeItem(t)&&(i=this.getMinimumValue(t));const r=(i-e)/a*100;return{size:(this.getMaximumValue(t)-e)/a*100-r,offset:r}}getFormattedValue(t){const{value:e,formattedValue:a}=t;return a||(Array.isArray(e)?"scatter"===this.type?`(${e[0]}, ${e[1]})`:`${e[0]} — ${e[1]}`:`${e}`)}getItemText(t){return t.text}renderTooltip(t,e,i){const r=this.getItemText(t),l={label:r,helperLabel:this.getFormattedValue(t),elementId:e};return"bar"!==this.type&&"dot"!==this.type&&"nps"!==this.type&&"scatter"!==this.type&&(l.label=`${r} (${i.toFixed(2)}%)`),a("limel-tooltip",Object.assign({},l,{openDirection:"portrait"===this.orientation?"right":"top"}))}calculateRange(){var t;if(this.range)return this.range;const e=Math.min(0,...this.items.map(this.getMinimumValue)),a=Math.max(...this.items.map(this.getMaximumValue)),i=this.items.reduce(((t,e)=>t+this.getMaximumValue(e)),0);let r=null!==(t=this.maxValue)&&void 0!==t?t:a;"pie"!==this.type&&"doughnut"!==this.type||this.maxValue||(r=i),this.axisIncrement||(this.axisIncrement=this.calculateAxisIncrement(this.items.map(this.getMaximumValue)));const l=Math.ceil(r/this.axisIncrement)*this.axisIncrement,o=Math.floor(e/this.axisIncrement)*this.axisIncrement;return{minValue:o,maxValue:l,totalRange:l-o,increment:this.axisIncrement}}calculateAxisIncrement(t,e=10){return this.calculateNiceStep(Math.max(...t),e)}calculateNiceStep(t,e=10){if(t<=0)return 1;const a=t/e,i=10**Math.floor(Math.log10(a));return Math.ceil(a/i)*i}axisSpan(t){return Math.max(0,...t)-Math.min(0,...t)}calculateAxisRange(t,e){const a=Math.floor(Math.min(0,...t)/e)*e,i=Math.ceil(Math.max(0,...t)/e)*e;return{minValue:a,maxValue:i,totalRange:i-a,increment:e}}normalize(t,e){return 0===e.totalRange?50:(t-e.minValue)/e.totalRange*100}getXValue(t){return Array.isArray(t.value)?t.value[0]:t.value}getYValue(t){return Array.isArray(t.value)?t.value[1]:t.value}getMinimumValue(t){const e=t.value;return Array.isArray(e)?Math.min(...e):e}getMaximumValue(t){const e=t.value;return Array.isArray(e)?Math.max(...e):e}isRangeItem(t){return Array.isArray(t.value)}handleChange(){this.range=null,this.secondaryAxisRange=null,this.recalculateRangeData()}recalculateRangeData(){"scatter"!==this.type?this.range=this.calculateRange():this.recalculateScatterRanges()}recalculateScatterRanges(){const t=this.items.map((t=>this.getXValue(t))),e=this.items.map((t=>this.getYValue(t)));this.range=this.calculateAxisRange(e,this.calculateNiceStep(this.axisSpan(e))),this.secondaryAxisRange=this.calculateAxisRange(t,this.calculateNiceStep(this.axisSpan(t)))}getClickableItem(t){const e=t.dataset.index;if(void 0===e)return;const a=this.items[Number(e)];return a.clickable?a:void 0}static get watchers(){return{items:[{handleChange:0}],axisIncrement:[{handleChange:0}],maxValue:[{handleChange:0}]}}};l.style='@charset "UTF-8";:host(limel-chart[type=bar]) .chart,:host(limel-chart[type=dot]) .chart,:host(limel-chart[type=line]) .chart,:host(limel-chart[type=area]) .chart{display:flex;background-color:var(--chart-background-color, transparent)}:host(limel-chart[type=bar]) .item,:host(limel-chart[type=dot]) .item,:host(limel-chart[type=line]) .item,:host(limel-chart[type=area]) .item{position:relative;mix-blend-mode:hard-light}:host(limel-chart[type=bar][orientation=landscape]),:host(limel-chart[type=dot][orientation=landscape]),:host(limel-chart[type=line][orientation=landscape]),:host(limel-chart[type=area][orientation=landscape]){--limel-chart-padding:0.5rem 0.5rem 0.5rem 2rem}:host(limel-chart[type=bar][orientation=landscape]) .chart,:host(limel-chart[type=dot][orientation=landscape]) .chart,:host(limel-chart[type=line][orientation=landscape]) .chart,:host(limel-chart[type=area][orientation=landscape]) .chart{flex-direction:row;align-items:flex-end;overflow:auto hidden;padding:0 0.125rem}:host(limel-chart[type=bar][orientation=landscape]) .item,:host(limel-chart[type=dot][orientation=landscape]) .item,:host(limel-chart[type=line][orientation=landscape]) .item,:host(limel-chart[type=area][orientation=landscape]) .item{min-width:var(--limel-chart-min-item-size);width:inherit}:host(limel-chart[type=bar][orientation=portrait]),:host(limel-chart[type=dot][orientation=portrait]),:host(limel-chart[type=line][orientation=portrait]),:host(limel-chart[type=area][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 1rem 0.5rem}:host(limel-chart[type=bar][orientation=portrait]) .chart,:host(limel-chart[type=dot][orientation=portrait]) .chart,:host(limel-chart[type=line][orientation=portrait]) .chart,:host(limel-chart[type=area][orientation=portrait]) .chart{flex-direction:column;overflow:hidden auto;padding:0.125rem 0}:host(limel-chart[type=bar][orientation=portrait]) .item,:host(limel-chart[type=dot][orientation=portrait]) .item,:host(limel-chart[type=line][orientation=portrait]) .item,:host(limel-chart[type=area][orientation=portrait]) .item{min-height:var(--limel-chart-min-item-size);height:inherit}:host(limel-chart[display-axis-labels][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 2rem 1.25rem}:host(limel-chart[display-axis-labels][orientation=landscape]){--limel-chart-padding:0.5rem 0.5rem 1.25rem 3rem}:host(limel-chart[display-axis-labels][type=scatter]) table thead,:host(limel-chart[display-axis-labels][type=scatter]) table th,:host(limel-chart[display-axis-labels][type=line]) table thead,:host(limel-chart[display-axis-labels][type=line]) table th,:host(limel-chart[display-axis-labels][type=dot]) table thead,:host(limel-chart[display-axis-labels][type=dot]) table th,:host(limel-chart[display-axis-labels][type=area]) table thead,:host(limel-chart[display-axis-labels][type=area]) table th,:host(limel-chart[display-axis-labels][type=bar]) table thead,:host(limel-chart[display-axis-labels][type=bar]) table th{all:unset}:host(limel-chart[display-axis-labels][type=scatter]) table th,:host(limel-chart[display-axis-labels][type=line]) table th,:host(limel-chart[display-axis-labels][type=dot]) table th,:host(limel-chart[display-axis-labels][type=area]) table th,:host(limel-chart[display-axis-labels][type=bar]) table th{position:absolute;font-size:var(--limel-theme-default-small-font-size);max-width:100%;max-height:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(limel-chart[display-axis-labels][orientation=portrait]) table thead th:first-of-type{left:-1.25rem;writing-mode:sideways-lr}:host(limel-chart[display-axis-labels][orientation=portrait]) table thead th:last-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}:host(limel-chart[display-axis-labels][orientation=landscape]) table thead th:first-of-type{bottom:-1.25rem;left:50%;transform:translateX(-50%)}:host(limel-chart[display-axis-labels][orientation=landscape]) table thead th:last-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[display-item-text][type=scatter]) td.text,:host(limel-chart[display-item-text][type=line]) td.text,:host(limel-chart[display-item-text][type=area]) td.text,:host(limel-chart[display-item-text][type=dot]) td.text,:host(limel-chart[display-item-text][type=bar]) td.text{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:absolute;font-size:0.75rem;max-width:max(5rem, 100%);mix-blend-mode:difference}:host(limel-chart[display-item-value][type=scatter]) td.value,:host(limel-chart[display-item-value][type=line]) td.value,:host(limel-chart[display-item-value][type=area]) td.value,:host(limel-chart[display-item-value][type=dot]) td.value,:host(limel-chart[display-item-value][type=bar]) td.value{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:absolute;font-size:0.75rem;max-width:max(5rem, 100%);border-radius:9rem;padding:0 0.25rem;background-color:rgb(var(--contrast-100), 0.7);box-shadow:var(--shadow-brighten-edges-outside)}:host(limel-chart[display-item-value][type=scatter]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=line]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=area]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=dot]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=bar]) .item.has-value-zero td.value{opacity:0}:host(limel-chart[display-item-text][orientation=landscape]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=landscape]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-negative-value-only td.value{transform:rotateX(180deg)}:host(limel-chart[display-item-text][orientation=landscape]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-value-zero td.text{transform:translateY(-50%)}:host(limel-chart[display-item-text][orientation=portrait]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=portrait]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait]) .item.has-negative-value-only td.value{transform:rotateY(180deg)}:host(limel-chart[display-item-text][orientation=landscape][type=bar]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=bar]) td.value{top:0;transform:translateY(-50%)}:host(limel-chart[display-item-text][orientation=landscape][type=bar]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=bar]) .item.has-negative-value-only td.value{transform:rotateX(180deg) translateY(50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) td.value{right:0;transform:translateX(50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) .item.has-negative-value-only td.value{transform:rotateY(180deg) translateX(-50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) .item.has-value-zero td.text{transform:translateX(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) td.value{top:1rem}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) td.text{top:0}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) .item.has-negative-value-only td.value{transform:rotateX(180deg)}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) .item.has-value-zero td.text{transform:translateY(-100%)}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) td.value{right:-0.25rem;transform:translateX(100%)}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) td.text{right:0.5rem}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) .item.has-negative-value-only td.value{transform:rotateY(180deg) translateX(-100%)}:host(limel-chart[display-item-text][type=scatter]) td.text{bottom:calc(100% + 0.25rem);left:50%;transform:translateX(-50%)}:host(limel-chart[display-item-value][type=scatter]) td.value{top:calc(100% + 0.25rem);left:50%;transform:translateX(-50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.value{left:0.5rem;bottom:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.text{transform:translateY(150%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.value{transform:translateY(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) .item.has-negative-value-only td.text{transform:translateY(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) .item.has-negative-value-only td.value{transform:translateY(150%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.value{left:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.text{transform:translateX(-100%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.value{transform:translateX(0)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) .item.has-negative-value-only td.text{transform:translateX(0)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) .item.has-negative-value-only td.value{transform:translateX(-100%)}:host(limel-chart[type=pie]) table,:host(limel-chart[type=doughnut]) table,:host(limel-chart[type=ring]) table{min-height:2rem;min-width:2rem}:host(limel-chart[type=pie]) .chart,:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .chart,:host(limel-chart[type=doughnut]) .item,:host(limel-chart[type=ring]) .chart,:host(limel-chart[type=ring]) .item{aspect-ratio:1;display:flex;margin:auto}:host(limel-chart[type=pie]) .chart,:host(limel-chart[type=doughnut]) .chart,:host(limel-chart[type=ring]) .chart{justify-content:center;align-items:center}:host(limel-chart[type=pie]) .chart:before,:host(limel-chart[type=doughnut]) .chart:before,:host(limel-chart[type=ring]) .chart:before{aspect-ratio:1;content:"";position:absolute;z-index:0;inset:0;margin:auto;border-radius:50%;max-width:100%;max-height:100%;background-color:var(--chart-background-color, rgb(var(--contrast-200)))}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item,:host(limel-chart[type=ring]) .item{max-width:100%;max-height:100%;border-radius:50%;position:absolute;inset:0}:host(limel-chart[type=bar]) .chart,:host(limel-chart[type=dot]) .chart{gap:0.5rem}:host(limel-chart[type=bar]) .item,:host(limel-chart[type=dot]) .item{display:flex;align-items:center;justify-content:center;border-radius:var(--chart-item-border-radius, 0.125rem)}:host(limel-chart[type=bar]) .item{background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=dot]) .item:before,:host(limel-chart[type=dot]) .item:after{content:"";position:absolute;margin:auto;width:var(--limel-chart-min-item-size);height:var(--limel-chart-min-item-size);border-radius:50%}:host(limel-chart[type=dot]) .item::after{background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=dot]) .item.has-start-value:before{background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=bar][orientation=landscape]) .item,:host(limel-chart[type=dot][orientation=landscape]) .item{height:calc(var(--limel-chart-item-size) * 1%);bottom:calc(var(--limel-chart-item-offset) * 1%)}:host(limel-chart[type=bar][orientation=landscape]) .item.has-negative-value-only,:host(limel-chart[type=dot][orientation=landscape]) .item.has-negative-value-only{height:calc(var(--limel-chart-item-size) * -1%);transform-origin:bottom;transform:rotateX(180deg)}:host(limel-chart[type=dot][orientation=landscape]) .item.has-start-value,:host(limel-chart[type=dot][orientation=landscape]) .item:hover,:host(limel-chart[type=dot][orientation=landscape]) .item:focus-visible{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/1px 100% no-repeat}:host(limel-chart[type=dot][orientation=landscape]) .item:before{inset:auto 0 0 0;transform:translateY(50%)}:host(limel-chart[type=dot][orientation=landscape]) .item::after{inset:0 0 auto 0;transform:translateY(-50%)}:host(limel-chart[type=bar][orientation=portrait]) .item,:host(limel-chart[type=dot][orientation=portrait]) .item{width:calc(var(--limel-chart-item-size) * 1%);left:calc(var(--limel-chart-item-offset) * 1%)}:host(limel-chart[type=bar][orientation=portrait]) .item.has-negative-value-only,:host(limel-chart[type=dot][orientation=portrait]) .item.has-negative-value-only{width:calc(var(--limel-chart-item-size) * -1%);transform-origin:left;transform:rotateY(180deg)}:host(limel-chart[type=dot][orientation=portrait]) .item.has-start-value,:host(limel-chart[type=dot][orientation=portrait]) .item:hover,:host(limel-chart[type=dot][orientation=portrait]) .item:focus-visible{background:linear-gradient(to right, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/100% 1px no-repeat}:host(limel-chart[type=dot][orientation=portrait]) .item:before{inset:0 auto 0 0;transform:translateX(-50%)}:host(limel-chart[type=dot][orientation=portrait]) .item:after{inset:0 0 0 auto;transform:translateX(50%)}:host(limel-chart[type=area]) .item,:host(limel-chart[type=line]) .item{position:relative}:host(limel-chart[type=area]) .item:after,:host(limel-chart[type=line]) .item:after{margin:auto;width:var(--limel-chart-min-item-size);height:var(--limel-chart-min-item-size);border-radius:50%;border:1px solid rgb(var(--contrast-100))}:host(limel-chart[type=area]) .item:before,:host(limel-chart[type=line]) .item:before{inset:0}:host(limel-chart[type=area]) .item:after,:host(limel-chart[type=area]) .item:before,:host(limel-chart[type=line]) .item:after,:host(limel-chart[type=line]) .item:before{transition:border-color 0.2s ease, opacity 0.4s ease;content:"";position:absolute;background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=area]) .item:hover:after,:host(limel-chart[type=area]) .item:focus-visible:after,:host(limel-chart[type=line]) .item:hover:after,:host(limel-chart[type=line]) .item:focus-visible:after{border-color:transparent}:host(limel-chart[type=line][orientation=landscape]) .item,:host(limel-chart[type=area][orientation=landscape]) .item{height:100%}:host(limel-chart[type=line][orientation=landscape]) .item:after,:host(limel-chart[type=area][orientation=landscape]) .item:after{transform:translateX(-50%) translateY(50%);left:0;bottom:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[type=line][orientation=landscape]) .item:last-of-type:before,:host(limel-chart[type=area][orientation=landscape]) .item:last-of-type:before{display:none}:host(limel-chart[type=line][orientation=portrait]) .item,:host(limel-chart[type=area][orientation=portrait]) .item{width:100%}:host(limel-chart[type=line][orientation=portrait]) .item:after,:host(limel-chart[type=area][orientation=portrait]) .item:after{transform:translateX(-50%) translateY(-50%);left:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[type=area]) .item:after{opacity:0}:host(limel-chart[type=area]) .item:hover:after,:host(limel-chart[type=area]) .item:focus-visible:after{opacity:1}:host(limel-chart[type=area]) .item:hover:before,:host(limel-chart[type=area]) .item:focus-visible:before{opacity:0.7}:host(limel-chart[type=area][orientation=landscape]){}:host(limel-chart[type=area][orientation=landscape]) .item:before{clip-path:polygon(0 calc((100 - var(--limel-chart-item-offset)) * 1%), 0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1%), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1%), 100% calc((100 - var(--limel-chart-next-item-offset)) * 1%))}:host(limel-chart[type=area][orientation=portrait]){}:host(limel-chart[type=area][orientation=portrait]) .item:before{clip-path:polygon(calc(var(--limel-chart-item-offset) * 1%) 0, calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%) 0, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1%) 100%, calc(var(--limel-chart-next-item-offset) * 1%) 100%)}:host(limel-chart[type=line]){--limel-chart-line-thickness:0.125rem}:host(limel-chart[type=line]) .item:hover:before{opacity:0.4}:host(limel-chart[type=line][orientation=landscape]){}:host(limel-chart[type=line][orientation=landscape]) .item:hover{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) left/1px 100% no-repeat}:host(limel-chart[type=line][orientation=landscape]) .item:before{clip-path:polygon(0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1%), 0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1% + var(--limel-chart-line-thickness)), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1% + var(--limel-chart-line-thickness)), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1%))}:host(limel-chart[type=line][orientation=portrait]){}:host(limel-chart[type=line][orientation=portrait]) .item:hover{background:linear-gradient(to right, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) top/100% 1px no-repeat}:host(limel-chart[type=line][orientation=portrait]) .item:before{clip-path:polygon(calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%) 0, calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1% + var(--limel-chart-line-thickness)) 0, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1% + var(--limel-chart-line-thickness)) 100%, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1%) 100%)}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item{background:conic-gradient(transparent 0 calc(var(--limel-chart-item-offset) * 1%), var(--limel-chart-item-color, var(--limel-chart-default-item-color)) calc(var(--limel-chart-item-offset) * 1%) calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%), transparent calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%))}:host(limel-chart[type=pie]) .item:focus,:host(limel-chart[type=pie]) .item:focus-visible,:host(limel-chart[type=doughnut]) .item:focus,:host(limel-chart[type=doughnut]) .item:focus-visible{outline:none}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item{pointer-events:none}:host(limel-chart[type=doughnut]) .chart:after{aspect-ratio:1;content:"";position:absolute;inset:0;margin:auto;max-width:60%;max-height:60%;border-radius:50%;background-color:rgb(var(--contrast-100))}:host(limel-chart[type=ring]) .chart:after{content:"";position:absolute;inset:0;aspect-ratio:1;border-radius:50%;max-height:calc(100% - var(--limel-chart-number-of-items) * 100% / (var(--limel-chart-number-of-items) + 1));max-width:calc(100% - var(--limel-chart-number-of-items) * 100% / (var(--limel-chart-number-of-items) + 1));background-color:var(--limel-chart-background-color, rgb(var(--contrast-200)))}:host(limel-chart[type=ring]) .chart:has(.item:hover) .item,:host(limel-chart[type=ring]) .chart:has(.item:focus-visible) .item{opacity:1;filter:grayscale(1)}:host(limel-chart[type=ring]) .chart:after,:host(limel-chart[type=ring]) .item{margin:auto;border:1px solid var(--limel-chart-background-color, rgb(var(--contrast-400)))}:host(limel-chart[type=ring]) .item{background:conic-gradient(var(--limel-chart-item-color, var(--limel-chart-default-item-color)) 0 calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%), var(--chart-background-color, rgb(var(--contrast-200))) calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%));max-width:calc(100% - var(--limel-chart-item-index) * 100% / (var(--limel-chart-number-of-items) + 1));max-height:calc(100% - var(--limel-chart-item-index) * 100% / (var(--limel-chart-number-of-items) + 1))}:host(limel-chart[type=ring]) .item:focus-visible,:host(limel-chart[type=ring]) .item:hover{filter:grayscale(0) !important}:host(limel-chart[type=stacked-bar]) .chart{display:flex;border-radius:0.25rem;overflow:hidden;background-color:var(--chart-background-color, rgb(var(--contrast-800), 0.2))}:host(limel-chart[type=stacked-bar]) .item{display:flex;border-radius:var(--chart-item-border-radius, 0);background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=stacked-bar]) .item:last-of-type:not(:focus-visible){box-shadow:none !important}:host(limel-chart[type=stacked-bar][orientation=landscape]) .chart{flex-direction:row}:host(limel-chart[type=stacked-bar][orientation=landscape]) .item{min-height:0.5rem;width:calc(var(--limel-chart-item-size) * 1%)}:host(limel-chart[type=stacked-bar][orientation=landscape]) .item:not(:focus-visible){box-shadow:-1px 0 0 0 var(--chart-item-divider-color, rgb(var(--color-white), 0.6)) inset}:host(limel-chart[type=stacked-bar][orientation=portrait]) .chart{flex-direction:column-reverse}:host(limel-chart[type=stacked-bar][orientation=portrait]) .item{min-width:0.5rem;height:calc(var(--limel-chart-item-size) * 1%)}:host(limel-chart[type=stacked-bar][orientation=portrait]) .item:not(:focus-visible){box-shadow:0 -1px 0 0 rgb(var(--color-white), 0.6) inset}:host(limel-chart[type=nps]){--limel-chart-nps-gauge-angel:220deg}:host(limel-chart[type=nps]) table{min-height:4rem;min-width:4rem}:host(limel-chart[type=nps]) .chart{position:relative;display:flex;justify-content:center;align-items:center;aspect-ratio:1;margin:auto;width:unset;height:unset;max-width:100%;max-height:100%;rotate:calc(var(--limel-chart-nps-gauge-angel) / 2 * -1);transform:translate(-15%, -5%)}:host(limel-chart[type=nps]) .chart:before,:host(limel-chart[type=nps]) .chart:after{content:"";aspect-ratio:1;position:absolute;border-radius:50%;z-index:-1;min-height:0;min-width:0}:host(limel-chart[type=nps]) .chart:before{height:100%;max-height:100%;background:conic-gradient(rgb(var(--color-coral-default)) 0deg calc(var(--limel-chart-nps-gauge-angel) / 2), rgb(var(--color-amber-light)) calc(var(--limel-chart-nps-gauge-angel) / 2) calc(var(--limel-chart-nps-gauge-angel) * 0.65), rgb(var(--color-lime-light)) calc(var(--limel-chart-nps-gauge-angel) * 0.65) calc(var(--limel-chart-nps-gauge-angel) * 0.85), rgb(var(--color-lime-default)) calc(var(--limel-chart-nps-gauge-angel) * 0.85) var(--limel-chart-nps-gauge-angel), transparent var(--limel-chart-nps-gauge-angel))}:host(limel-chart[type=nps]) .chart:after{height:calc(100% - min(3rem, 20%) * 2);max-height:calc(100% - min(3rem, 20%) * 2);background:conic-gradient(var(--chart-background-color, rgb(var(--contrast-100))) 0deg var(--limel-chart-nps-gauge-angel), transparent var(--limel-chart-nps-gauge-angel))}:host(limel-chart[type=nps]) .item{display:flex;align-items:flex-start;justify-content:center;border-radius:0.5rem;position:absolute;height:calc(50% - min(3rem, 20%) + 0.5rem);width:0.5rem;transform:translateY(-50%) rotate(calc((var(--limel-chart-item-value) + 100) / 200 * var(--limel-chart-nps-gauge-angel)));transform-origin:bottom}:host(limel-chart[type=nps]) .item:hover,:host(limel-chart[type=nps]) .item:focus-visible{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/1px 100% no-repeat}:host(limel-chart[type=nps]) .item:before,:host(limel-chart[type=nps]) .item:after{content:"";position:absolute}:host(limel-chart[type=nps]) .item:before{transform:translateY(-60%);width:0.4rem;border-radius:1rem;border-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));border-style:solid;border-bottom-width:1.75rem;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent}:host(limel-chart[type=nps]) .item:after{border-radius:50%;background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));aspect-ratio:1;height:clamp(0.75rem, 10%, 1.25rem);border:0.125rem solid rgb(var(--contrast-100), 0.8);box-shadow:var(--shadow-depth-8)}:host(limel-chart[type=scatter]){--limel-chart-padding:0.5rem 0.5rem 1rem 2rem}:host(limel-chart[type=scatter]) .chart{display:block;background-color:var(--chart-background-color, transparent)}:host(limel-chart[type=scatter]) .item{position:absolute;transform-origin:center;width:var(--chart-scatter-item-size, 0.5rem);height:var(--chart-scatter-item-size, 0.5rem);border-radius:50%;background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));mix-blend-mode:hard-light}:host(limel-chart[type=scatter][orientation=landscape]) .item{left:calc(var(--limel-chart-item-offset-x) * 1%);bottom:calc(var(--limel-chart-item-offset-y) * 1%);transform:translate(-50%, 50%)}:host(limel-chart[type=scatter][orientation=portrait]) .item{left:calc(var(--limel-chart-item-offset-y) * 1%);top:calc(var(--limel-chart-item-offset-x) * 1%);transform:translate(-50%, -50%)}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]),:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 2rem 3rem}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]) table thead th:first-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]) table thead th:last-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]) table thead th:first-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]) table thead th:last-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}.axises{position:absolute;display:flex;justify-content:space-between;min-height:100%;min-width:100%;height:100%;width:100%}.axis-line{transition:opacity 0.4s ease;position:relative;opacity:0.2;font-size:0.625rem;border-color:var(--limel-chart-axis-line-color)}.axis-line:hover{opacity:0.6;transition-duration:0.2s}.axis-line.zero-line{opacity:0.6;z-index:1}.axis-line limel-badge{--badge-background-color:transparent;--badge-text-color:currentColor;position:absolute;text-align:right;min-width:2rem}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axises{flex-direction:column-reverse}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axis-line{border-bottom:1px solid;transform:translateY(50%)}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axis-line limel-badge{bottom:0;left:-2rem;transform:translateY(50%)}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axises{flex-direction:row}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axis-line{border-left:1px solid;transform:translateX(-50%)}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axis-line limel-badge{bottom:-1rem;right:-1rem}.axises.horizontal-lines .axis-line{border-bottom:1px solid;transform:translateY(50%)}.axises.horizontal-lines .axis-line limel-badge{bottom:0;left:-2rem;transform:translateY(50%)}:host(limel-chart[orientation=landscape]) .axises.horizontal-lines{flex-direction:column-reverse}:host(limel-chart[orientation=portrait]) .axises.horizontal-lines{flex-direction:column}.axises.vertical-lines{flex-direction:row}.axises.vertical-lines .axis-line{border-left:1px solid;transform:translateX(-50%)}.axises.vertical-lines .axis-line limel-badge{bottom:-1rem;right:-1rem}:host(limel-chart){--limel-chart-min-item-size:0.5rem;--limel-chart-default-item-color:var( --chart-item-color, rgb(var(--contrast-1100), 0.8) );--chart-axis-line-color:var( --limel-chart-axis-line-color, rgb(var(--contrast-900)) );box-sizing:border-box;isolation:isolate;display:flex;width:100%;height:100%;min-width:0;min-height:0;padding:var(--limel-chart-padding)}table{all:unset;border-collapse:collapse;border-spacing:0;empty-cells:show;position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0}table colgroup,table thead,table tbody,table tr,table th,table td{all:unset}table caption,table colgroup,table thead,table tfoot,table th,table td{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}*,*:before,*:after{box-sizing:border-box}.chart{position:relative;flex-grow:1;width:100%;height:100%;min-height:0;min-width:0}.chart:has(.item:hover) .item,.chart:has(.item:focus-visible) .item{opacity:0.4}.item:focus{outline:none}.item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.item{transition:background-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.4s ease;cursor:help}.item:focus-visible,.item:hover{opacity:1 !important}.item[role=button]{cursor:pointer}limel-spinner{margin:auto}';export{l as limel_chart}
1
+ import{r as t,c as e,h as a}from"./p-BGxJfR2f.js";import{t as i}from"./p-DgqE77nk.js";import{c as r}from"./p-JbKhhoXs.js";const l=class{constructor(a){t(this,a),this.interact=e(this,"interact"),this.language="en",this.displayAxisLabels=!1,this.displayItemText=!1,this.displayItemValue=!1,this.type="stacked-bar",this.orientation="landscape",this.loading=!1,this.handleClick=t=>{const e=this.getClickableItem(t.currentTarget);e&&(t.stopPropagation(),this.interact.emit(e))},this.handleKeyDown=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this.getClickableItem(t.currentTarget);e&&(t.preventDefault(),this.interact.emit(e))}}componentWillLoad(){this.recalculateRangeData()}render(){return this.loading?a("limel-spinner",{limeBranded:!1}):a("table",{"aria-busy":this.loading?"true":"false","aria-live":"polite",style:{"--limel-chart-number-of-items":this.items.length.toString()}},this.renderCaption(),this.renderTableHeader(),this.renderAxises(),a("tbody",{class:"chart"},this.renderItems()))}renderCaption(){if(this.accessibleLabel)return a("caption",null,this.accessibleLabel)}renderTableHeader(){var t,e;return a("thead",null,a("tr",null,a("th",{scope:"col"},null!==(t=this.accessibleItemsLabel)&&void 0!==t?t:i.get("items",this.language)),a("th",{scope:"col"},null!==(e=this.accessibleValuesLabel)&&void 0!==e?e:i.get("value",this.language))))}renderAxises(){if(["bar","dot","area","line","scatter"].includes(this.type))return"scatter"===this.type?this.renderScatterAxises():this.renderAxisLines(this.range)}renderScatterAxises(){const t="portrait"===this.orientation,e=t?this.range:this.secondaryAxisRange;return[this.renderAxisLines(t?this.secondaryAxisRange:this.range,"horizontal-lines"),this.renderAxisLines(e,"vertical-lines")]}renderAxisLines(t,e){const{minValue:i,maxValue:r,increment:l}=t,o=[];for(let t=i;t<=r;t+=l)o.push(a("div",{class:{"axis-line":!0,"zero-line":0===t},role:"presentation"},a("limel-badge",{label:t})));const s={axises:!0};return e&&(s[e]=!0),a("div",{class:s,role:"presentation",key:e},o)}renderItems(){var t;if(!(null===(t=this.items)||void 0===t?void 0:t.length))return;let e=0;return this.items.map(((t,i)=>{const l=r(),o=this.calculateSizeAndOffset(t),s=o.size;let n=o.offset;return"pie"!==this.type&&"doughnut"!==this.type||(n=e,e+=s),a("tr",{style:this.getItemStyle(t,i,s,n),class:this.getItemClass(t),key:l,id:l,"data-index":i,tabIndex:0,role:t.clickable?"button":null,onClick:this.handleClick,onKeyDown:this.handleKeyDown},a("td",{class:"text"},this.getItemText(t)),a("td",{class:"value"},this.getFormattedValue(t)),this.renderTooltip(t,l,s))}))}getItemStyle(t,e,a,i){if("scatter"===this.type)return this.getScatterItemStyle(t,e);const r={"--limel-chart-item-offset":`${i}`,"--limel-chart-item-size":`${a}`,"--limel-chart-item-index":`${e}`,"--limel-chart-item-value":`${t.value}`};if(t.color&&(r["--limel-chart-item-color"]=t.color),"line"===this.type||"area"===this.type){const t=this.calculateSizeAndOffset(this.items[e+1]);r["--limel-chart-next-item-size"]=`${t.size}`,r["--limel-chart-next-item-offset"]=`${t.offset}`}return r}getScatterItemStyle(t,e){const a={"--limel-chart-item-offset-x":`${this.normalize(this.getXValue(t),this.secondaryAxisRange)}`,"--limel-chart-item-offset-y":`${this.normalize(this.getYValue(t),this.range)}`,"--limel-chart-item-index":`${e}`};return t.color&&(a["--limel-chart-item-color"]=t.color),a}getItemClass(t){return{item:!0,"has-start-value":"scatter"!==this.type&&Array.isArray(t.value),"has-negative-value-only":this.getMaximumValue(t)<0&&!this.isRangeItem(t),"has-value-zero":"scatter"!==this.type&&0===this.getMaximumValue(t)}}calculateSizeAndOffset(t){const{minValue:e,totalRange:a}=this.range;if(!t)return{size:0,offset:0};let i=0;this.isRangeItem(t)&&(i=this.getMinimumValue(t));const r=(i-e)/a*100;return{size:(this.getMaximumValue(t)-e)/a*100-r,offset:r}}getFormattedValue(t){const{value:e,formattedValue:a}=t;return a||(Array.isArray(e)?"scatter"===this.type?`(${e[0]}, ${e[1]})`:`${e[0]} — ${e[1]}`:`${e}`)}getItemText(t){return t.text}renderTooltip(t,e,i){const r=this.getItemText(t),l={label:r,helperLabel:this.getFormattedValue(t),elementId:e};return"bar"!==this.type&&"dot"!==this.type&&"nps"!==this.type&&"scatter"!==this.type&&(l.label=`${r} (${i.toFixed(2)}%)`),a("limel-tooltip",Object.assign({},l,{openDirection:"portrait"===this.orientation?"right":"top"}))}calculateRange(){var t;if(this.range)return this.range;const e=Math.min(0,...this.items.map(this.getMinimumValue)),a=Math.max(...this.items.map(this.getMaximumValue)),i=this.items.reduce(((t,e)=>t+this.getMaximumValue(e)),0);let r=null!==(t=this.maxValue)&&void 0!==t?t:a;"pie"!==this.type&&"doughnut"!==this.type||this.maxValue||(r=i),this.axisIncrement||(this.axisIncrement=this.calculateAxisIncrement(this.items.map(this.getMaximumValue)));const l=Math.ceil(r/this.axisIncrement)*this.axisIncrement,o=Math.floor(e/this.axisIncrement)*this.axisIncrement;return{minValue:o,maxValue:l,totalRange:l-o,increment:this.axisIncrement}}calculateAxisIncrement(t,e=10){return this.calculateNiceStep(Math.max(...t),e)}calculateNiceStep(t,e=10){if(t<=0)return 1;const a=t/e,i=10**Math.floor(Math.log10(a));return Math.ceil(a/i)*i}axisSpan(t){return Math.max(0,...t)-Math.min(0,...t)}calculateAxisRange(t,e){const a=Math.floor(Math.min(0,...t)/e)*e,i=Math.ceil(Math.max(0,...t)/e)*e;return{minValue:a,maxValue:i,totalRange:i-a,increment:e}}normalize(t,e){return 0===e.totalRange?50:(t-e.minValue)/e.totalRange*100}getXValue(t){return Array.isArray(t.value)?t.value[0]:t.value}getYValue(t){return Array.isArray(t.value)?t.value[1]:t.value}getMinimumValue(t){const e=t.value;return Array.isArray(e)?Math.min(...e):e}getMaximumValue(t){const e=t.value;return Array.isArray(e)?Math.max(...e):e}isRangeItem(t){return Array.isArray(t.value)}handleChange(){this.range=null,this.secondaryAxisRange=null,this.recalculateRangeData()}recalculateRangeData(){"scatter"!==this.type?this.range=this.calculateRange():this.recalculateScatterRanges()}recalculateScatterRanges(){const t=this.items.map((t=>this.getXValue(t))),e=this.items.map((t=>this.getYValue(t)));this.range=this.calculateAxisRange(e,this.calculateNiceStep(this.axisSpan(e))),this.secondaryAxisRange=this.calculateAxisRange(t,this.calculateNiceStep(this.axisSpan(t)))}getClickableItem(t){const e=t.dataset.index;if(void 0===e)return;const a=this.items[Number(e)];return a.clickable?a:void 0}static get watchers(){return{items:[{handleChange:0}],axisIncrement:[{handleChange:0}],maxValue:[{handleChange:0}]}}};l.style='@charset "UTF-8";:host(limel-chart[type=bar]) .chart,:host(limel-chart[type=dot]) .chart,:host(limel-chart[type=line]) .chart,:host(limel-chart[type=area]) .chart{display:flex;background-color:var(--chart-background-color, transparent)}:host(limel-chart[type=bar]) .item,:host(limel-chart[type=dot]) .item,:host(limel-chart[type=line]) .item,:host(limel-chart[type=area]) .item{position:relative;mix-blend-mode:hard-light}:host(limel-chart[type=bar][orientation=landscape]),:host(limel-chart[type=dot][orientation=landscape]),:host(limel-chart[type=line][orientation=landscape]),:host(limel-chart[type=area][orientation=landscape]){--limel-chart-padding:0.5rem 0.5rem 0.5rem 2rem}:host(limel-chart[type=bar][orientation=landscape]) .chart,:host(limel-chart[type=dot][orientation=landscape]) .chart,:host(limel-chart[type=line][orientation=landscape]) .chart,:host(limel-chart[type=area][orientation=landscape]) .chart{flex-direction:row;align-items:flex-end;overflow:auto hidden;padding:0 0.125rem}:host(limel-chart[type=bar][orientation=landscape]) .item,:host(limel-chart[type=dot][orientation=landscape]) .item,:host(limel-chart[type=line][orientation=landscape]) .item,:host(limel-chart[type=area][orientation=landscape]) .item{min-width:var(--limel-chart-min-item-size);width:inherit}:host(limel-chart[type=bar][orientation=portrait]),:host(limel-chart[type=dot][orientation=portrait]),:host(limel-chart[type=line][orientation=portrait]),:host(limel-chart[type=area][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 1rem 0.5rem}:host(limel-chart[type=bar][orientation=portrait]) .chart,:host(limel-chart[type=dot][orientation=portrait]) .chart,:host(limel-chart[type=line][orientation=portrait]) .chart,:host(limel-chart[type=area][orientation=portrait]) .chart{flex-direction:column;overflow:hidden auto;padding:0.125rem 0}:host(limel-chart[type=bar][orientation=portrait]) .item,:host(limel-chart[type=dot][orientation=portrait]) .item,:host(limel-chart[type=line][orientation=portrait]) .item,:host(limel-chart[type=area][orientation=portrait]) .item{min-height:var(--limel-chart-min-item-size);height:inherit}:host(limel-chart[display-axis-labels][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 2rem 1.25rem}:host(limel-chart[display-axis-labels][orientation=landscape]){--limel-chart-padding:0.5rem 0.5rem 1.25rem 3rem}:host(limel-chart[display-axis-labels][type=scatter]) table thead,:host(limel-chart[display-axis-labels][type=scatter]) table th,:host(limel-chart[display-axis-labels][type=line]) table thead,:host(limel-chart[display-axis-labels][type=line]) table th,:host(limel-chart[display-axis-labels][type=dot]) table thead,:host(limel-chart[display-axis-labels][type=dot]) table th,:host(limel-chart[display-axis-labels][type=area]) table thead,:host(limel-chart[display-axis-labels][type=area]) table th,:host(limel-chart[display-axis-labels][type=bar]) table thead,:host(limel-chart[display-axis-labels][type=bar]) table th{all:unset}:host(limel-chart[display-axis-labels][type=scatter]) table th,:host(limel-chart[display-axis-labels][type=line]) table th,:host(limel-chart[display-axis-labels][type=dot]) table th,:host(limel-chart[display-axis-labels][type=area]) table th,:host(limel-chart[display-axis-labels][type=bar]) table th{position:absolute;font-size:var(--limel-theme-default-small-font-size);max-width:100%;max-height:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(limel-chart[display-axis-labels][orientation=portrait]) table thead th:first-of-type{left:-1.25rem;writing-mode:sideways-lr}:host(limel-chart[display-axis-labels][orientation=portrait]) table thead th:last-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}:host(limel-chart[display-axis-labels][orientation=landscape]) table thead th:first-of-type{bottom:-1.25rem;left:50%;transform:translateX(-50%)}:host(limel-chart[display-axis-labels][orientation=landscape]) table thead th:last-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[display-item-text][type=scatter]) td.text,:host(limel-chart[display-item-text][type=line]) td.text,:host(limel-chart[display-item-text][type=area]) td.text,:host(limel-chart[display-item-text][type=dot]) td.text,:host(limel-chart[display-item-text][type=bar]) td.text{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:absolute;font-size:0.75rem;max-width:max(5rem, 100%);mix-blend-mode:difference}:host(limel-chart[display-item-value][type=scatter]) td.value,:host(limel-chart[display-item-value][type=line]) td.value,:host(limel-chart[display-item-value][type=area]) td.value,:host(limel-chart[display-item-value][type=dot]) td.value,:host(limel-chart[display-item-value][type=bar]) td.value{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:absolute;font-size:0.75rem;max-width:max(5rem, 100%);border-radius:9rem;padding:0 0.25rem;background-color:rgb(var(--contrast-100), 0.7);box-shadow:var(--shadow-brighten-edges-outside)}:host(limel-chart[display-item-value][type=scatter]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=line]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=area]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=dot]) .item.has-value-zero td.value,:host(limel-chart[display-item-value][type=bar]) .item.has-value-zero td.value{opacity:0}:host(limel-chart[display-item-text][orientation=landscape]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=landscape]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-negative-value-only td.value{transform:rotateX(180deg)}:host(limel-chart[display-item-text][orientation=landscape]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=landscape]) .item.has-value-zero td.text{transform:translateY(-50%)}:host(limel-chart[display-item-text][orientation=portrait]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=portrait]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait]) .item.has-negative-value-only td.value{transform:rotateY(180deg)}:host(limel-chart[display-item-text][orientation=landscape][type=bar]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=bar]) td.value{top:0;transform:translateY(-50%)}:host(limel-chart[display-item-text][orientation=landscape][type=bar]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=bar]) .item.has-negative-value-only td.value{transform:rotateX(180deg) translateY(50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) td.value{right:0;transform:translateX(50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) .item.has-negative-value-only td.value{transform:rotateY(180deg) translateX(-50%)}:host(limel-chart[display-item-text][orientation=portrait][type=bar]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=portrait][type=bar]) .item.has-value-zero td.text{transform:translateX(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) td.value{top:1rem}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) td.text{top:0}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) .item.has-negative-value-only td.value{transform:rotateX(180deg)}:host(limel-chart[display-item-text][orientation=landscape][type=dot]) .item.has-value-zero td.text,:host(limel-chart[display-item-value][orientation=landscape][type=dot]) .item.has-value-zero td.text{transform:translateY(-100%)}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) td.value{right:-0.25rem;transform:translateX(100%)}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) td.text{right:0.5rem}:host(limel-chart[display-item-text][orientation=portrait][type=dot]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=dot]) .item.has-negative-value-only td.value{transform:rotateY(180deg) translateX(-100%)}:host(limel-chart[display-item-text][type=scatter]) td.text{bottom:calc(100% + 0.25rem);left:50%;transform:translateX(-50%)}:host(limel-chart[display-item-value][type=scatter]) td.value{top:calc(100% + 0.25rem);left:50%;transform:translateX(-50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.value{left:0.5rem;bottom:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.text{transform:translateY(150%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) td.value{transform:translateY(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=landscape][type=area]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=landscape][type=area]) .item.has-negative-value-only td.text{transform:translateY(50%)}:host(limel-chart[display-item-text][orientation=landscape][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-text][orientation=landscape][type=area]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=landscape][type=area]) .item.has-negative-value-only td.value{transform:translateY(150%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.value{left:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.text{transform:translateX(-100%)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) td.value{transform:translateX(0)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait][type=line]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-text][orientation=portrait][type=area]) .item.has-negative-value-only td.text,:host(limel-chart[display-item-value][orientation=portrait][type=area]) .item.has-negative-value-only td.text{transform:translateX(0)}:host(limel-chart[display-item-text][orientation=portrait][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=line]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-text][orientation=portrait][type=area]) .item.has-negative-value-only td.value,:host(limel-chart[display-item-value][orientation=portrait][type=area]) .item.has-negative-value-only td.value{transform:translateX(-100%)}:host(limel-chart[type=pie]) table,:host(limel-chart[type=doughnut]) table,:host(limel-chart[type=ring]) table{min-height:2rem;min-width:2rem}:host(limel-chart[type=pie]) .chart,:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .chart,:host(limel-chart[type=doughnut]) .item,:host(limel-chart[type=ring]) .chart,:host(limel-chart[type=ring]) .item{aspect-ratio:1;display:flex;margin:auto}:host(limel-chart[type=pie]) .chart,:host(limel-chart[type=doughnut]) .chart,:host(limel-chart[type=ring]) .chart{justify-content:center;align-items:center}:host(limel-chart[type=pie]) .chart:before,:host(limel-chart[type=doughnut]) .chart:before,:host(limel-chart[type=ring]) .chart:before{aspect-ratio:1;content:"";position:absolute;z-index:0;inset:0;margin:auto;border-radius:50%;max-width:100%;max-height:100%;background-color:var(--chart-background-color, rgb(var(--contrast-200)))}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item,:host(limel-chart[type=ring]) .item{max-width:100%;max-height:100%;border-radius:50%;position:absolute;inset:0}:host(limel-chart[type=bar]) .chart,:host(limel-chart[type=dot]) .chart{gap:0.5rem}:host(limel-chart[type=bar]) .item,:host(limel-chart[type=dot]) .item{display:flex;align-items:center;justify-content:center;border-radius:var(--chart-item-border-radius, 0.125rem)}:host(limel-chart[type=bar]) .item{background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=dot]) .item:before,:host(limel-chart[type=dot]) .item:after{content:"";position:absolute;margin:auto;width:var(--limel-chart-min-item-size);height:var(--limel-chart-min-item-size);border-radius:50%}:host(limel-chart[type=dot]) .item::after{background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=dot]) .item.has-start-value:before{background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=bar][orientation=landscape]) .item,:host(limel-chart[type=dot][orientation=landscape]) .item{height:calc(var(--limel-chart-item-size) * 1%);bottom:calc(var(--limel-chart-item-offset) * 1%)}:host(limel-chart[type=bar][orientation=landscape]) .item.has-negative-value-only,:host(limel-chart[type=dot][orientation=landscape]) .item.has-negative-value-only{height:calc(var(--limel-chart-item-size) * -1%);transform-origin:bottom;transform:rotateX(180deg)}:host(limel-chart[type=dot][orientation=landscape]) .item.has-start-value,:host(limel-chart[type=dot][orientation=landscape]) .item:hover,:host(limel-chart[type=dot][orientation=landscape]) .item:focus-visible{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/1px 100% no-repeat}:host(limel-chart[type=dot][orientation=landscape]) .item:before{inset:auto 0 0 0;transform:translateY(50%)}:host(limel-chart[type=dot][orientation=landscape]) .item::after{inset:0 0 auto 0;transform:translateY(-50%)}:host(limel-chart[type=bar][orientation=portrait]) .item,:host(limel-chart[type=dot][orientation=portrait]) .item{width:calc(var(--limel-chart-item-size) * 1%);left:calc(var(--limel-chart-item-offset) * 1%)}:host(limel-chart[type=bar][orientation=portrait]) .item.has-negative-value-only,:host(limel-chart[type=dot][orientation=portrait]) .item.has-negative-value-only{width:calc(var(--limel-chart-item-size) * -1%);transform-origin:left;transform:rotateY(180deg)}:host(limel-chart[type=dot][orientation=portrait]) .item.has-start-value,:host(limel-chart[type=dot][orientation=portrait]) .item:hover,:host(limel-chart[type=dot][orientation=portrait]) .item:focus-visible{background:linear-gradient(to right, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/100% 1px no-repeat}:host(limel-chart[type=dot][orientation=portrait]) .item:before{inset:0 auto 0 0;transform:translateX(-50%)}:host(limel-chart[type=dot][orientation=portrait]) .item:after{inset:0 0 0 auto;transform:translateX(50%)}:host(limel-chart[type=area]) .item,:host(limel-chart[type=line]) .item{position:relative}:host(limel-chart[type=area]) .item:after,:host(limel-chart[type=line]) .item:after{margin:auto;width:var(--limel-chart-min-item-size);height:var(--limel-chart-min-item-size);border-radius:50%;border:1px solid rgb(var(--contrast-100))}:host(limel-chart[type=area]) .item:before,:host(limel-chart[type=line]) .item:before{inset:0}:host(limel-chart[type=area]) .item:after,:host(limel-chart[type=area]) .item:before,:host(limel-chart[type=line]) .item:after,:host(limel-chart[type=line]) .item:before{transition:border-color 0.2s ease, opacity 0.4s ease;content:"";position:absolute;background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=area]) .item:hover:after,:host(limel-chart[type=area]) .item:focus-visible:after,:host(limel-chart[type=line]) .item:hover:after,:host(limel-chart[type=line]) .item:focus-visible:after{border-color:transparent}:host(limel-chart[type=line][orientation=landscape]) .item,:host(limel-chart[type=area][orientation=landscape]) .item{height:100%}:host(limel-chart[type=line][orientation=landscape]) .item:after,:host(limel-chart[type=area][orientation=landscape]) .item:after{transform:translateX(-50%) translateY(50%);left:0;bottom:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[type=line][orientation=landscape]) .item:last-of-type:before,:host(limel-chart[type=area][orientation=landscape]) .item:last-of-type:before{display:none}:host(limel-chart[type=line][orientation=portrait]) .item,:host(limel-chart[type=area][orientation=portrait]) .item{width:100%}:host(limel-chart[type=line][orientation=portrait]) .item:after,:host(limel-chart[type=area][orientation=portrait]) .item:after{transform:translateX(-50%) translateY(-50%);left:calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%)}:host(limel-chart[type=area]) .item:after{opacity:0}:host(limel-chart[type=area]) .item:hover:after,:host(limel-chart[type=area]) .item:focus-visible:after{opacity:1}:host(limel-chart[type=area]) .item:hover:before,:host(limel-chart[type=area]) .item:focus-visible:before{opacity:0.7}:host(limel-chart[type=area][orientation=landscape]){}:host(limel-chart[type=area][orientation=landscape]) .item:before{clip-path:polygon(0 calc((100 - var(--limel-chart-item-offset)) * 1%), 0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1%), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1%), 100% calc((100 - var(--limel-chart-next-item-offset)) * 1%))}:host(limel-chart[type=area][orientation=portrait]){}:host(limel-chart[type=area][orientation=portrait]) .item:before{clip-path:polygon(calc(var(--limel-chart-item-offset) * 1%) 0, calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%) 0, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1%) 100%, calc(var(--limel-chart-next-item-offset) * 1%) 100%)}:host(limel-chart[type=line]){--limel-chart-line-thickness:0.125rem}:host(limel-chart[type=line]) .item:hover:before{opacity:0.4}:host(limel-chart[type=line][orientation=landscape]){}:host(limel-chart[type=line][orientation=landscape]) .item:hover{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) left/1px 100% no-repeat}:host(limel-chart[type=line][orientation=landscape]) .item:before{clip-path:polygon(0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1%), 0 calc((100 - (var(--limel-chart-item-size) + var(--limel-chart-item-offset))) * 1% + var(--limel-chart-line-thickness)), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1% + var(--limel-chart-line-thickness)), 100% calc((100 - (var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset))) * 1%))}:host(limel-chart[type=line][orientation=portrait]){}:host(limel-chart[type=line][orientation=portrait]) .item:hover{background:linear-gradient(to right, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) top/100% 1px no-repeat}:host(limel-chart[type=line][orientation=portrait]) .item:before{clip-path:polygon(calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1%) 0, calc((var(--limel-chart-item-size) + var(--limel-chart-item-offset)) * 1% + var(--limel-chart-line-thickness)) 0, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1% + var(--limel-chart-line-thickness)) 100%, calc((var(--limel-chart-next-item-size) + var(--limel-chart-next-item-offset)) * 1%) 100%)}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item{background:conic-gradient(transparent 0 calc(var(--limel-chart-item-offset) * 1%), var(--limel-chart-item-color, var(--limel-chart-default-item-color)) calc(var(--limel-chart-item-offset) * 1%) calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%), transparent calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%))}:host(limel-chart[type=pie]) .item:focus,:host(limel-chart[type=pie]) .item:focus-visible,:host(limel-chart[type=doughnut]) .item:focus,:host(limel-chart[type=doughnut]) .item:focus-visible{outline:none}:host(limel-chart[type=pie]) .item,:host(limel-chart[type=doughnut]) .item{pointer-events:none}:host(limel-chart[type=doughnut]) .chart:after{aspect-ratio:1;content:"";position:absolute;inset:0;margin:auto;max-width:60%;max-height:60%;border-radius:50%;background-color:rgb(var(--contrast-100))}:host(limel-chart[type=ring]) .chart:after{content:"";position:absolute;inset:0;aspect-ratio:1;border-radius:50%;max-height:calc(100% - var(--limel-chart-number-of-items) * 100% / (var(--limel-chart-number-of-items) + 1));max-width:calc(100% - var(--limel-chart-number-of-items) * 100% / (var(--limel-chart-number-of-items) + 1));background-color:var(--limel-chart-background-color, rgb(var(--contrast-200)))}:host(limel-chart[type=ring]) .chart:has(.item:hover) .item,:host(limel-chart[type=ring]) .chart:has(.item:focus-visible) .item{opacity:1;filter:grayscale(1)}:host(limel-chart[type=ring]) .chart:after,:host(limel-chart[type=ring]) .item{margin:auto;border:1px solid var(--limel-chart-background-color, rgb(var(--contrast-400)))}:host(limel-chart[type=ring]) .item{background:conic-gradient(var(--limel-chart-item-color, var(--limel-chart-default-item-color)) 0 calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%), var(--chart-background-color, rgb(var(--contrast-200))) calc(var(--limel-chart-item-offset) * 1% + var(--limel-chart-item-size) * 1%));max-width:calc(100% - var(--limel-chart-item-index) * 100% / (var(--limel-chart-number-of-items) + 1));max-height:calc(100% - var(--limel-chart-item-index) * 100% / (var(--limel-chart-number-of-items) + 1))}:host(limel-chart[type=ring]) .item:focus-visible,:host(limel-chart[type=ring]) .item:hover{filter:grayscale(0) !important}:host(limel-chart[type=stacked-bar]) .chart{display:flex;border-radius:0.25rem;overflow:hidden;background-color:var(--chart-background-color, rgb(var(--contrast-800), 0.2))}:host(limel-chart[type=stacked-bar]) .item{display:flex;border-radius:var(--chart-item-border-radius, 0);background:var(--limel-chart-item-color, var(--limel-chart-default-item-color))}:host(limel-chart[type=stacked-bar]) .item:last-of-type:not(:focus-visible){box-shadow:none !important}:host(limel-chart[type=stacked-bar][orientation=landscape]) .chart{flex-direction:row}:host(limel-chart[type=stacked-bar][orientation=landscape]) .item{min-height:0.5rem;width:calc(var(--limel-chart-item-size) * 1%)}:host(limel-chart[type=stacked-bar][orientation=landscape]) .item:not(:focus-visible){box-shadow:-1px 0 0 0 var(--chart-item-divider-color, rgb(var(--color-white), 0.6)) inset}:host(limel-chart[type=stacked-bar][orientation=portrait]) .chart{flex-direction:column-reverse}:host(limel-chart[type=stacked-bar][orientation=portrait]) .item{min-width:0.5rem;height:calc(var(--limel-chart-item-size) * 1%)}:host(limel-chart[type=stacked-bar][orientation=portrait]) .item:not(:focus-visible){box-shadow:0 -1px 0 0 rgb(var(--color-white), 0.6) inset}:host(limel-chart[type=nps]){--limel-chart-nps-gauge-angel:220deg}:host(limel-chart[type=nps]) table{min-height:4rem;min-width:4rem}:host(limel-chart[type=nps]) .chart{position:relative;display:flex;justify-content:center;align-items:center;aspect-ratio:1;margin:auto;width:unset;height:unset;max-width:100%;max-height:100%;rotate:calc(var(--limel-chart-nps-gauge-angel) / 2 * -1);transform:translate(-15%, -5%)}:host(limel-chart[type=nps]) .chart:before,:host(limel-chart[type=nps]) .chart:after{content:"";aspect-ratio:1;position:absolute;border-radius:50%;z-index:-1;min-height:0;min-width:0}:host(limel-chart[type=nps]) .chart:before{height:100%;max-height:100%;background:conic-gradient(rgb(var(--color-coral-default)) 0deg calc(var(--limel-chart-nps-gauge-angel) / 2), rgb(var(--color-amber-light)) calc(var(--limel-chart-nps-gauge-angel) / 2) calc(var(--limel-chart-nps-gauge-angel) * 0.65), rgb(var(--color-lime-light)) calc(var(--limel-chart-nps-gauge-angel) * 0.65) calc(var(--limel-chart-nps-gauge-angel) * 0.85), rgb(var(--color-lime-default)) calc(var(--limel-chart-nps-gauge-angel) * 0.85) var(--limel-chart-nps-gauge-angel), transparent var(--limel-chart-nps-gauge-angel))}:host(limel-chart[type=nps]) .chart:after{height:calc(100% - min(3rem, 20%) * 2);max-height:calc(100% - min(3rem, 20%) * 2);background:conic-gradient(var(--chart-background-color, rgb(var(--contrast-100))) 0deg var(--limel-chart-nps-gauge-angel), transparent var(--limel-chart-nps-gauge-angel))}:host(limel-chart[type=nps]) .item{display:flex;align-items:flex-start;justify-content:center;border-radius:0.5rem;position:absolute;height:calc(50% - min(3rem, 20%) + 0.5rem);width:0.5rem;transform:translateY(-50%) rotate(calc((var(--limel-chart-item-value) + 100) / 200 * var(--limel-chart-nps-gauge-angel)));transform-origin:bottom}:host(limel-chart[type=nps]) .item:hover,:host(limel-chart[type=nps]) .item:focus-visible{background:linear-gradient(to bottom, rgb(var(--contrast-800), 0.4) 0%, rgb(var(--contrast-800), 0.4) 100%) center/1px 100% no-repeat}:host(limel-chart[type=nps]) .item:before,:host(limel-chart[type=nps]) .item:after{content:"";position:absolute}:host(limel-chart[type=nps]) .item:before{transform:translateY(-60%);width:0.4rem;border-radius:1rem;border-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));border-style:solid;border-bottom-width:1.75rem;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent}:host(limel-chart[type=nps]) .item:after{border-radius:50%;background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));aspect-ratio:1;height:clamp(0.75rem, 10%, 1.25rem);border:0.125rem solid rgb(var(--contrast-100), 0.8);box-shadow:var(--shadow-depth-8)}:host(limel-chart[type=scatter]){--limel-chart-padding:0.5rem 0.5rem 1rem 2rem}:host(limel-chart[type=scatter]) .chart{display:block;background-color:var(--chart-background-color, transparent)}:host(limel-chart[type=scatter]) .item{position:absolute;transform-origin:center;width:var(--chart-scatter-item-size, 0.5rem);height:var(--chart-scatter-item-size, 0.5rem);border-radius:50%;background-color:var(--limel-chart-item-color, var(--limel-chart-default-item-color));mix-blend-mode:hard-light}:host(limel-chart[type=scatter][orientation=landscape]) .item{left:calc(var(--limel-chart-item-offset-x) * 1%);bottom:calc(var(--limel-chart-item-offset-y) * 1%);transform:translate(-50%, 50%)}:host(limel-chart[type=scatter][orientation=portrait]) .item{left:calc(var(--limel-chart-item-offset-y) * 1%);top:calc(var(--limel-chart-item-offset-x) * 1%);transform:translate(-50%, -50%)}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]),:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]){--limel-chart-padding:0.5rem 0.5rem 2rem 3rem}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]) table thead th:first-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}:host(limel-chart[type=scatter][display-axis-labels][orientation=landscape]) table thead th:last-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]) table thead th:first-of-type{left:-3rem;writing-mode:sideways-lr}:host(limel-chart[type=scatter][display-axis-labels][orientation=portrait]) table thead th:last-of-type{bottom:-2rem;left:50%;transform:translateX(-50%)}.axises{position:absolute;display:flex;justify-content:space-between;min-height:100%;min-width:100%;height:100%;width:100%}.axis-line{transition:opacity 0.4s ease;position:relative;opacity:0.2;font-size:0.625rem;border-color:var(--limel-chart-axis-line-color)}.axis-line:hover{opacity:0.6;transition-duration:0.2s}.axis-line.zero-line{opacity:0.6;z-index:1}.axis-line limel-badge{--badge-background-color:transparent;--badge-text-color:currentColor;position:absolute;text-align:right;min-width:2rem}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axises{flex-direction:column-reverse}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axis-line{border-bottom:1px solid;transform:translateY(50%)}:host(limel-chart[orientation=landscape]:not([type=scatter])) .axis-line limel-badge{bottom:0;left:-2rem;transform:translateY(50%)}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axises{flex-direction:row}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axis-line{border-left:1px solid;transform:translateX(-50%)}:host(limel-chart[orientation=portrait]:not([type=scatter])) .axis-line limel-badge{bottom:-1rem;right:-1rem}.axises.horizontal-lines .axis-line{border-bottom:1px solid;transform:translateY(50%)}.axises.horizontal-lines .axis-line limel-badge{bottom:0;left:-2rem;transform:translateY(50%)}:host(limel-chart[orientation=landscape]) .axises.horizontal-lines{flex-direction:column-reverse}:host(limel-chart[orientation=portrait]) .axises.horizontal-lines{flex-direction:column}.axises.vertical-lines{flex-direction:row}.axises.vertical-lines .axis-line{border-left:1px solid;transform:translateX(-50%)}.axises.vertical-lines .axis-line limel-badge{bottom:-1rem;right:-1rem}:host(limel-chart){--limel-chart-min-item-size:0.5rem;--limel-chart-default-item-color:var( --chart-item-color, rgb(var(--contrast-1100), 0.8) );--chart-axis-line-color:var( --limel-chart-axis-line-color, rgb(var(--contrast-900)) );box-sizing:border-box;isolation:isolate;display:flex;width:100%;height:100%;min-width:0;min-height:0;padding:var(--limel-chart-padding)}table{all:unset;border-collapse:collapse;border-spacing:0;empty-cells:show;position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0}table colgroup,table thead,table tbody,table tr,table th,table td{all:unset}table caption,table colgroup,table thead,table tfoot,table th,table td{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}*,*:before,*:after{box-sizing:border-box}.chart{position:relative;flex-grow:1;width:100%;height:100%;min-height:0;min-width:0}.chart:has(.item:hover) .item,.chart:has(.item:focus-visible) .item{opacity:0.4}.item:focus{outline:none}.item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.item{transition:background-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.4s ease;cursor:help}.item:focus-visible,.item:hover{opacity:1 !important}.item[role=button]{cursor:pointer}limel-spinner{margin:auto}';export{l as limel_chart}