@luzmo/analytics-components-kit 1.0.1-alpha.42 → 1.0.1-alpha.44

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 (102) hide show
  1. package/components/{calculate-data-item-icon-BFpVWXnR.js → calculate-data-item-icon-DKjZwr-x.js} +1 -1
  2. package/components/{calculate-data-item-icon-C_3QUGmB.cjs → calculate-data-item-icon-DlfbBvFN.cjs} +1 -1
  3. package/components/display-settings/display-settings.d.ts +1 -0
  4. package/components/display-settings/index.cjs +1 -86
  5. package/components/display-settings/index.js +6 -216
  6. package/components/display-settings-binning/index.cjs +1 -1
  7. package/components/display-settings-binning/index.js +5 -5
  8. package/components/display-settings-datetime/index.cjs +1 -1
  9. package/components/display-settings-datetime/index.js +5 -5
  10. package/components/display-settings-grand-totals/index.cjs +1 -1
  11. package/components/display-settings-grand-totals/index.js +6 -6
  12. package/components/display-settings-numeric/index.cjs +1 -1
  13. package/components/display-settings-numeric/index.js +5 -5
  14. package/components/display-settings-period-over-period/index.cjs +1 -1
  15. package/components/display-settings-period-over-period/index.js +4 -4
  16. package/components/draggable-data-item/index.cjs +1 -1
  17. package/components/draggable-data-item/index.js +3 -3
  18. package/components/draggable-data-item-level/index.cjs +1 -1
  19. package/components/draggable-data-item-level/index.js +5 -5
  20. package/components/droppable-slot/droppable-slot.d.ts +6 -2
  21. package/components/droppable-slot/index.cjs +71 -10
  22. package/components/droppable-slot/index.js +658 -128
  23. package/components/edit-item/index.cjs +1 -1
  24. package/components/edit-item/index.js +4 -4
  25. package/components/edit-option/index.cjs +1 -1
  26. package/components/edit-option/index.js +1 -1
  27. package/components/edit-option-action-button-group/index.cjs +1 -1
  28. package/components/edit-option-action-button-group/index.js +3 -3
  29. package/components/{edit-option-base-BQc4gXup.js → edit-option-base-CbpBi6I7.js} +3 -3
  30. package/components/{edit-option-base-ByphLI4J.cjs → edit-option-base-Db3JjWMk.cjs} +1 -1
  31. package/components/edit-option-color-picker/index.cjs +1 -1
  32. package/components/edit-option-color-picker/index.js +2 -2
  33. package/components/edit-option-multi-language-field/index.cjs +1 -1
  34. package/components/edit-option-multi-language-field/index.js +2 -2
  35. package/components/edit-option-number-field/index.cjs +1 -1
  36. package/components/edit-option-number-field/index.js +2 -2
  37. package/components/edit-option-picker/index.cjs +1 -1
  38. package/components/edit-option-picker/index.js +2 -2
  39. package/components/edit-option-position-picker/index.cjs +1 -1
  40. package/components/edit-option-position-picker/index.js +2 -2
  41. package/components/edit-option-positions-number-field/index.cjs +1 -1
  42. package/components/edit-option-positions-number-field/index.js +4 -4
  43. package/components/edit-option-radio-button-group/index.cjs +1 -1
  44. package/components/edit-option-radio-button-group/index.js +2 -2
  45. package/components/edit-option-slider/index.cjs +1 -1
  46. package/components/edit-option-slider/index.js +2 -2
  47. package/components/edit-option-switch/index.cjs +1 -1
  48. package/components/edit-option-switch/index.js +2 -2
  49. package/components/edit-option-text-field/index.cjs +1 -1
  50. package/components/edit-option-text-field/index.js +2 -2
  51. package/components/filter-data-item-picker/index.cjs +1 -1
  52. package/components/filter-data-item-picker/index.js +2 -2
  53. package/components/filter-expression-picker/index.cjs +1 -1
  54. package/components/filter-expression-picker/index.js +1 -1
  55. package/components/filter-item/index.cjs +1 -1
  56. package/components/filter-item/index.js +3 -3
  57. package/components/filter-value-picker/index.cjs +1 -1
  58. package/components/filter-value-picker/index.js +1 -1
  59. package/components/filter-value-picker-datetime/index.cjs +1 -1
  60. package/components/filter-value-picker-datetime/index.js +1 -1
  61. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  62. package/components/filter-value-picker-hierarchy/index.js +2 -2
  63. package/components/filter-value-picker-numeric/index.cjs +1 -1
  64. package/components/filter-value-picker-numeric/index.js +2 -2
  65. package/components/{focusable-BTJYY_Mf.cjs → focusable-B8t8a-WJ.cjs} +1 -1
  66. package/components/{focusable-BXhQz3_k.js → focusable-Bhf_beoW.js} +1 -1
  67. package/components/grid/grid.d.ts +1 -1
  68. package/components/grid/index.cjs +9 -9
  69. package/components/grid/index.js +127 -127
  70. package/components/{if-defined-CTc4c9nr.js → if-defined-Dg09naf2.js} +1 -1
  71. package/components/{if-defined-Bulnuz1A.cjs → if-defined-DjdbEoAa.cjs} +1 -1
  72. package/components/{index-8fxgV8-A.js → index-BNCgbOV2.js} +2 -2
  73. package/components/{index-DQbl3h5H.cjs → index-BNFpjvqX.cjs} +1 -1
  74. package/components/index-BqMMcuLX.cjs +121 -0
  75. package/components/index-Cw_HnduG.js +304 -0
  76. package/components/{index-BiY07GvX.js → index-DM0JWaVq.js} +4 -4
  77. package/components/{index-DM96Q1fX.cjs → index-MVmoiSxL.cjs} +1 -1
  78. package/components/index.cjs +1 -1
  79. package/components/index.js +3 -3
  80. package/components/{luzmo-icons-CP__dRRM.cjs → luzmo-icons-Bvm-_ECi.cjs} +1 -1
  81. package/components/{luzmo-icons-B2K7AcCF.js → luzmo-icons-DnAqAQCX.js} +9 -9
  82. package/components/{property-Dn4zSyxu.js → property-BFMfZY1k.js} +81 -78
  83. package/components/property-BV1QaY8E.cjs +42 -0
  84. package/components/{sized-mixin-BNtmplgF.cjs → sized-mixin-C48t6K7U.cjs} +1 -1
  85. package/components/{sized-mixin-BR_Ii7le.js → sized-mixin-CkdMApAU.js} +1 -1
  86. package/components/slot-contents-picker/index.cjs +1 -1
  87. package/components/slot-contents-picker/index.js +8 -8
  88. package/components/slot-menu/index.cjs +9 -9
  89. package/components/slot-menu/index.js +149 -80
  90. package/components/slot-menu/slot-menu.d.ts +5 -5
  91. package/components/slot-menu-list/index.cjs +1 -1
  92. package/components/slot-menu-list/index.js +4 -4
  93. package/components/{state-vVJlsarL.js → state-BSTa7W6f.js} +1 -1
  94. package/components/{state-BxZEcclm.cjs → state-CuE7TJCY.cjs} +1 -1
  95. package/components/{task-qPJdeXO1.cjs → task-0B-FC3rj.cjs} +1 -1
  96. package/components/{task-PQaVY8Iw.js → task-CDsB8Kbr.js} +1 -1
  97. package/custom-elements.json +28 -16
  98. package/package.json +1 -1
  99. package/utils/drag/draggable.d.ts +13 -0
  100. package/utils/store/slot-context.d.ts +4 -0
  101. package/utils/store/slot-store.d.ts +21 -0
  102. package/components/property-BCb4Kybn.cjs +0 -42
@@ -44,10 +44,8 @@ export declare class LuzmoSlotMenu extends LuzmoSlotMenu_base {
44
44
  * Whether to show the top menu label & delete button
45
45
  */
46
46
  noTopMenuLabel?: boolean;
47
- /**
48
- * The contents of the slot
49
- */
50
- slotContents: any;
47
+ private _store;
48
+ dragBoundary?: string;
51
49
  /**
52
50
  * The list of columns that can be used for the rate aggregation
53
51
  */
@@ -63,10 +61,11 @@ export declare class LuzmoSlotMenu extends LuzmoSlotMenu_base {
63
61
  _slotContents: any[];
64
62
  _currentSlotContent: any;
65
63
  _activeIndex: number;
64
+ private _cleanupDrag?;
66
65
  disconnectedCallback(): void;
67
66
  private _sendChangeEvent;
68
67
  private _sendCloseEvent;
69
- protected willUpdate(changedProperties: PropertyValues): void;
68
+ protected willUpdate(_changedProperties: PropertyValues): void;
70
69
  protected updated(): void;
71
70
  private _handleSlotListChange;
72
71
  private _handleSlotContentChange;
@@ -75,5 +74,6 @@ export declare class LuzmoSlotMenu extends LuzmoSlotMenu_base {
75
74
  close(): void;
76
75
  _removeActiveSlotContent(): void;
77
76
  protected render(): TemplateResult;
77
+ protected firstUpdated(_changedProperties: PropertyValues): void;
78
78
  }
79
79
  export {};
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../property-BCb4Kybn.cjs"),v=require("../get-css-variable-DLiZYZEi.cjs"),C=require("../luzmo-icons-CP__dRRM.cjs"),_=require("../localize-r7ALOUy_.cjs"),P=require("../query-all-CR2wWKRD.cjs"),j=require("../focusable-BTJYY_Mf.cjs"),k=require("../sized-mixin-BNtmplgF.cjs");var D={large:700};function F(i){i.animate([{backgroundColor:"var(--ds-background-selected, #E9F2FF)"},{}],{duration:D.large,easing:"cubic-bezier(0.25, 0.1, 0.25, 1.0)",iterations:1})}function w(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,o)}return e}function S(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?w(Object(e),!0).forEach(function(o){v._defineProperty(i,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):w(Object(e)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(e,o))})}return i}var L={top:function(t,e){return Math.abs(e.y-t.top)},right:function(t,e){return Math.abs(t.right-e.x)},bottom:function(t,e){return Math.abs(t.bottom-e.y)},left:function(t,e){return Math.abs(e.x-t.left)}},I=Symbol("closestEdge");function $(i,t){var e,o,s=t.element,u=t.input,n=t.allowedEdges,l={x:u.clientX,y:u.clientY},r=s.getBoundingClientRect(),a=n.map(function(c){return{edge:c,value:L[c](r,l)}}),d=(e=(o=a.sort(function(c,b){return c.value-b.value})[0])===null||o===void 0?void 0:o.edge)!==null&&e!==void 0?e:null;return S(S({},i),{},v._defineProperty({},I,d))}function E(i){var t;return(t=i[I])!==null&&t!==void 0?t:null}const M=':host{font-family:var(--luzmo-slot-menu-list-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-list-font-size, var(--slot-menu-list-font-size));color:var(--luzmo-slot-menu-listfont-color, var(--luzmo-font-color))}:host{margin:0;padding:0;list-style:none;border-right:var(--luzmo-slot-menu-list-border-right-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-list-border-right-color, var(--luzmo-border-color))}:host li{position:relative;cursor:pointer}:host li:hover{background-color:var(--luzmo-slot-menu-list-background-color-hover, var(--slot-menu-list-background-color-hover))}:host .active{background-color:var(--luzmo-slot-menu-list-active-background-color, var(--slot-menu-list-active-background-color));color:var(--luzmo-slot-menu-list-active-color, var(--slot-menu-list-active-color))}:host .active:hover{background-color:var(--luzmo-slot-menu-list-active-background-color-hover, var(--slot-menu-list-active-background-color-hover))}.drop-indicator{position:absolute;left:0;right:0;height:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height));background-color:var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color))}.drop-indicator:before{content:"";display:block;width:100%;border:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)) solid var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color));border-radius:50%;position:absolute;background:var(--luzmo-slot-menu-list-drop-indicator-background, var(--luzmo-background-color));left:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));top:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));height:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size));width:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size))}.drop-indicator[data-edge=top]{top:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.drop-indicator[data-edge=bottom]{bottom:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.draggable-slot-content{display:flex;justify-content:space-between;gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));align-items:center}.draggable-slot-content .draggable-slot-content-label,.draggable-slot-content .draggable-slot-content-remove{padding-block-start:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding));padding-block-end:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding))}.draggable-slot-content .draggable-slot-content-label{padding-inline-start:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draggable-slot-content .draggable-slot-content-remove{padding-inline-end:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:0 0 auto}:host{--slot-menu-list-active-background-color: var(--luzmo-primary);--slot-menu-list-active-background-color-hover: var(--luzmo-primary-hover);--slot-menu-list-active-color: var(--luzmo-primary-inverse-color);--slot-menu-list-background-color-hover: var(--luzmo-background-color-hover);--slot-menu-list-drop-indicator-color: var(--luzmo-font-color-down);--slot-menu-list-drop-indicator-height: 2px;--slot-menu-list-drop-indicator-circle-size: 4px}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2)}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-4);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5)}';var q=Object.defineProperty,f=(i,t,e,o)=>{for(var s=void 0,u=i.length-1,n;u>=0;u--)(n=i[u])&&(s=n(t,e,s)||s);return s&&q(t,e,s),s};class h extends k.SizedMixin(j.LuzmoElement,{validSizes:Object.values(k.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotContents=[],this.activeIndex=0,this._sendChangeEvent=()=>{this.dispatchEvent(new CustomEvent("slot-list-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(this.slotContents),activeIndex:this.activeIndex}}))},this._cleanupFns=[],this._attachAll=()=>{[...this._draggableSlotContentElements].forEach(t=>{const e=this._sendChangeEvent.bind(this),o=this,s=v.draggable({element:t,onGenerateDragPreview({nativeSetDragImage:n}){v.setCustomNativeDragPreview({nativeSetDragImage:n,render({container:l}){var d;const r=document.createElement("div");r.classList.add("drag-preview");const a={};[["borderColor","--luzmo-slot-menu-list-border-color","--luzmo-border-color"],["backgroundColor","--luzmo-slot-menu-list-background-color","--luzmo-background-color"],["color","--luzmo-slot-menu-list-font-color","--slot-menu-list-font-color"],["fontSize","--luzmo-slot-menu-list-font-size","--slot-menu-list-font-size"],["horizontalPadding","--luzmo-slot-menu-list-item-horizontal-padding","--slot-menu-list-item-horizontal-padding"],["verticalPadding","--luzmo-slot-menu-list-item-vertical-padding","--slot-menu-list-item-vertical-padding"],["borderRadius","--luzmo-slot-menu-list-border-radius","--luzmo-border-radius"],["fontFamily","--luzmo-slot-menu-list-font-family","--luzmo-font-family"]].forEach(([c,b,y])=>{const m=v.getCssVariableValue(t,b)||v.getCssVariableValue(t,y);a[c]=m}),r.textContent=((d=t.querySelector("[data-task-content]"))==null?void 0:d.textContent)??t.textContent,Object.assign(r.style,{border:`1px solid ${a.borderColor}`,backgroundColor:a.backgroundColor,borderRadius:a.borderRadius,fontFamily:a.fontFamily,fontSize:a.fontSize,color:a.color,paddingInline:`${a.horizontalPadding}`,paddingBlock:`${a.verticalPadding}`}),l.append(r)}})},getInitialData(){var r;const n=t.parentElement;let l=0;return n&&(l=[...((r=n.parentElement)==null?void 0:r.children)??[]].indexOf(n)),{index:l}},onDragStart(){t.style.opacity="0.5"},onDrop(){t.style.opacity="1"}});this._cleanupFns.push(s);const u=v.dropTargetForElements({element:t,canDrop({source:n}){var l;return n.element===t?!1:(l=n==null?void 0:n.element)==null?void 0:l.classList.contains("draggable-slot-content")},getData(n){return $({},{element:t,input:n.input,allowedEdges:["top","bottom"]})},getIsSticky(){return!0},onDragEnter({self:n}){const l=E(n.data);if(!l)return;const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDrag({self:n}){var a,d,c;const l=E(n.data);if(!l){(a=t.nextElementSibling)==null||a.remove();return}if(((d=t.nextElementSibling)==null?void 0:d.getAttribute("data-edge"))===l)return;(c=t.nextElementSibling)==null||c.remove();const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDragLeave(){var n;(n=t.nextElementSibling)==null||n.remove()},onDrop({self:n,source:l}){var d,c,b,y;(d=t.nextElementSibling)==null||d.remove();const r=E(n.data),a=n.element.parentElement;if(typeof l.data.index=="number"&&a){let m=[...((c=a.parentElement)==null?void 0:c.children)??[]].indexOf(a);r==="bottom"&&l.data.index>=m&&m<(((y=(b=a==null?void 0:a.parentElement)==null?void 0:b.children)==null?void 0:y.length)??0)-1?m+=1:r==="top"&&m>l.data.index&&(m-=1);const g=o.activeIndex,z=l.data.index,x=m,O=o.slotContents[z];o.slotContents.splice(z,1),o.slotContents.splice(x,0,O),z===g?o.activeIndex=x:z<g&&x>=g?o.activeIndex=g-1:z>g&&x<=g&&(o.activeIndex=g+1)}r&&(F(l.element),o.requestUpdate(),e())}});this._cleanupFns.push(u)})},this._detachAll=()=>{this._cleanupFns.forEach(t=>t()),this._cleanupFns=[]}}static get styles(){return[p.r(M)]}willUpdate(){this._detachAll()}updated(){this._attachAll()}setActiveIndex(t){this.activeIndex=t,this._sendChangeEvent()}removeSlotContent(t){this.slotContents=this.slotContents.filter((e,o)=>o!==t),this.activeIndex===t?this.activeIndex=t:this.slotContents.length>0&&this.activeIndex>t&&this.activeIndex--,this._sendChangeEvent()}render(){const t=this.slotContents.map((e,o)=>{const s=_.localize(e.label,this.contentLanguage);return p.x`<li class=${o===this.activeIndex?"active":""}>
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../property-BV1QaY8E.cjs"),v=require("../get-css-variable-DLiZYZEi.cjs"),C=require("../luzmo-icons-Bvm-_ECi.cjs"),_=require("../localize-r7ALOUy_.cjs"),P=require("../query-all-CR2wWKRD.cjs"),j=require("../focusable-B8t8a-WJ.cjs"),k=require("../sized-mixin-C48t6K7U.cjs");var D={large:700};function F(i){i.animate([{backgroundColor:"var(--ds-background-selected, #E9F2FF)"},{}],{duration:D.large,easing:"cubic-bezier(0.25, 0.1, 0.25, 1.0)",iterations:1})}function w(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,o)}return e}function S(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?w(Object(e),!0).forEach(function(o){v._defineProperty(i,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):w(Object(e)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(e,o))})}return i}var L={top:function(t,e){return Math.abs(e.y-t.top)},right:function(t,e){return Math.abs(t.right-e.x)},bottom:function(t,e){return Math.abs(t.bottom-e.y)},left:function(t,e){return Math.abs(e.x-t.left)}},I=Symbol("closestEdge");function $(i,t){var e,o,s=t.element,u=t.input,n=t.allowedEdges,l={x:u.clientX,y:u.clientY},r=s.getBoundingClientRect(),a=n.map(function(c){return{edge:c,value:L[c](r,l)}}),d=(e=(o=a.sort(function(c,b){return c.value-b.value})[0])===null||o===void 0?void 0:o.edge)!==null&&e!==void 0?e:null;return S(S({},i),{},v._defineProperty({},I,d))}function E(i){var t;return(t=i[I])!==null&&t!==void 0?t:null}const M=':host{font-family:var(--luzmo-slot-menu-list-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-list-font-size, var(--slot-menu-list-font-size));color:var(--luzmo-slot-menu-listfont-color, var(--luzmo-font-color))}:host{margin:0;padding:0;list-style:none;border-right:var(--luzmo-slot-menu-list-border-right-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-list-border-right-color, var(--luzmo-border-color))}:host li{position:relative;cursor:pointer}:host li:hover{background-color:var(--luzmo-slot-menu-list-background-color-hover, var(--slot-menu-list-background-color-hover))}:host .active{background-color:var(--luzmo-slot-menu-list-active-background-color, var(--slot-menu-list-active-background-color));color:var(--luzmo-slot-menu-list-active-color, var(--slot-menu-list-active-color))}:host .active:hover{background-color:var(--luzmo-slot-menu-list-active-background-color-hover, var(--slot-menu-list-active-background-color-hover))}.drop-indicator{position:absolute;left:0;right:0;height:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height));background-color:var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color))}.drop-indicator:before{content:"";display:block;width:100%;border:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)) solid var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color));border-radius:50%;position:absolute;background:var(--luzmo-slot-menu-list-drop-indicator-background, var(--luzmo-background-color));left:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));top:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));height:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size));width:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size))}.drop-indicator[data-edge=top]{top:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.drop-indicator[data-edge=bottom]{bottom:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.draggable-slot-content{display:flex;justify-content:space-between;gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));align-items:center}.draggable-slot-content .draggable-slot-content-label,.draggable-slot-content .draggable-slot-content-remove{padding-block-start:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding));padding-block-end:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding))}.draggable-slot-content .draggable-slot-content-label{padding-inline-start:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draggable-slot-content .draggable-slot-content-remove{padding-inline-end:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:0 0 auto}:host{--slot-menu-list-active-background-color: var(--luzmo-primary);--slot-menu-list-active-background-color-hover: var(--luzmo-primary-hover);--slot-menu-list-active-color: var(--luzmo-primary-inverse-color);--slot-menu-list-background-color-hover: var(--luzmo-background-color-hover);--slot-menu-list-drop-indicator-color: var(--luzmo-font-color-down);--slot-menu-list-drop-indicator-height: 2px;--slot-menu-list-drop-indicator-circle-size: 4px}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2)}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-4);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5)}';var q=Object.defineProperty,f=(i,t,e,o)=>{for(var s=void 0,u=i.length-1,n;u>=0;u--)(n=i[u])&&(s=n(t,e,s)||s);return s&&q(t,e,s),s};class h extends k.SizedMixin(j.LuzmoElement,{validSizes:Object.values(k.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotContents=[],this.activeIndex=0,this._sendChangeEvent=()=>{this.dispatchEvent(new CustomEvent("slot-list-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(this.slotContents),activeIndex:this.activeIndex}}))},this._cleanupFns=[],this._attachAll=()=>{[...this._draggableSlotContentElements].forEach(t=>{const e=this._sendChangeEvent.bind(this),o=this,s=v.draggable({element:t,onGenerateDragPreview({nativeSetDragImage:n}){v.setCustomNativeDragPreview({nativeSetDragImage:n,render({container:l}){var d;const r=document.createElement("div");r.classList.add("drag-preview");const a={};[["borderColor","--luzmo-slot-menu-list-border-color","--luzmo-border-color"],["backgroundColor","--luzmo-slot-menu-list-background-color","--luzmo-background-color"],["color","--luzmo-slot-menu-list-font-color","--slot-menu-list-font-color"],["fontSize","--luzmo-slot-menu-list-font-size","--slot-menu-list-font-size"],["horizontalPadding","--luzmo-slot-menu-list-item-horizontal-padding","--slot-menu-list-item-horizontal-padding"],["verticalPadding","--luzmo-slot-menu-list-item-vertical-padding","--slot-menu-list-item-vertical-padding"],["borderRadius","--luzmo-slot-menu-list-border-radius","--luzmo-border-radius"],["fontFamily","--luzmo-slot-menu-list-font-family","--luzmo-font-family"]].forEach(([c,b,y])=>{const m=v.getCssVariableValue(t,b)||v.getCssVariableValue(t,y);a[c]=m}),r.textContent=((d=t.querySelector("[data-task-content]"))==null?void 0:d.textContent)??t.textContent,Object.assign(r.style,{border:`1px solid ${a.borderColor}`,backgroundColor:a.backgroundColor,borderRadius:a.borderRadius,fontFamily:a.fontFamily,fontSize:a.fontSize,color:a.color,paddingInline:`${a.horizontalPadding}`,paddingBlock:`${a.verticalPadding}`}),l.append(r)}})},getInitialData(){var r;const n=t.parentElement;let l=0;return n&&(l=[...((r=n.parentElement)==null?void 0:r.children)??[]].indexOf(n)),{index:l}},onDragStart(){t.style.opacity="0.5"},onDrop(){t.style.opacity="1"}});this._cleanupFns.push(s);const u=v.dropTargetForElements({element:t,canDrop({source:n}){var l;return n.element===t?!1:(l=n==null?void 0:n.element)==null?void 0:l.classList.contains("draggable-slot-content")},getData(n){return $({},{element:t,input:n.input,allowedEdges:["top","bottom"]})},getIsSticky(){return!0},onDragEnter({self:n}){const l=E(n.data);if(!l)return;const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDrag({self:n}){var a,d,c;const l=E(n.data);if(!l){(a=t.nextElementSibling)==null||a.remove();return}if(((d=t.nextElementSibling)==null?void 0:d.getAttribute("data-edge"))===l)return;(c=t.nextElementSibling)==null||c.remove();const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDragLeave(){var n;(n=t.nextElementSibling)==null||n.remove()},onDrop({self:n,source:l}){var d,c,b,y;(d=t.nextElementSibling)==null||d.remove();const r=E(n.data),a=n.element.parentElement;if(typeof l.data.index=="number"&&a){let m=[...((c=a.parentElement)==null?void 0:c.children)??[]].indexOf(a);r==="bottom"&&l.data.index>=m&&m<(((y=(b=a==null?void 0:a.parentElement)==null?void 0:b.children)==null?void 0:y.length)??0)-1?m+=1:r==="top"&&m>l.data.index&&(m-=1);const g=o.activeIndex,z=l.data.index,x=m,O=o.slotContents[z];o.slotContents.splice(z,1),o.slotContents.splice(x,0,O),z===g?o.activeIndex=x:z<g&&x>=g?o.activeIndex=g-1:z>g&&x<=g&&(o.activeIndex=g+1)}r&&(F(l.element),o.requestUpdate(),e())}});this._cleanupFns.push(u)})},this._detachAll=()=>{this._cleanupFns.forEach(t=>t()),this._cleanupFns=[]}}static get styles(){return[p.r(M)]}willUpdate(){this._detachAll()}updated(){this._attachAll()}setActiveIndex(t){this.activeIndex=t,this._sendChangeEvent()}removeSlotContent(t){this.slotContents=this.slotContents.filter((e,o)=>o!==t),this.activeIndex===t?this.activeIndex=t:this.slotContents.length>0&&this.activeIndex>t&&this.activeIndex--,this._sendChangeEvent()}render(){const t=this.slotContents.map((e,o)=>{const s=_.localize(e.label,this.contentLanguage);return p.x`<li class=${o===this.activeIndex?"active":""}>
21
21
  <div class="draggable-slot-content">
22
22
  <div
23
23
  class="draggable-slot-content-label"
@@ -17,13 +17,13 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- import { r as P, x as E, n as x } from "../property-Dn4zSyxu.js";
20
+ import { r as P, x as E, n as x } from "../property-BFMfZY1k.js";
21
21
  import { _ as S, d as F, a as j, s as D, g as w } from "../get-css-variable-YlLiVgo8.js";
22
- import { a7 as $, aa as L } from "../luzmo-icons-B2K7AcCF.js";
22
+ import { a7 as $, ab as L } from "../luzmo-icons-DnAqAQCX.js";
23
23
  import { l as M } from "../localize-BX7q0S0M.js";
24
24
  import { r as A } from "../query-all-Ddzx2fEK.js";
25
- import { L as R } from "../focusable-BXhQz3_k.js";
26
- import { S as T, E as q } from "../sized-mixin-BR_Ii7le.js";
25
+ import { L as R } from "../focusable-Bhf_beoW.js";
26
+ import { S as T, E as q } from "../sized-mixin-CkdMApAU.js";
27
27
  const _ = () => {
28
28
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
29
29
  const r = document.createElement("style");
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- import { n as r } from "./property-Dn4zSyxu.js";
20
+ import { n as r } from "./property-BFMfZY1k.js";
21
21
  /**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";const r=require("./property-BCb4Kybn.cjs");/**
20
+ "use strict";const r=require("./property-BV1QaY8E.cjs");/**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";const d=require("./property-BCb4Kybn.cjs");/**
20
+ "use strict";const d=require("./property-BV1QaY8E.cjs");/**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- import { f as d } from "./property-Dn4zSyxu.js";
20
+ import { f as d } from "./property-BFMfZY1k.js";
21
21
  /**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
@@ -1310,7 +1310,7 @@
1310
1310
  "kind": "field",
1311
1311
  "name": "slotContents",
1312
1312
  "type": {
1313
- "text": "any"
1313
+ "text": "SlotContent[]"
1314
1314
  },
1315
1315
  "default": "[]",
1316
1316
  "attribute": "slotContents"
@@ -1334,6 +1334,15 @@
1334
1334
  "attribute": "language",
1335
1335
  "reflects": true
1336
1336
  },
1337
+ {
1338
+ "kind": "field",
1339
+ "name": "dragBoundary",
1340
+ "type": {
1341
+ "text": "string | undefined"
1342
+ },
1343
+ "attribute": "drag-boundary",
1344
+ "reflects": true
1345
+ },
1337
1346
  {
1338
1347
  "kind": "field",
1339
1348
  "name": "menu",
@@ -1411,7 +1420,7 @@
1411
1420
  {
1412
1421
  "name": "slotContents",
1413
1422
  "type": {
1414
- "text": "any"
1423
+ "text": "SlotContent[]"
1415
1424
  },
1416
1425
  "default": "[]",
1417
1426
  "fieldName": "slotContents"
@@ -1431,6 +1440,13 @@
1431
1440
  "default": "'en'",
1432
1441
  "fieldName": "language"
1433
1442
  },
1443
+ {
1444
+ "name": "drag-boundary",
1445
+ "type": {
1446
+ "text": "string | undefined"
1447
+ },
1448
+ "fieldName": "dragBoundary"
1449
+ },
1434
1450
  {
1435
1451
  "name": "menu",
1436
1452
  "type": {
@@ -5742,10 +5758,10 @@
5742
5758
  "kind": "field",
5743
5759
  "name": "defaultItemActionsMenu",
5744
5760
  "type": {
5745
- "text": "InputActionGroup[]"
5761
+ "text": "InputActionGroup[] | undefined"
5746
5762
  },
5747
- "default": "[]",
5748
5763
  "description": "The default item actions menu.",
5764
+ "default": "[{ type: 'group', actions: ['edit-data', 'edit-options', 'clone'] }, { type: 'group', actions: ['delete'] }]",
5749
5765
  "attribute": "default-item-actions-menu",
5750
5766
  "reflects": true
5751
5767
  },
@@ -5902,10 +5918,10 @@
5902
5918
  {
5903
5919
  "name": "default-item-actions-menu",
5904
5920
  "type": {
5905
- "text": "InputActionGroup[]"
5921
+ "text": "InputActionGroup[] | undefined"
5906
5922
  },
5907
- "default": "[]",
5908
5923
  "description": "The default item actions menu.",
5924
+ "default": "[{ type: 'group', actions: ['edit-data', 'edit-options', 'clone'] }, { type: 'group', actions: ['delete'] }]",
5909
5925
  "fieldName": "defaultItemActionsMenu"
5910
5926
  },
5911
5927
  {
@@ -6407,13 +6423,11 @@
6407
6423
  },
6408
6424
  {
6409
6425
  "kind": "field",
6410
- "name": "slotContents",
6426
+ "name": "dragBoundary",
6411
6427
  "type": {
6412
- "text": "any"
6428
+ "text": "string | undefined"
6413
6429
  },
6414
- "default": "[]",
6415
- "description": "The contents of the slot",
6416
- "attribute": "slotContents"
6430
+ "attribute": "drag-boundary"
6417
6431
  },
6418
6432
  {
6419
6433
  "kind": "field",
@@ -6586,13 +6600,11 @@
6586
6600
  "fieldName": "noTopMenuLabel"
6587
6601
  },
6588
6602
  {
6589
- "name": "slotContents",
6603
+ "name": "drag-boundary",
6590
6604
  "type": {
6591
- "text": "any"
6605
+ "text": "string | undefined"
6592
6606
  },
6593
- "default": "[]",
6594
- "description": "The contents of the slot",
6595
- "fieldName": "slotContents"
6607
+ "fieldName": "dragBoundary"
6596
6608
  },
6597
6609
  {
6598
6610
  "name": "measureColumns",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/analytics-components-kit",
3
- "version": "1.0.1-alpha.42",
3
+ "version": "1.0.1-alpha.44",
4
4
  "type": "module",
5
5
  "main": "./components/index.js",
6
6
  "module": "./components/index.js",
@@ -0,0 +1,13 @@
1
+ export interface DraggableOptions {
2
+ /** The element that will move */
3
+ element: HTMLElement;
4
+ /** Element that receives pointerdown to start drag */
5
+ handle: HTMLElement;
6
+ /** Optional element whose bounding box acts as clamp */
7
+ boundary?: HTMLElement | null;
8
+ /** Callback when drag starts */
9
+ onDragStart?: () => void;
10
+ /** Callback when drag ends */
11
+ onDragEnd?: () => void;
12
+ }
13
+ export declare function makeDraggable({ element, handle, boundary, onDragStart, onDragEnd }: DraggableOptions): () => void;
@@ -0,0 +1,4 @@
1
+ import type { SlotStore } from './slot-store';
2
+ export declare const slotContext: {
3
+ __context__: SlotStore;
4
+ };
@@ -0,0 +1,21 @@
1
+ import { GenericSlotContent } from '@luzmo/dashboard-contents-types';
2
+ export type SlotContent = GenericSlotContent;
3
+ export declare class SlotStore {
4
+ /**
5
+ * Holds all contents for this droppable slot.
6
+ */
7
+ readonly slotContents: import("signal-polyfill").Signal.State<GenericSlotContent[]>;
8
+ /**
9
+ * Index of the content currently selected / active in a slot menu.
10
+ */
11
+ readonly activeIndex: import("signal-polyfill").Signal.State<number>;
12
+ get activeContent(): SlotContent | undefined;
13
+ /** Replace the full list (e.g. after dropping or re-ordering). */
14
+ setContents(contents: SlotContent[]): void;
15
+ /** Change which item is considered active (e.g. user clicked in list). */
16
+ updateActive(index: number): void;
17
+ /** Update / overwrite a single content entry. */
18
+ updateContent(content: SlotContent, index?: number): void;
19
+ /** Remove one content entry by index. */
20
+ removeContent(index: number): void;
21
+ }
@@ -1,42 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- "use strict";/**
21
- * @license
22
- * Copyright 2019 Google LLC
23
- * SPDX-License-Identifier: BSD-3-Clause
24
- */const H=globalThis,j=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),W=new WeakMap;let et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(j&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=W.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&W.set(e,t))}return t}toString(){return this.cssText}};const st=r=>new et(typeof r=="string"?r:r+"",void 0,I),lt=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);return new et(e,r,I)},ct=(r,t)=>{if(j)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=H.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},q=j?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return st(e)})(r):r;/**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */const{is:dt,defineProperty:pt,getOwnPropertyDescriptor:ut,getOwnPropertyNames:$t,getOwnPropertySymbols:_t,getPrototypeOf:ft}=Object,f=globalThis,J=f.trustedTypes,At=J?J.emptyScript:"",L=f.reactiveElementPolyfillSupport,b=(r,t)=>r,M={toAttribute(r,t){switch(t){case Boolean:r=r?At:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},R=(r,t)=>!dt(r,t),K={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:R};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);let v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&pt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=ut(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const a=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??K}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=ft(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,s=[...$t(e),..._t(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(q(i))}else t!==void 0&&e.push(q(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ct(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:M).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:M;this._$Em=i,this[i]=a.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??R)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[b("elementProperties")]=new Map,v[b("finalized")]=new Map,L==null||L({ReactiveElement:v}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.0.4");/**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */const w=globalThis,N=w.trustedTypes,Z=N?N.createPolicy("lit-html",{createHTML:r=>r}):void 0,it="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,rt="?"+_,gt=`<${rt}>`,m=document,C=()=>m.createComment(""),U=r=>r===null||typeof r!="object"&&typeof r!="function",V=Array.isArray,mt=r=>V(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",z=`[
33
- \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,G=/>/g,A=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
34
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Q=/'/g,X=/"/g,nt=/^(?:script|style|textarea|title)$/i,ot=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),yt=ot(1),vt=ot(2),y=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Y=new WeakMap,g=m.createTreeWalker(m,129);function ht(r,t){if(!V(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Z!==void 0?Z.createHTML(t):t}const Et=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=S;for(let a=0;a<e;a++){const h=r[a];let d,p,l=-1,u=0;for(;u<h.length&&(n.lastIndex=u,p=n.exec(h),p!==null);)u=n.lastIndex,n===S?p[1]==="!--"?n=F:p[1]!==void 0?n=G:p[2]!==void 0?(nt.test(p[2])&&(i=RegExp("</"+p[2],"g")),n=A):p[3]!==void 0&&(n=A):n===A?p[0]===">"?(n=i??S,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,d=p[1],n=p[3]===void 0?A:p[3]==='"'?X:Q):n===X||n===Q?n=A:n===F||n===G?n=S:(n=A,i=void 0);const $=n===A&&r[a+1].startsWith("/>")?" ":"";o+=n===S?h+gt:l>=0?(s.push(d),h.slice(0,l)+it+h.slice(l)+_+$):h+_+(l===-2?a:$)}return[ht(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class x{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const a=t.length-1,h=this.parts,[d,p]=Et(t,e);if(this.el=x.createElement(d,s),g.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(it)){const u=p[n++],$=i.getAttribute(l).split(_),O=/([.?@])?(.*)/.exec(u);h.push({type:1,index:o,name:O[2],strings:$,ctor:O[1]==="."?bt:O[1]==="?"?wt:O[1]==="@"?Pt:k}),i.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:o}),i.removeAttribute(l));if(nt.test(i.tagName)){const l=i.textContent.split(_),u=l.length-1;if(u>0){i.textContent=N?N.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],C()),g.nextNode(),h.push({type:2,index:++o});i.append(l[u],C())}}}else if(i.nodeType===8)if(i.data===rt)h.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function E(r,t,e=r,s){var n,a;if(t===y)return t;let i=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl;const o=U(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(r,i._$AS(r,t.values),i,s)),t}class St{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??m).importNode(e,!0);g.currentNode=i;let o=g.nextNode(),n=0,a=0,h=s[0];for(;h!==void 0;){if(n===h.index){let d;h.type===2?d=new T(o,o.nextSibling,this,t):h.type===1?d=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(d=new Ct(o,this,t)),this._$AV.push(d),h=s[++a]}n!==(h==null?void 0:h.index)&&(o=g.nextNode(),n++)}return g.currentNode=m,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class T{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),U(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==y&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):mt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=x.createElement(ht(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new St(i,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=Y.get(t.strings);return e===void 0&&Y.set(t.strings,e=new x(t)),e}k(t){V(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new T(this.O(C()),this.O(C()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=E(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==y,n&&(this._$AH=t);else{const a=t;let h,d;for(t=o[0],h=0;h<o.length-1;h++)d=E(this,a[s+h],e,h),d===y&&(d=this._$AH[h]),n||(n=!U(d)||d!==this._$AH[h]),d===c?t=c:t!==c&&(t+=(d??"")+o[h+1]),this._$AH[h]=d}n&&!i&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class bt extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class wt extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class Pt extends k{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??c)===y)return;const s=this._$AH,i=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ct{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const B=w.litHtmlPolyfillSupport;B==null||B(x,T),(w.litHtmlVersions??(w.litHtmlVersions=[])).push("3.2.1");const at=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new T(t.insertBefore(C(),o),o,void 0,e??{})}return i._$AI(r),i};/**
35
- * @license
36
- * Copyright 2017 Google LLC
37
- * SPDX-License-Identifier: BSD-3-Clause
38
- */let P=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return y}};var tt;P._$litElement$=!0,P.finalized=!0,(tt=globalThis.litElementHydrateSupport)==null||tt.call(globalThis,{LitElement:P});const D=globalThis.litElementPolyfillSupport;D==null||D({LitElement:P});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
39
- * @license
40
- * Copyright 2017 Google LLC
41
- * SPDX-License-Identifier: BSD-3-Clause
42
- */const Ut={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:R},xt=(r=Ut,t,e)=>{const{kind:s,metadata:i}=e;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(e.name,r),s==="accessor"){const{name:n}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,h,r)},init(a){return a!==void 0&&this.P(n,void 0,r),a}}}if(s==="setter"){const{name:n}=e;return function(a){const h=this[n];t.call(this,a),this.requestUpdate(n,h,r)}}throw Error("Unsupported decorator location: "+s)};function Tt(r){return(t,e)=>typeof e=="object"?xt(r,t,e):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,n?{...s,wrapped:!0}:s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}exports.B=at;exports.E=c;exports.T=y;exports.b=vt;exports.f=R;exports.i=lt;exports.n=Tt;exports.r=st;exports.r$1=P;exports.x=yt;