@m3e/web 2.1.1 → 2.1.2
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/dist/all.js +605 -1296
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +54 -114
- package/dist/all.min.js.map +1 -1
- package/dist/app-bar.js +2 -34
- package/dist/app-bar.js.map +1 -1
- package/dist/app-bar.min.js +1 -1
- package/dist/app-bar.min.js.map +1 -1
- package/dist/autocomplete.js +17 -40
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/avatar.js +1 -28
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.min.js +1 -1
- package/dist/avatar.min.js.map +1 -1
- package/dist/badge.js +1 -39
- package/dist/badge.js.map +1 -1
- package/dist/badge.min.js +1 -1
- package/dist/badge.min.js.map +1 -1
- package/dist/bottom-sheet.js +22 -58
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/button-group.js +2 -34
- package/dist/button-group.js.map +1 -1
- package/dist/button-group.min.js +1 -1
- package/dist/button-group.min.js.map +1 -1
- package/dist/button.js +2 -34
- package/dist/button.js.map +1 -1
- package/dist/button.min.js +1 -1
- package/dist/button.min.js.map +1 -1
- package/dist/card.js +4 -34
- package/dist/card.js.map +1 -1
- package/dist/card.min.js +1 -1
- package/dist/card.min.js.map +1 -1
- package/dist/checkbox.js +2 -34
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.min.js +1 -1
- package/dist/checkbox.min.js.map +1 -1
- package/dist/chips.js +2 -40
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core-a11y.js +1 -39
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +4 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +164 -177
- package/dist/core-anchoring.js.map +1 -1
- package/dist/core-anchoring.min.js +1 -1
- package/dist/core-anchoring.min.js.map +1 -1
- package/dist/core-bidi.js +1 -31
- package/dist/core-bidi.js.map +1 -1
- package/dist/core-bidi.min.js +2 -3
- package/dist/core-bidi.min.js.map +1 -1
- package/dist/core.js +53 -40
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +517 -512
- package/dist/custom-elements.json +5201 -4336
- package/dist/dialog.js +3 -41
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.min.js +1 -1
- package/dist/dialog.min.js.map +1 -1
- package/dist/divider.js +1 -28
- package/dist/divider.js.map +1 -1
- package/dist/divider.min.js +1 -1
- package/dist/divider.min.js.map +1 -1
- package/dist/drawer-container.js +18 -48
- package/dist/drawer-container.js.map +1 -1
- package/dist/drawer-container.min.js +1 -1
- package/dist/drawer-container.min.js.map +1 -1
- package/dist/expansion-panel.js +8 -41
- package/dist/expansion-panel.js.map +1 -1
- package/dist/expansion-panel.min.js +1 -1
- package/dist/expansion-panel.min.js.map +1 -1
- package/dist/fab-menu.js +3 -47
- package/dist/fab-menu.js.map +1 -1
- package/dist/fab-menu.min.js +1 -1
- package/dist/fab-menu.min.js.map +1 -1
- package/dist/fab.js +1 -33
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +1 -1
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +19 -49
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +3 -4
- package/dist/form-field.min.js.map +1 -1
- package/dist/heading.js +1 -28
- package/dist/heading.js.map +1 -1
- package/dist/heading.min.js +1 -1
- package/dist/heading.min.js.map +1 -1
- package/dist/html-custom-data.json +192 -171
- package/dist/icon-button.js +2 -34
- package/dist/icon-button.js.map +1 -1
- package/dist/icon-button.min.js +1 -1
- package/dist/icon-button.min.js.map +1 -1
- package/dist/icon.js +1 -28
- package/dist/icon.js.map +1 -1
- package/dist/icon.min.js +1 -1
- package/dist/icon.min.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +7 -0
- package/dist/index.min.js.map +1 -0
- package/dist/list.js +17 -46
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +1 -1
- package/dist/list.min.js.map +1 -1
- package/dist/loading-indicator.js +8 -31
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +1 -1
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +3 -47
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +3 -41
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +1 -1
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-menu.js +2 -40
- package/dist/nav-menu.js.map +1 -1
- package/dist/nav-menu.min.js +1 -1
- package/dist/nav-menu.min.js.map +1 -1
- package/dist/nav-rail.js +1 -33
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +1 -1
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +3 -59
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/paginator.js +2 -34
- package/dist/paginator.js.map +1 -1
- package/dist/paginator.min.js +2 -3
- package/dist/paginator.min.js.map +1 -1
- package/dist/progress-indicator.js +41 -63
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +32 -32
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/radio-group.js +1 -39
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.min.js +1 -1
- package/dist/radio-group.min.js.map +1 -1
- package/dist/segmented-button.js +2 -40
- package/dist/segmented-button.js.map +1 -1
- package/dist/segmented-button.min.js +1 -1
- package/dist/segmented-button.min.js.map +1 -1
- package/dist/select.js +16 -40
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/shape.js +1 -28
- package/dist/shape.js.map +1 -1
- package/dist/shape.min.js +1 -1
- package/dist/shape.min.js.map +1 -1
- package/dist/slide-group.js +9 -42
- package/dist/slide-group.js.map +1 -1
- package/dist/slide-group.min.js +1 -1
- package/dist/slide-group.min.js.map +1 -1
- package/dist/slider.js +1 -39
- package/dist/slider.js.map +1 -1
- package/dist/slider.min.js +1 -1
- package/dist/slider.min.js.map +1 -1
- package/dist/snackbar.js +2 -40
- package/dist/snackbar.js.map +1 -1
- package/dist/snackbar.min.js +1 -1
- package/dist/snackbar.min.js.map +1 -1
- package/dist/split-button.js +1 -39
- package/dist/split-button.js.map +1 -1
- package/dist/split-button.min.js +1 -1
- package/dist/split-button.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +6 -0
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts +3 -3
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
- package/dist/src/card/CardElement.d.ts +1 -0
- package/dist/src/card/CardElement.d.ts.map +1 -1
- package/dist/src/card/styles/CardVariantToken.d.ts +1 -1
- package/dist/src/card/styles/CardVariantToken.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +6 -3
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelScrollStrategy.d.ts +3 -0
- package/dist/src/core/anchoring/FloatingPanelScrollStrategy.d.ts.map +1 -0
- package/dist/src/core/anchoring/index.d.ts +1 -0
- package/dist/src/core/anchoring/index.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/ReconnectedCallback.d.ts +15 -0
- package/dist/src/core/shared/mixins/ReconnectedCallback.d.ts.map +1 -0
- package/dist/src/core/shared/mixins/SuppressInitialAnimation.d.ts +11 -0
- package/dist/src/core/shared/mixins/SuppressInitialAnimation.d.ts.map +1 -0
- package/dist/src/core/shared/mixins/index.d.ts +2 -0
- package/dist/src/core/shared/mixins/index.d.ts.map +1 -1
- package/dist/src/drawer-container/DrawerContainerElement.d.ts +4 -2
- package/dist/src/drawer-container/DrawerContainerElement.d.ts.map +1 -1
- package/dist/src/expansion-panel/ExpansionPanelElement.d.ts +3 -1
- package/dist/src/expansion-panel/ExpansionPanelElement.d.ts.map +1 -1
- package/dist/src/fab-menu/FabMenuElement.d.ts +1 -3
- package/dist/src/fab-menu/FabMenuElement.d.ts.map +1 -1
- package/dist/src/form-field/FormFieldElement.d.ts +4 -2
- package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
- package/dist/src/list/ActionListElement.d.ts.map +1 -1
- package/dist/src/list/ListItemElement.d.ts +3 -1
- package/dist/src/list/ListItemElement.d.ts.map +1 -1
- package/dist/src/loading-indicator/LoadingIndicatorElement.d.ts +3 -1
- package/dist/src/loading-indicator/LoadingIndicatorElement.d.ts.map +1 -1
- package/dist/src/menu/MenuElement.d.ts +1 -3
- package/dist/src/menu/MenuElement.d.ts.map +1 -1
- package/dist/src/nav-bar/NavBarElement.d.ts +1 -1
- package/dist/src/nav-bar/NavBarElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts +0 -4
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/CircularProgressIndicatorElement.d.ts +2 -0
- package/dist/src/progress-indicator/CircularProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/LinearProgressIndicatorElement.d.ts +2 -0
- package/dist/src/progress-indicator/LinearProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/ProgressElementIndicatorBase.d.ts +1 -1
- package/dist/src/progress-indicator/ProgressElementIndicatorBase.d.ts.map +1 -1
- package/dist/src/select/SelectElement.d.ts +6 -0
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/slide-group/SlideGroupElement.d.ts +5 -1
- package/dist/src/slide-group/SlideGroupElement.d.ts.map +1 -1
- package/dist/src/stepper/StepperElement.d.ts +1 -1
- package/dist/src/stepper/StepperElement.d.ts.map +1 -1
- package/dist/src/toc/TocElement.d.ts +1 -1
- package/dist/src/toc/TocElement.d.ts.map +1 -1
- package/dist/src/tooltip/TooltipElementBase.d.ts +3 -1
- package/dist/src/tooltip/TooltipElementBase.d.ts.map +1 -1
- package/dist/stepper.js +3 -41
- package/dist/stepper.js.map +1 -1
- package/dist/stepper.min.js +1 -1
- package/dist/stepper.min.js.map +1 -1
- package/dist/switch.js +1 -33
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js +1 -1
- package/dist/switch.min.js.map +1 -1
- package/dist/tabs.js +1 -39
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.min.js +1 -1
- package/dist/tabs.min.js.map +1 -1
- package/dist/textarea-autosize.js +1 -39
- package/dist/textarea-autosize.js.map +1 -1
- package/dist/textarea-autosize.min.js +2 -3
- package/dist/textarea-autosize.min.js.map +1 -1
- package/dist/theme.js +1 -39
- package/dist/theme.js.map +1 -1
- package/dist/theme.min.js +19 -19
- package/dist/theme.min.js.map +1 -1
- package/dist/toc.js +4 -42
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/dist/toolbar.js +1 -39
- package/dist/toolbar.js.map +1 -1
- package/dist/toolbar.min.js +1 -1
- package/dist/toolbar.min.js.map +1 -1
- package/dist/tooltip.js +15 -46
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +3 -2
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2025 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
-
import{LitElement as t,html as e,unsafeCSS as n,css as o}from"lit";import{AttachInternals as i,addCustomState as r,deleteCustomState as l,DesignToken as s,customElement as a,setCustomState as c}from"@m3e/web/core";import{M3eDirectionality as f}from"@m3e/web/core/bidi";function u(t,e,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(t):o?o.value:e.get(t)}function h(t,e,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(t,n):i?i.value=n:e.set(t,n),n}"function"==typeof SuppressedError&&SuppressedError;const d=Math.min,p=Math.max,m=Math.round,g=Math.floor,y=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function x(t,e,n){return p(t,d(e,n))}function b(t,e){return"function"==typeof t?t(e):t}function R(t){return t.split("-")[0]}function E(t){return t.split("-")[1]}function T(t){return"x"===t?"y":"x"}function k(t){return"y"===t?"height":"width"}const L=new Set(["top","bottom"]);function S(t){return L.has(R(t))?"y":"x"}function C(t){return T(S(t))}function A(t){return t.replace(/start|end/g,t=>v[t])}const P=["left","right"],O=["right","left"],D=["top","bottom"],W=["bottom","top"];function F(t,e,n,o){const i=E(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?O:P:e?P:O;case"left":case"right":return e?D:W;default:return[]}}(R(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(A)))),r}function M(t){return t.replace(/left|right|bottom|top/g,t=>w[t])}function $(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function B(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function N(t,e,n){let{reference:o,floating:i}=t;const r=S(e),l=C(e),s=k(l),a=R(e),c="y"===r,f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(E(e)){case"start":d[l]-=h*(n&&c?-1:1);break;case"end":d[l]+=h*(n&&c?-1:1)}return d}async function H(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=b(e,t),p=$(d),m=s[h?"floating"===u?"reference":"floating":u],g=B(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),y="floating"===u?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),v=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},x=B(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:a}):y);return{top:(g.top-x.top+p.top)/v.y,bottom:(x.bottom-g.bottom+p.bottom)/v.y,left:(g.left-x.left+p.left)/v.x,right:(x.right-g.right+p.right)/v.x}}function V(t){const e=d(...t.map(t=>t.left)),n=d(...t.map(t=>t.top));return{x:e,y:n,width:p(...t.map(t=>t.right))-e,height:p(...t.map(t=>t.bottom))-n}}const j=new Set(["left","top"]);function z(){return"undefined"!=typeof window}function Y(t){return U(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function I(t){var e;return null==(e=(U(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function U(t){return!!z()&&(t instanceof Node||t instanceof q(t).Node)}function X(t){return!!z()&&(t instanceof Element||t instanceof q(t).Element)}function _(t){return!!z()&&(t instanceof HTMLElement||t instanceof q(t).HTMLElement)}function G(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof q(t).ShadowRoot)}const J=new Set(["inline","contents"]);function K(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=ct(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!J.has(i)}const Q=new Set(["table","td","th"]);function Z(t){return Q.has(Y(t))}const tt=[":popover-open",":modal"];function et(t){return tt.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const nt=["transform","translate","scale","rotate","perspective"],ot=["transform","translate","scale","rotate","perspective","filter"],it=["paint","layout","strict","content"];function rt(t){const e=lt(),n=X(t)?ct(t):t;return nt.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||ot.some(t=>(n.willChange||"").includes(t))||it.some(t=>(n.contain||"").includes(t))}function lt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const st=new Set(["html","body","#document"]);function at(t){return st.has(Y(t))}function ct(t){return q(t).getComputedStyle(t)}function ft(t){return X(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ut(t){if("html"===Y(t))return t;const e=t.assignedSlot||t.parentNode||G(t)&&t.host||I(t);return G(e)?e.host:e}function ht(t){const e=ut(t);return at(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&K(e)?e:ht(e)}function dt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=ht(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=q(i);if(r){const t=pt(l);return e.concat(l,l.visualViewport||[],K(i)?i:[],t&&n?dt(t):[])}return e.concat(i,dt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function mt(t){const e=ct(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=_(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,s=m(n)!==r||m(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function gt(t){return X(t)?t:t.contextElement}function yt(t){const e=gt(t);if(!_(e))return y(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=mt(e);let l=(r?m(n.width):n.width)/o,s=(r?m(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const wt=y(0);function vt(t){const e=q(t);return lt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:wt}function xt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=gt(t);let l=y(1);e&&(o?X(o)&&(l=yt(o)):l=yt(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==q(t))&&e}(r,n,o)?vt(r):y(0);let a=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,f=i.width/l.x,u=i.height/l.y;if(r){const t=q(r),e=o&&X(o)?q(o):o;let n=t,i=pt(n);for(;i&&o&&e!==n;){const t=yt(i),e=i.getBoundingClientRect(),o=ct(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,c*=t.y,f*=t.x,u*=t.y,a+=r,c+=l,n=q(i),i=pt(n)}}return B({width:f,height:u,x:a,y:c})}function bt(t,e){const n=ft(t).scrollLeft;return e?e.left+n:xt(I(t)).left+n}function Rt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-bt(t,n),y:n.top+e.scrollTop}}const Et=new Set(["absolute","fixed"]);function Tt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=q(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,a=0;if(i){r=i.width,l=i.height;const t=lt();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,a=i.offsetTop)}const c=bt(o);if(c<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-e.clientWidth-i);l<=25&&(r-=l)}else c<=25&&(r+=c);return{width:r,height:l,x:s,y:a}}(t,n);else if("document"===e)o=function(t){const e=I(t),n=ft(t),o=t.ownerDocument.body,i=p(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=p(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+bt(t);const s=-n.scrollTop;return"rtl"===ct(o).direction&&(l+=p(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}(I(t));else if(X(e))o=function(t,e){const n=xt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=_(t)?yt(t):y(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=vt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return B(o)}function kt(t,e){const n=ut(t);return!(n===e||!X(n)||at(n))&&("fixed"===ct(n).position||kt(n,e))}function Lt(t,e,n){const o=_(e),i=I(e),r="fixed"===n,l=xt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const a=y(0);function c(){a.x=bt(i)}if(o||!o&&!r)if(("body"!==Y(e)||K(i))&&(s=ft(e)),o){const t=xt(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&c();r&&!o&&i&&c();const f=!i||o||r?y(0):Rt(i,s);return{x:l.left+s.scrollLeft-a.x-f.x,y:l.top+s.scrollTop-a.y-f.y,width:l.width,height:l.height}}function St(t){return"static"===ct(t).position}function Ct(t,e){if(!_(t)||"fixed"===ct(t).position)return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function At(t,e){const n=q(t);if(et(t))return n;if(!_(t)){let e=ut(t);for(;e&&!at(e);){if(X(e)&&!St(e))return e;e=ut(e)}return n}let o=Ct(t,e);for(;o&&Z(o)&&St(o);)o=Ct(o,e);return o&&at(o)&&St(o)&&!rt(o)?n:o||function(t){let e=ut(t);for(;_(e)&&!at(e);){if(rt(e))return e;if(et(e))return null;e=ut(e)}return null}(t)||n}const Pt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=I(o),s=!!e&&et(e.floating);if(o===l||s&&r)return n;let a={scrollLeft:0,scrollTop:0},c=y(1);const f=y(0),u=_(o);if((u||!u&&!r)&&(("body"!==Y(o)||K(l))&&(a=ft(o)),_(o))){const t=xt(o);c=yt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const h=!l||u||r?y(0):Rt(l,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+h.x,y:n.y*c.y-a.scrollTop*c.y+f.y+h.y}},getDocumentElement:I,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?et(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=dt(t,[],!1).filter(t=>X(t)&&"body"!==Y(t)),i=null;const r="fixed"===ct(t).position;let l=r?ut(t):t;for(;X(l)&&!at(l);){const e=ct(l),n=rt(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&Et.has(i.position)||K(l)&&!n&&kt(t,l))?o=o.filter(t=>t!==l):i=e,l=ut(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=r[0],s=r.reduce((t,n)=>{const o=Tt(e,n,i);return t.top=p(o.top,t.top),t.right=d(o.right,t.right),t.bottom=d(o.bottom,t.bottom),t.left=p(o.left,t.left),t},Tt(e,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:At,getElementRects:async function(t){const e=this.getOffsetParent||At,n=this.getDimensions,o=await n(t.floating);return{reference:Lt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=mt(t);return{width:e,height:n}},getScale:yt,isElement:X,isRTL:function(t){return"rtl"===ct(t).direction}};function Ot(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Dt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=gt(t),f=i||r?[...c?dt(c):[],...dt(e)]:[];f.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const u=c&&s?function(t,e){let n,o=null;const i=I(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),r();const c=t.getBoundingClientRect(),{left:f,top:u,width:h,height:m}=c;if(s||e(),!h||!m)return;const y={rootMargin:-g(u)+"px "+-g(i.clientWidth-(f+h))+"px "+-g(i.clientHeight-(u+m))+"px "+-g(f)+"px",threshold:p(0,d(1,a))||1};let w=!0;function v(e){const o=e[0].intersectionRatio;if(o!==a){if(!w)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||Ot(c,t.getBoundingClientRect())||l(),w=!1}try{o=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(v,y)}o.observe(t)}(!0),r}(c,n):null;let h,m=-1,y=null;l&&(y=new ResizeObserver(t=>{let[o]=t;o&&o.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),c&&!a&&y.observe(c),y.observe(e));let w=a?xt(t):null;return a&&function e(){const o=xt(t);w&&!Ot(w,o)&&n();w=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==u||u(),null==(t=y)||t.disconnect(),y=null,a&&cancelAnimationFrame(h)}}const Wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=e,a=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=R(n),s=E(n),a="y"===S(n),c=j.has(l)?-1:1,f=r&&a?-1:1,u=b(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof p&&(d="end"===s?-1*p:p),a?{x:d*f,y:h*c}:{x:h*c,y:d*f}}(e,t);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:l}}}}},Ft=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=b(t,e),c={x:n,y:o},f=await H(e,a),u=S(R(i)),h=T(u);let d=c[h],p=c[u];if(r){const t="y"===h?"bottom":"right";d=x(d+f["y"===h?"top":"left"],d,d-f[t])}if(l){const t="y"===u?"bottom":"right";p=x(p+f["y"===u?"top":"left"],p,p-f[t])}const m=s.fn({...e,[h]:d,[u]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[u]:l}}}}}},Mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=b(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const y=R(i),w=S(s),v=R(s)===s,x=await(null==a.isRTL?void 0:a.isRTL(c.floating)),T=h||(v||!m?[M(s)]:function(t){const e=M(t);return[A(t),e,A(e)]}(s)),L="none"!==p;!h&&L&&T.push(...F(s,m,p,x));const P=[s,...T],O=await H(e,g),D=[];let W=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&D.push(O[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const o=E(t),i=C(t),r=k(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=M(l)),[l,M(l)]}(i,l,x);D.push(O[t[0]],O[t[1]])}if(W=[...W,{placement:i,overflows:D}],!D.every(t=>t<=0)){var $,B;const t=((null==($=r.flip)?void 0:$.index)||0)+1,e=P[t];if(e){if(!("alignment"===u&&w!==S(e))||W.every(t=>S(t.placement)!==w||t.overflows[0]>0))return{data:{index:t,overflows:W},reset:{placement:e}}}let n=null==(B=W.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:B.placement;if(!n)switch(d){case"bestFit":{var N;const t=null==(N=W.filter(t=>{if(L){const e=S(t.placement);return e===w||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:N[0];t&&(n=t);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},$t=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:l}=e,{padding:s=2,x:a,y:c}=b(t,e),f=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(o.reference))||[]),u=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let o=null;for(let t=0;t<e.length;t++){const i=e[t];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map(t=>B(V(t)))}(f),h=B(V(f)),m=$(s);const g=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=a&&null!=c)return u.find(t=>a>t.left-m.left&&a<t.right+m.right&&c>t.top-m.top&&c<t.bottom+m.bottom)||h;if(u.length>=2){if("y"===S(n)){const t=u[0],e=u[u.length-1],o="top"===R(n),i=t.top,r=e.bottom,l=o?t.left:e.left,s=o?t.right:e.right;return{top:i,bottom:r,left:l,right:s,width:s-l,height:r-i,x:l,y:i}}const t="left"===R(n),e=p(...u.map(t=>t.right)),o=d(...u.map(t=>t.left)),i=u.filter(n=>t?n.left===o:n.right===e),r=i[0].top,l=i[i.length-1].bottom;return{top:r,bottom:l,left:o,right:e,width:e-o,height:l-r,x:o,y:r}}return h}},floating:o.floating,strategy:l});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},Bt=(t,e,n)=>{const o=new Map,i={platform:Pt,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=N(c,o,a),h=o,d={},p=0;for(let n=0;n<s.length;n++){const{name:r,fn:m}=s[n],{x:g,y:y,data:w,reset:v}=await m({x:f,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,d={...d,[r]:{...d[r],...w}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(h=v.placement),v.rects&&(c=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:f,y:u}=N(c,h,a))),n=-1)}return{x:f,y:u,placement:h,strategy:i,middlewareData:d}})(t,e,{...i,platform:r})};function Nt(t){return function(t){for(let e=t;e;e=Ht(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Ht(t);e;e=Ht(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||rt(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Ht(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}async function Vt(t,e,n,o){async function i(){const i=new Array;n?.inline&&i.push($t()),n.flip&&i.push(!0===n.flip?Mt():Mt({fallbackPlacements:n.flip})),n.shift&&i.push(Ft()),n.offset&&!isNaN(n.offset)&&i.push(Wt(n.offset));const r=await Bt(e,t,{placement:n.position,middleware:i,platform:{...Pt,getOffsetParent:t=>Pt.getOffsetParent(t,Nt)}});o(r.x,r.y,r.placement)}return await i(),Dt(e,t,async()=>await i())}var jt,zt,Yt,qt,It,Ut,Xt;let _t=class extends(i(t)){constructor(){super(...arguments),jt.add(this),zt.set(this,void 0),Yt.set(this,void 0),qt.set(this,void 0),It.set(this,t=>u(this,jt,"m",Xt).call(this,t)),Ut.set(this,t=>{"closed"===t.newState&&(u(this,qt,"f")?.call(this),h(this,qt,void 0,"f"),h(this,Yt,void 0,"f"))})}get isOpen(){return void 0!==u(this,zt,"f")}get trigger(){return u(this,zt,"f")??null}connectedCallback(){super.connectedCallback(),r(this,"-no-animate"),this.setAttribute("popover","manual"),this.addEventListener("toggle",u(this,Ut,"f")),document.addEventListener("click",u(this,It,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("toggle",u(this,Ut,"f")),document.removeEventListener("click",u(this,It,"f"))}async show(t,e){u(this,zt,"f")&&u(this,zt,"f")!==t&&this.hide(),h(this,qt,await Vt(this,e??t,{position:"bottom-start",inline:!0,flip:!0},(t,e,n)=>{c(this,"-top",n.includes("top")),c(this,"-bottom",n.includes("bottom")),"rtl"===f.current?(this.style.right=window.innerWidth-t-this.clientWidth+"px",this.style.left=""):(this.style.left=`${t}px`,this.style.right=""),this.style.top=`${e}px`}),"f"),this.showPopover(),h(this,zt,t,"f"),u(this,zt,"f").ariaExpanded="true",h(this,Yt,e,"f")}hide(t=!1){this.hidePopover(),u(this,zt,"f")&&(u(this,zt,"f").ariaExpanded="false",t&&u(this,zt,"f").focus(),h(this,zt,void 0,"f"))}async toggle(t,e){u(this,zt,"f")?this.hide():await this.show(t,e)}firstUpdated(t){super.firstUpdated(t),requestAnimationFrame(()=>l(this,"-no-animate"))}render(){return e`<div class="base"><slot></slot></div>`}};zt=new WeakMap,Yt=new WeakMap,qt=new WeakMap,It=new WeakMap,Ut=new WeakMap,jt=new WeakSet,Xt=function(t){this.isOpen&&!t.composedPath().some(t=>t===this||t===u(this,zt,"f")||t===u(this,Yt,"f"))&&this.hide()},_t.styles=o`:host { position: absolute; flex-direction: column; padding: unset; margin: unset; border: unset; overflow-y: auto; scrollbar-width: ${s.scrollbar.thinWidth}; scrollbar-color: ${s.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-floating-panel-container-padding-block, 0.25rem) ); border-radius: var(--m3e-floating-panel-container-shape, ${s.shape.corner.large}); min-width: var(--m3e-floating-panel-container-min-width, 7rem); max-width: var(--m3e-floating-panel-container-max-width, 17.5rem); max-height: var(--m3e-floating-panel-container-max-height, 17.5rem); background-color: var(--m3e-floating-panel-container-color, ${s.color.surfaceContainer}); box-shadow: var(--m3e-floating-panel-container-elevation, ${s.elevation.level3}); opacity: 0; display: none; } .base { box-sizing: border-box; display: flex; flex-direction: column; padding-block: var(--m3e-floating-panel-container-padding-block, 0.25rem); padding-inline: var(--m3e-floating-panel-container-padding-inline, 0.25rem); } :host(:not(:state(-no-animate))) { transition: ${n(`opacity ${s.motion.duration.short2} ${s.motion.easing.standard}, \n transform ${s.motion.duration.short2} ${s.motion.easing.standard},\n overlay ${s.motion.duration.short2} ${s.motion.easing.standard} allow-discrete,\n display ${s.motion.duration.short2} ${s.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: block; opacity: 1; } :host::backdrop { background-color: transparent; } :host(:state(-bottom)) { transform-origin: top; } :host(:state(-top)) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } } @media (prefers-reduced-motion) { :host(:not(:state(-no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`,_t=function(t,e,n,o){var i,r=arguments.length,l=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(l=(r<3?i(l):r>3?i(e,n,l):i(e,n))||l);return r>3&&l&&Object.defineProperty(e,n,l),l}([a("m3e-floating-panel")],_t);export{_t as M3eFloatingPanelElement,Vt as positionAnchor};
|
|
6
|
+
import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as n}from"tslib";import{LitElement as o,html as i,unsafeCSS as r,css as l}from"lit";import{property as s}from"lit/decorators.js";import{SuppressInitialAnimation as a,AttachInternals as c,ScrollController as f,DesignToken as u,customElement as h,setCustomState as d}from"@m3e/web/core";import{M3eDirectionality as p}from"@m3e/web/core/bidi";const m=Math.min,g=Math.max,y=Math.round,w=Math.floor,x=t=>({x:t,y:t}),v={left:"right",right:"left",bottom:"top",top:"bottom"};function b(t,e,n){return g(t,m(e,n))}function R(t,e){return"function"==typeof t?t(e):t}function k(t){return t.split("-")[0]}function L(t){return t.split("-")[1]}function E(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function C(t){return E(T(t))}function A(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],W=["right","left"],P=["top","bottom"],D=["bottom","top"];function $(t,e,n,o){const i=L(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?W:O:e?O:W;case"left":case"right":return e?P:D;default:return[]}}(k(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(A)))),r}function M(t){const e=k(t);return v[e]+t.slice(e.length)}function F(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function B(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function N(t,e,n){let{reference:o,floating:i}=t;const r=T(e),l=C(e),s=S(l),a=k(e),c="y"===r,f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(L(e)){case"start":d[l]-=h*(n&&c?-1:1);break;case"end":d[l]+=h*(n&&c?-1:1)}return d}async function H(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=R(e,t),p=F(d),m=s[h?"floating"===u?"reference":"floating":u],g=B(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),y="floating"===u?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},v=B(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:a}):y);return{top:(g.top-v.top+p.top)/x.y,bottom:(v.bottom-g.bottom+p.bottom)/x.y,left:(g.left-v.left+p.left)/x.x,right:(v.right-g.right+p.right)/x.x}}function V(t){const e=m(...t.map(t=>t.left)),n=m(...t.map(t=>t.top));return{x:e,y:n,width:g(...t.map(t=>t.right))-e,height:g(...t.map(t=>t.bottom))-n}}const z=new Set(["left","top"]);function Y(){return"undefined"!=typeof window}function j(t){return X(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function q(t){var e;return null==(e=(X(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function X(t){return!!Y()&&(t instanceof Node||t instanceof I(t).Node)}function _(t){return!!Y()&&(t instanceof Element||t instanceof I(t).Element)}function G(t){return!!Y()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function J(t){return!(!Y()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function K(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function Q(t){return/^(table|td|th)$/.test(j(t))}function U(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const Z=/transform|translate|scale|rotate|perspective|filter/,tt=/paint|layout|strict|content/,et=t=>!!t&&"none"!==t;let nt;function ot(t){const e=_(t)?lt(t):t;return et(e.transform)||et(e.translate)||et(e.scale)||et(e.rotate)||et(e.perspective)||!it()&&(et(e.backdropFilter)||et(e.filter))||Z.test(e.willChange||"")||tt.test(e.contain||"")}function it(){return null==nt&&(nt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nt}function rt(t){return/^(html|body|#document)$/.test(j(t))}function lt(t){return I(t).getComputedStyle(t)}function st(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function at(t){if("html"===j(t))return t;const e=t.assignedSlot||t.parentNode||J(t)&&t.host||q(t);return J(e)?e.host:e}function ct(t){const e=at(t);return rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&K(e)?e:ct(e)}function ft(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=ct(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=I(i);if(r){const t=ut(l);return e.concat(l,l.visualViewport||[],K(i)?i:[],t&&n?ft(t):[])}return e.concat(i,ft(i,[],n))}function ut(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ht(t){const e=lt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=G(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,s=y(n)!==r||y(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function dt(t){return _(t)?t:t.contextElement}function pt(t){const e=dt(t);if(!G(e))return x(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ht(e);let l=(r?y(n.width):n.width)/o,s=(r?y(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const mt=x(0);function gt(t){const e=I(t);return it()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:mt}function yt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=dt(t);let l=x(1);e&&(o?_(o)&&(l=pt(o)):l=pt(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==I(t))&&e}(r,n,o)?gt(r):x(0);let a=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,f=i.width/l.x,u=i.height/l.y;if(r){const t=I(r),e=o&&_(o)?I(o):o;let n=t,i=ut(n);for(;i&&o&&e!==n;){const t=pt(i),e=i.getBoundingClientRect(),o=lt(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,c*=t.y,f*=t.x,u*=t.y,a+=r,c+=l,n=I(i),i=ut(n)}}return B({width:f,height:u,x:a,y:c})}function wt(t,e){const n=st(t).scrollLeft;return e?e.left+n:yt(q(t)).left+n}function xt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-wt(t,n),y:n.top+e.scrollTop}}function vt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=I(t),o=q(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,a=0;if(i){r=i.width,l=i.height;const t=it();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,a=i.offsetTop)}const c=wt(o);if(c<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-e.clientWidth-i);l<=25&&(r-=l)}else c<=25&&(r+=c);return{width:r,height:l,x:s,y:a}}(t,n);else if("document"===e)o=function(t){const e=q(t),n=st(t),o=t.ownerDocument.body,i=g(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=g(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+wt(t);const s=-n.scrollTop;return"rtl"===lt(o).direction&&(l+=g(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}(q(t));else if(_(e))o=function(t,e){const n=yt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=G(t)?pt(t):x(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=gt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return B(o)}function bt(t,e){const n=at(t);return!(n===e||!_(n)||rt(n))&&("fixed"===lt(n).position||bt(n,e))}function Rt(t,e,n){const o=G(e),i=q(e),r="fixed"===n,l=yt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const a=x(0);function c(){a.x=wt(i)}if(o||!o&&!r)if(("body"!==j(e)||K(i))&&(s=st(e)),o){const t=yt(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&c();r&&!o&&i&&c();const f=!i||o||r?x(0):xt(i,s);return{x:l.left+s.scrollLeft-a.x-f.x,y:l.top+s.scrollTop-a.y-f.y,width:l.width,height:l.height}}function kt(t){return"static"===lt(t).position}function Lt(t,e){if(!G(t)||"fixed"===lt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function Et(t,e){const n=I(t);if(U(t))return n;if(!G(t)){let e=at(t);for(;e&&!rt(e);){if(_(e)&&!kt(e))return e;e=at(e)}return n}let o=Lt(t,e);for(;o&&Q(o)&&kt(o);)o=Lt(o,e);return o&&rt(o)&&kt(o)&&!ot(o)?n:o||function(t){let e=at(t);for(;G(e)&&!rt(e);){if(ot(e))return e;if(U(e))return null;e=at(e)}return null}(t)||n}const St={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=q(o),s=!!e&&U(e.floating);if(o===l||s&&r)return n;let a={scrollLeft:0,scrollTop:0},c=x(1);const f=x(0),u=G(o);if((u||!u&&!r)&&(("body"!==j(o)||K(l))&&(a=st(o)),u)){const t=yt(o);c=pt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const h=!l||u||r?x(0):xt(l,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+h.x,y:n.y*c.y-a.scrollTop*c.y+f.y+h.y}},getDocumentElement:q,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?U(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ft(t,[],!1).filter(t=>_(t)&&"body"!==j(t)),i=null;const r="fixed"===lt(t).position;let l=r?at(t):t;for(;_(l)&&!rt(l);){const e=lt(l),n=ot(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||K(l)&&!n&&bt(t,l))?o=o.filter(t=>t!==l):i=e,l=at(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=vt(e,r[0],i);let s=l.top,a=l.right,c=l.bottom,f=l.left;for(let t=1;t<r.length;t++){const n=vt(e,r[t],i);s=g(n.top,s),a=m(n.right,a),c=m(n.bottom,c),f=g(n.left,f)}return{width:a-f,height:c-s,x:f,y:s}},getOffsetParent:Et,getElementRects:async function(t){const e=this.getOffsetParent||Et,n=this.getDimensions,o=await n(t.floating);return{reference:Rt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ht(t);return{width:e,height:n}},getScale:pt,isElement:_,isRTL:function(t){return"rtl"===lt(t).direction}};function Tt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ct(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=dt(t),f=i||r?[...c?ft(c):[],...e?ft(e):[]]:[];f.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const u=c&&s?function(t,e){let n,o=null;const i=q(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),r();const c=t.getBoundingClientRect(),{left:f,top:u,width:h,height:d}=c;if(s||e(),!h||!d)return;const p={rootMargin:-w(u)+"px "+-w(i.clientWidth-(f+h))+"px "+-w(i.clientHeight-(u+d))+"px "+-w(f)+"px",threshold:g(0,m(1,a))||1};let y=!0;function x(e){const o=e[0].intersectionRatio;if(o!==a){if(!y)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||Tt(c,t.getBoundingClientRect())||l(),y=!1}try{o=new IntersectionObserver(x,{...p,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(x,p)}o.observe(t)}(!0),r}(c,n):null;let h,d=-1,p=null;l&&(p=new ResizeObserver(t=>{let[o]=t;o&&o.target===c&&p&&e&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var t;null==(t=p)||t.observe(e)})),n()}),c&&!a&&p.observe(c),e&&p.observe(e));let y=a?yt(t):null;return a&&function e(){const o=yt(t);y&&!Tt(y,o)&&n();y=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==u||u(),null==(t=p)||t.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const At=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=e,a=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=k(n),s=L(n),a="y"===T(n),c=z.has(l)?-1:1,f=r&&a?-1:1,u=R(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof p&&(d="end"===s?-1*p:p),a?{x:d*f,y:h*c}:{x:h*c,y:d*f}}(e,t);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:l}}}}},Ot=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:l=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=R(t,e),f={x:n,y:o},u=await r.detectOverflow(e,c),h=T(k(i)),d=E(h);let p=f[d],m=f[h];if(l){const t="y"===d?"bottom":"right";p=b(p+u["y"===d?"top":"left"],p,p-u[t])}if(s){const t="y"===h?"bottom":"right";m=b(m+u["y"===h?"top":"left"],m,m-u[t])}const g=a.fn({...e,[d]:p,[h]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:l,[h]:s}}}}}},Wt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=R(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const y=k(i),w=T(s),x=k(s)===s,v=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=h||(x||!m?[M(s)]:function(t){const e=M(t);return[A(t),e,A(e)]}(s)),E="none"!==p;!h&&E&&b.push(...$(s,m,p,v));const O=[s,...b],W=await a.detectOverflow(e,g),P=[];let D=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&P.push(W[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const o=L(t),i=C(t),r=S(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=M(l)),[l,M(l)]}(i,l,v);P.push(W[t[0]],W[t[1]])}if(D=[...D,{placement:i,overflows:P}],!P.every(t=>t<=0)){var F,B;const t=((null==(F=r.flip)?void 0:F.index)||0)+1,e=O[t];if(e){if(!("alignment"===u&&w!==T(e))||D.every(t=>T(t.placement)!==w||t.overflows[0]>0))return{data:{index:t,overflows:D},reset:{placement:e}}}let n=null==(B=D.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:B.placement;if(!n)switch(d){case"bestFit":{var N;const t=null==(N=D.filter(t=>{if(E){const e=T(t.placement);return e===w||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:N[0];t&&(n=t);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},Pt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:l}=e,{padding:s=2,x:a,y:c}=R(t,e),f=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(o.reference))||[]),u=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let o=null;for(let t=0;t<e.length;t++){const i=e[t];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map(t=>B(V(t)))}(f),h=B(V(f)),d=F(s);const p=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=a&&null!=c)return u.find(t=>a>t.left-d.left&&a<t.right+d.right&&c>t.top-d.top&&c<t.bottom+d.bottom)||h;if(u.length>=2){if("y"===T(n)){const t=u[0],e=u[u.length-1],o="top"===k(n),i=t.top,r=e.bottom,l=o?t.left:e.left,s=o?t.right:e.right;return{top:i,bottom:r,left:l,right:s,width:s-l,height:r-i,x:l,y:i}}const t="left"===k(n),e=g(...u.map(t=>t.right)),o=m(...u.map(t=>t.left)),i=u.filter(n=>t?n.left===o:n.right===e),r=i[0].top,l=i[i.length-1].bottom;return{top:r,bottom:l,left:o,right:e,width:e-o,height:l-r,x:o,y:r}}return h}},floating:o.floating,strategy:l});return i.reference.x!==p.reference.x||i.reference.y!==p.reference.y||i.reference.width!==p.reference.width||i.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},Dt=(t,e,n)=>{const o=new Map,i={platform:St,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:H},a=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=N(c,o,a),h=o,d=0;const p={};for(let n=0;n<r.length;n++){const m=r[n];if(!m)continue;const{name:g,fn:y}=m,{x:w,y:x,data:v,reset:b}=await y({x:f,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});f=null!=w?w:f,u=null!=x?x:u,p[g]={...p[g],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:u}=N(c,h,a))),n=-1)}return{x:f,y:u,placement:h,strategy:i,middlewareData:p}})(t,e,{...i,platform:r})};function $t(t){return function(t){for(let e=t;e;e=Mt(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Mt(t);e;e=Mt(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||ot(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Mt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}async function Ft(t,e,n,o){async function i(){const i=new Array;n?.inline&&i.push(Pt()),n.flip&&i.push(!0===n.flip?Wt():Wt({fallbackPlacements:n.flip})),n.shift&&i.push(Ot()),n.offset&&!isNaN(n.offset)&&i.push(At(n.offset));const r=await Dt(e,t,{placement:n.position,middleware:i,platform:{...St,getOffsetParent:t=>St.getOffsetParent(t,$t)}});o(r.x,r.y,r.placement)}return await i(),Ct(e,t,async()=>await i())}var Bt,Nt,Ht,Vt,zt,Yt,jt,It;let qt=class extends(a(c(o))){constructor(){super(...arguments),Bt.add(this),Nt.set(this,void 0),Ht.set(this,void 0),Vt.set(this,void 0),zt.set(this,e=>t(this,Bt,"m",It).call(this,e)),Yt.set(this,n=>{"closed"===n.newState&&(t(this,Vt,"f")?.call(this),e(this,Vt,void 0,"f"))}),jt.set(this,new f(this,{target:null,callback:()=>this.hide(!1)})),this.scrollStrategy="hide"}get isOpen(){return void 0!==t(this,Nt,"f")}get trigger(){return t(this,Nt,"f")??null}connectedCallback(){super.connectedCallback(),this.setAttribute("popover","manual"),this.addEventListener("toggle",t(this,Yt,"f")),document.addEventListener("click",t(this,zt,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("toggle",t(this,Yt,"f")),document.removeEventListener("click",t(this,zt,"f"))}async show(n,o){t(this,Nt,"f")&&t(this,Nt,"f")!==n&&this.hide(),e(this,Vt,await Ft(this,o??n,{position:"bottom-start",inline:!0,flip:!0},(t,e,n)=>{d(this,"-top",n.includes("top")),d(this,"-bottom",n.includes("bottom")),"rtl"===p.current?(this.style.right=window.innerWidth-t-this.clientWidth+"px",this.style.left=""):(this.style.left=`${t}px`,this.style.right=""),this.style.top=`${e}px`}),"f"),this.showPopover(),e(this,Nt,n,"f"),t(this,Nt,"f").ariaExpanded="true",e(this,Ht,o,"f"),"hide"===this.scrollStrategy&&t(this,jt,"f").observe(t(this,Ht,"f")??t(this,Nt,"f"))}hide(n=!1){this.hidePopover(),t(this,Nt,"f")&&(t(this,Nt,"f").ariaExpanded="false",n&&t(this,Nt,"f").focus(),t(this,jt,"f").unobserve(t(this,Ht,"f")??t(this,Nt,"f")),e(this,Nt,void 0,"f"),e(this,Ht,void 0,"f"))}async toggle(e,n){t(this,Nt,"f")?this.hide():await this.show(e,n)}render(){return i`<div class="base"><slot></slot></div>`}};Nt=new WeakMap,Ht=new WeakMap,Vt=new WeakMap,zt=new WeakMap,Yt=new WeakMap,jt=new WeakMap,Bt=new WeakSet,It=function(e){this.isOpen&&!e.composedPath().some(e=>e===this||e===t(this,Nt,"f")||e===t(this,Ht,"f"))&&this.hide()},qt.styles=l`:host { position: absolute; flex-direction: column; padding: unset; margin: unset; border: unset; overflow-y: auto; scrollbar-width: ${u.scrollbar.thinWidth}; scrollbar-color: ${u.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-floating-panel-container-padding-block, 0.25rem) ); border-radius: var(--m3e-floating-panel-container-shape, ${u.shape.corner.large}); min-width: var(--m3e-floating-panel-container-min-width, 7rem); max-width: var(--m3e-floating-panel-container-max-width, 17.5rem); max-height: var(--m3e-floating-panel-container-max-height, 17.5rem); background-color: var(--m3e-floating-panel-container-color, ${u.color.surfaceContainer}); box-shadow: var(--m3e-floating-panel-container-elevation, ${u.elevation.level3}); opacity: 0; display: none; } .base { box-sizing: border-box; display: flex; flex-direction: column; padding-block: var(--m3e-floating-panel-container-padding-block, 0.25rem); padding-inline: var(--m3e-floating-panel-container-padding-inline, 0.25rem); } :host(:not(:state(-no-animate))) { transition: ${r(`opacity ${u.motion.duration.short2} ${u.motion.easing.standard}, \n transform ${u.motion.duration.short2} ${u.motion.easing.standard},\n overlay ${u.motion.duration.short2} ${u.motion.easing.standard} allow-discrete,\n display ${u.motion.duration.short2} ${u.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: block; opacity: 1; } :host::backdrop { background-color: transparent; } :host(:state(-bottom)) { transform-origin: top; } :host(:state(-top)) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } } @media (prefers-reduced-motion) { :host(:not(:state(-no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`,n([s({attribute:"scroll-strategy"})],qt.prototype,"scrollStrategy",void 0),qt=n([h("m3e-floating-panel")],qt);export{qt as M3eFloatingPanelElement,Ft as positionAnchor};
|
|
7
7
|
//# sourceMappingURL=core-anchoring.min.js.map
|