@solid-design-system/components 5.8.0 → 5.8.1
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.
- package/cdn/chunks/chunk.HRTBCNEN.js +1 -0
- package/{cdn-versioned/chunks/chunk.PU5TFXA4.js → cdn/chunks/chunk.PMP4GFXI.js} +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/header/header.js +1 -1
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/custom-elements.json +1 -1
- package/cdn/solid-components.bundle.js +18 -18
- package/cdn/solid-components.iife.js +18 -18
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/autocomplete-config.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.26O6IKAG.js +1 -1
- package/cdn-versioned/chunks/chunk.2JBLGDAG.js +1 -1
- package/cdn-versioned/chunks/chunk.3IA4LYAE.js +1 -1
- package/cdn-versioned/chunks/chunk.4ND6BT4C.js +1 -1
- package/cdn-versioned/chunks/chunk.5P5EXSCE.js +1 -1
- package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
- package/cdn-versioned/chunks/chunk.7PAPSYUK.js +1 -1
- package/cdn-versioned/chunks/chunk.7UITUXR7.js +1 -1
- package/cdn-versioned/chunks/chunk.BUAUXM45.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.DR3XJQRD.js +1 -1
- package/cdn-versioned/chunks/chunk.DSA6LS4D.js +1 -1
- package/cdn-versioned/chunks/chunk.DU2SXY3R.js +1 -1
- package/cdn-versioned/chunks/chunk.DUHPZXXT.js +1 -1
- package/cdn-versioned/chunks/chunk.EXZ5YJHN.js +1 -1
- package/cdn-versioned/chunks/chunk.FMW27SW2.js +1 -1
- package/cdn-versioned/chunks/chunk.FSFMVNRK.js +1 -1
- package/cdn-versioned/chunks/chunk.G24RRCWJ.js +1 -1
- package/cdn-versioned/chunks/chunk.G7HBP2EA.js +4 -4
- package/cdn-versioned/chunks/chunk.HEVVK37Z.js +1 -1
- package/cdn-versioned/chunks/chunk.HJWBWAOH.js +1 -1
- package/cdn-versioned/chunks/chunk.HK5LV22V.js +1 -1
- package/cdn-versioned/chunks/chunk.HRTBCNEN.js +1 -0
- package/cdn-versioned/chunks/chunk.IIPOW4BF.js +1 -1
- package/cdn-versioned/chunks/chunk.ILZHTUPU.js +1 -1
- package/cdn-versioned/chunks/chunk.J2LVZAHB.js +1 -1
- package/cdn-versioned/chunks/chunk.J6OZWGFI.js +1 -1
- package/cdn-versioned/chunks/chunk.J7EPPTFP.js +1 -1
- package/cdn-versioned/chunks/chunk.KGZFLNCL.js +1 -1
- package/cdn-versioned/chunks/chunk.KRR6NFHE.js +1 -1
- package/cdn-versioned/chunks/chunk.KVHJAQJC.js +1 -1
- package/cdn-versioned/chunks/chunk.M7V7LXP2.js +1 -1
- package/cdn-versioned/chunks/chunk.NEHO757V.js +1 -1
- package/cdn-versioned/chunks/chunk.NVXMW7JA.js +2 -2
- package/cdn-versioned/chunks/chunk.OLKTD3H6.js +1 -1
- package/{cdn/chunks/chunk.PU5TFXA4.js → cdn-versioned/chunks/chunk.PMP4GFXI.js} +1 -1
- package/cdn-versioned/chunks/chunk.QDGET4J7.js +1 -1
- package/cdn-versioned/chunks/chunk.QDYCPBH5.js +1 -1
- package/cdn-versioned/chunks/chunk.REJ4HJHM.js +1 -1
- package/cdn-versioned/chunks/chunk.SABXUHBG.js +1 -1
- package/cdn-versioned/chunks/chunk.SV6S6VUZ.js +1 -1
- package/cdn-versioned/chunks/chunk.TEMANSX2.js +4 -4
- package/cdn-versioned/chunks/chunk.TW4QSRRZ.js +1 -1
- package/cdn-versioned/chunks/chunk.UPOUK4YE.js +1 -1
- package/cdn-versioned/chunks/chunk.VGYK5BAY.js +1 -1
- package/cdn-versioned/chunks/chunk.VY4OJYTU.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WLNGSSPM.js +1 -1
- package/cdn-versioned/chunks/chunk.X2PYZCU7.js +1 -1
- package/cdn-versioned/chunks/chunk.XRCG4RJJ.js +1 -1
- package/cdn-versioned/chunks/chunk.XRHEUCUN.js +1 -1
- package/cdn-versioned/chunks/chunk.XYSFDUN5.js +3 -3
- package/cdn-versioned/chunks/chunk.YCMKDACM.js +1 -1
- package/cdn-versioned/chunks/chunk.YCO53VY5.js +1 -1
- package/cdn-versioned/chunks/chunk.YR2HDSHK.js +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.js +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/header/header.js +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.js +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +218 -218
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +20 -20
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +20 -20
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/autocomplete-config.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +84 -84
- package/cdn-versioned/web-types.json +142 -142
- package/dist/chunks/{chunk.7UEOJL4C.js → chunk.357URABG.js} +1 -1
- package/dist/components/header/header.js +1 -1
- package/dist/custom-elements.json +1 -1
- package/dist/solid-components.js +1 -1
- package/dist/web-types.json +1 -1
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.2BDWN26F.js +5 -5
- package/dist-versioned/chunks/chunk.2CQI5LE4.js +3 -3
- package/dist-versioned/chunks/chunk.2W7NHUH7.js +26 -26
- package/dist-versioned/chunks/{chunk.7UEOJL4C.js → chunk.357URABG.js} +2 -2
- package/dist-versioned/chunks/chunk.374V27WG.js +1 -1
- package/dist-versioned/chunks/chunk.3IFUYWCQ.js +4 -4
- package/dist-versioned/chunks/chunk.56KFGJVD.js +1 -1
- package/dist-versioned/chunks/chunk.5IM5U5QH.js +6 -6
- package/dist-versioned/chunks/chunk.5KVES6PS.js +3 -3
- package/dist-versioned/chunks/chunk.5ZNZ5OFS.js +24 -24
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.7MAASMDW.js +1 -1
- package/dist-versioned/chunks/chunk.7ZNUQOKK.js +2 -2
- package/dist-versioned/chunks/chunk.AGJBHOHC.js +9 -9
- package/dist-versioned/chunks/chunk.BFV6FVEH.js +2 -2
- package/dist-versioned/chunks/chunk.BGJVVJYW.js +8 -8
- package/dist-versioned/chunks/chunk.BHEBFVOB.js +1 -1
- package/dist-versioned/chunks/chunk.C3QUN3CW.js +1 -1
- package/dist-versioned/chunks/chunk.CRGWQRUO.js +2 -2
- package/dist-versioned/chunks/chunk.CU3SNWRP.js +3 -3
- package/dist-versioned/chunks/chunk.DHECGUIH.js +2 -2
- package/dist-versioned/chunks/chunk.ECTYRNKF.js +3 -3
- package/dist-versioned/chunks/chunk.FAY52O5K.js +5 -5
- package/dist-versioned/chunks/chunk.FQ65C655.js +1 -1
- package/dist-versioned/chunks/chunk.G7LKDW7D.js +2 -2
- package/dist-versioned/chunks/chunk.GRJDOPAS.js +12 -12
- package/dist-versioned/chunks/chunk.GWQANU5I.js +3 -3
- package/dist-versioned/chunks/chunk.H7FP247H.js +2 -2
- package/dist-versioned/chunks/chunk.IUAN7YQ4.js +2 -2
- package/dist-versioned/chunks/chunk.J2R4HF6O.js +2 -2
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.L7XW5PYI.js +14 -14
- package/dist-versioned/chunks/chunk.NC2M2T2Q.js +4 -4
- package/dist-versioned/chunks/chunk.ONBBO64D.js +1 -1
- package/dist-versioned/chunks/chunk.PBSF5V4E.js +11 -11
- package/dist-versioned/chunks/chunk.PCHDKK7W.js +6 -6
- package/dist-versioned/chunks/chunk.PK4OGH3M.js +2 -2
- package/dist-versioned/chunks/chunk.PYH33SDH.js +1 -1
- package/dist-versioned/chunks/chunk.SO2HIZUP.js +5 -5
- package/dist-versioned/chunks/chunk.TQRMINMT.js +2 -2
- package/dist-versioned/chunks/chunk.U62FIAJ5.js +1 -1
- package/dist-versioned/chunks/chunk.U7SCAMCN.js +2 -2
- package/dist-versioned/chunks/chunk.UA3G5555.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UTHJPWMF.js +2 -2
- package/dist-versioned/chunks/chunk.VOSWJX2Z.js +6 -6
- package/dist-versioned/chunks/chunk.VTMF55NN.js +2 -2
- package/dist-versioned/chunks/chunk.WK2T7YB4.js +1 -1
- package/dist-versioned/chunks/chunk.X6WRFCHO.js +1 -1
- package/dist-versioned/chunks/chunk.XNHIGD4G.js +1 -1
- package/dist-versioned/chunks/chunk.XX3FTPX7.js +5 -5
- package/dist-versioned/chunks/chunk.ZC5TZTGP.js +3 -3
- package/dist-versioned/chunks/chunk.ZD3I7DCU.js +2 -2
- package/dist-versioned/chunks/chunk.ZTR5JB55.js +4 -4
- package/dist-versioned/chunks/chunk.ZZZHB23N.js +2 -2
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/header/header.js +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +218 -218
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +84 -84
- package/dist-versioned/web-types.json +142 -142
- package/package.json +7 -7
- package/cdn/chunks/chunk.BMMJQ4XS.js +0 -1
- package/cdn-versioned/chunks/chunk.BMMJQ4XS.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid-design-system/components",
|
|
3
3
|
"description": "Solid Design System: Components",
|
|
4
|
-
"version": "5.8.
|
|
4
|
+
"version": "5.8.1",
|
|
5
5
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
6
6
|
"author": "Union Investment",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"directory": "packages/components"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@floating-ui/dom": "^1.7.
|
|
62
|
+
"@floating-ui/dom": "^1.7.1",
|
|
63
63
|
"@shoelace-style/animations": "^1.2.0",
|
|
64
64
|
"@shoelace-style/localize": "^3.2.1",
|
|
65
65
|
"classix": "^2.2.2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
77
77
|
"@web/test-runner": "^0.20.2",
|
|
78
78
|
"@web/test-runner-commands": "^0.9.0",
|
|
79
|
-
"@web/test-runner-playwright": "^0.11.
|
|
79
|
+
"@web/test-runner-playwright": "^0.11.1",
|
|
80
80
|
"autoprefixer": "^10.4.21",
|
|
81
81
|
"change-case": "^5.4.4",
|
|
82
82
|
"chokidar": "^4.0.3",
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
"minify-html-literals": "^1.3.5",
|
|
97
97
|
"ora": "^8.2.0",
|
|
98
98
|
"picocolors": "^1.1.1",
|
|
99
|
-
"playwright": "^1.
|
|
99
|
+
"playwright": "^1.53.0",
|
|
100
100
|
"plop": "^4.0.1",
|
|
101
|
-
"postcss": "^8.5.
|
|
102
|
-
"postcss-import": "^16.1.
|
|
101
|
+
"postcss": "^8.5.6",
|
|
102
|
+
"postcss-import": "^16.1.1",
|
|
103
103
|
"prettier": "^3.5.3",
|
|
104
104
|
"recursive-copy": "^2.0.14",
|
|
105
|
-
"sinon": "^
|
|
105
|
+
"sinon": "^21.0.0",
|
|
106
106
|
"tailwindcss": "^3.4.17",
|
|
107
107
|
"typescript": "5.8.3",
|
|
108
108
|
"user-agent-data-types": "^0.4.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Bt}from"./chunk.26V4EXHB.js";import{a as Dt,b as E,d as Rt,h as Ct}from"./chunk.VGYK5BAY.js";import{b as kt,e as Et}from"./chunk.UWPDCU52.js";import{a as C,b as V,c as mt,e as b}from"./chunk.TJOCV4DC.js";var j=Math.min,T=Math.max,ft=Math.round,ut=Math.floor,B=t=>({x:t,y:t}),he={left:"right",right:"left",bottom:"top",top:"bottom"},de={start:"end",end:"start"};function gt(t,e,n){return T(t,j(e,n))}function Q(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function Tt(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}function Y(t){return["top","bottom"].includes(I(t))?"y":"x"}function yt(t){return Tt(Y(t))}function Ft(t,e,n){n===void 0&&(n=!1);let i=Z(t),o=yt(t),s=wt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function $t(t){let e=at(t);return[pt(t),e,pt(e)]}function pt(t){return t.replace(/start|end/g,e=>de[e])}function me(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function Nt(t,e,n,i){let o=Z(t),s=me(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(pt)))),s}function at(t){return t.replace(/left|right|bottom|top/g,e=>he[e])}function pe(t){return C({top:0,right:0,bottom:0,left:0},t)}function Lt(t){return typeof t!="number"?pe(t):{top:t,right:t,bottom:t,left:t}}function tt(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Ht(t,e,n){let{reference:i,floating:o}=t,s=Y(e),r=yt(e),l=wt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,u;switch(a){case"top":u={x:f,y:i.y-o.height};break;case"bottom":u={x:f,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-o.width,y:h};break;default:u={x:i.x,y:i.y}}switch(Z(e)){case"start":u[r]-=m*(n&&c?-1:1);break;case"end":u[r]+=m*(n&&c?-1:1);break}return u}var Wt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:h}=Ht(c,i,a),m=i,u={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:v,data:A,reset:O}=await g({x:f,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:u,rects:c,platform:r,elements:{reference:t,floating:e}});f=y!=null?y:f,h=v!=null?v:h,u=V(C({},u),{[w]:C(C({},u[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:h}=Ht(c,m,a)),p=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:u}};async function xt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Q(e,t),d=Lt(u),w=l[m?h==="floating"?"reference":"floating":h],g=tt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=tt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Vt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=Q(t,e)||{};if(c==null)return{};let h=Lt(f),m={x:n,y:i},u=yt(o),d=wt(u),p=await r.getDimensions(c),w=u==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[u]-m[u]-s.floating[d],O=m[u]-s.reference[u],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),R=k?k[v]:0;(!R||!await(r.isElement==null?void 0:r.isElement(k)))&&(R=l.floating[v]||s.floating[d]);let _=A/2-O/2,N=R/2-p[d]/2-1,S=j(h[g],N),X=j(h[y],N),H=S,U=R-p[d]-X,P=R/2-p[d]/2+_,ot=gt(H,P,U),D=!a.arrow&&Z(o)!=null&&P!==ot&&s.reference[d]/2-(P<H?S:X)-p[d]/2<0,J=D?P<H?P-H:P-U:0;return{[u]:m[u]+J,data:C({[u]:ot,centerOffset:P-ot-J},D&&{alignmentOffset:J}),reset:D}}});var jt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,ot=Q(t,e),{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=ot,w=mt(ot,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=Y(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[at(l)]:$t(l)),k=d!=="none";!m&&k&&O.push(...Nt(l,p,d,A));let R=[l,...O],_=await xt(e,w),N=[],S=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(_[g]),h){let D=Ft(o,r,A);N.push(_[D[0]],_[D[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,J=R[D];if(J){var U;let K=h==="alignment"?y!==Y(J):!1,W=((U=S[0])==null?void 0:U.overflows[0])>0;if(!K||W)return{data:{index:D,overflows:S},reset:{placement:J}}}let ct=(H=S.filter(K=>K.overflows[0]<=0).sort((K,W)=>K.overflows[1]-W.overflows[1])[0])==null?void 0:H.placement;if(!ct)switch(u){case"bestFit":{var P;let K=(P=S.filter(W=>{if(k){let G=Y(W.placement);return G===y||G==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(G=>G>0).reduce((G,ue)=>G+ue,0)]).sort((W,G)=>W[1]-G[1])[0])==null?void 0:P[0];K&&(ct=K);break}case"initialPlacement":ct=l;break}if(o!==ct)return{reset:{placement:ct}}}return{}}}};async function ge(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Z(n),a=Y(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,h=Q(e,t),{mainAxis:m,crossAxis:u,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof d=="number"&&(u=l==="end"?d*-1:d),a?{x:u*f,y:m*c}:{x:m*c,y:u*f}}var _t=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await ge(e,t);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:V(C({},a),{placement:r})}}}},It=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=Q(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}}}=w,a=mt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await xt(e,a),h=Y(I(o)),m=Tt(h),u=c[m],d=c[h];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=u+f[g],A=u-f[y];u=gt(v,u,A)}if(r){let g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=gt(v,d,A)}let p=l.fn(V(C({},e),{[m]:u,[h]:d}));return V(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[h]:r}}})}}};var Yt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,S=Q(t,e),{apply:a=()=>{}}=S,c=mt(S,["apply"]),f=await xt(e,c),h=I(o),m=Z(o),u=Y(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-f.top-f.bottom,v=d-f.left-f.right,A=j(p-f[w],y),O=j(d-f[g],v),k=!e.middlewareData.shift,R=A,_=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=y),k&&!m){let X=T(f.left,0),H=T(f.right,0),U=T(f.top,0),P=T(f.bottom,0);u?_=d-2*(X!==0||H!==0?X+H:T(f.left,f.right)):R=p-2*(U!==0||P!==0?U+P:T(f.top,f.bottom))}await a(V(C({},e),{availableWidth:_,availableHeight:R}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function vt(){return typeof window!="undefined"}function et(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return vt()?t instanceof Node||t instanceof L(t).Node:!1}function z(t){return vt()?t instanceof Element||t instanceof L(t).Element:!1}function $(t){return vt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function qt(t){return!vt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function Ut(t){return["table","td","th"].includes(et(t))}function ht(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function bt(t){let e=At(),n=z(t)?M(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(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 Kt(t){let e=q(t);for(;$(e)&&!nt(e);){if(bt(e))return e;if(ht(e))return null;e=q(e)}return null}function At(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(et(t))}function M(t){return L(t).getComputedStyle(t)}function dt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(et(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||F(t);return qt(e)?e.host:e}function Gt(t){let e=q(t);return nt(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&st(e)?e:Gt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Gt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=L(o);if(s){let l=Ot(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=M(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=$(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=ft(n)!==s||ft(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function St(t){return z(t)?t:t.contextElement}function lt(t){let e=St(t);if(!$(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Zt(e),r=(s?ft(n.width):n.width)/i,l=(s?ft(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var we=B(0);function te(t){let e=L(t);return!At()||!e.visualViewport?we:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ye(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function it(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=St(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ye(s,n,i)?te(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,h=o.height/r.y;if(s){let m=L(s),u=i&&z(i)?L(i):i,d=m,p=Ot(d);for(;p&&i&&u!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=M(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,h*=w.y,a+=v,c+=A,d=L(p),p=Ot(d)}}return tt({width:f,height:h,x:a,y:c})}function zt(t,e){let n=dt(t).scrollLeft;return e?e.left+n:it(F(t)).left+n}function ee(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function xe(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),l=e?ht(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),h=$(i);if((h||!h&&!s)&&((et(i)!=="body"||st(r))&&(a=dt(i)),$(i))){let u=it(i);c=lt(i),f.x=u.x+i.clientLeft,f.y=u.y+i.clientTop}let m=r&&!h&&!s?ee(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function ve(t){return Array.from(t.getClientRects())}function be(t){let e=F(t),n=dt(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return M(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ae(t,e){let n=L(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=At();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Oe(t,e){let n=it(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=$(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Jt(t,e,n){let i;if(e==="viewport")i=Ae(t,n);else if(e==="document")i=be(F(t));else if(z(e))i=Oe(e,n);else{let o=te(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return tt(i)}function ne(t,e){let n=q(t);return n===e||!z(n)||nt(n)?!1:M(n).position==="fixed"||ne(n,e)}function Ee(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&et(l)!=="body"),o=null,s=M(t).position==="fixed",r=s?q(t):t;for(;z(r)&&!nt(r);){let l=M(r),a=bt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ne(t,r))?i=i.filter(f=>f!==r):o=l,r=q(r)}return e.set(t,i),i}function Re(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ht(e)?[]:Ee(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let h=Jt(e,f,o);return c.top=T(h.top,c.top),c.right=j(h.right,c.right),c.bottom=j(h.bottom,c.bottom),c.left=T(h.left,c.left),c},Jt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ce(t){let{width:e,height:n}=Zt(t);return{width:e,height:n}}function Te(t,e,n){let i=$(e),o=F(e),s=n==="fixed",r=it(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);function c(){a.x=zt(o)}if(i||!i&&!s)if((et(e)!=="body"||st(o))&&(l=dt(e)),i){let u=it(e,!0,s,e);a.x=u.x+e.clientLeft,a.y=u.y+e.clientTop}else o&&c();s&&!i&&o&&c();let f=o&&!i&&!s?ee(o,l):B(0),h=r.left+l.scrollLeft-a.x-f.x,m=r.top+l.scrollTop-a.y-f.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return M(t).position==="static"}function Qt(t,e){if(!$(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=L(t);if(ht(t))return n;if(!$(t)){let o=q(t);for(;o&&!nt(o);){if(z(o)&&!Pt(o))return o;o=q(o)}return n}let i=Qt(t,e);for(;i&&Ut(i)&&Pt(i);)i=Qt(i,e);return i&&nt(i)&&Pt(i)&&!bt(i)?n:i||Kt(t)||n}var Le=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,i=await n(t.floating);return{reference:Te(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Pe(t){return M(t).direction==="rtl"}var Se={convertOffsetParentRelativeRectToViewportRelativeRect:xe,getDocumentElement:F,getClippingRect:Re,getOffsetParent:ie,getElementRects:Le,getClientRects:ve,getDimensions:Ce,getScale:lt,isElement:z,isRTL:Pe};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ze(t,e){let n=null,i,o=F(t);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();let c=t.getBoundingClientRect(),{left:f,top:h,width:m,height:u}=c;if(l||e(),!m||!u)return;let d=ut(h),p=ut(o.clientWidth-(f+m)),w=ut(o.clientHeight-(h+u)),g=ut(f),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,j(1,a))||1},A=!0;function O(k){let R=k[0].intersectionRatio;if(R!==a){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!oe(c,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,V(C({},v),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(O,v)}n.observe(t)}return r(!0),s}function re(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=St(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=c&&l?ze(c,n):null,m=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(e)})),n()}),c&&!a&&u.observe(c),u.observe(e));let d,p=a?it(t):null;a&&w();function w(){let g=it(t);p&&!oe(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(d)}}var se=_t;var le=It,ce=jt,Mt=Yt;var ae=Vt;var fe=(t,e,n)=>{let i=new Map,o=C({platform:Se},n),s=V(C({},o.platform),{_c:i});return Wt(t,e,V(C({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=re(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[se({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(Mt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(ce({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(le({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(Mt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ae({element:this.arrowEl,padding:this.arrowPadding})),fe(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,h="",m="",u="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",h=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:u,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Et`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Bt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Et`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,kt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Rt('[part="popup"]')],x.prototype,"popup",2),b([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),b([E({reflect:!0})],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({type:String,reflect:!0})],x.prototype,"placement",2),b([E({type:String,reflect:!0})],x.prototype,"strategy",2),b([E({type:Number,reflect:!0})],x.prototype,"distance",2),b([E({type:Number,reflect:!0})],x.prototype,"skidding",2),b([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),b([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),b([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Dt("sd-popup")],x);export{x as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Bt}from"./chunk.26V4EXHB.js";import{a as Dt,b as E,d as Rt,h as Ct}from"./chunk.VGYK5BAY.js";import{b as kt,e as Et}from"./chunk.UWPDCU52.js";import{a as C,b as V,c as mt,e as b}from"./chunk.TJOCV4DC.js";var j=Math.min,T=Math.max,ft=Math.round,ut=Math.floor,B=t=>({x:t,y:t}),he={left:"right",right:"left",bottom:"top",top:"bottom"},de={start:"end",end:"start"};function gt(t,e,n){return T(t,j(e,n))}function Q(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function Tt(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}function Y(t){return["top","bottom"].includes(I(t))?"y":"x"}function yt(t){return Tt(Y(t))}function Ft(t,e,n){n===void 0&&(n=!1);let i=Z(t),o=yt(t),s=wt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=at(r)),[r,at(r)]}function $t(t){let e=at(t);return[pt(t),e,pt(e)]}function pt(t){return t.replace(/start|end/g,e=>de[e])}function me(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function Nt(t,e,n,i){let o=Z(t),s=me(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(pt)))),s}function at(t){return t.replace(/left|right|bottom|top/g,e=>he[e])}function pe(t){return C({top:0,right:0,bottom:0,left:0},t)}function Lt(t){return typeof t!="number"?pe(t):{top:t,right:t,bottom:t,left:t}}function tt(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Ht(t,e,n){let{reference:i,floating:o}=t,s=Y(e),r=yt(e),l=wt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,u;switch(a){case"top":u={x:f,y:i.y-o.height};break;case"bottom":u={x:f,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-o.width,y:h};break;default:u={x:i.x,y:i.y}}switch(Z(e)){case"start":u[r]-=m*(n&&c?-1:1);break;case"end":u[r]+=m*(n&&c?-1:1);break}return u}var Wt=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:h}=Ht(c,i,a),m=i,u={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:v,data:A,reset:O}=await g({x:f,y:h,initialPlacement:i,placement:m,strategy:o,middlewareData:u,rects:c,platform:r,elements:{reference:t,floating:e}});f=y!=null?y:f,h=v!=null?v:h,u=V(C({},u),{[w]:C(C({},u[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:h}=Ht(c,m,a)),p=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:u}};async function xt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Q(e,t),d=Lt(u),w=l[m?h==="floating"?"reference":"floating":h],g=tt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y=h==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=tt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Vt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=Q(t,e)||{};if(c==null)return{};let h=Lt(f),m={x:n,y:i},u=yt(o),d=wt(u),p=await r.getDimensions(c),w=u==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[u]-m[u]-s.floating[d],O=m[u]-s.reference[u],k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),R=k?k[v]:0;(!R||!await(r.isElement==null?void 0:r.isElement(k)))&&(R=l.floating[v]||s.floating[d]);let _=A/2-O/2,N=R/2-p[d]/2-1,S=j(h[g],N),X=j(h[y],N),H=S,U=R-p[d]-X,P=R/2-p[d]/2+_,ot=gt(H,P,U),D=!a.arrow&&Z(o)!=null&&P!==ot&&s.reference[d]/2-(P<H?S:X)-p[d]/2<0,J=D?P<H?P-H:P-U:0;return{[u]:m[u]+J,data:C({[u]:ot,centerOffset:P-ot-J},D&&{alignmentOffset:J}),reset:D}}});var jt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,ot=Q(t,e),{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=ot,w=mt(ot,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=Y(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[at(l)]:$t(l)),k=d!=="none";!m&&k&&O.push(...Nt(l,p,d,A));let R=[l,...O],_=await xt(e,w),N=[],S=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(_[g]),h){let D=Ft(o,r,A);N.push(_[D[0]],_[D[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,J=R[D];if(J){var U;let K=h==="alignment"?y!==Y(J):!1,W=((U=S[0])==null?void 0:U.overflows[0])>0;if(!K||W)return{data:{index:D,overflows:S},reset:{placement:J}}}let ct=(H=S.filter(K=>K.overflows[0]<=0).sort((K,W)=>K.overflows[1]-W.overflows[1])[0])==null?void 0:H.placement;if(!ct)switch(u){case"bestFit":{var P;let K=(P=S.filter(W=>{if(k){let G=Y(W.placement);return G===y||G==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(G=>G>0).reduce((G,ue)=>G+ue,0)]).sort((W,G)=>W[1]-G[1])[0])==null?void 0:P[0];K&&(ct=K);break}case"initialPlacement":ct=l;break}if(o!==ct)return{reset:{placement:ct}}}return{}}}};async function ge(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Z(n),a=Y(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,h=Q(e,t),{mainAxis:m,crossAxis:u,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof d=="number"&&(u=l==="end"?d*-1:d),a?{x:u*f,y:m*c}:{x:m*c,y:u*f}}var _t=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await ge(e,t);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:V(C({},a),{placement:r})}}}},It=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=Q(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}}}=w,a=mt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await xt(e,a),h=Y(I(o)),m=Tt(h),u=c[m],d=c[h];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=u+f[g],A=u-f[y];u=gt(v,u,A)}if(r){let g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=gt(v,d,A)}let p=l.fn(V(C({},e),{[m]:u,[h]:d}));return V(C({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[h]:r}}})}}};var Yt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,S=Q(t,e),{apply:a=()=>{}}=S,c=mt(S,["apply"]),f=await xt(e,c),h=I(o),m=Z(o),u=Y(o)==="y",{width:d,height:p}=s.floating,w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");let y=p-f.top-f.bottom,v=d-f.left-f.right,A=j(p-f[w],y),O=j(d-f[g],v),k=!e.middlewareData.shift,R=A,_=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(R=y),k&&!m){let X=T(f.left,0),H=T(f.right,0),U=T(f.top,0),P=T(f.bottom,0);u?_=d-2*(X!==0||H!==0?X+H:T(f.left,f.right)):R=p-2*(U!==0||P!==0?U+P:T(f.top,f.bottom))}await a(V(C({},e),{availableWidth:_,availableHeight:R}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function vt(){return typeof window!="undefined"}function et(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function F(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return vt()?t instanceof Node||t instanceof L(t).Node:!1}function z(t){return vt()?t instanceof Element||t instanceof L(t).Element:!1}function $(t){return vt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function qt(t){return!vt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function Ut(t){return["table","td","th"].includes(et(t))}function ht(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function bt(t){let e=At(),n=z(t)?M(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(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 Kt(t){let e=q(t);for(;$(e)&&!nt(e);){if(bt(e))return e;if(ht(e))return null;e=q(e)}return null}function At(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(et(t))}function M(t){return L(t).getComputedStyle(t)}function dt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(et(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||F(t);return qt(e)?e.host:e}function Gt(t){let e=q(t);return nt(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&st(e)?e:Gt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Gt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=L(o);if(s){let l=Ot(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=M(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=$(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=ft(n)!==s||ft(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function St(t){return z(t)?t:t.contextElement}function lt(t){let e=St(t);if(!$(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Zt(e),r=(s?ft(n.width):n.width)/i,l=(s?ft(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var we=B(0);function te(t){let e=L(t);return!At()||!e.visualViewport?we:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ye(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function it(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=St(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ye(s,n,i)?te(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,h=o.height/r.y;if(s){let m=L(s),u=i&&z(i)?L(i):i,d=m,p=Ot(d);for(;p&&i&&u!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=M(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,h*=w.y,a+=v,c+=A,d=L(p),p=Ot(d)}}return tt({width:f,height:h,x:a,y:c})}function zt(t,e){let n=dt(t).scrollLeft;return e?e.left+n:it(F(t)).left+n}function ee(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function xe(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=F(i),l=e?ht(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),h=$(i);if((h||!h&&!s)&&((et(i)!=="body"||st(r))&&(a=dt(i)),$(i))){let u=it(i);c=lt(i),f.x=u.x+i.clientLeft,f.y=u.y+i.clientTop}let m=r&&!h&&!s?ee(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function ve(t){return Array.from(t.getClientRects())}function be(t){let e=F(t),n=dt(t),i=t.ownerDocument.body,o=T(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=T(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return M(i).direction==="rtl"&&(r+=T(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ae(t,e){let n=L(t),i=F(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=At();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Oe(t,e){let n=it(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=$(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Jt(t,e,n){let i;if(e==="viewport")i=Ae(t,n);else if(e==="document")i=be(F(t));else if(z(e))i=Oe(e,n);else{let o=te(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return tt(i)}function ne(t,e){let n=q(t);return n===e||!z(n)||nt(n)?!1:M(n).position==="fixed"||ne(n,e)}function Ee(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&et(l)!=="body"),o=null,s=M(t).position==="fixed",r=s?q(t):t;for(;z(r)&&!nt(r);){let l=M(r),a=bt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ne(t,r))?i=i.filter(f=>f!==r):o=l,r=q(r)}return e.set(t,i),i}function Re(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ht(e)?[]:Ee(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let h=Jt(e,f,o);return c.top=T(h.top,c.top),c.right=j(h.right,c.right),c.bottom=j(h.bottom,c.bottom),c.left=T(h.left,c.left),c},Jt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ce(t){let{width:e,height:n}=Zt(t);return{width:e,height:n}}function Te(t,e,n){let i=$(e),o=F(e),s=n==="fixed",r=it(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);function c(){a.x=zt(o)}if(i||!i&&!s)if((et(e)!=="body"||st(o))&&(l=dt(e)),i){let u=it(e,!0,s,e);a.x=u.x+e.clientLeft,a.y=u.y+e.clientTop}else o&&c();s&&!i&&o&&c();let f=o&&!i&&!s?ee(o,l):B(0),h=r.left+l.scrollLeft-a.x-f.x,m=r.top+l.scrollTop-a.y-f.y;return{x:h,y:m,width:r.width,height:r.height}}function Pt(t){return M(t).position==="static"}function Qt(t,e){if(!$(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return F(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=L(t);if(ht(t))return n;if(!$(t)){let o=q(t);for(;o&&!nt(o);){if(z(o)&&!Pt(o))return o;o=q(o)}return n}let i=Qt(t,e);for(;i&&Ut(i)&&Pt(i);)i=Qt(i,e);return i&&nt(i)&&Pt(i)&&!bt(i)?n:i||Kt(t)||n}var Le=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,i=await n(t.floating);return{reference:Te(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Pe(t){return M(t).direction==="rtl"}var Se={convertOffsetParentRelativeRectToViewportRelativeRect:xe,getDocumentElement:F,getClippingRect:Re,getOffsetParent:ie,getElementRects:Le,getClientRects:ve,getDimensions:Ce,getScale:lt,isElement:z,isRTL:Pe};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ze(t,e){let n=null,i,o=F(t);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();let c=t.getBoundingClientRect(),{left:f,top:h,width:m,height:u}=c;if(l||e(),!m||!u)return;let d=ut(h),p=ut(o.clientWidth-(f+m)),w=ut(o.clientHeight-(h+u)),g=ut(f),v={rootMargin:-d+"px "+-p+"px "+-w+"px "+-g+"px",threshold:T(0,j(1,a))||1},A=!0;function O(k){let R=k[0].intersectionRatio;if(R!==a){if(!A)return r();R?r(!1,R):i=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!oe(c,t.getBoundingClientRect())&&r(),A=!1}try{n=new IntersectionObserver(O,V(C({},v),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(O,v)}n.observe(t)}return r(!0),s}function re(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=St(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let h=c&&l?ze(c,n):null,m=-1,u=null;r&&(u=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(e)})),n()}),c&&!a&&u.observe(c),u.observe(e));let d,p=a?it(t):null;a&&w();function w(){let g=it(t);p&&!oe(p,g)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),h==null||h(),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(d)}}var se=_t;var le=It,ce=jt,Mt=Yt;var ae=Vt;var fe=(t,e,n)=>{let i=new Map,o=C({platform:Se},n),s=V(C({},o.platform),{_c:i});return Wt(t,e,V(C({},o),{platform:s}))};var x=class extends Ct{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=re(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[se({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(Mt({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(ce({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(le({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(Mt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(ae({element:this.arrowEl,padding:this.arrowPadding})),fe(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,h="",m="",u="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",h=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:h,right:m,bottom:u,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Et`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Bt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Et`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Ct.styles,kt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Rt('[part="popup"]')],x.prototype,"popup",2),b([Rt('[part="arrow"]')],x.prototype,"arrowEl",2),b([E({reflect:!0})],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({type:String,reflect:!0})],x.prototype,"placement",2),b([E({type:String,reflect:!0})],x.prototype,"strategy",2),b([E({type:Number,reflect:!0})],x.prototype,"distance",2),b([E({type:Number,reflect:!0})],x.prototype,"skidding",2),b([E({type:Boolean,reflect:!0})],x.prototype,"arrow",2),b([E({type:String,attribute:"arrow-placement",reflect:!0})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number,reflect:!0})],x.prototype,"arrowPadding",2),b([E({type:Boolean,reflect:!0})],x.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({type:String,attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({type:String,attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Dt("sd-5-8-0-popup")],x);export{x as a};
|