@luzmo/analytics-components-kit 1.0.1-alpha.2 → 1.0.1-alpha.4

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 (151) hide show
  1. package/LICENSE +18 -0
  2. package/custom-elements.json +1550 -0
  3. package/lib/area-chart-slots.config-BLxiYX05.cjs +20 -0
  4. package/lib/area-chart-slots.config-C0c2ZzBh.js +52 -0
  5. package/lib/async-directive-CPjMHOPu.cjs +24 -0
  6. package/lib/async-directive-SCUUQ3Mh.js +114 -0
  7. package/lib/bar-chart-slots.config-GSSL7XVA.js +47 -0
  8. package/lib/bar-chart-slots.config-Jx1PveTM.cjs +20 -0
  9. package/lib/bar-chart.config-B57geUzJ.cjs +20 -0
  10. package/lib/bar-chart.config-CQ6HAvs2.js +153 -0
  11. package/lib/bar-chart.en-BqYbiHO3.cjs +20 -0
  12. package/lib/bar-chart.en-FwT00qdU.js +69 -0
  13. package/lib/bar-chart.fr-DGx9smEh.cjs +20 -0
  14. package/lib/bar-chart.fr-DbxKiM0j.js +44 -0
  15. package/lib/bar-chart.nl-BYzVExsz.cjs +20 -0
  16. package/lib/bar-chart.nl-ahX1ARpH.js +44 -0
  17. package/lib/button-base-B4PdJFVe.cjs +27 -0
  18. package/lib/button-base-CtfPWS-P.js +142 -0
  19. package/lib/column-chart.config-B57geUzJ.cjs +20 -0
  20. package/lib/column-chart.config-C9hP0kX7.js +153 -0
  21. package/lib/cs-DVZ0Tapy.js +89 -0
  22. package/lib/cs-I9E81keK.cjs +20 -0
  23. package/lib/da-DHy05oSR.js +97 -0
  24. package/lib/da-QkdvupDg.cjs +20 -0
  25. package/lib/de-Dn5mUzha.cjs +20 -0
  26. package/lib/de-iM39JlAt.js +109 -0
  27. package/lib/decompose-numeric-format-B3rVVHpO.cjs +20 -0
  28. package/lib/decompose-numeric-format-BuZcjH2k.js +39 -0
  29. package/lib/directive-helpers-BSB0tfc9.cjs +32 -0
  30. package/lib/directive-helpers-eY1rHtyn.js +154 -0
  31. package/lib/divider.module-BW8qaMVq.js +211 -0
  32. package/lib/divider.module-DEy88Ieh.cjs +20 -0
  33. package/lib/donut-chart-slots.config-BEwhfq27.js +39 -0
  34. package/lib/donut-chart-slots.config-DIp-24lO.cjs +20 -0
  35. package/lib/donut-chart.config-3DhKiSSM.js +177 -0
  36. package/lib/donut-chart.config-DLWJUlHx.cjs +20 -0
  37. package/lib/donut-chart.en-Blb9oSdU.cjs +20 -0
  38. package/lib/donut-chart.en-CzjT4-XN.js +85 -0
  39. package/lib/donut-chart.fr-BeTVa2wh.cjs +20 -0
  40. package/lib/donut-chart.fr-DftPrKbG.js +39 -0
  41. package/lib/donut-chart.nl-D9YGbOce.cjs +20 -0
  42. package/lib/donut-chart.nl-NMatXfhK.js +39 -0
  43. package/lib/draggable-data-item/index.cjs +20 -0
  44. package/lib/draggable-data-item/index.js +30 -0
  45. package/lib/droppable-slot/index.cjs +20 -0
  46. package/lib/droppable-slot/index.js +30 -0
  47. package/lib/en-BDBzmAXX.cjs +202 -0
  48. package/lib/en-CIeY2T5K.js +1980 -0
  49. package/lib/en-GB-BqYHIX1v.cjs +20 -0
  50. package/lib/en-GB-CYx--4nh.js +28 -0
  51. package/lib/es-CwyPlN5d.cjs +20 -0
  52. package/lib/es-KhTq4jX8.js +305 -0
  53. package/lib/fi-Dh_ebgpe.js +97 -0
  54. package/lib/fi-rijeZE5V.cjs +20 -0
  55. package/lib/fr-BcgE-6S_.cjs +20 -0
  56. package/lib/fr-CU727YF1.js +305 -0
  57. package/lib/get-css-variable-BHHQ0SnL.js +1444 -0
  58. package/lib/get-css-variable-D439CdH9.cjs +24 -0
  59. package/lib/he-Au3xg6lR.js +89 -0
  60. package/lib/he-O6Ih8Bqh.cjs +20 -0
  61. package/lib/hu-BnZ8y3xQ.cjs +20 -0
  62. package/lib/hu-DNJ-P_MW.js +97 -0
  63. package/lib/if-defined-BbzmSG-O.js +757 -0
  64. package/lib/if-defined-V7yEJWI3.cjs +54 -0
  65. package/lib/imageobject.config-B7ld9bj3.cjs +20 -0
  66. package/lib/imageobject.config-DZLp9Elq.js +127 -0
  67. package/lib/index-0314DjEl.cjs +20 -0
  68. package/lib/index-B9h2L_hV.js +3048 -0
  69. package/lib/index-BDXFsKUM.cjs +146 -0
  70. package/lib/index-Bd4cKS9O.js +155 -0
  71. package/lib/index-BmAD29P2.js +106 -0
  72. package/lib/index-Bo1DpZ-1.cjs +58 -0
  73. package/lib/index-C4ePDYEC.cjs +41 -0
  74. package/lib/index-C9xEN5Ji.js +82 -0
  75. package/lib/index-CBCm4_7S.js +869 -0
  76. package/lib/index-CM80_HQw.js +442 -0
  77. package/lib/index-CcF-9wyF.cjs +71 -0
  78. package/lib/index-CfEm5P0J.cjs +196 -0
  79. package/lib/index-CrWoFMZ3.cjs +22 -0
  80. package/lib/index-CtEJZdT0.js +1627 -0
  81. package/lib/index-CvX-HLY1.cjs +322 -0
  82. package/lib/index-D37RwuEH.js +1584 -0
  83. package/lib/index-D5puKlcm.cjs +96 -0
  84. package/lib/index-DGz6jCKo.cjs +26 -0
  85. package/lib/index-DJp_9h0l.js +327 -0
  86. package/lib/index-DSbgZduE.js +501 -0
  87. package/lib/index-D_KYpfBM.js +24 -0
  88. package/lib/index-DdtjeKYI.js +928 -0
  89. package/lib/index-Dj7PF4Q9.cjs +63 -0
  90. package/lib/index-Dq3HAOaM.js +127 -0
  91. package/lib/index-DrIA0eFE.js +392 -0
  92. package/lib/index-jt6FL_uE.cjs +20 -0
  93. package/lib/index-kJR406YZ.cjs +112 -0
  94. package/lib/index-v8ZTprPO.cjs +51 -0
  95. package/lib/index.cjs +875 -0
  96. package/lib/index.js +6411 -0
  97. package/lib/it-Bh5U73z6.js +305 -0
  98. package/lib/it-PshtLMkq.cjs +20 -0
  99. package/lib/ja-CCcHUL61.js +89 -0
  100. package/lib/ja-KIS2HdaG.cjs +20 -0
  101. package/lib/ko--l4qmjLV.cjs +20 -0
  102. package/lib/ko-DhapsZMM.js +89 -0
  103. package/lib/line-chart.config-BZcvfO2c.cjs +20 -0
  104. package/lib/line-chart.config-CIVN6uLI.js +115 -0
  105. package/lib/mk-B9HPSuKa.js +97 -0
  106. package/lib/mk-DZlj-edb.cjs +20 -0
  107. package/lib/nl-BKlDqOXb.cjs +20 -0
  108. package/lib/nl-BwSt5Bf4.js +109 -0
  109. package/lib/no-D-DofYnx.js +109 -0
  110. package/lib/no-D_SzxhTu.cjs +20 -0
  111. package/lib/observe-slot-text-DOYmGOZe.js +181 -0
  112. package/lib/observe-slot-text-oJ0a2KY9.cjs +42 -0
  113. package/lib/picker/index.cjs +20 -0
  114. package/lib/picker/index.js +32 -0
  115. package/lib/pl-D_L_0Boq.js +97 -0
  116. package/lib/pl-PIK23rK_.cjs +20 -0
  117. package/lib/popover-Bwnkg-5-.js +67 -0
  118. package/lib/popover-CQGN8nbX.cjs +32 -0
  119. package/lib/progress-circle/index.cjs +35 -0
  120. package/lib/progress-circle/index.js +104 -0
  121. package/lib/pt-B0BBS5VB.js +89 -0
  122. package/lib/pt-Dqlu4MS5.cjs +20 -0
  123. package/lib/ru-Vo-m3O_2.js +108 -0
  124. package/lib/ru-zyNDTB04.cjs +20 -0
  125. package/lib/sv-1DPTltNQ.cjs +20 -0
  126. package/lib/sv-CiozMaev.js +89 -0
  127. package/lib/textobject.config-C8opcGG4.js +52 -0
  128. package/lib/textobject.config-DbAajFz8.cjs +20 -0
  129. package/lib/tr-BkmWvOG2.cjs +20 -0
  130. package/lib/tr-D_D4i5iv.js +109 -0
  131. package/lib/zh-CN-DTZ4OmdP.cjs +20 -0
  132. package/lib/zh-CN-wsl7eFSd.js +89 -0
  133. package/lib/zh-TW-DTZ4OmdP.cjs +20 -0
  134. package/lib/zh-TW-wsl7eFSd.js +89 -0
  135. package/package.json +19 -24
  136. package/37.js +0 -1
  137. package/729.js +0 -1
  138. package/common-31743c5a.js +0 -13
  139. package/common-b02547a0.js +0 -1
  140. package/common-b49d9a9d.js +0 -1
  141. package/common-b5232813.js +0 -56
  142. package/common-cefd4f4c.js +0 -1
  143. package/common-d6cb565f.js +0 -1
  144. package/common-fd868059.js +0 -1
  145. package/common-fedaf338.js +0 -32
  146. package/edit-option-picker/index.js +0 -314
  147. package/edit-option-slider/index.js +0 -102
  148. package/edit-option-toggle/index.js +0 -114
  149. package/index.js +0 -346
  150. package/vendors-93cc3efa.js +0 -1
  151. package/vendors-bb3d84b5.js +0 -1
@@ -0,0 +1,112 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2024 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";const C=require("./directive-helpers-BSB0tfc9.cjs"),g=require("./if-defined-V7yEJWI3.cjs"),pt=require("./index-Bo1DpZ-1.cjs"),St=require("./async-directive-CPjMHOPu.cjs");/**
21
+ * @license
22
+ * Copyright 2021 Google LLC
23
+ * SPDX-License-Identifier: BSD-3-Clause
24
+ */function ie(e){return(t,n)=>{const{slot:i,selector:o}=e??{},s="slot"+(i?`[name=${i}]`:":not([name])");return g.e$1(t,n,{get(){var a;const r=(a=this.renderRoot)==null?void 0:a.querySelector(s),l=(r==null?void 0:r.assignedElements(e))??[];return o===void 0?l:l.filter(c=>c.matches(o))}})}}class oe extends Event{constructor(t,n,i){super("slottable-request",{bubbles:!1,cancelable:!0,composed:!1}),this.name=t,this.data=n,this.slotName=i===void 0?t:`${t}.${i}`}}const Ot=Symbol("remove-slottable-request");/**
25
+ * @license
26
+ * Copyright 2018 Google LLC
27
+ * SPDX-License-Identifier: BSD-3-Clause
28
+ */const se="important",we=" !"+se,kt=C.e(class extends C.i{constructor(e){var t;if(super(e),e.type!==C.t.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return i==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?n.removeProperty(i):n[i]=null);for(const i in t){const o=t[i];if(o!=null){this.ft.add(i);const s=typeof o=="string"&&o.endsWith(we);i.includes("-")||s?n.setProperty(i,s?o.slice(0,-11):o,s?se:""):n[i]=o}}return g.T}});function Ee(e,t,n=[]){for(const[i,o]of t.entries()){const s=e[i],r=s.parentElement||s.getRootNode();n[i]&&n[i](o),r&&r!==s&&s.replaceWith(o),delete e[i]}return t}const xe=(e,t,{position:n,prepareCallback:i}={position:"beforeend"})=>{let{length:o}=e;if(o===0)return()=>e;let s=1,r=0;(n==="afterbegin"||n==="afterend")&&(s=-1,r=o-1);const l=new Array(o),a=new Array(o),c=document.createComment("placeholder for reparented element");do{const h=e[r];i&&(a[r]=i(h)),l[r]=c.cloneNode();const d=h.parentElement||h.getRootNode();d&&d!==h&&d.replaceChild(l[r],h),t.insertAdjacentElement(n,h),r+=s}while(--o>0);return function(){return Ee(l,e,a)}},Ce=1e3,Pe=1e3;class Oe{constructor(t={}){this.warmUpDelay=Ce,this.coolDownDelay=Pe,this.isWarm=!1,this.timeout=0,Object.assign(this,t)}openTimer(t){if(this.cancelCooldownTimer(),!this.component||t!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=t,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(n=>{this.resolve=n,this.timeout=window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay)}),this.promise);if(this.promise)return this.promise;throw new Error("Inconsistent state")}close(t){this.component&&this.component===t&&(this.resetCooldownTimer(),this.timeout>0&&(clearTimeout(this.timeout),this.timeout=0),this.resolve&&(this.resolve(!0),delete this.resolve),delete this.promise,delete this.component)}resetCooldownTimer(){this.isWarm&&(this.cooldownTimeout&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay))}cancelCooldownTimer(){this.cooldownTimeout&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}}const Et=new Oe,tt=()=>{},zt=(e,t,n)=>{const i=new AbortController,o=new Map,s=()=>{i.abort(),n()};let r,l;const a=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{s()})})}),c=d=>{d.target===e&&(o.set(d.propertyName,o.get(d.propertyName)-1),o.get(d.propertyName)||o.delete(d.propertyName),o.size===0&&s())},h=d=>{d.target===e&&(o.has(d.propertyName)||o.set(d.propertyName,0),o.set(d.propertyName,o.get(d.propertyName)+1),cancelAnimationFrame(a),cancelAnimationFrame(r),cancelAnimationFrame(l))};e.addEventListener("transitionrun",h,{signal:i.signal}),e.addEventListener("transitionend",c,{signal:i.signal}),e.addEventListener("transitioncancel",c,{signal:i.signal}),t()};function L(){return new Promise(e=>requestAnimationFrame(()=>e()))}class rt extends g.LuzmoElement{constructor(){super(...arguments),this.dispose=tt,this.offset=0,this.willPreventClose=!1}applyFocus(t,n){}get delayed(){return!1}set delayed(t){}get disabled(){return!1}set disabled(t){}get elementResolver(){return this._elementResolver}set elementResolver(t){this._elementResolver=t}ensureOnDOM(t){}makeTransition(t){return null}manageDelay(t){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(t){}get placementController(){return this._placementController}set placementController(t){this._placementController=t}requestSlottable(){}returnFocus(){}get state(){return"closed"}set state(t){}manuallyKeepOpen(){}static update(){const t=new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(t)}static async open(t,n,i,o){await Promise.resolve().then(()=>et);const s=arguments.length===2,r=i||t,l=new this;let a=!1;const c=xe([r],l,{position:"beforeend",prepareCallback:f=>{const u=f.slot;return f.removeAttribute("slot"),()=>{f.slot=u}}});if(l.dispose=()=>{l.addEventListener("luzmo-closed",()=>{a||(c(),a=!0),requestAnimationFrame(()=>{l.remove()})}),l.open=!1,l.dispose=tt},!s&&r&&o){const f=t,u=n,p=o;return rt.applyOptions(l,{...p,delayed:p.delayed||r.hasAttribute("delayed"),trigger:p.virtualTrigger||f,type:u==="modal"?"modal":u==="hover"?"hint":"auto"}),f.after(l),await l.updateComplete,l.open=!0,l.dispose}const d=n;return l.append(r),rt.applyOptions(l,{...d,delayed:d.delayed||r.hasAttribute("delayed")}),l.updateComplete.then(()=>{l.open=!0}),l}static applyOptions(t,n){t.delayed=!!n.delayed,t.receivesFocus=n.receivesFocus??"auto",t.triggerElement=n.trigger||null,t.type=n.type||"modal",t.offset=n.offset??0,t.placement=n.placement,t.willPreventClose=!!n.notImmediatelyClosable}}const _t=e=>e.querySelector(pt.userFocusableSelector),Nt=e=>e.assignedElements().find(n=>n.matches(pt.userFocusableSelector));class Bt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="open",this.newState="closed"}}class qt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="closed",this.newState="open"}}class z extends Event{constructor(t,n,{publish:i,interaction:o,reason:s}){super(t,{bubbles:i,composed:i}),this.overlay=n,this.detail={interaction:o,reason:s}}}class at{constructor(t,n){this.x=0,this.y=0,this.x=t,this.y=n}updateBoundingClientRect(t,n){this.x=t,this.y=n,rt.update()}getBoundingClientRect(){return{width:0,height:0,top:this.y,right:this.x,y:this.y,x:this.x,bottom:this.y,left:this.x,toJSON(){}}}}function Te(e){class t extends e{async manageDialogOpen(){const i=this.open;if(await L(),await this.managePosition(),this.open!==i)return;const o=await this.dialogMakeTransition(i);this.open===i&&await this.dialogApplyFocus(i,o)}dialogMakeTransition(i){let o=null;const s=(l,a)=>()=>{if(l.open=i,!i){const h=()=>{l.removeEventListener("close",h)};l.addEventListener("close",h)}if(a>0)return;const c=i?qt:Bt;this.dispatchEvent(new c),i&&(l.matches(pt.userFocusableSelector)&&(o=l),o=o||_t(l),o||l.querySelectorAll("slot").forEach(d=>{o||(o=Nt(d))}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(l,a)=>()=>{if(this.open!==i)return;const c=i?"luzmo-opened":"luzmo-closed";if(a>0){l.dispatchEvent(new z(c,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||i!==this.open)return;const h=async()=>{const d=this.triggerElement instanceof at;this.dispatchEvent(new z(c,this,{interaction:this.type,publish:d})),l.dispatchEvent(new z(c,this,{interaction:this.type,publish:!1})),this.triggerElement&&!d&&this.triggerElement.dispatchEvent(new z(c,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await L(),await L(),i===this.open&&i===!1&&this.requestSlottable()};!i&&this.dialogEl.open?(this.dialogEl.addEventListener("close",()=>{h()},{once:!0}),this.dialogEl.close()):h()};return this.elements.forEach((l,a)=>{zt(l,s(l,a),r(l,a))}),o}dialogApplyFocus(i,o){this.applyFocus(i,o)}}return t}function Ae(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(i){if(i===!1||i!==this.open){Et.close(this);return}this.delayed&&await Et.openTimer(this)&&(this.open=!i)}ensureOnDOM(i){document.body.offsetHeight}makeTransition(i){if(this.open!==i)return null;let o=null;const s=(l,a)=>()=>{if(i!==this.open)return;if(l.open=i,a===0){const h=i?qt:Bt;this.dispatchEvent(new h)}if(i!==!0||(l.matches(pt.userFocusableSelector)&&(o=l),o=o||_t(l),o))return;l.querySelectorAll("slot").forEach(h=>{o||(o=Nt(h))})},r=(l,a)=>async()=>{if(this.open!==i)return;const c=i?"luzmo-opened":"luzmo-closed";if(l.dispatchEvent(new z(c,this,{interaction:this.type})),a>0)return;const h=this.triggerElement instanceof at;this.dispatchEvent(new z(c,this,{interaction:this.type,publish:h})),this.triggerElement&&!h&&this.triggerElement.dispatchEvent(new z(c,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await L(),await L(),i===this.open&&i===!1&&this.requestSlottable()};return this.elements.forEach((l,a)=>{zt(l,s(l,a),r(l,a))}),o}}return t}const Re=CSS.supports("(overlay: auto)");function Gt(e){let t=!1;try{t=e.matches(":popover-open")}catch{}let n=!1;try{n=e.matches(":open")}catch{}return t||n}function De(e){class t extends e{async manageDelay(i){if(i===!1||i!==this.open){Et.close(this);return}this.delayed&&await Et.openTimer(this)&&(this.open=!i)}shouldHidePopover(i){if(i&&this.open!==i)return;const o=async({newState:s}={})=>{s!=="open"&&await this.placementController.resetOverlayPosition()};if(!Gt(this.dialogEl)){o();return}this.dialogEl.addEventListener("toggle",o,{once:!0})}shouldShowPopover(i){let o=!1;try{o=this.dialogEl.matches(":popover-open")}catch{}let s=!1;try{s=this.dialogEl.matches(":open")}catch{}i&&this.open===i&&!o&&!s&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(i){await L(),Re||await this.shouldHidePopover(i),this.shouldShowPopover(i),await L()}makeTransition(i){if(this.open!==i)return null;let o=null;const s=(l,a)=>()=>{if(l.open=i,a===0){const h=i?qt:Bt;this.dispatchEvent(new h)}if(!i||(l.matches(pt.userFocusableSelector)&&(o=l),o=o||_t(l),o))return;l.querySelectorAll("slot").forEach(h=>{o||(o=Nt(h))})},r=(l,a)=>()=>{if(this.open!==i)return;const c=i?"luzmo-opened":"luzmo-closed";if(a>0){l.dispatchEvent(new z(c,this,{interaction:this.type,publish:!1}));return}const h=async()=>{if(this.open!==i)return;await L();const f=this.triggerElement instanceof at;this.dispatchEvent(new z(c,this,{interaction:this.type,publish:f})),l.dispatchEvent(new z(c,this,{interaction:this.type,publish:!1})),this.triggerElement&&!f&&this.triggerElement.dispatchEvent(new z(c,this,{interaction:this.type,publish:!0})),this.state=i?"opened":"closed",this.returnFocus(),await L(),await L(),i===this.open&&i===!1&&this.requestSlottable()};if(this.open!==i)return;const d=Gt(this.dialogEl);i!==!0&&d&&this.isConnected?(this.dialogEl.addEventListener("beforetoggle",()=>{h()},{once:!0}),this.dialogEl.hidePopover()):h()};return this.elements.forEach((l,a)=>{zt(l,s(l,a),r(l,a))}),o}}return t}const Se="showPopover"in document.createElement("div");class ke{constructor(){this.root=document.body,this.stack=[],this.handlePointerdown=t=>{this.pointerdownPath=t.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{const t=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!(t!=null&&t.length))return;const n=this.lastOverlay;this.lastOverlay=void 0;const i=this.stack.length-1,o=this.stack.filter((s,r)=>!t.find(a=>a===s||a===(s==null?void 0:s.triggerElement)&&(s==null?void 0:s.type)==="hint"||r===i&&s!==n&&s.triggerInteraction==="longpress")&&!s.shouldPreventClose()&&s.type!=="manual"&&!(s.type==="modal"&&n!==s));o.reverse(),o.forEach(s=>{this.closeOverlay(s);let r=s.parentOverlayToForceClose;for(;r;)this.closeOverlay(r),r=r.parentOverlayToForceClose})},this.handleBeforetoggle=t=>{const{target:n,newState:i}=t;i!=="open"&&this.closeOverlay(n)},this.handleKeydown=t=>{if(t.code!=="Escape"||this.stack.length===0)return;const n=this.stack.at(-1);if((n==null?void 0:n.type)==="page"){t.preventDefault();return}Se||(n==null?void 0:n.type)!=="manual"&&n&&this.closeOverlay(n)},this.bindEvents()}get document(){return this.root.ownerDocument||document}bindEvents(){this.document.addEventListener("pointerdown",this.handlePointerdown),this.document.addEventListener("pointerup",this.handlePointerup),this.document.addEventListener("keydown",this.handleKeydown)}closeOverlay(t){const n=this.stack.indexOf(t);n!==-1&&this.stack.splice(n,1),t.open=!1}overlaysByTriggerElement(t){return this.stack.filter(n=>n.triggerElement===t)}add(t){if(this.stack.includes(t)){const n=this.stack.indexOf(t);n!==-1&&(this.stack.splice(n,1),this.stack.push(t));return}if(t.type==="auto"||t.type==="modal"||t.type==="page"){const n="luzmo-overlay-query-path",i=new Event(n,{composed:!0,bubbles:!0});t.addEventListener(n,o=>{const s=o.composedPath();this.stack.forEach(r=>{!s.find(a=>a===r)&&r.type!=="manual"&&r.type!=="modal"&&this.closeOverlay(r)})},{once:!0}),t.dispatchEvent(i)}else if(t.type==="hint"){if(this.stack.some(i=>i.type!=="manual"&&i.triggerElement&&i.triggerElement===t.triggerElement)){t.open=!1;return}this.stack.forEach(i=>{i.type==="hint"&&this.closeOverlay(i)})}requestAnimationFrame(()=>{this.stack.push(t),t.addEventListener("beforetoggle",this.handleBeforetoggle,{once:!0})})}remove(t){this.closeOverlay(t)}}const Xt=new ke,Le=':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}',J=Math.min,S=Math.max,xt=Math.round,vt=Math.floor,M=e=>({x:e,y:e}),Fe={left:"right",right:"left",bottom:"top",top:"bottom"},$e={start:"end",end:"start"};function Lt(e,t,n){return S(e,J(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function ht(e){return e.split("-")[1]}function re(e){return e==="x"?"y":"x"}function Ht(e){return e==="y"?"height":"width"}function nt(e){return["top","bottom"].includes(Q(e))?"y":"x"}function Mt(e){return re(nt(e))}function ze(e,t,n){n===void 0&&(n=!1);const i=ht(e),o=Mt(e),s=Ht(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ct(r)),[r,Ct(r)]}function _e(e){const t=Ct(e);return[Ft(e),t,Ft(t)]}function Ft(e){return e.replace(/start|end/g,t=>$e[t])}function Ne(e,t,n){const i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?s:r;default:return[]}}function Be(e,t,n,i){const o=ht(e);let s=Ne(Q(e),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Ft)))),s}function Ct(e){return e.replace(/left|right|bottom|top/g,t=>Fe[t])}function qe(e){return{top:0,right:0,bottom:0,left:0,...e}}function le(e){return typeof e!="number"?qe(e):{top:e,right:e,bottom:e,left:e}}function Pt(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function Jt(e,t,n){let{reference:i,floating:o}=e;const s=nt(t),r=Mt(t),l=Ht(r),a=Q(t),c=s==="y",h=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;let u;switch(a){case"top":u={x:h,y:i.y-o.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-o.width,y:d};break;default:u={x:i.x,y:i.y}}switch(ht(t)){case"start":u[r]-=f*(n&&c?-1:1);break;case"end":u[r]+=f*(n&&c?-1:1);break}return u}const He=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:d}=Jt(c,i,a),f=i,u={},p=0;for(let m=0;m<l.length;m++){const{name:y,fn:v}=l[m],{x:b,y:w,data:x,reset:E}=await v({x:h,y:d,initialPlacement:i,placement:f,strategy:o,middlewareData:u,rects:c,platform:r,elements:{reference:e,floating:t}});h=b??h,d=w??d,u={...u,[y]:{...u[y],...x}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:h,y:d}=Jt(c,f,a)),m=-1)}return{x:h,y:d,placement:f,strategy:o,middlewareData:u}};async function It(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:f=!1,padding:u=0}=ct(t,e),p=le(u),y=l[f?d==="floating"?"reference":"floating":d],v=Pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:h,strategy:a})),b=d==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:a}):b);return{top:(v.top-E.top+p.top)/x.y,bottom:(E.bottom-v.bottom+p.bottom)/x.y,left:(v.left-E.left+p.left)/x.x,right:(E.right-v.right+p.right)/x.x}}const Me=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=t,{element:c,padding:h=0}=ct(e,t)||{};if(c==null)return{};const d=le(h),f={x:n,y:i},u=Mt(o),p=Ht(u),m=await r.getDimensions(c),y=u==="y",v=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",x=s.reference[p]+s.reference[u]-f[u]-s.floating[p],E=f[u]-s.reference[u],F=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let O=F?F[w]:0;(!O||!await(r.isElement==null?void 0:r.isElement(F)))&&(O=l.floating[w]||s.floating[p]);const V=x/2-E/2,B=O/2-m[p]/2-1,$=J(d[v],B),K=J(d[b],B),q=$,Y=O-m[p]-K,A=O/2-m[p]/2+V,ot=Lt(q,A,Y),U=!a.arrow&&ht(o)!=null&&A!==ot&&s.reference[p]/2-(A<q?$:K)-m[p]/2<0,H=U?A<q?A-q:A-Y:0;return{[u]:f[u]+H,data:{[u]:ot,centerOffset:A-ot-H,...U&&{alignmentOffset:H}},reset:U}}}),Ie=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=ct(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Q(o),b=nt(l),w=Q(l)===l,x=await(a.isRTL==null?void 0:a.isRTL(c.floating)),E=f||(w||!m?[Ct(l)]:_e(l)),F=p!=="none";!f&&F&&E.push(...Be(l,m,p,x));const O=[l,...E],V=await It(t,y),B=[];let $=((i=s.flip)==null?void 0:i.overflows)||[];if(h&&B.push(V[v]),d){const A=ze(o,r,x);B.push(V[A[0]],V[A[1]])}if($=[...$,{placement:o,overflows:B}],!B.every(A=>A<=0)){var K,q;const A=(((K=s.flip)==null?void 0:K.index)||0)+1,ot=O[A];if(ot)return{data:{index:A,overflows:$},reset:{placement:ot}};let U=(q=$.filter(H=>H.overflows[0]<=0).sort((H,G)=>H.overflows[1]-G.overflows[1])[0])==null?void 0:q.placement;if(!U)switch(u){case"bestFit":{var Y;const H=(Y=$.filter(G=>{if(F){const X=nt(G.placement);return X===b||X==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(X=>X>0).reduce((X,be)=>X+be,0)]).sort((G,X)=>G[1]-X[1])[0])==null?void 0:Y[0];H&&(U=H);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};async function We(e,t){const{placement:n,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Q(n),l=ht(n),a=nt(n)==="y",c=["left","top"].includes(r)?-1:1,h=s&&a?-1:1,d=ct(t,e);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof p=="number"&&(u=l==="end"?p*-1:p),a?{x:u*h,y:f*c}:{x:f*c,y:u*h}}const Ve=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await We(t,e);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Ue=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...a}=ct(e,t),c={x:n,y:i},h=await It(t,a),d=nt(Q(o)),f=re(d);let u=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=u+h[y],w=u-h[v];u=Lt(b,u,w)}if(r){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+h[y],w=p-h[v];p=Lt(b,p,w)}const m=l.fn({...t,[f]:u,[d]:p});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[f]:s,[d]:r}}}}}},je=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:s,platform:r,elements:l}=t,{apply:a=()=>{},...c}=ct(e,t),h=await It(t,c),d=Q(o),f=ht(o),u=nt(o)==="y",{width:p,height:m}=s.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=f===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,y=f==="end"?"top":"bottom");const b=m-h.top-h.bottom,w=p-h.left-h.right,x=J(m-h[y],b),E=J(p-h[v],w),F=!t.middlewareData.shift;let O=x,V=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=w),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(O=b),F&&!f){const $=S(h.left,0),K=S(h.right,0),q=S(h.top,0),Y=S(h.bottom,0);u?V=p-2*($!==0||K!==0?$+K:S(h.left,h.right)):O=m-2*(q!==0||Y!==0?q+Y:S(h.top,h.bottom))}await a({...t,availableWidth:V,availableHeight:O});const B=await r.getDimensions(l.floating);return p!==B.width||m!==B.height?{reset:{rects:!0}}:{}}}};function Tt(){return typeof window<"u"}function dt(e){return ae(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){var t;return(t=(ae(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ae(e){return Tt()?e instanceof Node||e instanceof k(e).Node:!1}function _(e){return Tt()?e instanceof Element||e instanceof k(e).Element:!1}function I(e){return Tt()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function Qt(e){return!Tt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function ft(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=N(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function Ke(e){return["table","td","th"].includes(dt(e))}function At(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wt(e){const t=Vt(),n=_(e)?N(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ye(e){let t=Z(e);for(;I(t)&&!lt(t);){if(Wt(t))return t;if(At(t))return null;t=Z(t)}return null}function Vt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lt(e){return["html","body","#document"].includes(dt(e))}function N(e){return k(e).getComputedStyle(e)}function Rt(e){return _(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(dt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qt(e)&&e.host||W(e);return Qt(t)?t.host:t}function ce(e){const t=Z(e);return lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:I(t)&&ft(t)?t:ce(t)}function ut(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ce(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=k(o);if(s){const l=$t(r);return t.concat(r,r.visualViewport||[],ft(o)?o:[],l&&n?ut(l):[])}return t.concat(o,ut(o,[],n))}function $t(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function he(e){const t=N(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=I(e),s=o?e.offsetWidth:n,r=o?e.offsetHeight:i,l=xt(n)!==s||xt(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Ut(e){return _(e)?e:e.contextElement}function st(e){const t=Ut(e);if(!I(t))return M(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=he(t);let r=(s?xt(n.width):n.width)/i,l=(s?xt(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const Ge=M(0);function de(e){const t=k(e);return!Vt()||!t.visualViewport?Ge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function it(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Ut(e);let r=M(1);t&&(i?_(i)&&(r=st(i)):r=st(e));const l=Xe(s,n,i)?de(s):M(0);let a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,h=o.width/r.x,d=o.height/r.y;if(s){const f=k(s),u=i&&_(i)?k(i):i;let p=f,m=$t(p);for(;m&&i&&u!==p;){const y=st(m),v=m.getBoundingClientRect(),b=N(m),w=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,x=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;a*=y.x,c*=y.y,h*=y.x,d*=y.y,a+=w,c+=x,p=k(m),m=$t(p)}}return Pt({width:h,height:d,x:a,y:c})}function jt(e,t){const n=Rt(e).scrollLeft;return t?t.left+n:it(W(e)).left+n}function ue(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:jt(e,i)),s=i.top+t.scrollTop;return{x:o,y:s}}function Je(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",r=W(i),l=t?At(t.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=M(1);const h=M(0),d=I(i);if((d||!d&&!s)&&((dt(i)!=="body"||ft(r))&&(a=Rt(i)),I(i))){const u=it(i);c=st(i),h.x=u.x+i.clientLeft,h.y=u.y+i.clientTop}const f=r&&!d&&!s?ue(r,a,!0):M(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+h.x+f.x,y:n.y*c.y-a.scrollTop*c.y+h.y+f.y}}function Qe(e){return Array.from(e.getClientRects())}function Ze(e){const t=W(e),n=Rt(e),i=e.ownerDocument.body,o=S(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=S(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+jt(e);const l=-n.scrollTop;return N(i).direction==="rtl"&&(r+=S(t.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function tn(e,t){const n=k(e),i=W(e),o=n.visualViewport;let s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const c=Vt();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function en(e,t){const n=it(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=I(e)?st(e):M(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Zt(e,t,n){let i;if(t==="viewport")i=tn(e,n);else if(t==="document")i=Ze(W(e));else if(_(t))i=en(t,n);else{const o=de(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pt(i)}function pe(e,t){const n=Z(e);return n===t||!_(n)||lt(n)?!1:N(n).position==="fixed"||pe(n,t)}function nn(e,t){const n=t.get(e);if(n)return n;let i=ut(e,[],!1).filter(l=>_(l)&&dt(l)!=="body"),o=null;const s=N(e).position==="fixed";let r=s?Z(e):e;for(;_(r)&&!lt(r);){const l=N(r),a=Wt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ft(r)&&!a&&pe(e,r))?i=i.filter(h=>h!==r):o=l,r=Z(r)}return t.set(e,i),i}function on(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[...n==="clippingAncestors"?At(t)?[]:nn(t,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,h)=>{const d=Zt(t,h,o);return c.top=S(d.top,c.top),c.right=J(d.right,c.right),c.bottom=J(d.bottom,c.bottom),c.left=S(d.left,c.left),c},Zt(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function sn(e){const{width:t,height:n}=he(e);return{width:t,height:n}}function rn(e,t,n){const i=I(t),o=W(t),s=n==="fixed",r=it(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=M(0);if(i||!i&&!s)if((dt(t)!=="body"||ft(o))&&(l=Rt(t)),i){const f=it(t,!0,s,t);a.x=f.x+t.clientLeft,a.y=f.y+t.clientTop}else o&&(a.x=jt(o));const c=o&&!i&&!s?ue(o,l):M(0),h=r.left+l.scrollLeft-a.x-c.x,d=r.top+l.scrollTop-a.y-c.y;return{x:h,y:d,width:r.width,height:r.height}}function Dt(e){return N(e).position==="static"}function te(e,t){if(!I(e)||N(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function fe(e,t){const n=k(e);if(At(e))return n;if(!I(e)){let o=Z(e);for(;o&&!lt(o);){if(_(o)&&!Dt(o))return o;o=Z(o)}return n}let i=te(e,t);for(;i&&Ke(i)&&Dt(i);)i=te(i,t);return i&&lt(i)&&Dt(i)&&!Wt(i)?n:i||Ye(e)||n}const ln=async function(e){const t=this.getOffsetParent||fe,n=this.getDimensions,i=await n(e.floating);return{reference:rn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function an(e){return N(e).direction==="rtl"}const cn={convertOffsetParentRelativeRectToViewportRelativeRect:Je,getDocumentElement:W,getClippingRect:on,getOffsetParent:fe,getElementRects:ln,getClientRects:Qe,getDimensions:sn,getScale:st,isElement:_,isRTL:an};function ge(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hn(e,t){let n=null,i;const o=W(e);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const c=e.getBoundingClientRect(),{left:h,top:d,width:f,height:u}=c;if(l||t(),!f||!u)return;const p=vt(d),m=vt(o.clientWidth-(h+f)),y=vt(o.clientHeight-(d+u)),v=vt(h),w={rootMargin:-p+"px "+-m+"px "+-y+"px "+-v+"px",threshold:S(0,J(1,a))||1};let x=!0;function E(F){const O=F[0].intersectionRatio;if(O!==a){if(!x)return r();O?r(!1,O):i=setTimeout(()=>{r(!1,1e-7)},1e3)}O===1&&!ge(c,e.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return r(!0),s}function ee(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Ut(e),h=o||s?[...c?ut(c):[],...ut(t)]:[];h.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&l?hn(c,n):null;let f=-1,u=null;r&&(u=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(t)})),n()}),c&&!a&&u.observe(c),u.observe(t));let p,m=a?it(e):null;a&&y();function y(){const v=it(e);m&&!ge(m,v)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;h.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=u)==null||v.disconnect(),u=null,a&&cancelAnimationFrame(p)}}const dn=Ve,un=Ue,ne=Ie,pn=je,fn=Me,gn=(e,t,n)=>{const i=new Map,o={platform:cn,...n},s={...o.platform,_c:i};return He(e,t,{...o,platform:s})};function yt(e){if(e===void 0)return 0;const t=window.devicePixelRatio||1;return Math.round(e*t)/t}const bt=8,mn=100,vn=e=>({left:["right","bottom","top"],"left-start":["right-start","bottom","top"],"left-end":["right-end","bottom","top"],right:["left","bottom","top"],"right-start":["left-start","bottom","top"],"right-end":["left-end","bottom","top"],top:["bottom","left","right"],"top-start":["bottom-start","left","right"],"top-end":["bottom-end","left","right"],bottom:["top","left","right"],"bottom-start":["top-start","left","right"],"bottom-end":["top-end","left","right"]})[e]??[e];class yn{constructor(t){this.originalPlacements=new WeakMap,this.allowPlacementUpdate=!1,this.closeForAncestorUpdate=()=>{!this.allowPlacementUpdate&&this.options.type!=="modal"&&this.cleanup&&this.target.dispatchEvent(new Event("close",{bubbles:!0})),this.allowPlacementUpdate=!1},this.updatePlacement=()=>{this.computePlacement()},this.resetOverlayPosition=()=>{!this.target||!this.options||(this.clearOverlayPosition(),this.host.offsetHeight,this.computePlacement())},this.host=t,this.host.addController(this)}placeOverlay(t=this.target,n=this.options){if(this.target=t,this.options=n,!t||!n)return;const i=ee(n.trigger,t,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),o=ee(n.trigger,t,this.updatePlacement,{ancestorScroll:!1});this.cleanup=()=>{var s;(s=this.host.elements)==null||s.forEach(r=>{r.addEventListener("luzmo-closed",()=>{const l=this.originalPlacements.get(r);l&&r.setAttribute("placement",l),this.originalPlacements.delete(r)},{once:!0})}),i(),o()}}async computePlacement(){var f,u;const{options:t,target:n}=this;await(document.fonts?document.fonts.ready:Promise.resolve());const i=t.trigger instanceof HTMLElement?ne():ne({padding:bt,fallbackPlacements:vn(t.placement)}),[o=0,s=0]=Array.isArray(t==null?void 0:t.offset)?t.offset:[t.offset,0],r=(f=this.host.elements.find(p=>p.tipElement))==null?void 0:f.tipElement,l=[dn({mainAxis:o,crossAxis:s}),un({padding:bt}),i,pn({padding:bt,apply:({availableWidth:p,availableHeight:m,rects:{floating:y}})=>{const v=Math.max(mn,Math.floor(m)),b=y.height;this.initialHeight=this.isConstrained&&this.initialHeight||b,this.isConstrained=b<this.initialHeight||v<=b;const w=this.isConstrained?`${v}px`:"";Object.assign(n.style,{maxWidth:`${Math.floor(p)}px`,maxHeight:w})}}),...r?[fn({element:r,padding:t.tipPadding||bt})]:[]],{x:a,y:c,placement:h,middlewareData:d}=await gn(t.trigger,n,{placement:t.placement,middleware:l,strategy:"fixed"});if(Object.assign(n.style,{top:"0px",left:"0px",translate:`${yt(a)}px ${yt(c)}px`}),n.setAttribute("actual-placement",h),(u=this.host.elements)==null||u.forEach(p=>{this.originalPlacements.has(p)||this.originalPlacements.set(p,p.getAttribute("placement")),p.setAttribute("placement",h)}),r&&d.arrow){const{x:p,y:m}=d.arrow;Object.assign(r.style,{top:h.startsWith("right")||h.startsWith("left")?"0px":"",left:h.startsWith("bottom")||h.startsWith("top")?"0px":"",translate:`${yt(p)}px ${yt(m)}px`})}}clearOverlayPosition(){this.target&&(this.target.style.removeProperty("max-height"),this.target.style.removeProperty("max-width"),this.initialHeight=void 0,this.isConstrained=!1)}hostConnected(){document.addEventListener("luzmo-update-overlays",this.resetOverlayPosition)}hostUpdated(){var t;this.host.open||((t=this.cleanup)==null||t.call(this),this.cleanup=void 0)}hostDisconnected(){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0,document.removeEventListener("luzmo-update-overlays",this.resetOverlayPosition)}}var gt=(e=>(e[e.click=0]="click",e[e.hover=1]="hover",e[e.longpress=2]="longpress",e))(gt||{});class Kt{constructor(t,{overlay:n,isPersistent:i,handleOverlayReady:o}){this.target=t,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!i,this.handleOverlayReady=o,this.isPersistent&&this.init(),this.overlay=n}get activelyOpening(){return!1}get open(){var t;return((t=this.overlay)==null?void 0:t.open)??this.isLazilyOpen}set open(t){if(t!==this.open){if(this.isLazilyOpen=t,this.overlay){this.overlay.open=t;return}t&&(customElements.whenDefined("luzmo-overlay").then(async()=>{const{Overlay:n}=await Promise.resolve().then(()=>et);this.overlay=new n,this.overlay.open=!0}),Promise.resolve().then(()=>et))}}get overlay(){return this._overlay}set overlay(t){var n;t&&this.overlay!==t&&(this.overlay&&this.overlay.removeController(this),this._overlay=t,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),(n=this.handleOverlayReady)==null||n.call(this,this.overlay))}prepareDescription(t){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){var t;this.releaseDescription(),(t=this.abortController)==null||t.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}}class bn extends Kt{constructor(){super(...arguments),this.type=gt.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){var n;(n=this.abortController)==null||n.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("click",()=>this.handleClick(),{signal:t}),this.target.addEventListener("pointerdown",()=>this.handlePointerdown(),{signal:t})}}const wn=300;class En extends Kt{constructor(){super(...arguments),this.type=gt.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleTargetFocusin(){this.target.matches(":focus-visible")&&(this.open=!0,this.focusedin=!0)}handleTargetFocusout(){this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){var t;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0),!((t=this.overlay)!=null&&t.disabled)&&(this.open=!0,this.pointerentered=!0)}handleTargetPointerleave(){this.doPointerleave()}handleHostPointerenter(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0)}handleHostPointerleave(){this.doPointerleave()}prepareDescription(){if(this.overlay.elements.length===0)return;const t=this.target.getRootNode(),n=this.overlay.elements[0].getRootNode(),i=this.overlay.getRootNode();t===i?this.prepareOverlayRelativeDescription():t===n&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){const t=C.conditionAttributeWithId(this.target,"aria-describedby",[this.overlay.id]);this.releaseDescription=()=>{t(),this.releaseDescription=tt}}prepareContentRelativeDescription(){const t=[],n=this.overlay.elements.map(o=>(t.push(o.id),o.id||(o.id=`${this.overlay.tagName.toLowerCase()}-helper-${C.randomID()}`),o.id));this.elementIds=t;const i=C.conditionAttributeWithId(this.target,"aria-describedby",n);this.releaseDescription=()=>{i(),this.overlay.elements.map((o,s)=>{o.id=this.elementIds[s]}),this.releaseDescription=tt}}doPointerleave(){this.pointerentered=!1;const t=this.target;this.focusedin&&t.matches(":focus-visible")||(this.hoverTimeout=setTimeout(()=>{this.open=!1},wn))}init(){var n;(n=this.abortController)==null||n.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("focusin",()=>this.handleTargetFocusin(),{signal:t}),this.target.addEventListener("focusout",()=>this.handleTargetFocusout(),{signal:t}),this.target.addEventListener("pointerenter",()=>this.handleTargetPointerenter(),{signal:t}),this.target.addEventListener("pointerleave",()=>this.handleTargetPointerleave(),{signal:t}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;const{signal:t}=this.abortController;this.overlay.addEventListener("pointerenter",()=>this.handleHostPointerenter(),{signal:t}),this.overlay.addEventListener("pointerleave",()=>this.handleHostPointerleave(),{signal:t})}}const xn=300,Cn={touch:"Double tap and long press for additional options",keyboard:"Press Space or Alt+Down Arrow for additional options",mouse:"Click and hold for additional options"};class Pn extends Kt{constructor(){super(...arguments),this.type=gt.longpress,this.longpressState=null,this.releaseDescription=tt,this.handlePointerup=()=>{var t;clearTimeout(this.timeout),this.target&&(this.longpressState=((t=this.overlay)==null?void 0:t.state)==="opening"?"pressed":null,document.removeEventListener("pointerup",this.handlePointerup),document.removeEventListener("pointercancel",this.handlePointerup))}}get activelyOpening(){return this.longpressState==="opening"||this.longpressState==="pressed"}handleLongpress(){this.open=!0,this.longpressState=this.longpressState==="potential"?"opening":"pressed"}handlePointerdown(t){!this.target||t.button!==0||(this.longpressState="potential",document.addEventListener("pointerup",this.handlePointerup),document.addEventListener("pointercancel",this.handlePointerup),"holdAffordance"in this.target)||(this.timeout=setTimeout(()=>{this.target&&this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"pointer"}}))},xn))}handleKeydown(t){const{code:n,altKey:i}=t;i&&n==="ArrowDown"&&(t.stopPropagation(),t.stopImmediatePropagation())}handleKeyup(t){const{code:n,altKey:i}=t;if(n==="Space"||i&&n==="ArrowDown"){if(!this.target)return;t.stopPropagation(),this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(t){if(this.releaseDescription!==tt||this.overlay.elements.length===0)return;const n=document.createElement("div");n.id=`longpress-describedby-descriptor-${C.randomID()}`;const i=St.isIOS()||St.isAndroid()?"touch":"keyboard";n.textContent=Cn[i],n.slot="longpress-describedby-descriptor";const o=t.getRootNode(),s=this.overlay.getRootNode();o===s?this.overlay.append(n):(n.hidden=!("host"in o),t.after(n));const r=C.conditionAttributeWithId(t,"aria-describedby",[n.id]);this.releaseDescription=()=>{r(),n.remove(),this.releaseDescription=tt}}shouldCompleteOpen(){this.longpressState=this.longpressState==="pressed"?null:this.longpressState}init(){var n;(n=this.abortController)==null||n.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("longpress",()=>this.handleLongpress(),{signal:t}),this.target.addEventListener("pointerdown",i=>this.handlePointerdown(i),{signal:t}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener("keydown",i=>this.handleKeydown(i),{signal:t}),this.target.addEventListener("keyup",i=>this.handleKeyup(i),{signal:t}))}}const me={click:bn,longpress:Pn,hover:En};var On=Object.defineProperty,Tn=Object.getOwnPropertyDescriptor,R=(e,t,n,i)=>{for(var o=i>1?void 0:i?Tn(t,n):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(i?r(t,n,o):r(o))||o);return i&&o&&On(t,n,o),o};const An="showPopover"in document.createElement("div");let wt=Te(rt);wt=An?De(wt):Ae(wt);var j;const T=(j=class extends wt{constructor(){super(...arguments),this._delayed=!1,this._disabled=!1,this.offset=0,this._open=!1,this.lastRequestSlottableState=!1,this.receivesFocus="auto",this._state="closed",this.triggerElement=null,this.type="auto",this.wasOpen=!1,this.closeOnFocusOut=t=>{if(!t.relatedTarget)return;const n=new Event("overlay-relation-query",{bubbles:!0,composed:!0});t.relatedTarget.addEventListener(n.type,i=>{i.composedPath().includes(this)||(this.open=!1)}),t.relatedTarget.dispatchEvent(n)}}get delayed(){var t;return((t=this.elements.at(-1))==null?void 0:t.hasAttribute("delayed"))||this._delayed}set delayed(t){this._delayed=t}get disabled(){return this._disabled}set disabled(t){var n;this._disabled=t,t?((n=this.strategy)==null||n.abort(),this.wasOpen=this.open,this.open=!1):(this.bindEvents(),this.open=this.open||this.wasOpen,this.wasOpen=!1)}get hasNonVirtualTrigger(){return!!this.triggerElement&&!(this.triggerElement instanceof at)}get placementController(){return this._placementController||(this._placementController=new yn(this)),this._placementController}get open(){return this._open}set open(t){var n;t&&this.disabled||t!==this.open&&((n=this.strategy)!=null&&n.activelyOpening&&!t||(this._open=t,this.open&&(j.openCount+=1),this.requestUpdate("open",!this.open),this.open&&this.requestSlottable()))}get state(){return this._state}set state(t){var i;if(t===this.state)return;const n=this.state;this._state=t,(this.state==="opened"||this.state==="closed")&&((i=this.strategy)==null||i.shouldCompleteOpen()),this.requestUpdate("state",n)}get elementResolver(){return this._elementResolver||(this._elementResolver=new C.ElementResolutionController(this)),this._elementResolver}get usesDialog(){return this.type==="modal"||this.type==="page"}get popoverValue(){if("popover"in this)switch(this.type){case"modal":case"page":return;case"hint":return"manual";default:return this.type}}get requiresPositioning(){return!(this.type==="page"||!this.open||!this.triggerElement||!this.placement&&this.type!=="hint")}managePosition(){if(!this.requiresPositioning||!this.open)return;const t=this.offset||0,n=this.triggerElement,i=this.placement||"right",o=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:t,placement:i,tipPadding:o,trigger:n,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();const t=this.open;if(this.open!==t||(await this.manageDelay(t),this.open!==t)||(await this.ensureOnDOM(t),this.open!==t))return;const n=await this.makeTransition(t);this.open===t&&await this.applyFocus(t,n)}async applyFocus(t,n){if(!(this.receivesFocus==="false"||this.type==="hint")){if(await L(),await L(),t===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}n==null||n.focus()}}returnFocus(){var n;if(this.open||this.type==="hint")return;const t=()=>{var s,r;const i=[];let o=document.activeElement;for(;(s=o==null?void 0:o.shadowRoot)!=null&&s.activeElement;)o=o.shadowRoot.activeElement;for(;o;){const l=o.assignedSlot||o.parentElement||((r=o.getRootNode())==null?void 0:r.host);l&&i.push(l),o=l}return i};this.receivesFocus!=="false"&&((n=this.triggerElement)!=null&&n.focus)&&(this.contains(this.getRootNode().activeElement)||t().includes(this)||document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(t){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(Xt.add(this),this.willPreventClose&&(document.addEventListener("pointerup",()=>{this.dialogEl.classList.toggle("not-immediately-closable",!1),this.willPreventClose=!1},{once:!0}),this.dialogEl.classList.toggle("not-immediately-closable",!0))):(t&&this.dispose(),Xt.remove(this)),this.open&&this.state!=="opened"?this.state="opening":!this.open&&this.state!=="closed"&&(this.state="closing"),this.usesDialog?this.manageDialogOpen():this.managePopoverOpen(),this.type==="auto")){const n=this.getRootNode();this.open?n.addEventListener("focusout",this.closeOnFocusOut,{capture:!0}):n.removeEventListener("focusout",this.closeOnFocusOut,{capture:!0})}}bindEvents(){var t;(t=this.strategy)==null||t.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new me[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(t){t.newState!=="open"&&this.handleBrowserClose(t)}handleBrowserClose(t){var n;if(t.stopPropagation(),!((n=this.strategy)!=null&&n.activelyOpening)){this.open=!1;return}this.manuallyKeepOpen()}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){var t,n;this.elements.length===0?(t=this.strategy)==null||t.releaseDescription():this.hasNonVirtualTrigger&&((n=this.strategy)==null||n.prepareDescription(this.triggerElement))}shouldPreventClose(){const t=this.willPreventClose;return this.willPreventClose=!1,t}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new oe("overlay-content",this.open?{}:Ot)),this.lastRequestSlottableState=this.open)}willUpdate(t){var i;if(this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${C.randomID()}`),t.has("open")&&(this.hasUpdated||this.open)&&this.manageOpen(t.get("open")),t.has("trigger")){const[o,s]=((i=this.trigger)==null?void 0:i.split("@"))||[];this.elementResolver.selector=o?`#${o}`:"",this.triggerInteraction=s}let n=!1;t.has(C.elementResolverUpdatedSymbol)&&(n=this.triggerElement,this.triggerElement=this.elementResolver.element),t.has("triggerElement")&&(n=t.get("triggerElement")),n!==!1&&this.bindEvents()}updated(t){super.updated(t),t.has("placement")&&(this.placement?this.dialogEl.setAttribute("actual-placement",this.placement):this.dialogEl.removeAttribute("actual-placement"),this.open&&t.get("placement")!==void 0&&this.placementController.resetOverlayPosition()),t.has("state")&&this.state==="closed"&&t.get("state")!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return g.x` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":j.openCount.toString()}}renderDialog(){return g.x`
29
+ <dialog
30
+ class="dialog"
31
+ part="dialog"
32
+ placement=${g.o(this.requiresPositioning?this.placement||"right":void 0)}
33
+ style=${kt(this.dialogStyleMap)}
34
+ @close=${this.handleBrowserClose}
35
+ @cancel=${this.handleBrowserClose}
36
+ @beforetoggle=${this.handleBeforetoggle}
37
+ ?is-visible=${this.state!=="closed"}
38
+ >
39
+ ${this.renderContent()}
40
+ </dialog>
41
+ `}renderPopover(){return g.x`
42
+ <div
43
+ class="dialog"
44
+ part="dialog"
45
+ placement=${g.o(this.requiresPositioning?this.placement||"right":void 0)}
46
+ popover=${g.o(this.popoverValue)}
47
+ style=${kt(this.dialogStyleMap)}
48
+ @beforetoggle=${this.handleBeforetoggle}
49
+ @close=${this.handleBrowserClose}
50
+ ?is-visible=${this.state!=="closed"}
51
+ >
52
+ ${this.renderContent()}
53
+ </div>
54
+ `}render(){const t=this.type==="modal"||this.type==="page";return g.x`
55
+ ${t?this.renderDialog():this.renderPopover()}
56
+ <slot name="longpress-describedby-descriptor"></slot>
57
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("close",()=>{this.open=!1}),this.hasUpdated&&this.bindEvents()}disconnectedCallback(){var t;(t=this.strategy)==null||t.releaseDescription(),this.open=!1,super.disconnectedCallback()}},j.styles=[g.r(Le)],j.openCount=1,j);R([g.n({type:Boolean})],T.prototype,"delayed",1);R([g.e(".dialog")],T.prototype,"dialogEl",2);R([g.n({type:Boolean})],T.prototype,"disabled",1);R([ie({flatten:!0,selector:':not([slot="longpress-describedby-descriptor"], slot)'})],T.prototype,"elements",2);R([g.n({type:Number})],T.prototype,"offset",2);R([g.n({type:Boolean,reflect:!0})],T.prototype,"open",1);R([g.n()],T.prototype,"placement",2);R([g.n({attribute:"receives-focus"})],T.prototype,"receivesFocus",2);R([g.e("slot")],T.prototype,"slotEl",2);R([C.r()],T.prototype,"state",1);R([g.n({type:Number,attribute:"tip-padding"})],T.prototype,"tipPadding",2);R([g.n()],T.prototype,"trigger",2);R([g.n({attribute:!1})],T.prototype,"triggerElement",2);R([g.n({attribute:!1})],T.prototype,"triggerInteraction",2);R([g.n()],T.prototype,"type",2);let mt=T;const et=Object.freeze(Object.defineProperty({__proto__:null,Overlay:mt},Symbol.toStringTag,{value:"Module"})),Rn=":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";var Dn=Object.defineProperty,D=(e,t,n,i)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,n,o)||o);return o&&Dn(t,n,o),o};class P extends g.LuzmoElement{constructor(){super(...arguments),this.content="click hover longpress",this.offset=6,this.disabled=!1,this.receivesFocus="auto",this.clickContent=[],this.longpressContent=[],this.hoverContent=[],this.targetContent=[]}static get styles(){return[g.r(Rn)]}getAssignedElementsFromSlot(t){return t.assignedElements({flatten:!0})}handleTriggerContent(t){this.targetContent=this.getAssignedElementsFromSlot(t.target)}handleSlotContent(t){switch(t.target.name){case"click-content":{this.clickContent=this.getAssignedElementsFromSlot(t.target);break}case"longpress-content":{this.longpressContent=this.getAssignedElementsFromSlot(t.target);break}case"hover-content":{this.hoverContent=this.getAssignedElementsFromSlot(t.target);break}}}handleBeforetoggle(t){const{target:n}=t;let i;if(n===this.clickOverlayElement)i="click";else if(n===this.longpressOverlayElement)i="longpress";else if(n===this.hoverOverlayElement)i="hover";else return;t.newState==="open"?this.open=i:this.open===i&&(this.open=void 0)}update(t){var n,i,o,s,r,l;t.has("clickContent")&&(this.clickPlacement=((n=this.clickContent[0])==null?void 0:n.getAttribute("placement"))||((i=this.clickContent[0])==null?void 0:i.getAttribute("direction"))||void 0),t.has("hoverContent")&&(this.hoverPlacement=((o=this.hoverContent[0])==null?void 0:o.getAttribute("placement"))||((s=this.hoverContent[0])==null?void 0:s.getAttribute("direction"))||void 0),t.has("longpressContent")&&(this.longpressPlacement=((r=this.longpressContent[0])==null?void 0:r.getAttribute("placement"))||((l=this.longpressContent[0])==null?void 0:l.getAttribute("direction"))||void 0),super.update(t)}renderSlot(t){return g.x`
58
+ <slot name=${t} @slotchange=${this.handleSlotContent}></slot>
59
+ `}renderClickOverlay(){Promise.resolve().then(()=>et);const t=this.renderSlot("click-content");return this.clickContent.length===0?t:g.x`
60
+ <luzmo-overlay
61
+ id="click-overlay"
62
+ ?disabled=${this.disabled||this.clickContent.length===0}
63
+ ?open=${this.open==="click"&&this.clickContent.length>0}
64
+ .offset=${this.offset}
65
+ .placement=${this.clickPlacement||this.placement}
66
+ .triggerElement=${this.targetContent[0]}
67
+ .triggerInteraction=${"click"}
68
+ .type=${this.type==="modal"?"modal":"auto"}
69
+ @beforetoggle=${this.handleBeforetoggle}
70
+ .receivesFocus=${this.receivesFocus}
71
+ >
72
+ ${t}
73
+ </luzmo-overlay>
74
+ `}renderHoverOverlay(){Promise.resolve().then(()=>et);const t=this.renderSlot("hover-content");return this.hoverContent.length===0?t:g.x`
75
+ <luzmo-overlay
76
+ id="hover-overlay"
77
+ ?open=${this.open==="hover"&&this.hoverContent.length>0}
78
+ ?disabled=${this.disabled||this.hoverContent.length===0||!!this.open&&this.open!=="hover"}
79
+ .offset=${this.offset}
80
+ .placement=${this.hoverPlacement||this.placement}
81
+ .triggerElement=${this.targetContent[0]}
82
+ .triggerInteraction=${"hover"}
83
+ .type=${"hint"}
84
+ @beforetoggle=${this.handleBeforetoggle}
85
+ .receivesFocus=${this.receivesFocus}
86
+ >
87
+ ${t}
88
+ </luzmo-overlay>
89
+ `}renderLongpressOverlay(){Promise.resolve().then(()=>et);const t=this.renderSlot("longpress-content");return this.longpressContent.length===0?t:g.x`
90
+ <luzmo-overlay
91
+ id="longpress-overlay"
92
+ ?disabled=${this.disabled||this.longpressContent.length===0}
93
+ ?open=${this.open==="longpress"&&this.longpressContent.length>0}
94
+ .offset=${this.offset}
95
+ .placement=${this.longpressPlacement||this.placement}
96
+ .triggerElement=${this.targetContent[0]}
97
+ .triggerInteraction=${"longpress"}
98
+ .type=${"auto"}
99
+ @beforetoggle=${this.handleBeforetoggle}
100
+ .receivesFocus=${this.receivesFocus}
101
+ >
102
+ ${t}
103
+ </luzmo-overlay>
104
+ <slot name="longpress-describedby-descriptor"></slot>
105
+ `}render(){const t=this.content.split(" ");return g.x`
106
+ <slot
107
+ id="trigger"
108
+ name="trigger"
109
+ @slotchange=${this.handleTriggerContent}
110
+ ></slot>
111
+ ${[t.includes("click")?this.renderClickOverlay():g.x``,t.includes("hover")?this.renderHoverOverlay():g.x``,t.includes("longpress")?this.renderLongpressOverlay():g.x``]}
112
+ `}updated(t){if(super.updated(t),this.disabled&&t.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}D([g.n()],P.prototype,"content");D([g.n({reflect:!0})],P.prototype,"placement");D([g.n()],P.prototype,"type");D([g.n({type:Number})],P.prototype,"offset");D([g.n({reflect:!0})],P.prototype,"open");D([g.n({type:Boolean,reflect:!0})],P.prototype,"disabled");D([g.n({attribute:"receives-focus"})],P.prototype,"receivesFocus");D([C.r()],P.prototype,"clickContent");D([C.r()],P.prototype,"longpressContent");D([C.r()],P.prototype,"hoverContent");D([C.r()],P.prototype,"targetContent");D([g.e("#click-overlay",!0)],P.prototype,"clickOverlayElement");D([g.e("#longpress-overlay",!0)],P.prototype,"longpressOverlayElement");D([g.e("#hover-overlay",!0)],P.prototype,"hoverOverlayElement");function ve(e,t,n,i){return mt.open(e,t,n,i)}class Sn extends St.f{render(t){return g.E}update(t,[n]){this.template=n,this.target!==t.element&&(this.target=t.element,this.renderBefore=this.target.children[0]),this.listenerHost=this.target,this.init()}handleSlottableRequest(t){if(t.target!==t.currentTarget)return;const n=t.data===Ot;g.B(n?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var n;(n=this.listeners)==null||n.abort(),this.listeners=new AbortController;const{signal:t}=this.listeners;this.listenerHost.addEventListener("slottable-request",i=>this.handleSlottableRequest(i),{signal:t})}disconnected(){var t;(t=this.listeners)==null||t.abort()}reconnected(){this.init()}}class Yt extends Sn{constructor(){super(...arguments),this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}},this.options={...this.defaultOptions.overlayOptions}}render(t,n){return g.E}update(t,[n,i]){var l,a,c;this.options={...this.defaultOptions.overlayOptions,...i==null?void 0:i.overlayOptions},this.insertionOptions=i==null?void 0:i.insertionOptions,this.template=n,this.host=(l=t.options)==null?void 0:l.host;let o=!1;const s=(i==null?void 0:i.triggerInteraction)||this.defaultOptions.triggerInteraction,r=gt[(a=this.strategy)==null?void 0:a.type]!==s;this.target!==t.element&&(this.target=t.element,o=!0),(o||r)&&((c=this.strategy)==null||c.abort(),this.strategy=new me[s](this.target,{isPersistent:!0,handleOverlayReady:h=>{this.listenerHost=this.overlay=h,this.init()}})),this.strategy.open=(i==null?void 0:i.open)??!1}handleSlottableRequest(t){var o,s;if(t.target!==t.currentTarget)return;const n=t.data===Ot,i={};if(this.host&&(i.host=this.host),g.B(n?void 0:this.template(),this.overlay,i),n)this.overlay.remove();else{rt.applyOptions(this.overlay,{...this.options,trigger:this.target});const r=typeof((o=this.insertionOptions)==null?void 0:o.el)=="function"?this.insertionOptions.el():((s=this.insertionOptions)==null?void 0:s.el)||this.target,{where:l="afterend"}=this.insertionOptions||{};r.insertAdjacentElement(l,this.overlay)}}}const ye=C.e(Yt);customElements.get("luzmo-overlay")||customElements.define("luzmo-overlay",mt);customElements.get("luzmo-overlay-trigger")||customElements.define("luzmo-overlay-trigger",P);const kn=Object.freeze(Object.defineProperty({__proto__:null,Overlay:mt,OverlayTrigger:P,OverlayTriggerDirective:Yt,VirtualTrigger:at,openOverlay:ve,trigger:ye},Symbol.toStringTag,{value:"Module"}));exports.Overlay=mt;exports.OverlayTrigger=P;exports.OverlayTriggerDirective=Yt;exports.SlottableRequestEvent=oe;exports.VirtualTrigger=at;exports.index=kn;exports.o=kt;exports.o$1=ie;exports.openOverlay=ve;exports.overlay=et;exports.removeSlottableRequest=Ot;exports.trigger=ye;
@@ -0,0 +1,51 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2024 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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./if-defined-V7yEJWI3.cjs");require("./index-DGz6jCKo.cjs");require("./index-CvX-HLY1.cjs");require("./index-jt6FL_uE.cjs");require("./index-Dj7PF4Q9.cjs");const g=require("./index-Bo1DpZ-1.cjs"),u=require("./directive-helpers-BSB0tfc9.cjs"),b=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-binning-gap, var(--display-settings-binning-gap))}:host{--display-settings-binning-gap: var(--luzmo-spacing-3)}:host([size=s]){--display-settings-binning-gap: var(--luzmo-spacing-3)}:host([size=l]){--display-settings-binning-gap: var(--luzmo-spacing-4)}:host([size=xl]){--display-settings-binning-gap: var(--luzmo-spacing-5)}";var h=Object.defineProperty,o=(a,n,l,d)=>{for(var i=void 0,t=a.length-1,r;t>=0;t--)(r=a[t])&&(i=r(n,l,i)||i);return i&&h(n,l,i),i};class s extends e.SizedMixin(e.LuzmoElement,{validSizes:Object.values(e.ElementSizes)}){constructor(){super(...arguments),this.slotContent={}}static get styles(){return[e.r(b)]}willUpdate(n){var l,d,i,t;n.has("slotContent")&&(this._enabled=((d=(l=this.slotContent)==null?void 0:l.bins)==null?void 0:d.enabled)??!1,this._binWidth=((t=(i=this.slotContent)==null?void 0:i.bins)==null?void 0:t.number)??10)}toggleBinning(){this._enabled=!this._enabled,this.sendEvent()}setBinning(){this._binWidth=this.binWidthElement.value,this.sendEvent()}sendEvent(){const n={enabled:!!this._enabled,number:this._binWidth??10};this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,bins:n}}}))}renderBinWidth(){return e.x`<div class="setting">
21
+ <luzmo-field-label for="bin-width">Bin width</luzmo-field-label>
22
+ <luzmo-number-field
23
+ id="bin-width"
24
+ min="0"
25
+ value=${this._binWidth??10}
26
+ .size=${this.size}
27
+ @change=${this.setBinning}
28
+ ></luzmo-number-field>
29
+ </div>`}render(){return e.x`<div class="settings-container">
30
+ <div class="settings-row">
31
+ <div class="setting">
32
+ <luzmo-field-label for="binning">Binning</luzmo-field-label>
33
+ <luzmo-action-button
34
+ id="binning"
35
+ toggles
36
+ emphasized
37
+ .size=${this.size}
38
+ ?selected=${this._enabled}
39
+ class=${e.o(this._enabled?"active":"inactive")}
40
+ @click=${this.toggleBinning}
41
+ >
42
+ <luzmo-icon
43
+ slot="icon"
44
+ .icon=${this._enabled?g.C0:g.h0}
45
+ ></luzmo-icon>
46
+ ${this._enabled?"Enabled":"Disabled"}
47
+ </luzmo-action-button>
48
+ </div>
49
+ ${this._enabled?this.renderBinWidth():""}
50
+ </div>
51
+ </div>`}}o([e.n({type:String,reflect:!0})],s.prototype,"language");o([e.n()],s.prototype,"slotContent");o([u.r()],s.prototype,"_enabled");o([e.e("#bin-width")],s.prototype,"binWidthElement");customElements.get("luzmo-display-settings-binning")||customElements.define("luzmo-display-settings-binning",s);exports.LuzmoDisplaySettingsBinning=s;