@swisspost/design-system-components 10.0.0-next.69 → 10.0.0-next.70
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/cjs/{package-CzSn3NmD.js → package-Ds_LS1pB.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/post-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/post-closebutton_14.cjs.entry.js +15 -15
- package/dist/cjs/post-collapsible_2.cjs.entry.js +1 -1
- package/dist/cjs/post-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox-option.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox.cjs.entry.js +2 -2
- package/dist/cjs/post-login-widget.cjs.entry.js +2 -2
- package/dist/cjs/post-number-input.cjs.entry.js +3 -3
- package/dist/cjs/post-pagination.cjs.entry.js +1 -1
- package/dist/cjs/post-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/post-stepper.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +2 -1
- package/dist/collection/components/post-header/post-header.js +4 -4
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +1 -1
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-login-widget/post-login-widget.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-login-widget.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/{p-B4tq6hiA.js → p-B076QoO3.js} +1 -1
- package/dist/components/react/{p-DwJ5SwpN.js → p-B2iQay0-.js} +1 -1
- package/dist/components/react/{p-HNUXY1z7.js → p-B_RL4AOE.js} +1 -1
- package/dist/components/react/p-BoFDru4R.js +1 -0
- package/dist/components/react/{p-D1KBbwmi.js → p-BuL0WAoF.js} +1 -1
- package/dist/components/react/{p-DRtzK3cr.js → p-C8b6-YQl.js} +1 -1
- package/dist/components/react/{p-BYfHrHCb.js → p-Cu9RsvYK.js} +1 -1
- package/dist/components/react/{p-Bj33xnuq.js → p-D6uA8DbL.js} +1 -1
- package/dist/components/react/{p-DAIxJysJ.js → p-DSSN7xW4.js} +1 -1
- package/dist/components/react/p-DW7sbg9f.js +1 -0
- package/dist/components/react/{p-De_QjSNJ.js → p-DgdnwpId.js} +1 -1
- package/dist/components/react/{p-BbOp03Tv.js → p-Dmnnz3fB.js} +1 -1
- package/dist/components/react/{p-UY924tHr.js → p-tpgRP2Dr.js} +1 -1
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-login-widget.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +1 -1
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +1 -1
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-number-input.js +1 -1
- package/dist/components/react/post-pagination.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +1 -1
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +1 -1
- package/dist/components/react/post-stepper-item.js +1 -1
- package/dist/components/react/post-stepper.js +1 -1
- package/dist/components/react/post-tab-item.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +1 -1
- package/dist/docs.json +9 -1
- package/dist/esm/package-DW7sbg9f.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +1 -1
- package/dist/esm/post-autocomplete.entry.js +1 -1
- package/dist/esm/post-avatar.entry.js +1 -1
- package/dist/esm/post-back-to-top.entry.js +1 -1
- package/dist/esm/post-banner.entry.js +1 -1
- package/dist/esm/post-breadcrumb-item.entry.js +1 -1
- package/dist/esm/post-breadcrumbs.entry.js +1 -1
- package/dist/esm/post-closebutton_14.entry.js +15 -15
- package/dist/esm/post-collapsible_2.entry.js +1 -1
- package/dist/esm/post-date-picker.entry.js +1 -1
- package/dist/esm/post-footer.entry.js +3 -3
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-listbox-option.entry.js +3 -3
- package/dist/esm/post-listbox.entry.js +2 -2
- package/dist/esm/post-login-widget.entry.js +2 -2
- package/dist/esm/post-number-input.entry.js +3 -3
- package/dist/esm/post-pagination.entry.js +1 -1
- package/dist/esm/post-popover-trigger.entry.js +2 -2
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-stepper-item.entry.js +2 -2
- package/dist/esm/post-stepper.entry.js +2 -2
- package/dist/esm/post-tab-item.entry.js +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/{p-f88a161a.entry.js → p-092f8795.entry.js} +1 -1
- package/dist/post-components/{p-500a3fc7.entry.js → p-17ccebe6.entry.js} +1 -1
- package/dist/post-components/{p-d57462a3.entry.js → p-1d58bec1.entry.js} +1 -1
- package/dist/post-components/{p-8b68164f.entry.js → p-25c28493.entry.js} +1 -1
- package/dist/post-components/p-29ada3d7.entry.js +1 -0
- package/dist/post-components/{p-95df4d4e.entry.js → p-2fcca5ec.entry.js} +1 -1
- package/dist/post-components/{p-0992cba9.entry.js → p-3cefd49e.entry.js} +1 -1
- package/dist/post-components/{p-220d0eab.entry.js → p-3fea238c.entry.js} +1 -1
- package/dist/post-components/{p-0c249c71.entry.js → p-5068ae7e.entry.js} +1 -1
- package/dist/post-components/{p-cca0cf23.entry.js → p-521178f5.entry.js} +1 -1
- package/dist/post-components/p-534fed55.entry.js +1 -0
- package/dist/post-components/{p-5664d5b5.entry.js → p-570d64dd.entry.js} +1 -1
- package/dist/post-components/{p-dfe811cc.entry.js → p-5f52cba3.entry.js} +1 -1
- package/dist/post-components/{p-c95fcb40.entry.js → p-77d5e17b.entry.js} +1 -1
- package/dist/post-components/{p-52f85cba.entry.js → p-86697a58.entry.js} +1 -1
- package/dist/post-components/{p-906b669b.entry.js → p-987bebe8.entry.js} +1 -1
- package/dist/post-components/{p-272de102.entry.js → p-9ca5c297.entry.js} +1 -1
- package/dist/post-components/{p-1e28d279.entry.js → p-9ea3066f.entry.js} +1 -1
- package/dist/post-components/p-DW7sbg9f.js +1 -0
- package/dist/post-components/{p-cd6684e1.entry.js → p-a6fc33fa.entry.js} +1 -1
- package/dist/post-components/{p-30e5bc99.entry.js → p-ac853d6b.entry.js} +1 -1
- package/dist/post-components/p-bd09bc20.entry.js +1 -0
- package/dist/post-components/p-c2e05ba0.entry.js +1 -0
- package/dist/post-components/{p-d99bdef2.entry.js → p-c55b537b.entry.js} +1 -1
- package/dist/post-components/p-dded4f13.entry.js +1 -0
- package/dist/post-components/{p-6644e626.entry.js → p-e6ba44b1.entry.js} +1 -1
- package/dist/post-components/{p-fc2882a8.entry.js → p-ead1094e.entry.js} +1 -1
- package/dist/post-components/{p-9fab1847.entry.js → p-f12e59a0.entry.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-footer/post-footer.d.ts +1 -0
- package/hydrate/index.js +36 -35
- package/hydrate/index.mjs +36 -35
- package/package.json +4 -4
- package/dist/components/react/p-B4l5EAoq.js +0 -1
- package/dist/components/react/p-CfQqdIV2.js +0 -1
- package/dist/esm/package-B4l5EAoq.js +0 -3
- package/dist/post-components/p-5ade4255.entry.js +0 -1
- package/dist/post-components/p-694e76be.entry.js +0 -1
- package/dist/post-components/p-92e4a7f7.entry.js +0 -1
- package/dist/post-components/p-B4l5EAoq.js +0 -1
- package/dist/post-components/p-c70cad6e.entry.js +0 -1
- package/dist/post-components/p-f14ca918.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as a,g as c}from"./index2.js";import"./index3.js";import{v as l}from"./package.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],f=Math.min,u=Math.max,h=Math.round,d=Math.floor,m=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function v(t,e,n){return u(t,f(e,n))}function w(t,e){return"function"==typeof t?t(e):t}function x(t){return t.split("-")[0]}function y(t){return t.split("-")[1]}function b(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function E(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return b(E(t))}function T(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const M=["left","right"],A=["right","left"],O=["top","bottom"],H=["bottom","top"];function L(t){const e=x(t);return g[e]+t.slice(e.length)}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 D(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function P(t,e,n){let{reference:o,floating:r}=t;const i=E(e),s=k(e),a=S(s),c=x(e),l="y"===i,p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,u=o[a]/2-r[a]/2;let h;switch(c){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(y(e)){case"start":h[s]-=u*(n&&l?-1:1);break;case"end":h[s]+=u*(n&&l?-1:1)}return h}async function F(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:u=!1,padding:h=0}=w(e,t),d=$(h),m=a[u?"floating"===f?"reference":"floating":f],g=D(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),v="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},b=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:c}):v);return{top:(g.top-b.top+d.top)/y.y,bottom:(b.bottom-g.bottom+d.bottom)/y.y,left:(g.left-b.left+d.left)/y.x,right:(b.right-g.right+d.right)/y.x}}function z(t){const e=f(...t.map((t=>t.left))),n=f(...t.map((t=>t.top)));return{x:e,y:n,width:u(...t.map((t=>t.right)))-e,height:u(...t.map((t=>t.bottom)))-n}}const R=new Set(["left","top"]);function C(){return"undefined"!=typeof window}function W(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function j(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function B(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!C()&&(t instanceof Node||t instanceof j(t).Node)}function q(t){return!!C()&&(t instanceof Element||t instanceof j(t).Element)}function I(t){return!!C()&&(t instanceof HTMLElement||t instanceof j(t).HTMLElement)}function N(t){return!(!C()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof j(t).ShadowRoot)}function V(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function X(t){return/^(table|td|th)$/.test(W(t))}function Y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const _=/transform|translate|scale|rotate|perspective|filter/,J=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let Q;function U(t){const e=q(t)?et(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Z()&&(K(e.backdropFilter)||K(e.filter))||_.test(e.willChange||"")||J.test(e.contain||"")}function Z(){return null==Q&&(Q="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Q}function tt(t){return/^(html|body|#document)$/.test(W(t))}function et(t){return j(t).getComputedStyle(t)}function nt(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if("html"===W(t))return t;const e=t.assignedSlot||t.parentNode||N(t)&&t.host||B(t);return N(e)?e.host:e}function rt(t){const e=ot(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&V(e)?e:rt(e)}function it(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=rt(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=j(r);if(i){const t=st(s);return e.concat(s,s.visualViewport||[],V(r)?r:[],t&&n?it(t):[])}return e.concat(r,it(r,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function at(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=h(n)!==i||h(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ct(t){return q(t)?t:t.contextElement}function lt(t){const e=ct(t);if(!I(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=at(e);let s=(i?h(n.width):n.width)/o,a=(i?h(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const pt=m(0);function ft(t){const e=j(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:pt}function ut(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ct(t);let s=m(1);e&&(o?q(o)&&(s=lt(o)):s=lt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==j(t))&&e}(i,n,o)?ft(i):m(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i){const t=j(i),e=o&&q(o)?j(o):o;let n=t,r=st(n);for(;r&&o&&e!==n;){const t=lt(r),e=r.getBoundingClientRect(),o=et(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,p*=t.x,f*=t.y,c+=i,l+=s,n=j(r),r=st(n)}}return D({width:p,height:f,x:c,y:l})}function ht(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ut(B(t)).left+n}function dt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ht(t,n),y:n.top+e.scrollTop}}function mt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=j(t),o=B(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=Z();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const l=ht(o);if(l<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=B(t),n=nt(t),o=t.ownerDocument.body,r=u(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=u(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ht(t);const a=-n.scrollTop;return"rtl"===et(o).direction&&(s+=u(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(B(t));else if(q(e))o=function(t,e){const n=ut(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?lt(t):m(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=ft(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function gt(t,e){const n=ot(t);return!(n===e||!q(n)||tt(n))&&("fixed"===et(n).position||gt(n,e))}function vt(t,e,n){const o=I(e),r=B(e),i="fixed"===n,s=ut(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=m(0);function l(){c.x=ht(r)}if(o||!o&&!i)if(("body"!==W(e)||V(r))&&(a=nt(e)),o){const t=ut(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&l();i&&!o&&r&&l();const p=!r||o||i?m(0):dt(r,a);return{x:s.left+a.scrollLeft-c.x-p.x,y:s.top+a.scrollTop-c.y-p.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function xt(t,e){if(!I(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return B(t)===n&&(n=n.ownerDocument.body),n}function yt(t,e){const n=j(t);if(Y(t))return n;if(!I(t)){let e=ot(t);for(;e&&!tt(e);){if(q(e)&&!wt(e))return e;e=ot(e)}return n}let o=xt(t,e);for(;o&&X(o)&&wt(o);)o=xt(o,e);return o&&tt(o)&&wt(o)&&!U(o)?n:o||function(t){let e=ot(t);for(;I(e)&&!tt(e);){if(U(e))return e;if(Y(e))return null;e=ot(e)}return null}(t)||n}const bt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=B(o),a=!!e&&Y(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=m(1);const p=m(0),f=I(o);if((f||!f&&!i)&&(("body"!==W(o)||V(s))&&(c=nt(o)),f)){const t=ut(o);l=lt(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?m(0):dt(s,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+u.x,y:n.y*l.y-c.scrollTop*l.y+p.y+u.y}},getDocumentElement:B,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?Y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=it(t,[],!1).filter((t=>q(t)&&"body"!==W(t))),r=null;const i="fixed"===et(t).position;let s=i?ot(t):t;for(;q(s)&&!tt(s);){const e=et(s),n=U(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||V(s)&&!n&>(t,s))?o=o.filter((t=>t!==s)):r=e,s=ot(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=mt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,p=s.left;for(let t=1;t<i.length;t++){const n=mt(e,i[t],r);a=u(n.top,a),c=f(n.right,c),l=f(n.bottom,l),p=u(n.left,p)}return{width:c-p,height:l-a,x:p,y:a}},getOffsetParent:yt,getElementRects:async function(t){const e=this.getOffsetParent||yt,n=this.getDimensions,o=await n(t.floating);return{reference:vt(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}=at(t);return{width:e,height:n}},getScale:lt,isElement:q,isRTL:function(t){return"rtl"===et(t).direction}};function St(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Et=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=x(n),a=y(n),c="y"===E(n),l=R.has(s)?-1:1,p=i&&c?-1:1,f=w(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),c?{x:h*p,y:u*l}:{x:u*l,y:h*p}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},kt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...g}=w(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=x(r),b=E(a),$=x(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(l.floating)),P=u||($||!m?[L(a)]:function(t){const e=L(t);return[T(t),e,T(e)]}(a)),F="none"!==d;!u&&F&&P.push(...function(t,e,n,o){const r=y(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?A:M:e?M:A;case"left":case"right":return e?O:H;default:return[]}}(x(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(T)))),i}(a,m,d,D));const z=[a,...P],R=await c.detectOverflow(e,g),C=[];let W=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&C.push(R[v]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=y(t),r=k(t),i=S(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,D);C.push(R[t[0]],R[t[1]])}if(W=[...W,{placement:r,overflows:C}],!C.every((t=>t<=0))){var j,B;const t=((null==(j=i.flip)?void 0:j.index)||0)+1,e=z[t];if(e&&("alignment"!==f||b===E(e)||W.every((t=>E(t.placement)!==b||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(h){case"bestFit":{var G;const t=null==(G=W.filter((t=>{if(F){const e=E(t.placement);return e===b||"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:G[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},Tt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:c=()=>{},...l}=w(t,e),p=await s.detectOverflow(e,l),h=x(r),d=y(r),m="y"===E(r),{width:g,height:v}=i.floating;let b,S;"top"===h||"bottom"===h?(b=h,S=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=h,b="end"===d?"top":"bottom");const k=v-p.top-p.bottom,T=g-p.left-p.right;let M=f(v-p[b],k),A=f(g-p[S],T);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(A=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(M=k),!e.middlewareData.shift&&!d){const t=u(p.left,0),e=u(p.right,0),n=u(p.top,0),o=u(p.bottom,0);m?A=g-2*(0!==t||0!==e?t+e:u(p.left,p.right)):M=v-2*(0!==n||0!==o?n+o:u(p.top,p.bottom))}await c({...e,availableWidth:A,availableHeight:M});const O=await s.getDimensions(a.floating);return g!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}},Mt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:s}=e,{padding:a=2,x:c,y:l}=w(t,e),p=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),h=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 r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>D(z(t))))}(p),d=D(z(p)),m=$(a),g=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(h.length>=2){if("y"===E(n)){const t=h[0],e=h[h.length-1],o="top"===x(n),r=t.top,i=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:s,right:a,width:a-s,height:i-r,x:s,y:r}}const t="left"===x(n),e=u(...h.map((t=>t.right))),o=f(...h.map((t=>t.left))),r=h.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,s=r[r.length-1].bottom;return{top:i,bottom:s,left:o,right:e,width:e-o,height:s-i,x:o,y:i}}return d}},floating:o.floating,strategy:s});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};var At=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},Ot=new WeakMap;function Ht(t,e,n){Ot.set(t,setTimeout((()=>{Ot.has(t)&&t.dispatchEvent(new At("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Lt=globalThis.ShadowRoot||function(){},$t=globalThis.HTMLDialogElement||function(){},Dt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,zt=new WeakMap;function Rt(t){return zt.get(t)||"hidden"}var Ct=new WeakMap;function Wt(t){return[...t].pop()}function jt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Rt(t)||!e&&"hidden"!==Rt(t)||t instanceof $t&&t.hasAttribute("open")||document.fullscreenElement===t)}function Bt(t){if(!t)return 0;const e=Pt.get(document)||new Set,n=Ft.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Gt(t){let e;const n=Ft.get(t)||new Set,o=Pt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Wt(r),e.isConnected?e:(r.delete(e),Gt(t))):null}function qt(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function It(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?It(t.parentNode):t}function Nt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===zt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}function Vt(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,s=null;for(;!o;){if(i=Nt(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}s=n.get(i),(null===r||n.get(r)<s)&&(r=i)}(t.parentElement||It(t)),r}function Xt(t){return!(t.hidden||t instanceof Lt||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var Yt=new WeakMap;function _t(t){if(!jt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new At("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!jt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Vt(t,Pt.get(e)||new Set),s=Vt(t,Ft.get(e)||new Set);if("auto"===o&&(Kt(Ft.get(e)||new Set,n,!0),Ut(i||e,n,!0),r="auto"),"hint"===o&&(s?(Ut(s,n,!0),r="hint"):(Kt(Ft.get(e)||new Set,n,!0),i?(Ut(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!jt(t,!1))return;Gt(e)||(n=!0),"auto"===r?(Pt.has(e)||Pt.set(e,new Set),Pt.get(e).add(t)):"hint"===r&&(Ft.has(e)||Ft.set(e,new Set),Ft.get(e).add(t))}Yt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),zt.set(t,"showing"),Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t),ne(Ct.get(t),!0),c=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(Xt(r))return r;r=o.nextNode()}}(c)?.focus(),n&&a&&"auto"===t.popover&&Yt.set(t,a),Ht(t,"closed","open")}function Jt(t,e=!1,n=!1){if(!jt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Ut(t,e,n),!jt(t,!0)))return;const r=Pt.get(o)||new Set,i=r.has(t)&&Wt(r)===t;if(ne(Ct.get(t),!1),Ct.delete(t),n&&(t.dispatchEvent(new At("beforetoggle",{oldState:"open",newState:"closed"})),i&&Wt(r)!==t&&Ut(t,e,n),!jt(t,!0)))return;Dt.get(o)?.delete(t),r.delete(t),Ft.get(o)?.delete(t),t.classList.remove(":popover-open"),zt.set(t,"hidden"),n&&Ht(t,"open","closed");const s=Yt.get(t);s&&(Yt.delete(t),e&&s.focus())}function Kt(t,e=!1,n=!1){let o=qt(t);for(;o;)Jt(o,e,n),o=qt(t)}function Qt(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let s=null,a=!1;for(const n of e)if(n===t)a=!0;else if(a){s=n;break}if(!s)return;for(;"showing"===Rt(s)&&e.size;)Jt(Wt(e),n,o);e.has(t)&&Wt(e)!==t&&(r=!0),r&&(o=!1)}}function Ut(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Gt(t);for(;o;)Jt(o,e,n),o=Gt(t)}(o,e,n);Ft.get(o)?.has(t)?Qt(t,Ft.get(o),e,n):(Kt(Ft.get(o)||new Set,e,n),Pt.get(o)?.has(t)&&Qt(t,Pt.get(o),e,n))}var Zt=new WeakMap;function te(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Gt(n))return;const o=function(t){const e=Nt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}(t);return Bt(e)>Bt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Zt.set(n,o);else if("pointerup"===t.type){const t=Zt.get(n)===o;Zt.delete(n),t&&Ut(o||n,!1,!0)}}var ee=new WeakMap;function ne(t,e=!1){if(!t)return;ee.has(t)||ee.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=ee.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var oe=globalThis.ShadowRoot||function(){};function re(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ie=/(^|[^\\]):popover-open\b/g;var se=null;function ae(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===se)try{(se=new CSSStyleSheet).replaceSync(e)}catch{se=!1}if(!1===se){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[se,...t.adoptedStyleSheets]}const ce={"pop-in":function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}},le=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.toggleTimeoutId=null,this.hasOpenedOnce=!0,this.placement="top",this.edgeGap=8,this.arrow=!1,this.animation="pop-in",this.currentAnimation=null,this.boundMouseTrackingHandler=this.mouseTrackingHandler.bind(this)}validatePlacement(){a(this,"placement",p)}validateEdgeGap(){c(this,"edgeGap","number")}validateSafeSpace(){a(this,"safeSpace",["triangle","trapezoid"])}mouseTrackingHandler(t){this.host.style.setProperty("--post-safe-space-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--post-safe-space-cursor-y",`${t.clientY}px`)}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ie,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||At,re(Document.prototype,"querySelector",t),re(Document.prototype,"querySelectorAll",t),re(Element.prototype,"querySelector",t),re(Element.prototype,"querySelectorAll",t),re(Element.prototype,"matches",t),re(Element.prototype,"closest",t),re(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){_t(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Jt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===zt.get(this)&&void 0===t.force||!1===t.force?Jt(this,!0,!0):void 0!==t.force&&!0!==t.force||_t(this),"showing"===zt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return ae(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&ae(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=It(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof oe)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=It(n);if(!(o instanceof oe||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Rt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Jt(e,!0,!0):jt(e,!1)&&(Ct.set(e,t),_t(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||Ut(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",te),i.addEventListener("pointerup",te),ae(document)}()}componentDidLoad(){this.validatePlacement(),this.validateEdgeGap(),this.validateSafeSpace(),this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}async show(t){this.toggleTimeoutId||(this.eventTarget=t,this.calculatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){return this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=ce[this.animation];"function"==typeof e?this.runOpenAnimation(e,t):(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce&&(this.hasOpenedOnce=!1))}this.safeSpace&&globalThis.addEventListener("mousemove",this.boundMouseTrackingHandler)}close(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.safeSpace&&globalThis.removeEventListener("mousemove",this.boundMouseTrackingHandler),this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null),this.postBeforeToggle.emit({willOpen:!1}),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}async runOpenAnimation(t,e){let n;try{if(n=t(e),!n)return this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),void this.postShow.emit({first:this.hasOpenedOnce});this.currentAnimation=n,"running"===n.playState&&(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce})),await n.finished,this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce=!0}catch(t){console.warn("Animation failed or was interrupted:",t),this.postBeforeToggle.emit({willOpen:!1}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!1})}finally{this.currentAnimation===n&&(this.currentAnimation=null)}}handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?this.open():this.close()}startAutoupdates(){this.eventTarget&&this.host&&(this.clearAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,l=ct(t),p=r||i?[...l?it(l):[],...e?it(e):[]]:[];p.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const h=l&&a?function(t,e){let n,o=null;const r=B(t);function i(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const l=t.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=l;if(a||e(),!m||!g)return;const v={rootMargin:-d(h)+"px "+-d(r.clientWidth-(p+m))+"px "+-d(r.clientHeight-(h+g))+"px "+-d(p)+"px",threshold:u(0,f(1,c))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==c){if(!w)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||St(l,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(x,{...v,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,v)}o.observe(t)}(!0),i}(l,n):null;let m,g=-1,v=null;s&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&v&&e&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),l&&!c&&v.observe(l),e&&v.observe(e));let w=c?ut(t):null;return c&&function e(){const o=ut(t);w&&!St(w,o)&&n(),w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==h||h(),null==(t=v)||t.disconnect(),v=null,c&&cancelAnimationFrame(m)}}(this.eventTarget,this.host,this.calculatePosition.bind(this)))}getHeaderHeight(){const t=document.querySelector("post-header");return t?Number.parseFloat(getComputedStyle(t).height):0}async calculatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.computeMainPosition(),i=r.split("-")[0];if(this.dynamicPlacement=i,this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,this.arrow&&o.arrow){const{x:e,y:n}=o.arrow,r=t.STATIC_SIDES[i],s=-.5*this.arrowRef.offsetWidth;r&&Object.assign(this.arrowRef.style,{left:e?`${e}px`:"",top:n?`${n}px`:"",[r]:`${s}px`})}this.safeSpace&&this.eventTarget&&await this.updateSafeSpaceBoundaries(i)}async computeMainPosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=kt({padding:this.getHeaderHeight(),crossAxis:!1}),o=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=w(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=E(x(r)),h=b(u);let d=p[h],m=p[u];s&&(d=v(d+f["y"===h?"top":"left"],d,d-f["y"===h?"bottom":"right"])),a&&(m=v(m+f["y"===u?"top":"left"],m,m-f["y"===u?"bottom":"right"]));const g=c.fn({...e,[h]:d,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:(i={offset:32},void 0===i&&(i={}),{options:i,fn(t){const{x:e,y:n,placement:o,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=w(i,t),p={x:e,y:n},f=E(o),u=b(f);let h=p[u],d=p[f];const m=w(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+g.mainAxis,n=r.reference[u]+r.reference[t]-g.mainAxis;h<e?h=e:h>n&&(h=n)}if(l){var v,y;const t="y"===u?"width":"height",e=R.has(x(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(v=s.offset)?void 0:v[f])||0)+(e?0:g.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(y=s.offset)?void 0:y[f])||0)-(e?g.crossAxis:0);d<n?d=n:d>i&&(d=i)}return{[u]:h,[f]:d}}})}),r=[Et(this.offset??(this.arrow?t+4:t)),Mt(),...e?[n,o]:[o,n],Tt({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];var i;return this.arrow&&r.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:p=0}=w(t,e)||{};if(null==l)return{};const u=$(p),h={x:n,y:o},d=k(r),m=S(d),g=await s.getDimensions(l),x="y"===d,b=x?"top":"left",E=x?"bottom":"right",T=x?"clientHeight":"clientWidth",M=i.reference[m]+i.reference[d]-h[d]-i.floating[m],A=h[d]-i.reference[d],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let H=O?O[T]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[T]||i.floating[m]);const L=M/2-A/2,D=H/2-g[m]/2-1,P=f(u[b],D),F=f(u[E],D),z=P,R=H-g[m]-F,C=H/2-g[m]/2+L,W=v(z,C,R),j=!c.arrow&&null!=y(r)&&C!==W&&i.reference[m]/2-(C<z?P:F)-g[m]/2<0,B=j?C<z?C-z:C-R:0;return{[d]:h[d]+B,data:{[d]:W,centerOffset:C-W-B,...j&&{alignmentOffset:B}},reset:j}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:bt,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:F},c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=P(l,o,c),u=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:g,fn:v}=m,{x:w,y:x,data:y,reset:b}=await v({x:p,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:l,platform:a,elements:{reference:t,floating:e}});p=null!=w?w:p,f=null!=x?x:f,d[g]={...d[g],...y},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(l=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):b.rects),({x:p,y:f}=P(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(this.eventTarget,this.host,{placement:this.placement||"top",strategy:"fixed",middleware:r})}async updateSafeSpaceBoundaries(e){const n=this.eventTarget.getBoundingClientRect(),o="top"===e||"bottom"===e,r=((t,e,n)=>"top"===t||"bottom"===t?{popover:{y:"top"===t?e.bottom:e.top,xStart:e.left,xEnd:e.right},trigger:{y:"top"===t?n.top:n.bottom,xStart:n.left,xEnd:n.right}}:{popover:{x:"left"===t?e.right:e.left,yStart:e.top,yEnd:e.bottom},trigger:{x:"left"===t?n.left:n.right,yStart:n.top,yEnd:n.bottom}})(e,this.host.getBoundingClientRect(),n);t.PROPERTIES_TO_CLEAR.forEach((t=>{this.host.style.removeProperty(t)})),o?(this.host.style.setProperty("--post-safe-space-popover-y",`${r.popover.y}px`),this.host.style.setProperty("--post-safe-space-popover-x-start",`${r.popover.xStart}px`),this.host.style.setProperty("--post-safe-space-popover-x-end",`${r.popover.xEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-y",`${r.trigger.y}px`),this.host.style.setProperty("--post-safe-space-trigger-x-start",`${r.trigger.xStart}px`),this.host.style.setProperty("--post-safe-space-trigger-x-end",`${r.trigger.xEnd}px`)):(this.host.style.setProperty("--post-safe-space-popover-x",`${r.popover.x}px`),this.host.style.setProperty("--post-safe-space-popover-y-start",`${r.popover.yStart}px`),this.host.style.setProperty("--post-safe-space-popover-y-end",`${r.popover.yEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-x",`${r.trigger.x}px`),this.host.style.setProperty("--post-safe-space-trigger-y-start",`${r.trigger.yStart}px`),this.host.style.setProperty("--post-safe-space-trigger-y-end",`${r.trigger.yEnd}px`))}render(){return r(i,{key:"796c61380fcfc0fffb4a135eef8686eb4f0a218f","data-version":l,popover:"auto"},r("div",{key:"f7d4f69a528487406c5969165aea8970e76750c2",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&r("span",{key:"89b8f6036d958aae6e835f449f04f2c6086ab548","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),r("span",{key:"3a9804b70a612faaf7d7709a48b16bf9f3cdbf0e",part:"post-popovercontainer-border-mask"}),r("slot",{key:"b7e29480db2d1a8220080981f1b82d6f7994f150"})))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[513,"safe-space"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]},void 0,{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}]);function pe(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(s(t))||customElements.define(s(t),le))}))}le.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},le.PROPERTIES_TO_CLEAR=["--post-safe-space-popover-x","--post-safe-space-popover-y","--post-safe-space-popover-x-start","--post-safe-space-popover-x-end","--post-safe-space-popover-y-start","--post-safe-space-popover-y-end","--post-safe-space-trigger-x","--post-safe-space-trigger-y","--post-safe-space-trigger-x-start","--post-safe-space-trigger-x-end","--post-safe-space-trigger-y-start","--post-safe-space-trigger-y-end"];export{le as P,p as a,pe as d}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as a,g as c}from"./index2.js";import"./index3.js";import{v as l}from"./package.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],f=Math.min,u=Math.max,h=Math.round,d=Math.floor,m=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function v(t,e,n){return u(t,f(e,n))}function w(t,e){return"function"==typeof t?t(e):t}function x(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function E(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return y(E(t))}function T(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const M=["left","right"],A=["right","left"],O=["top","bottom"],H=["bottom","top"];function L(t){const e=x(t);return g[e]+t.slice(e.length)}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 D(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function P(t,e,n){let{reference:o,floating:r}=t;const i=E(e),s=k(e),a=S(s),c=x(e),l="y"===i,p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,u=o[a]/2-r[a]/2;let h;switch(c){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(b(e)){case"start":h[s]-=u*(n&&l?-1:1);break;case"end":h[s]+=u*(n&&l?-1:1)}return h}async function F(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:u=!1,padding:h=0}=w(e,t),d=$(h),m=a[u?"floating"===f?"reference":"floating":f],g=D(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),v="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},y=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:c}):v);return{top:(g.top-y.top+d.top)/b.y,bottom:(y.bottom-g.bottom+d.bottom)/b.y,left:(g.left-y.left+d.left)/b.x,right:(y.right-g.right+d.right)/b.x}}function z(t){const e=f(...t.map((t=>t.left))),n=f(...t.map((t=>t.top)));return{x:e,y:n,width:u(...t.map((t=>t.right)))-e,height:u(...t.map((t=>t.bottom)))-n}}const R=new Set(["left","top"]);function C(){return"undefined"!=typeof window}function W(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function j(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function B(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!C()&&(t instanceof Node||t instanceof j(t).Node)}function q(t){return!!C()&&(t instanceof Element||t instanceof j(t).Element)}function I(t){return!!C()&&(t instanceof HTMLElement||t instanceof j(t).HTMLElement)}function N(t){return!(!C()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof j(t).ShadowRoot)}function V(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function X(t){return/^(table|td|th)$/.test(W(t))}function Y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const _=/transform|translate|scale|rotate|perspective|filter/,J=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let Q;function U(t){const e=q(t)?et(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Z()&&(K(e.backdropFilter)||K(e.filter))||_.test(e.willChange||"")||J.test(e.contain||"")}function Z(){return null==Q&&(Q="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Q}function tt(t){return/^(html|body|#document)$/.test(W(t))}function et(t){return j(t).getComputedStyle(t)}function nt(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if("html"===W(t))return t;const e=t.assignedSlot||t.parentNode||N(t)&&t.host||B(t);return N(e)?e.host:e}function rt(t){const e=ot(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&V(e)?e:rt(e)}function it(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=rt(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=j(r);if(i){const t=st(s);return e.concat(s,s.visualViewport||[],V(r)?r:[],t&&n?it(t):[])}return e.concat(r,it(r,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function at(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=h(n)!==i||h(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ct(t){return q(t)?t:t.contextElement}function lt(t){const e=ct(t);if(!I(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=at(e);let s=(i?h(n.width):n.width)/o,a=(i?h(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const pt=m(0);function ft(t){const e=j(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:pt}function ut(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ct(t);let s=m(1);e&&(o?q(o)&&(s=lt(o)):s=lt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==j(t))&&e}(i,n,o)?ft(i):m(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i){const t=j(i),e=o&&q(o)?j(o):o;let n=t,r=st(n);for(;r&&o&&e!==n;){const t=lt(r),e=r.getBoundingClientRect(),o=et(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,p*=t.x,f*=t.y,c+=i,l+=s,n=j(r),r=st(n)}}return D({width:p,height:f,x:c,y:l})}function ht(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ut(B(t)).left+n}function dt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ht(t,n),y:n.top+e.scrollTop}}function mt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=j(t),o=B(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=Z();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const l=ht(o);if(l<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=B(t),n=nt(t),o=t.ownerDocument.body,r=u(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=u(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ht(t);const a=-n.scrollTop;return"rtl"===et(o).direction&&(s+=u(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(B(t));else if(q(e))o=function(t,e){const n=ut(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?lt(t):m(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=ft(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function gt(t,e){const n=ot(t);return!(n===e||!q(n)||tt(n))&&("fixed"===et(n).position||gt(n,e))}function vt(t,e,n){const o=I(e),r=B(e),i="fixed"===n,s=ut(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=m(0);function l(){c.x=ht(r)}if(o||!o&&!i)if(("body"!==W(e)||V(r))&&(a=nt(e)),o){const t=ut(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&l();i&&!o&&r&&l();const p=!r||o||i?m(0):dt(r,a);return{x:s.left+a.scrollLeft-c.x-p.x,y:s.top+a.scrollTop-c.y-p.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function xt(t,e){if(!I(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return B(t)===n&&(n=n.ownerDocument.body),n}function bt(t,e){const n=j(t);if(Y(t))return n;if(!I(t)){let e=ot(t);for(;e&&!tt(e);){if(q(e)&&!wt(e))return e;e=ot(e)}return n}let o=xt(t,e);for(;o&&X(o)&&wt(o);)o=xt(o,e);return o&&tt(o)&&wt(o)&&!U(o)?n:o||function(t){let e=ot(t);for(;I(e)&&!tt(e);){if(U(e))return e;if(Y(e))return null;e=ot(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=B(o),a=!!e&&Y(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=m(1);const p=m(0),f=I(o);if((f||!f&&!i)&&(("body"!==W(o)||V(s))&&(c=nt(o)),f)){const t=ut(o);l=lt(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?m(0):dt(s,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+u.x,y:n.y*l.y-c.scrollTop*l.y+p.y+u.y}},getDocumentElement:B,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?Y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=it(t,[],!1).filter((t=>q(t)&&"body"!==W(t))),r=null;const i="fixed"===et(t).position;let s=i?ot(t):t;for(;q(s)&&!tt(s);){const e=et(s),n=U(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||V(s)&&!n&>(t,s))?o=o.filter((t=>t!==s)):r=e,s=ot(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=mt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,p=s.left;for(let t=1;t<i.length;t++){const n=mt(e,i[t],r);a=u(n.top,a),c=f(n.right,c),l=f(n.bottom,l),p=u(n.left,p)}return{width:c-p,height:l-a,x:p,y:a}},getOffsetParent:bt,getElementRects:async function(t){const e=this.getOffsetParent||bt,n=this.getDimensions,o=await n(t.floating);return{reference:vt(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}=at(t);return{width:e,height:n}},getScale:lt,isElement:q,isRTL:function(t){return"rtl"===et(t).direction}};function St(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Et=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=x(n),a=b(n),c="y"===E(n),l=R.has(s)?-1:1,p=i&&c?-1:1,f=w(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),c?{x:h*p,y:u*l}:{x:u*l,y:h*p}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},kt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...g}=w(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=x(r),y=E(a),$=x(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(l.floating)),P=u||($||!m?[L(a)]:function(t){const e=L(t);return[T(t),e,T(e)]}(a)),F="none"!==d;!u&&F&&P.push(...function(t,e,n,o){const r=b(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?A:M:e?M:A;case"left":case"right":return e?O:H;default:return[]}}(x(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(T)))),i}(a,m,d,D));const z=[a,...P],R=await c.detectOverflow(e,g),C=[];let W=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&C.push(R[v]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=k(t),i=S(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,D);C.push(R[t[0]],R[t[1]])}if(W=[...W,{placement:r,overflows:C}],!C.every((t=>t<=0))){var j,B;const t=((null==(j=i.flip)?void 0:j.index)||0)+1,e=z[t];if(e&&("alignment"!==f||y===E(e)||W.every((t=>E(t.placement)!==y||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(h){case"bestFit":{var G;const t=null==(G=W.filter((t=>{if(F){const e=E(t.placement);return e===y||"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:G[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},Tt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:c=()=>{},...l}=w(t,e),p=await s.detectOverflow(e,l),h=x(r),d=b(r),m="y"===E(r),{width:g,height:v}=i.floating;let y,S;"top"===h||"bottom"===h?(y=h,S=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=h,y="end"===d?"top":"bottom");const k=v-p.top-p.bottom,T=g-p.left-p.right;let M=f(v-p[y],k),A=f(g-p[S],T);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(A=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(M=k),!e.middlewareData.shift&&!d){const t=u(p.left,0),e=u(p.right,0),n=u(p.top,0),o=u(p.bottom,0);m?A=g-2*(0!==t||0!==e?t+e:u(p.left,p.right)):M=v-2*(0!==n||0!==o?n+o:u(p.top,p.bottom))}await c({...e,availableWidth:A,availableHeight:M});const O=await s.getDimensions(a.floating);return g!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}},Mt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:s}=e,{padding:a=2,x:c,y:l}=w(t,e),p=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),h=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 r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>D(z(t))))}(p),d=D(z(p)),m=$(a),g=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(h.length>=2){if("y"===E(n)){const t=h[0],e=h[h.length-1],o="top"===x(n),r=t.top,i=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:s,right:a,width:a-s,height:i-r,x:s,y:r}}const t="left"===x(n),e=u(...h.map((t=>t.right))),o=f(...h.map((t=>t.left))),r=h.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,s=r[r.length-1].bottom;return{top:i,bottom:s,left:o,right:e,width:e-o,height:s-i,x:o,y:i}}return d}},floating:o.floating,strategy:s});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};var At=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},Ot=new WeakMap;function Ht(t,e,n){Ot.set(t,setTimeout((()=>{Ot.has(t)&&t.dispatchEvent(new At("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Lt=globalThis.ShadowRoot||function(){},$t=globalThis.HTMLDialogElement||function(){},Dt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,zt=new WeakMap;function Rt(t){return zt.get(t)||"hidden"}var Ct=new WeakMap;function Wt(t){return[...t].pop()}function jt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Rt(t)||!e&&"hidden"!==Rt(t)||t instanceof $t&&t.hasAttribute("open")||document.fullscreenElement===t)}function Bt(t){if(!t)return 0;const e=Pt.get(document)||new Set,n=Ft.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Gt(t){let e;const n=Ft.get(t)||new Set,o=Pt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Wt(r),e.isConnected?e:(r.delete(e),Gt(t))):null}function qt(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function It(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?It(t.parentNode):t}function Nt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===zt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}function Vt(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,s=null;for(;!o;){if(i=Nt(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}s=n.get(i),(null===r||n.get(r)<s)&&(r=i)}(t.parentElement||It(t)),r}function Xt(t){return!(t.hidden||t instanceof Lt||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var Yt=new WeakMap;function _t(t){if(!jt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new At("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!jt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Vt(t,Pt.get(e)||new Set),s=Vt(t,Ft.get(e)||new Set);if("auto"===o&&(Kt(Ft.get(e)||new Set,n,!0),Ut(i||e,n,!0),r="auto"),"hint"===o&&(s?(Ut(s,n,!0),r="hint"):(Kt(Ft.get(e)||new Set,n,!0),i?(Ut(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!jt(t,!1))return;Gt(e)||(n=!0),"auto"===r?(Pt.has(e)||Pt.set(e,new Set),Pt.get(e).add(t)):"hint"===r&&(Ft.has(e)||Ft.set(e,new Set),Ft.get(e).add(t))}Yt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),zt.set(t,"showing"),Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t),ne(Ct.get(t),!0),c=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(Xt(r))return r;r=o.nextNode()}}(c)?.focus(),n&&a&&"auto"===t.popover&&Yt.set(t,a),Ht(t,"closed","open")}function Jt(t,e=!1,n=!1){if(!jt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Ut(t,e,n),!jt(t,!0)))return;const r=Pt.get(o)||new Set,i=r.has(t)&&Wt(r)===t;if(ne(Ct.get(t),!1),Ct.delete(t),n&&(t.dispatchEvent(new At("beforetoggle",{oldState:"open",newState:"closed"})),i&&Wt(r)!==t&&Ut(t,e,n),!jt(t,!0)))return;Dt.get(o)?.delete(t),r.delete(t),Ft.get(o)?.delete(t),t.classList.remove(":popover-open"),zt.set(t,"hidden"),n&&Ht(t,"open","closed");const s=Yt.get(t);s&&(Yt.delete(t),e&&s.focus())}function Kt(t,e=!1,n=!1){let o=qt(t);for(;o;)Jt(o,e,n),o=qt(t)}function Qt(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let s=null,a=!1;for(const n of e)if(n===t)a=!0;else if(a){s=n;break}if(!s)return;for(;"showing"===Rt(s)&&e.size;)Jt(Wt(e),n,o);e.has(t)&&Wt(e)!==t&&(r=!0),r&&(o=!1)}}function Ut(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Gt(t);for(;o;)Jt(o,e,n),o=Gt(t)}(o,e,n);Ft.get(o)?.has(t)?Qt(t,Ft.get(o),e,n):(Kt(Ft.get(o)||new Set,e,n),Pt.get(o)?.has(t)&&Qt(t,Pt.get(o),e,n))}var Zt=new WeakMap;function te(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Gt(n))return;const o=function(t){const e=Nt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}(t);return Bt(e)>Bt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Zt.set(n,o);else if("pointerup"===t.type){const t=Zt.get(n)===o;Zt.delete(n),t&&Ut(o||n,!1,!0)}}var ee=new WeakMap;function ne(t,e=!1){if(!t)return;ee.has(t)||ee.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=ee.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var oe=globalThis.ShadowRoot||function(){};function re(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ie=/(^|[^\\]):popover-open\b/g;var se=null;function ae(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===se)try{(se=new CSSStyleSheet).replaceSync(e)}catch{se=!1}if(!1===se){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[se,...t.adoptedStyleSheets]}const ce={"pop-in":function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}},le=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.toggleTimeoutId=null,this.hasOpenedOnce=!0,this.placement="top",this.edgeGap=8,this.arrow=!1,this.animation="pop-in",this.currentAnimation=null,this.boundMouseTrackingHandler=this.mouseTrackingHandler.bind(this)}validatePlacement(){a(this,"placement",p)}validateEdgeGap(){c(this,"edgeGap","number")}validateSafeSpace(){a(this,"safeSpace",["triangle","trapezoid"])}mouseTrackingHandler(t){this.host.style.setProperty("--post-safe-space-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--post-safe-space-cursor-y",`${t.clientY}px`)}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ie,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||At,re(Document.prototype,"querySelector",t),re(Document.prototype,"querySelectorAll",t),re(Element.prototype,"querySelector",t),re(Element.prototype,"querySelectorAll",t),re(Element.prototype,"matches",t),re(Element.prototype,"closest",t),re(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){_t(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Jt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===zt.get(this)&&void 0===t.force||!1===t.force?Jt(this,!0,!0):void 0!==t.force&&!0!==t.force||_t(this),"showing"===zt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return ae(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&ae(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=It(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof oe)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=It(n);if(!(o instanceof oe||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Rt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Jt(e,!0,!0):jt(e,!1)&&(Ct.set(e,t),_t(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||Ut(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",te),i.addEventListener("pointerup",te),ae(document)}()}componentDidLoad(){this.validatePlacement(),this.validateEdgeGap(),this.validateSafeSpace(),this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}async show(t){this.toggleTimeoutId||(this.eventTarget=t,this.calculatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){return this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=ce[this.animation];"function"==typeof e?this.runOpenAnimation(e,t):(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce&&(this.hasOpenedOnce=!1))}this.safeSpace&&globalThis.addEventListener("mousemove",this.boundMouseTrackingHandler)}close(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.safeSpace&&globalThis.removeEventListener("mousemove",this.boundMouseTrackingHandler),this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null),this.postBeforeToggle.emit({willOpen:!1}),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}async runOpenAnimation(t,e){let n;try{if(n=t(e),!n)return this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),void this.postShow.emit({first:this.hasOpenedOnce});this.currentAnimation=n,"running"===n.playState&&(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce})),await n.finished,this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce=!0}catch(t){console.warn("Animation failed or was interrupted:",t),this.postBeforeToggle.emit({willOpen:!1}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!1})}finally{this.currentAnimation===n&&(this.currentAnimation=null)}}handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?this.open():this.close()}startAutoupdates(){this.eventTarget&&this.host&&(this.clearAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,l=ct(t),p=r||i?[...l?it(l):[],...e?it(e):[]]:[];p.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const h=l&&a?function(t,e){let n,o=null;const r=B(t);function i(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const l=t.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=l;if(a||e(),!m||!g)return;const v={rootMargin:-d(h)+"px "+-d(r.clientWidth-(p+m))+"px "+-d(r.clientHeight-(h+g))+"px "+-d(p)+"px",threshold:u(0,f(1,c))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==c){if(!w)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||St(l,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(x,{...v,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,v)}o.observe(t)}(!0),i}(l,n):null;let m,g=-1,v=null;s&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&v&&e&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),l&&!c&&v.observe(l),e&&v.observe(e));let w=c?ut(t):null;return c&&function e(){const o=ut(t);w&&!St(w,o)&&n(),w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==h||h(),null==(t=v)||t.disconnect(),v=null,c&&cancelAnimationFrame(m)}}(this.eventTarget,this.host,this.calculatePosition.bind(this)))}getHeaderHeight(){const t=document.querySelector("post-header");return t?Number.parseFloat(getComputedStyle(t).height):0}async calculatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.computeMainPosition(),i=r.split("-")[0];if(this.dynamicPlacement=i,this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,this.arrow&&o.arrow){const{x:e,y:n}=o.arrow,r=t.STATIC_SIDES[i],s=-.5*this.arrowRef.offsetWidth;r&&Object.assign(this.arrowRef.style,{left:e?`${e}px`:"",top:n?`${n}px`:"",[r]:`${s}px`})}this.safeSpace&&this.eventTarget&&await this.updateSafeSpaceBoundaries(i)}async computeMainPosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=kt({padding:this.getHeaderHeight(),crossAxis:!1}),o=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=w(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=E(x(r)),h=y(u);let d=p[h],m=p[u];s&&(d=v(d+f["y"===h?"top":"left"],d,d-f["y"===h?"bottom":"right"])),a&&(m=v(m+f["y"===u?"top":"left"],m,m-f["y"===u?"bottom":"right"]));const g=c.fn({...e,[h]:d,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:(i={offset:32},void 0===i&&(i={}),{options:i,fn(t){const{x:e,y:n,placement:o,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=w(i,t),p={x:e,y:n},f=E(o),u=y(f);let h=p[u],d=p[f];const m=w(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+g.mainAxis,n=r.reference[u]+r.reference[t]-g.mainAxis;h<e?h=e:h>n&&(h=n)}if(l){var v,b;const t="y"===u?"width":"height",e=R.has(x(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(v=s.offset)?void 0:v[f])||0)+(e?0:g.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(b=s.offset)?void 0:b[f])||0)-(e?g.crossAxis:0);d<n?d=n:d>i&&(d=i)}return{[u]:h,[f]:d}}})}),r=[Et(this.offset??(this.arrow?t+4:t)),Mt(),...e?[n,o]:[o,n],Tt({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];var i;return this.arrow&&r.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:p=0}=w(t,e)||{};if(null==l)return{};const u=$(p),h={x:n,y:o},d=k(r),m=S(d),g=await s.getDimensions(l),x="y"===d,y=x?"top":"left",E=x?"bottom":"right",T=x?"clientHeight":"clientWidth",M=i.reference[m]+i.reference[d]-h[d]-i.floating[m],A=h[d]-i.reference[d],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let H=O?O[T]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[T]||i.floating[m]);const L=M/2-A/2,D=H/2-g[m]/2-1,P=f(u[y],D),F=f(u[E],D),z=P,R=H-g[m]-F,C=H/2-g[m]/2+L,W=v(z,C,R),j=!c.arrow&&null!=b(r)&&C!==W&&i.reference[m]/2-(C<z?P:F)-g[m]/2<0,B=j?C<z?C-z:C-R:0;return{[d]:h[d]+B,data:{[d]:W,centerOffset:C-W-B,...j&&{alignmentOffset:B}},reset:j}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:yt,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:F},c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=P(l,o,c),u=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:g,fn:v}=m,{x:w,y:x,data:b,reset:y}=await v({x:p,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:l,platform:a,elements:{reference:t,floating:e}});p=null!=w?w:p,f=null!=x?x:f,d[g]={...d[g],...b},y&&h<50&&(h++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(l=!0===y.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:p,y:f}=P(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(this.eventTarget,this.host,{placement:this.placement||"top",strategy:"fixed",middleware:r})}async updateSafeSpaceBoundaries(e){const n=this.eventTarget.getBoundingClientRect(),o="top"===e||"bottom"===e,r=((t,e,n)=>"top"===t||"bottom"===t?{popover:{y:"top"===t?e.bottom:e.top,xStart:e.left,xEnd:e.right},trigger:{y:"top"===t?n.top:n.bottom,xStart:n.left,xEnd:n.right}}:{popover:{x:"left"===t?e.right:e.left,yStart:e.top,yEnd:e.bottom},trigger:{x:"left"===t?n.left:n.right,yStart:n.top,yEnd:n.bottom}})(e,this.host.getBoundingClientRect(),n);t.PROPERTIES_TO_CLEAR.forEach((t=>{this.host.style.removeProperty(t)})),o?(this.host.style.setProperty("--post-safe-space-popover-y",`${r.popover.y}px`),this.host.style.setProperty("--post-safe-space-popover-x-start",`${r.popover.xStart}px`),this.host.style.setProperty("--post-safe-space-popover-x-end",`${r.popover.xEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-y",`${r.trigger.y}px`),this.host.style.setProperty("--post-safe-space-trigger-x-start",`${r.trigger.xStart}px`),this.host.style.setProperty("--post-safe-space-trigger-x-end",`${r.trigger.xEnd}px`)):(this.host.style.setProperty("--post-safe-space-popover-x",`${r.popover.x}px`),this.host.style.setProperty("--post-safe-space-popover-y-start",`${r.popover.yStart}px`),this.host.style.setProperty("--post-safe-space-popover-y-end",`${r.popover.yEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-x",`${r.trigger.x}px`),this.host.style.setProperty("--post-safe-space-trigger-y-start",`${r.trigger.yStart}px`),this.host.style.setProperty("--post-safe-space-trigger-y-end",`${r.trigger.yEnd}px`))}render(){return r(i,{key:"da51b463f946b73ed581ab510f5eed9ccb13c4db","data-version":l,popover:"auto"},r("div",{key:"51ba8b11b60b502a6fa03c4b808d392129a61c80",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&r("span",{key:"0c7460ca5005698768972b8c1f3115c621291444","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),r("span",{key:"d8b7fa2a392ba30b5e830e49b475ca5ee08f7f7a",part:"post-popovercontainer-border-mask"}),r("slot",{key:"d0be7e1cb648d34fc04fc43f0db3e9e44a8ccf2d"})))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[513,"safe-space"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]},void 0,{placement:[{validatePlacement:0}],edgeGap:[{validateEdgeGap:0}],safeSpace:[{validateSafeSpace:0}]}]);function pe(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(s(t))||customElements.define(s(t),le))}))}le.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},le.PROPERTIES_TO_CLEAR=["--post-safe-space-popover-x","--post-safe-space-popover-y","--post-safe-space-popover-x-start","--post-safe-space-popover-x-end","--post-safe-space-popover-y-start","--post-safe-space-popover-y-end","--post-safe-space-trigger-x","--post-safe-space-trigger-y","--post-safe-space-trigger-x-start","--post-safe-space-trigger-x-end","--post-safe-space-trigger-y-start","--post-safe-space-trigger-y-end"];export{le as P,p as a,pe as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,createEvent as a,h as r,Host as i,transformTag as e}from"@stencil/core/internal/client";import{v as o}from"./package.js";import{c as n}from"./index2.js";import"./index3.js";import{d as l}from"./post-icon2.js";const h=t(class extends s{validateLabel(){n(this,"label","string")}validateStars(){n(this,"stars","number")}validateCurrentRating(){n(this,"currentRating","number")}componentWillLoad(){this.validateLabel(),this.validateStars(),this.validateCurrentRating()}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postInput=a(this,"postInput",7),this.postChange=a(this,"postChange",7),this.hasChanged=!1,this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return r(i,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as a,h as r,Host as i,transformTag as e}from"@stencil/core/internal/client";import{v as o}from"./package.js";import{c as n}from"./index2.js";import"./index3.js";import{d as l}from"./post-icon2.js";const h=t(class extends s{validateLabel(){n(this,"label","string")}validateStars(){n(this,"stars","number")}validateCurrentRating(){n(this,"currentRating","number")}componentWillLoad(){this.validateLabel(),this.validateStars(),this.validateCurrentRating()}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postInput=a(this,"postInput",7),this.postChange=a(this,"postChange",7),this.hasChanged=!1,this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return r(i,{key:"7daf53685c00e611e289c1ce8eb4cb6491c2025b","data-version":o},r("div",{key:"d14774efb201b5f27b9c5f1557726d4683a7b34f",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} / ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>r("div",{key:"star-"+t,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},r("post-icon",{name:"favoritestar",class:"stroke"}),r("post-icon",{name:"favoritestar-solid",class:"fill"}))))))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}],stars:[{validateStars:0}],currentRating:[{validateCurrentRating:0}]}}static get style(){return":host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}"}},[1,"post-rating",{label:[513],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]},void 0,{label:[{validateLabel:0}],stars:[{validateStars:0}],currentRating:[{validateCurrentRating:0}]}]),c=h,d=function(){"undefined"!=typeof customElements&&["post-rating","post-icon"].forEach((t=>{switch(t){case"post-rating":customElements.get(e(t))||customElements.define(e(t),h);break;case"post-icon":customElements.get(e(t))||l()}}))};export{c as PostRating,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{v as c}from"./package.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return i(o,{key:"0919891d67f961e1ee2c8a7fb556d232ed34ed94","data-version":c,role:"listitem"},i("span",{key:"862705599a537267080fbf054e06353c65888bba",class:"stepper-item-content"},i("span",{key:"96c62cc07fd460402d4e49a36fad70c80eb52f78",class:"step-hidden-label visually-hidden"}),i("span",{key:"6cce8bef3684d50f8dbb72f48b1ca3b0bbcd57ca",class:"label"},i("slot",{key:"9ec06d2716870180309bbfde83a04953e7abb011"}))))}static get style(){return':host{grid-row:1;position:relative;padding-inline-start:0}:host::before,:host::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}:host(:not(:first-of-type)){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}:host(:not(:last-of-type)){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}:host(:not(:first-of-type,:last-of-type))::before{inset-inline-end:50%}:host(:not(:first-of-type,:last-of-type))::after{inset-inline-start:50%}:host(.stepper-item-current:not(:last-of-type))::after,:host(.stepper-item-current:first-of-type)::before,:host(.stepper-item-after-current)::before,:host(.stepper-item-after-current:last-of-type)::after{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;word-break:break-word;font-size:var(--post-device-font-size-7)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content{margin-inline:auto;text-align:center}:host(:last-of-type)>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}:host(.stepper-item-completed)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-selected)>.stepper-item-content{font-weight:var(--post-device-font-weight-bold)}:host(.stepper-item-selected)>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular)}:host(.stepper-item-current)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{counter-increment:step-index;content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-disabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::before{margin-inline:auto}:host(:last-of-type)>.stepper-item-content::before{margin-inline-start:auto}:host(.stepper-item-completed)>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-bg2);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2);z-index:1;mask-image:var(--post-icon-checkmark-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size7);height:var(--post-device-sizing-interactive-icon-size7);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3)}:root,:host{--post-icon-checkmark-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hlY2ttYXJrLXNvbGlkIj48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0ibTcuNDkgMTIuOTktMy42NC0zLjljLS40Ny0uNS0uNDQtMS4zLjA2LTEuNzdzMS4yOS0uNDQgMS43Ny4wNmwxLjQ4IDEuNTggMy4wNS00LjYyYy4zOC0uNTggMS4xNi0uNzQgMS43My0uMzUuNTguMzguNzQgMS4xNi4zNSAxLjczeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJtMTEuMTggMTguODgtNS4xNC01LjUxYTEuNSAxLjUgMCAwIDEgLjA3LTIuMTJjLjYtLjU2IDEuNTUtLjUzIDIuMTIuMDdsMi41NCAyLjcyIDQuODQtNy4zM2MuNDYtLjY5IDEuMzktLjg4IDIuMDgtLjQzLjY5LjQ2Ljg4IDEuMzkuNDMgMi4wOGwtNi45NCAxMC41MVoiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTE0Ljg3IDI0LjgxIDguMjMgMTcuN2MtLjY2LS43MS0uNjItMS44MS4wOC0yLjQ3LjcxLS42NiAxLjgxLS42MiAyLjQ3LjA4bDMuNjEgMy44NiA2LjYyLTEwLjA0Yy41My0uODEgMS42Mi0xLjAzIDIuNDItLjUuODEuNTMgMS4wMyAxLjYyLjUgMi40MkwxNC44NiAyNC44WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJtMTguNTYgMzAuNi04LjE0LTguNzFjLS43NS0uODEtLjcxLTIuMDcuMS0yLjgzLjgxLS43NSAyLjA3LS43MSAyLjgzLjFsNC42NyA1IDguNDEtMTIuNzRhMiAyIDAgMCAxIDMuMzQgMi4yeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0OCIgdmlld0JveD0iMCAwIDQ4IDQ4Ij48cGF0aCBkPSJtMjIuMjYgMzYuNTctOS42My0xMC4zMmMtLjg1LS45MS0uOC0yLjMzLjExLTMuMThzMi4zMy0uOCAzLjE4LjExbDUuNzQgNi4xNCAxMC4yLTE1LjQ1YTIuMjU0IDIuMjU0IDAgMCAxIDMuMTItLjY0YzEuMDQuNjggMS4zMiAyLjA4LjY0IDMuMTJMMjIuMjcgMzYuNTdaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjxwYXRoIGQ9Ik0yOS42MSA0Ny45MSAxNy4yIDM0LjYyYTIuNDk3IDIuNDk3IDAgMSAxIDMuNjUtMy40MWw4LjA4IDguNjUgMTMuOTUtMjEuMTNhMi40OTkgMi40OTkgMCAwIDEgNC4xNyAyLjc1TDI5LjYgNDcuOTFaIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZWNrbWFyay1zb2xpZCIvPjwvZz48L3N2Zz4=")}:host(:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size7)/2)}:host(:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(.stepper-item-completed)>.stepper-item-content::after{content:""}:host([aria-current=step])>.stepper-item-content::after{mask-image:var(--post-icon-edit-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:root,:host{--post-icon-edit-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktZWRpdC1zb2xpZCI+PHN5bWJvbCBpZD0iczE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGQ9Im0xLjUgMTAuOTkgOC41LTguNXMuMDMuMDUuMDUuMDdsMy41IDMuNDUtOC41MiA4LjUxem0tLjkyIDEuMi0uNTYgMy44IDMuODEtLjU2LTMuMjQtMy4yNFptMTUuMjUtOS4zN0wxMy4xOS4xOGEuNjMuNjMgMCAwIDAtLjg4IDBsLTEuMjcgMS4yN3MuMDQuMDIuMDYuMDRsMy41IDMuNDUgMS4yMy0xLjIzYy4yNC0uMjQuMjQtLjY0IDAtLjg4WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNS44NCAyMy4xNS4wMiAyNGwuODUtNS44MnptMS40MS0xLjA4TDIwLjQ5IDguODNsLTUuMjUtNS4xN3MtLjA0LS4wNy0uMDctLjFMMS45NSAxNi43OGw1LjMgNS4zWm0xNi41LTE3LjgzTDE5Ljc4LjI3YS45MzYuOTM2IDAgMCAwLTEuMzMgMGwtMi4wOSAyLjA5cy4wNi4wMy4wOS4wNmw1LjI2IDUuMTggMi4wMy0yLjAzYy4zNy0uMzcuMzctLjk2IDAtMS4zM1oiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0ibTguMDcgMzAuNzctOC4wNCAxLjIgMS4yMS04LjA3em0xLjUzLTEuMzEgMTcuODMtMTcuODQtNi45OS02Ljg5cy0uMDYtLjA5LS4wOS0uMTRMMi41NiAyMi4zOGw3LjAzIDcuMDdaTTMxLjY2IDUuNjIgMjYuMzcuMzNjLS40OS0uNDktMS4yOC0uNDktMS43NiAwbC0yLjg5IDIuODlzLjA5LjA0LjEyLjA4bDcuMDEgNi45IDIuODItMi44MmMuNDktLjQ5LjQ5LTEuMjggMC0xLjc2WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMi40MSAyOC43OSAyNS41MiA1LjcxYy4wNC4wNi4wNi4xMi4xMS4xN2w4Ljc0IDguNkwxMS4yMyAzNy42em0tMS4wMiAyLjE2TC4wNCA0MC4wMWw5LjA0LTEuMzktNy42OS03LjY4Wk0zOS41OCA3LjA3IDMyLjk3LjQ3Yy0uNjEtLjYxLTEuNi0uNjEtMi4yMSAwbC0zLjcgMy43Yy4wNS4wNC4xMS4wNi4xNS4xbDguNzYgOC42MSAzLjYxLTMuNjFjLjYxLS42MS42MS0xLjYgMC0yLjIiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHBhdGggZD0iTTIuODMgMzQuNTggMzEuMyA2LjExYy4wNS4wNy4wOC4xNC4xNC4ybDEwLjQ5IDEwLjMzLTI4LjU1IDI4LjU0em0tMS4xOCAyLjM2TDAgNDhsMTAuOTktMS42NnpNNDcuNDYgOC40NyAzOS41My41NGMtLjczLS43My0xLjkyLS43My0yLjY1IDBsLTMuODcgMy44N2MuMDYuMDQuMTMuMDcuMTkuMTJsMTAuNTEgMTAuMzQgMy43NS0zLjc1Yy43My0uNzMuNzMtMS45MiAwLTIuNjUiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZD0iTTE1LjA4IDYxLjcyIDAgNjMuOThsMi4zLTE1LjA0ek00Mi41MiA3Ljg0Yy0uMDgtLjA4LS4xMy0uMTgtLjE5LS4yOEwzLjU5IDQ2LjM0bDE0LjA5IDE0LjA5LTEuMDcgMS4wN2guMDJMNTYuNSAyMS42em0yMC43NiAzLjQ1TDUyLjcxLjcxYy0uOTctLjk3LTIuNTUtLjk3LTMuNTMgMGwtNC45OSA1Yy4wOS4wNS4xOC4xLjI2LjE3bDEzLjk5IDEzLjc4IDQuODQtNC44NGMuOTctLjk3Ljk3LTIuNTUgMC0zLjUzIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWVkaXQtc29saWQiLz48L2c+PC9zdmc+")}:host([aria-current=step]:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:host([aria-current=step]:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size4)/2)}@media screen and (max-width: 779.98px){:host{flex-grow:1;margin-inline:0;padding:0 !important}:host::before{content:unset}:host::after{inset-inline-start:0 !important}:host(:last-of-type){flex:0 0 32px}:host(:last-of-type)::after{content:unset}.stepper-item-content{margin-inline:0 !important}.label{display:none}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host::before,:host::after{background-color:CanvasText !important}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after,:host(.stepper-item-completed)::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}:host(.stepper-item-current) .stepper-item-content::before{background-color:Canvas;color:CanvasText}:host(.stepper-item-completed) .stepper-item-content::before,:host(.stepper-item-inactive) .stepper-item-content::before{border-color:Canvas;background-color:CanvasText}:host(.stepper-item-inactive) .stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-stepper-item"]),a=s,n=function(){"undefined"!=typeof customElements&&["post-stepper-item"].forEach((e=>{"post-stepper-item"===e&&(customElements.get(r(e))||customElements.define(r(e),s))}))};export{a as PostStepperItem,n as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{v as c}from"./package.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return i(o,{key:"f41ae27d8de89912b3aa34d9c89f5ec69f3df301","data-version":c,role:"listitem"},i("span",{key:"00a0dd2eb3fb020e49c5782245e1f3e72c77e780",class:"stepper-item-content"},i("span",{key:"bc9932083d295b92db24ddd22cb18a755db5ad11",class:"step-hidden-label visually-hidden"}),i("span",{key:"efe2d809c82c1d7de9e0cdf4e52b924943afa0bf",class:"label"},i("slot",{key:"47aceca3fc331ef91da60674dbc2af5ea7e76ec8"}))))}static get style(){return':host{grid-row:1;position:relative;padding-inline-start:0}:host::before,:host::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}:host(:not(:first-of-type)){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}:host(:not(:last-of-type)){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}:host(:not(:first-of-type,:last-of-type))::before{inset-inline-end:50%}:host(:not(:first-of-type,:last-of-type))::after{inset-inline-start:50%}:host(.stepper-item-current:not(:last-of-type))::after,:host(.stepper-item-current:first-of-type)::before,:host(.stepper-item-after-current)::before,:host(.stepper-item-after-current:last-of-type)::after{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;word-break:break-word;font-size:var(--post-device-font-size-7)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content{margin-inline:auto;text-align:center}:host(:last-of-type)>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}:host(.stepper-item-completed)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-selected)>.stepper-item-content{font-weight:var(--post-device-font-weight-bold)}:host(.stepper-item-selected)>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular)}:host(.stepper-item-current)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{counter-increment:step-index;content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-disabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::before{margin-inline:auto}:host(:last-of-type)>.stepper-item-content::before{margin-inline-start:auto}:host(.stepper-item-completed)>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-bg2);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2);z-index:1;mask-image:var(--post-icon-checkmark-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size7);height:var(--post-device-sizing-interactive-icon-size7);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3)}:root,:host{--post-icon-checkmark-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hlY2ttYXJrLXNvbGlkIj48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0ibTcuNDkgMTIuOTktMy42NC0zLjljLS40Ny0uNS0uNDQtMS4zLjA2LTEuNzdzMS4yOS0uNDQgMS43Ny4wNmwxLjQ4IDEuNTggMy4wNS00LjYyYy4zOC0uNTggMS4xNi0uNzQgMS43My0uMzUuNTguMzguNzQgMS4xNi4zNSAxLjczeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJtMTEuMTggMTguODgtNS4xNC01LjUxYTEuNSAxLjUgMCAwIDEgLjA3LTIuMTJjLjYtLjU2IDEuNTUtLjUzIDIuMTIuMDdsMi41NCAyLjcyIDQuODQtNy4zM2MuNDYtLjY5IDEuMzktLjg4IDIuMDgtLjQzLjY5LjQ2Ljg4IDEuMzkuNDMgMi4wOGwtNi45NCAxMC41MVoiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTE0Ljg3IDI0LjgxIDguMjMgMTcuN2MtLjY2LS43MS0uNjItMS44MS4wOC0yLjQ3LjcxLS42NiAxLjgxLS42MiAyLjQ3LjA4bDMuNjEgMy44NiA2LjYyLTEwLjA0Yy41My0uODEgMS42Mi0xLjAzIDIuNDItLjUuODEuNTMgMS4wMyAxLjYyLjUgMi40MkwxNC44NiAyNC44WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJtMTguNTYgMzAuNi04LjE0LTguNzFjLS43NS0uODEtLjcxLTIuMDcuMS0yLjgzLjgxLS43NSAyLjA3LS43MSAyLjgzLjFsNC42NyA1IDguNDEtMTIuNzRhMiAyIDAgMCAxIDMuMzQgMi4yeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0OCIgdmlld0JveD0iMCAwIDQ4IDQ4Ij48cGF0aCBkPSJtMjIuMjYgMzYuNTctOS42My0xMC4zMmMtLjg1LS45MS0uOC0yLjMzLjExLTMuMThzMi4zMy0uOCAzLjE4LjExbDUuNzQgNi4xNCAxMC4yLTE1LjQ1YTIuMjU0IDIuMjU0IDAgMCAxIDMuMTItLjY0YzEuMDQuNjggMS4zMiAyLjA4LjY0IDMuMTJMMjIuMjcgMzYuNTdaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjxwYXRoIGQ9Ik0yOS42MSA0Ny45MSAxNy4yIDM0LjYyYTIuNDk3IDIuNDk3IDAgMSAxIDMuNjUtMy40MWw4LjA4IDguNjUgMTMuOTUtMjEuMTNhMi40OTkgMi40OTkgMCAwIDEgNC4xNyAyLjc1TDI5LjYgNDcuOTFaIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZWNrbWFyay1zb2xpZCIvPjwvZz48L3N2Zz4=")}:host(:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size7)/2)}:host(:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(.stepper-item-completed)>.stepper-item-content::after{content:""}:host([aria-current=step])>.stepper-item-content::after{mask-image:var(--post-icon-edit-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:root,:host{--post-icon-edit-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktZWRpdC1zb2xpZCI+PHN5bWJvbCBpZD0iczE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGQ9Im0xLjUgMTAuOTkgOC41LTguNXMuMDMuMDUuMDUuMDdsMy41IDMuNDUtOC41MiA4LjUxem0tLjkyIDEuMi0uNTYgMy44IDMuODEtLjU2LTMuMjQtMy4yNFptMTUuMjUtOS4zN0wxMy4xOS4xOGEuNjMuNjMgMCAwIDAtLjg4IDBsLTEuMjcgMS4yN3MuMDQuMDIuMDYuMDRsMy41IDMuNDUgMS4yMy0xLjIzYy4yNC0uMjQuMjQtLjY0IDAtLjg4WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNS44NCAyMy4xNS4wMiAyNGwuODUtNS44MnptMS40MS0xLjA4TDIwLjQ5IDguODNsLTUuMjUtNS4xN3MtLjA0LS4wNy0uMDctLjFMMS45NSAxNi43OGw1LjMgNS4zWm0xNi41LTE3LjgzTDE5Ljc4LjI3YS45MzYuOTM2IDAgMCAwLTEuMzMgMGwtMi4wOSAyLjA5cy4wNi4wMy4wOS4wNmw1LjI2IDUuMTggMi4wMy0yLjAzYy4zNy0uMzcuMzctLjk2IDAtMS4zM1oiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0ibTguMDcgMzAuNzctOC4wNCAxLjIgMS4yMS04LjA3em0xLjUzLTEuMzEgMTcuODMtMTcuODQtNi45OS02Ljg5cy0uMDYtLjA5LS4wOS0uMTRMMi41NiAyMi4zOGw3LjAzIDcuMDdaTTMxLjY2IDUuNjIgMjYuMzcuMzNjLS40OS0uNDktMS4yOC0uNDktMS43NiAwbC0yLjg5IDIuODlzLjA5LjA0LjEyLjA4bDcuMDEgNi45IDIuODItMi44MmMuNDktLjQ5LjQ5LTEuMjggMC0xLjc2WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMi40MSAyOC43OSAyNS41MiA1LjcxYy4wNC4wNi4wNi4xMi4xMS4xN2w4Ljc0IDguNkwxMS4yMyAzNy42em0tMS4wMiAyLjE2TC4wNCA0MC4wMWw5LjA0LTEuMzktNy42OS03LjY4Wk0zOS41OCA3LjA3IDMyLjk3LjQ3Yy0uNjEtLjYxLTEuNi0uNjEtMi4yMSAwbC0zLjcgMy43Yy4wNS4wNC4xMS4wNi4xNS4xbDguNzYgOC42MSAzLjYxLTMuNjFjLjYxLS42MS42MS0xLjYgMC0yLjIiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHBhdGggZD0iTTIuODMgMzQuNTggMzEuMyA2LjExYy4wNS4wNy4wOC4xNC4xNC4ybDEwLjQ5IDEwLjMzLTI4LjU1IDI4LjU0em0tMS4xOCAyLjM2TDAgNDhsMTAuOTktMS42NnpNNDcuNDYgOC40NyAzOS41My41NGMtLjczLS43My0xLjkyLS43My0yLjY1IDBsLTMuODcgMy44N2MuMDYuMDQuMTMuMDcuMTkuMTJsMTAuNTEgMTAuMzQgMy43NS0zLjc1Yy43My0uNzMuNzMtMS45MiAwLTIuNjUiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZD0iTTE1LjA4IDYxLjcyIDAgNjMuOThsMi4zLTE1LjA0ek00Mi41MiA3Ljg0Yy0uMDgtLjA4LS4xMy0uMTgtLjE5LS4yOEwzLjU5IDQ2LjM0bDE0LjA5IDE0LjA5LTEuMDcgMS4wN2guMDJMNTYuNSAyMS42em0yMC43NiAzLjQ1TDUyLjcxLjcxYy0uOTctLjk3LTIuNTUtLjk3LTMuNTMgMGwtNC45OSA1Yy4wOS4wNS4xOC4xLjI2LjE3bDEzLjk5IDEzLjc4IDQuODQtNC44NGMuOTctLjk3Ljk3LTIuNTUgMC0zLjUzIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWVkaXQtc29saWQiLz48L2c+PC9zdmc+")}:host([aria-current=step]:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:host([aria-current=step]:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size4)/2)}@media screen and (max-width: 779.98px){:host{flex-grow:1;margin-inline:0;padding:0 !important}:host::before{content:unset}:host::after{inset-inline-start:0 !important}:host(:last-of-type){flex:0 0 32px}:host(:last-of-type)::after{content:unset}.stepper-item-content{margin-inline:0 !important}.label{display:none}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host::before,:host::after{background-color:CanvasText !important}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after,:host(.stepper-item-completed)::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}:host(.stepper-item-current) .stepper-item-content::before{background-color:Canvas;color:CanvasText}:host(.stepper-item-completed) .stepper-item-content::before,:host(.stepper-item-inactive) .stepper-item-content::before{border-color:Canvas;background-color:CanvasText}:host(.stepper-item-inactive) .stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-stepper-item"]),a=s,n=function(){"undefined"!=typeof customElements&&["post-stepper-item"].forEach((e=>{"post-stepper-item"===e&&(customElements.get(r(e))||customElements.define(r(e),s))}))};export{a as PostStepperItem,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as n}from"@stencil/core/internal/client";import{v as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as n}from"@stencil/core/internal/client";import{v as r}from"./package.js";import{c as a,f as d}from"./index2.js";import"./index3.js";const p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.currentIndex=-1}validateTextCurrentStep(){a(this,"textCurrentStep","string")}validateTextCompletedStep(){a(this,"textCompletedStep","string")}validateTextStepNumber(){d(this,"textStepNumber",/\{number\}/),this.updateActiveStepNumber()}validateCurrentIndex(){a(this,"currentIndex","number"),this.stepItems&&(this.updateSteps(),this.checkIndexes())}validateSelectedIndex(){void 0===this.selectedIndex?this.selectedIndex=this.currentIndex:(a(this,"selectedIndex","number"),this.checkIndexes()),this.updateSteps()}componentDidLoad(){this.validateTextCompletedStep(),this.validateTextCurrentStep(),this.validateTextStepNumber(),setTimeout((()=>{this.validateCurrentIndex(),this.validateSelectedIndex()}))}checkIndexes(){this.selectedIndex>this.currentIndex&&console.error("The selected-index cannot be higher than the current-index, as only the current and completed steps can be selected.")}updateActiveStepNumber(){this.textStepNumber&&(this.mobileActiveStepLabel=this.textStepNumber.replaceAll("{number}",""+(this.selectedIndex+1)),this.stepItems&&this.updateMobileActiveStepVisibility())}updateSteps(){this.stepItems=this.host.querySelectorAll("post-stepper-item"),!this.stepItems||this.stepItems.length<3?console.error("The post-stepper component should have at least three steps."):(this.updateActiveStepNumber(),this.stepItems.forEach(((e,t)=>{this.selectedIndex===t&&(this.mobileActiveStepName=e.innerHTML),e.classList.toggle("stepper-item-completed",this.currentIndex>t),e.classList.toggle("stepper-item-current",this.currentIndex===t),e.classList.toggle("stepper-item-selected",this.selectedIndex===t),e.classList.toggle("stepper-item-inactive",this.currentIndex<t),e.classList.toggle("stepper-item-after-current",t===this.currentIndex+1);const i=e.shadowRoot?.querySelector(".step-hidden-label");if(i){let e="";this.currentIndex>t&&(e=this.textCompletedStep+": "),this.selectedIndex===t&&(e=`${e}${this.textCurrentStep}: `),i.textContent=e}this.selectedIndex===t?(e.setAttribute("aria-current","step"),e.setAttribute("aria-live","polite")):(e.removeAttribute("aria-current"),e.removeAttribute("aria-live"))})),this.updateMobileActiveStepVisibility())}updateMobileActiveStepVisibility(){(this.selectedIndex>=this.stepItems.length||this.selectedIndex<0)&&(this.mobileActiveStepLabel="",this.mobileActiveStepName="")}render(){return i(s,{key:"8d6184e49608c81446eb3aa880df8a4535b9b959","data-version":r},i("ol",{key:"7340f39e1c7f8b903cb5f5e9c2cd536f54f0d60c"},i("slot",{key:"6a120449b6224f4a53c68bfedf08ef753d011b8b",onSlotchange:()=>this.updateSteps()})),i("div",{key:"9b4f91edd4bc7496a6c8c8976687323edf67d78e",class:"active-step","aria-hidden":"true"},i("span",{key:"70ad722fa40e413cf4ceadb3af8575dcffc33b81",class:"active-step-label"},this.mobileActiveStepLabel),i("span",{key:"02ea637605b7dfeb423daf7efb64b2abd572cea8",innerHTML:this.mobileActiveStepName})))}get host(){return this}static get watchers(){return{textCurrentStep:[{validateTextCurrentStep:0}],textCompletedStep:[{validateTextCompletedStep:0}],textStepNumber:[{validateTextStepNumber:0}],currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}]}}static get style(){return"ol{margin-block:0;padding-inline-start:0;list-style:none;counter-reset:step-index;display:grid;position:relative;overflow:hidden;grid-template-columns:20px;grid-auto-columns:minmax(0, 1fr);padding-inline-end:20px}@media screen and (max-width: 779.98px){ol{display:flex;padding-inline-end:0}}.active-step{font-size:var(--post-device-font-size-7);font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.active-step .active-step-label:has(+span:empty){visibility:hidden}@media screen and (min-width: 780px){.active-step{display:none}}"}},[257,"post-stepper",{textCurrentStep:[513,"text-current-step"],textCompletedStep:[513,"text-completed-step"],textStepNumber:[513,"text-step-number"],currentIndex:[2,"current-index"],selectedIndex:[2,"selected-index"],mobileActiveStepLabel:[32],mobileActiveStepName:[32]},void 0,{textCurrentStep:[{validateTextCurrentStep:0}],textCompletedStep:[{validateTextCompletedStep:0}],textStepNumber:[{validateTextStepNumber:0}],currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}]}]),c=p,l=function(){"undefined"!=typeof customElements&&["post-stepper"].forEach((e=>{"post-stepper"===e&&(customElements.get(n(e))||customElements.define(n(e),p))}))};export{c as PostStepper,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as i,transformTag as a}from"@stencil/core/internal/client";import{v as r}from"./package.js";import{c}from"./index2.js";import"./index3.js";import{n}from"./index.browser.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.mutationObserver=new MutationObserver(this.checkNavigationMode.bind(this)),this.isNavigationMode=!1}validateName(){c(this,"name","string")}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.tabId="tab-"+(this.host.id||n(6)),this.checkNavigationMode()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkNavigationMode(){const t=null!==this.host.querySelector("a");this.isNavigationMode=t}render(){return o(i,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as i,transformTag as a}from"@stencil/core/internal/client";import{v as r}from"./package.js";import{c}from"./index2.js";import"./index3.js";import{n}from"./index.browser.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.mutationObserver=new MutationObserver(this.checkNavigationMode.bind(this)),this.isNavigationMode=!1}validateName(){c(this,"name","string")}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.tabId="tab-"+(this.host.id||n(6)),this.checkNavigationMode()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkNavigationMode(){const t=null!==this.host.querySelector("a");this.isNavigationMode=t}render(){return o(i,{key:"ad908beacdffc7d6ce2eb0cab7a7a2868e876a34",id:this.tabId,role:this.isNavigationMode?void 0:"tab","data-version":r,"data-navigation-mode":""+this.isNavigationMode,"aria-selected":this.isNavigationMode?void 0:"false",tabindex:this.isNavigationMode?void 0:"-1",class:this.isNavigationMode?"nav-item":"tab-title"},o("slot",{key:"d8208d5c9b78f31351ad6c32677b8c693ec449f6"}))}get host(){return this}static get watchers(){return{name:[{validateName:0}]}}static get style(){return'.tab-title,.nav-item a{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0);cursor:pointer}.tab-title:hover,.nav-item a:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title:focus-visible,.nav-item a:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title:focus-visible::after,.nav-item a:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:focus-visible,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title,.nav-item a{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title:hover,.tab-title:focus,.tab-title:focus-within,.tab-title:focus-visible,.nav-item a:hover,.nav-item a:focus,.nav-item a:focus-within,.nav-item a:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}}.nav-item{display:inline-block;position:relative;box-sizing:border-box;cursor:default}.nav-item:focus,.nav-item:focus-visible{outline:none;box-shadow:none}.nav-item:focus::after,.nav-item:focus-visible::after{display:none}.nav-item a{color:inherit;text-decoration:none;display:block;width:100%;height:100%;box-sizing:border-box;position:relative;outline:none;cursor:pointer;border-radius:0}.nav-item a:focus{outline:none}.nav-item a:active{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.nav-item a:focus-visible{outline:none !important}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}.tab-title.active,.nav-item.active a{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title.active::before,.nav-item.active a::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title.active,.nav-item.active a{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title.active::before,.nav-item.active a::before{background-color:Highlight}}:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}'}},[257,"post-tab-item",{name:[513],tabId:[32],isNavigationMode:[32]},void 0,{name:[{validateName:0}]}]),b=s,l=function(){"undefined"!=typeof customElements&&["post-tab-item"].forEach((t=>{"post-tab-item"===t&&(customElements.get(a(t))||customElements.define(a(t),s))}))};export{b as PostTabItem,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as s,Host as o,transformTag as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as s,Host as o,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{n as a}from"./index.browser.js";import{c as i}from"./index2.js";import"./index3.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}validateFor(){i(this,"for","string")}componentWillLoad(){this.validateFor(),this.panelId="panel-"+(this.host.id||a(6))}render(){return s(o,{key:"d80c058e686d94347bfcb266f35f73247fc6db5a","data-version":n,id:this.panelId,role:"tabpanel",slot:"panels"},s("slot",{key:"dc226cf7fe57939fd53a8f1cc68c9eaf766d5c1e"}))}get host(){return this}static get watchers(){return{for:[{validateFor:0}]}}static get style(){return":host{display:none}"}},[257,"post-tab-panel",{for:[513],panelId:[32]},void 0,{for:[{validateFor:0}]}]),l=c,d=function(){"undefined"!=typeof customElements&&["post-tab-panel"].forEach((t=>{"post-tab-panel"===t&&(customElements.get(r(t))||customElements.define(r(t),c))}))};export{l as PostTabPanel,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,createEvent as i,h as e,Host as a,transformTag as n}from"@stencil/core/internal/client";import{v as o}from"./package.js";import{f as h}from"./fade.js";import{c as r}from"./index2.js";import"./index3.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=i(this,"postChange",7),this.isLoaded=!1,this.isNavigationMode=!1,this.fullWidth=!1}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isNavigationMode&&r(this,"label","string")}componentWillRender(){this.detectMode()}componentDidLoad(){if(this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.setupContentObserver(),this.validateLabel(),this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver.disconnect()}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-navigation-mode","aria-current"]})}handleContentChange(t){const s=this.shouldRedetectMode(t);this.hasAriaCurrentChanged(t)&&this.isNavigationMode&&this.updateActiveNavigationTab(),s&&this.handleModeChange()}shouldRedetectMode(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-navigation-mode"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActiveNavigationTab(){const t=this.findActiveNavigationTab();t&&t!==this.currentActiveTab&&this.activateTab(t)}handleModeChange(){const t=this.isNavigationMode;this.detectMode(),t!==this.isNavigationMode&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectMode(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.navigationMode));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both navigation mode (anchor elements) and panel mode (post-tab-panel elements) at the same time.");this.isNavigationMode=t}findActiveNavigationTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,i=this.host.querySelector(`post-tab-item[name=${t}]`);this.activateTab(i),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.isLoaded&&this.postChange.emit(this.currentActiveTab.name)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await function(t){return"function"==typeof t.componentOnReady?t.componentOnReady():new Promise((s=>function(t){return"function"==typeof requestAnimationFrame?requestAnimationFrame(t):setTimeout(t)}((()=>{s(t)}))))}(t),this.isNavigationMode)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.currentActiveTab.classList.remove("active"),this.isNavigationMode||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),t.classList.add("active"),this.isNavigationMode||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=h(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=h(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const i=Array.from(this.tabs).indexOf(t);let e;e="ArrowRight"===s?this.tabs[i+1]||this.tabs[0]:this.tabs[i-1]||this.tabs.at(-1),e&&(e.focus(),this.show(e.name))}render(){return e(a,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as i,h as e,Host as a,transformTag as n}from"@stencil/core/internal/client";import{v as o}from"./package.js";import{f as h}from"./fade.js";import{c as r}from"./index2.js";import"./index3.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=i(this,"postChange",7),this.isLoaded=!1,this.isNavigationMode=!1,this.fullWidth=!1}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isNavigationMode&&r(this,"label","string")}componentWillRender(){this.detectMode()}componentDidLoad(){if(this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.setupContentObserver(),this.validateLabel(),this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver.disconnect()}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-navigation-mode","aria-current"]})}handleContentChange(t){const s=this.shouldRedetectMode(t);this.hasAriaCurrentChanged(t)&&this.isNavigationMode&&this.updateActiveNavigationTab(),s&&this.handleModeChange()}shouldRedetectMode(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-navigation-mode"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActiveNavigationTab(){const t=this.findActiveNavigationTab();t&&t!==this.currentActiveTab&&this.activateTab(t)}handleModeChange(){const t=this.isNavigationMode;this.detectMode(),t!==this.isNavigationMode&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectMode(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.navigationMode));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both navigation mode (anchor elements) and panel mode (post-tab-panel elements) at the same time.");this.isNavigationMode=t}findActiveNavigationTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,i=this.host.querySelector(`post-tab-item[name=${t}]`);this.activateTab(i),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.isLoaded&&this.postChange.emit(this.currentActiveTab.name)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await function(t){return"function"==typeof t.componentOnReady?t.componentOnReady():new Promise((s=>function(t){return"function"==typeof requestAnimationFrame?requestAnimationFrame(t):setTimeout(t)}((()=>{s(t)}))))}(t),this.isNavigationMode)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.currentActiveTab.classList.remove("active"),this.isNavigationMode||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),t.classList.add("active"),this.isNavigationMode||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=h(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=h(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const i=Array.from(this.tabs).indexOf(t);let e;e="ArrowRight"===s?this.tabs[i+1]||this.tabs[0]:this.tabs[i-1]||this.tabs.at(-1),e&&(e.focus(),this.show(e.name))}render(){return e(a,{key:"4eb78778cb1a98e78714b5b8d69d15eaa68170c6","data-version":o},e("div",{key:"203c1529d44e676d40dd4f87593bcce07901079f",class:"tabs-wrapper",part:"post-tabs"},e(this.isNavigationMode?"nav":"div",{key:"70f132a96d11fdcc0f0e9bab5053cc3a188b5b04",class:"tabs",role:this.isNavigationMode?void 0:"tablist","aria-label":this.isNavigationMode?this.label:void 0},e("slot",{key:"24e2b06bf1b884d83d6c915d4c54029856f2a0ec",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}}))),!this.isNavigationMode&&e("div",{key:"bd6530a08d31258fa028761f44f0db4dc12541ec",class:"tab-content",part:"post-tabs-content"},e("slot",{key:"df50010f2b6cfbd77bc435bedbff1677415869e5",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return'.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}:host([full-width=true]) .tabs-wrapper{margin-inline:calc(-1*var(--post-container-offset))}:host([full-width=true]) .tabs-wrapper .tabs{padding-inline:var(--post-container-offset)}'}},[257,"post-tabs",{activeTab:[1,"active-tab"],fullWidth:[516,"full-width"],label:[513],isNavigationMode:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]),c=l,d=function(){"undefined"!=typeof customElements&&["post-tabs"].forEach((t=>{"post-tabs"===t&&(customElements.get(n(t))||customElements.define(n(t),l))}))};export{c as PostTabs,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as r}from"./package.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return o(s,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as r}from"./package.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return o(s,{key:"9d5a1290041d0a1959efceb520423124e5a09270","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},o("slot",{key:"9168b19b5ddd39dcf61139ff335db773d3da1a1a"}))}get host(){return this}static get style(){return":host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function a(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((t=>{"post-togglebutton"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}export{n as P,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Build as t,proxyCustomElement as
|
|
1
|
+
import{Build as t,proxyCustomElement as e,HTMLElement as s,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{g as n}from"./index2.js";import"./index3.js";import{v as h}from"./package.js";import{i as a}from"./focusable.js";const l=["pointerenter","pointerleave","focusin","focusout","long-press"];t.isBrowser&&(async()=>{await import("./long-press-event.js")})();const c=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}validateControlFor(){n(this,"for","string")}get tooltip(){if(t.isServer)return null;const e=document.getElementById(this.for);return"post-tooltip"===e?.localName?e:null}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){a(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){l.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){l.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return i(o,{key:"7121e61cb791f41af5f41b5e2586b0a0399a4e05","data-version":h},i("slot",{key:"5de58a569a3bfedb44330c7b66150e58afdfea9b",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get watchers(){return{for:[{validateControlFor:0}]}}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]},void 0,{for:[{validateControlFor:0}]}]),p=c,d=function(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(r(t))||customElements.define(r(t),c))}))};export{p as PostTooltipTrigger,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";import{v as a}from"./package.js";import{d as i}from"./index2.js";import"./index3.js";import{a as n,d as p}from"./post-popovercontainer2.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}validatePlacement(){i(this,"placement",n)}componentWillLoad(){this.validatePlacement()}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(e){this.open||await this.popoverRef.show(e)}async hide(){this.popoverRef.hide()}async toggle(e,t){this.popoverRef.toggle(e,t)}handleBeforeToggle(e){this.open=e.detail.willOpen}render(){return o(r,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as o,Host as r,transformTag as s}from"@stencil/core/internal/client";import{v as a}from"./package.js";import{d as i}from"./index2.js";import"./index3.js";import{a as n,d as p}from"./post-popovercontainer2.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}validatePlacement(){i(this,"placement",n)}componentWillLoad(){this.validatePlacement()}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(e){this.open||await this.popoverRef.show(e)}async hide(){this.popoverRef.hide()}async toggle(e,t){this.popoverRef.toggle(e,t)}handleBeforeToggle(e){this.open=e.detail.willOpen}render(){return o(r,{key:"4822f0831a0ce3e74e7eeb181f562b2e4624efc8","data-version":a},o("post-popovercontainer",{key:"ba403db39900c4fddc6ab7dca4be73c17b2e60bf",safeSpace:"trapezoid",class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,onPostBeforeToggle:e=>this.handleBeforeToggle(e),ref:e=>this.popoverRef=e},o("slot",{key:"205a693e6e0c2ed41c7c8b5a2dd8ae214f20e199"})))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}]}}static get style(){return':host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);width:inherit;word-wrap:break-word;white-space:normal}'}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]},void 0,{placement:[{validatePlacement:0}]}]),d=c,l=function(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((e=>{switch(e){case"post-tooltip":customElements.get(s(e))||customElements.define(s(e),c);break;case"post-popovercontainer":customElements.get(s(e))||p()}}))};export{d as PostTooltip,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as
|
|
1
|
+
import{t,p as s,H as e,h as o,a as i}from"./index.js";import{v as r}from"./p-DW7sbg9f.js";const a=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return o(i,{key:"9d5a1290041d0a1959efceb520423124e5a09270","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},o("slot",{key:"9168b19b5ddd39dcf61139ff335db773d3da1a1a"}))}get host(){return this}static get style(){return":host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function n(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((s=>{"post-togglebutton"===s&&(customElements.get(t(s))||customElements.define(t(s),a))}))}n();export{a as P,n as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as i,a as o,t as a}from"./index.js";import{a as n,d as r}from"./p-
|
|
1
|
+
import{p as e,H as t,c as s,h as i,a as o,t as a}from"./index.js";import{a as n,d as r}from"./p-Dmnnz3fB.js";import{v as l}from"./p-DW7sbg9f.js";import{g as h}from"./p-DsaGKkkf.js";import{d as c,c as d}from"./p-B2BDAeHI.js";import"./p-CJcRbvrI.js";import{E as p}from"./p-rEfV4v4a.js";import{g as m}from"./p-08F-DB-d.js";var f=function(e,t,s,i){var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,s,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,s,n):o(t,s))||n);return a>3&&n&&Object.defineProperty(t,s,n),n};const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.toggleMenu=s(this,"toggleMenu"),this.lastFocusedElement=null,this.KEYCODES={SPACE:" ",ENTER:"Enter",UP:"ArrowUp",DOWN:"ArrowDown",TAB:"Tab",HOME:"Home",END:"End",ESCAPE:"Escape"},this.placement="bottom",this.isVisible=!1,this.handleKeyDown=e=>{e.stopPropagation(),e.key!==this.KEYCODES.ESCAPE?Object.values(this.KEYCODES).includes(e.key)&&this.controlKeyDownHandler(e):this.toggle(this.host)},this.handleClick=e=>{["BUTTON","A","INPUT","SELECT","TEXTAREA"].includes(e.target.tagName)&&this.toggle(this.host)}}validatePlacement(){c(this,"placement",n)}validateLabel(){d(this,"label","string")}connectedCallback(){this.root=m(this.host),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick)}componentDidLoad(){this.validatePlacement(),this.validateLabel()}async toggle(e){this.popoverRef?await this.popoverRef.toggle(e):console.error("toggle: popoverRef is null or undefined")}async show(e){this.popoverRef?await this.popoverRef.show(e):console.error("show: popoverRef is null or undefined")}async hide(){this.popoverRef?await this.popoverRef.hide():console.error("hide: popoverRef is null or undefined")}handlePostShown(e){if(e.detail.first){this.host.setAttribute("role","menu");const e=this.getSlottedItems();for(const t of e)t.setAttribute("role","menuitem");this.label&&this.host.setAttribute("aria-label",this.label)}}handlePostBeforeToggle(e){this.isVisible=e.detail.willOpen,this.toggleMenu.emit(this.isVisible),this.isVisible?(this.lastFocusedElement=this.root?.activeElement,requestAnimationFrame((()=>{const e=this.getSlottedItems();e.length>0&&e[0].focus()}))):this.lastFocusedElement&&this.lastFocusedElement.focus()}controlKeyDownHandler(e){const t=this.getSlottedItems();if(0===t.length)return;let s=t.findIndex((e=>e===m(e).activeElement));switch(e.key){case this.KEYCODES.UP:e.preventDefault(),s=(s-1+t.length)%t.length;break;case this.KEYCODES.DOWN:e.preventDefault(),s=(s+1)%t.length;break;case this.KEYCODES.HOME:e.preventDefault(),s=0;break;case this.KEYCODES.END:e.preventDefault(),s=t.length-1;break;case this.KEYCODES.SPACE:return void this.toggle(this.host);case this.KEYCODES.TAB:this.toggle(this.host)}t[s]&&t[s].focus()}getSlottedItems(){const e=this.host.shadowRoot.querySelectorAll("slot"),t=[];return e.forEach((e=>t.push(...e.assignedElements()))),t.flatMap((e=>e instanceof HTMLSlotElement?e.assignedElements():e)).flatMap((e=>Array.from(h(e))))}render(){return i(o,{key:"7d0b1cd5bbb556696a565678446d046e6ff076f6","data-version":l},i("post-popovercontainer",{key:"0ae774fe00ca20072166dc8cd101462852227868",onPostShow:this.handlePostShown.bind(this),onPostBeforeToggle:this.handlePostBeforeToggle.bind(this),placement:this.placement,ref:e=>this.popoverRef=e},i("div",{key:"b222a596f617242223d83ca52fe5bea8a5cec99a",part:"post-menu"},i("slot",{key:"dd48fe47915864ffe3febcc27151e458db52a8f4",name:"header"}),i("slot",{key:"1ed5dccd1fbd838f05a11498717257c175be5073"}))))}get host(){return this}static get watchers(){return{placement:[{validatePlacement:0}],label:[{validateLabel:0}]}}static get style(){return":host{display:block}:where([part=post-menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}"}},[257,"post-menu",{placement:[1],label:[513],isVisible:[32],toggle:[64],show:[64],hide:[64]},void 0,{placement:[{validatePlacement:0}],label:[{validateLabel:0}]}]);function u(){"undefined"!=typeof customElements&&["post-menu","post-popovercontainer"].forEach((e=>{switch(e){case"post-menu":customElements.get(a(e))||customElements.define(a(e),b);break;case"post-popovercontainer":customElements.get(a(e))||r()}}))}f([p("post-popovercontainer")],b.prototype,"handlePostShown",null),f([p("post-popovercontainer")],b.prototype,"handlePostBeforeToggle",null),u();export{b as P,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as a,H as i,h as e,a as n}from"./index.js";import{d as s,g as o,c as r}from"./p-B2BDAeHI.js";import{v as l}from"./p-
|
|
1
|
+
import{t,p as a,H as i,h as e,a as n}from"./index.js";import{d as s,g as o,c as r}from"./p-B2BDAeHI.js";import{v as l}from"./p-DW7sbg9f.js";const m=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"],c=`https://unpkg.com/@swisspost/design-system-icons@${l}/public/post-icons/`,f=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.flipH=!1,this.flipV=!1}validateAnimation(){s(this,"animation",m)}validateBase(){o(this,"base","string")}validateName(){r(this,"name","string")}validateRotate(){o(this,"rotate","number")}validateScale(){o(this,"scale","number")}getUrl(){const t=`${this.name}.svg`;if(this.url?.startsWith("data:image/"))return this.url;if(this.url)return this.url;const a=t=>/^https?:\/\//.test(t),i=t=>t&&!t.endsWith("/")?`${t}/`:t,e=t=>t.replaceAll(/([^:])\/\//g,"$1/"),n=globalThis.location.origin,s=document.querySelector("base[href]")?.getAttribute("href")||"";let o="";{const t=document.querySelector('meta[name="design-system-settings"]');o=t?.getAttribute("data-post-icon-base")||""}const r=t=>{const e=i(s),o=i(t);return a(e)?`${e}${o}`:`${n}${e}${o}`};let l;return this.base?(l=a(this.base)?`${i(this.base)}${t}`:`${r(this.base)}${t}`,e(l)):o?(l=a(o)?`${i(o)}${t}`:`${r(o)}${t}`,e(l)):e(`${c}${t}`)}getStyles(){const t=this.getUrl();return Object.fromEntries(Object.entries({"-webkit-mask-image":`url(${t})`,"mask-image":`url('${t}')`,transform:(this.scale&&!Number.isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!Number.isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([t,a])=>null!==a)))}componentDidLoad(){this.validateBase(),this.validateName(),this.validateScale(),this.validateRotate(),this.validateAnimation()}render(){return e(n,{key:"f0c7dbf7fe05218aa6fc6cde30e249f1a709df27","data-version":l},e("span",{key:"b814a9f52a2eee57b7a59913c84caada39f63d30",style:this.getStyles()}))}get host(){return this}static get watchers(){return{animation:[{validateAnimation:0}],base:[{validateBase:0}],name:[{validateName:0}],rotate:[{validateRotate:0}],scale:[{validateScale:0}]}}static get style(){return":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}"}},[1,"post-icon",{animation:[513],base:[1],url:[1],flipH:[516,"flip-h"],flipV:[516,"flip-v"],name:[513],rotate:[2],scale:[2]},void 0,{animation:[{validateAnimation:0}],base:[{validateBase:0}],name:[{validateName:0}],rotate:[{validateRotate:0}],scale:[{validateScale:0}]}]);function h(){"undefined"!=typeof customElements&&["post-icon"].forEach((a=>{"post-icon"===a&&(customElements.get(t(a))||customElements.define(t(a),f))}))}h();export{f as P,h as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as e,H as s,c as o,h as i,a}from"./index.js";import{v as l}from"./p-DW7sbg9f.js";import"./p-CJcRbvrI.js";import{g as r}from"./p-B2BDAeHI.js";const h={height:"0",overflow:"hidden"},n={duration:!globalThis.matchMedia||globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches?0:350,easing:"ease",fill:"forwards"},c=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=o(this,"postToggle"),this.collapsed=!1}collapsedChange(){r(this,"collapsed","boolean")}get isExpanded(){return!this.collapsed}componentDidLoad(){this.collapsedChange(),this.updateTriggers()}async toggle(t=!this.isExpanded){if(t===this.isExpanded)return this.isExpanded;this.collapsed=!t;const e=this.isExpanded;{const t=e?(s=this.host).animate([h,{height:`${s.scrollHeight}px`,offset:1,overflow:"hidden"},{height:"auto",overflow:"visible"}],n):function(t){const e=globalThis.getComputedStyle(t).height;return t.animate([{height:e},h],n)}(this.host);this.postToggle.emit(e),await t.finished,t.commitStyles(),this.updateTriggers()}var s;return e}updateTriggers(){document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`).forEach((t=>t.update()))}render(){return i(a,{key:"79ec1a3eb11225a93f5e5b6da7334d20d5e4b565","data-version":l,tabindex:this.collapsed?-1:void 0,style:this.collapsed?h:void 0},i("slot",{key:"baff34fc9b45aec4c3fb0f74ad676ea1237c7d23"}))}get host(){return this}static get watchers(){return{collapsed:[{collapsedChange:0}]}}static get style(){return":host{display:block;position:relative;overflow:var(--post-collapsible-initial-overflow, hidden);height:var(--post-collapsible-initial-height, auto)}"}},[257,"post-collapsible",{collapsed:[1028],toggle:[64]},void 0,{collapsed:[{collapsedChange:0}]}]);function d(){"undefined"!=typeof customElements&&["post-collapsible"].forEach((e=>{"post-collapsible"===e&&(customElements.get(t(e))||customElements.define(t(e),c))}))}d();export{c as P,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as o}from"./index.js";import{v as n}from"./p-
|
|
1
|
+
import{t,p as e,H as o}from"./index.js";import{v as n}from"./p-DW7sbg9f.js";const i=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost()}connectedCallback(){this.host.dataset.version=n}get host(){return this}static get style(){return"post-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}"}},[0,"post-menu-item"]);function m(){"undefined"!=typeof customElements&&["post-menu-item"].forEach((e=>{"post-menu-item"===e&&(customElements.get(t(e))||customElements.define(t(e),i))}))}m();export{i as P,m as d}
|