@swisspost/design-system-components 1.7.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{index-c07c0cdb.js → index-13695f3f.js} +9 -5
  3. package/dist/cjs/index-13695f3f.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +12 -12
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/package-8152e25e.js +7 -0
  7. package/dist/cjs/package-8152e25e.js.map +1 -0
  8. package/dist/cjs/post-accordion-9877919c.js +88 -0
  9. package/dist/cjs/post-accordion-9877919c.js.map +1 -0
  10. package/dist/cjs/post-accordion-item.cjs.entry.js +55 -0
  11. package/dist/cjs/post-accordion-item.cjs.entry.js.map +1 -0
  12. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  13. package/dist/cjs/{post-alert-39ac30a4.js → post-alert-d87e6132.js} +4 -4
  14. package/dist/cjs/{post-alert-39ac30a4.js.map → post-alert-d87e6132.js.map} +1 -1
  15. package/dist/cjs/post-alert.cjs.entry.js +3 -3
  16. package/dist/cjs/post-collapsible-ef0561b4.js +84 -0
  17. package/dist/cjs/post-collapsible-ef0561b4.js.map +1 -0
  18. package/dist/cjs/post-collapsible.cjs.entry.js +3 -3
  19. package/dist/cjs/post-components.cjs.js +3 -3
  20. package/dist/cjs/post-components.cjs.js.map +1 -1
  21. package/dist/cjs/{post-icon-53e50c15.js → post-icon-e9dcd643.js} +3 -3
  22. package/dist/cjs/{post-icon-53e50c15.js.map → post-icon-e9dcd643.js.map} +1 -1
  23. package/dist/cjs/post-icon.cjs.entry.js +3 -3
  24. package/dist/cjs/{post-popover-5a75c1b2.js → post-popover-e114ebe7.js} +3 -3
  25. package/dist/cjs/{post-popover-5a75c1b2.js.map → post-popover-e114ebe7.js.map} +1 -1
  26. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  27. package/dist/cjs/{post-popovercontainer-84378594.js → post-popovercontainer-20fb22ee.js} +3 -3
  28. package/dist/cjs/{post-popovercontainer-84378594.js.map → post-popovercontainer-20fb22ee.js.map} +1 -1
  29. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  30. package/dist/cjs/{post-tab-header-02c6e31e.js → post-tab-header-34c1cc21.js} +3 -3
  31. package/dist/cjs/{post-tab-header-02c6e31e.js.map → post-tab-header-34c1cc21.js.map} +1 -1
  32. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tab-panel-3973b707.js → post-tab-panel-95cf7092.js} +3 -3
  34. package/dist/cjs/{post-tab-panel-3973b707.js.map → post-tab-panel-95cf7092.js.map} +1 -1
  35. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  36. package/dist/cjs/{post-tabs-7a4fead7.js → post-tabs-dbe7c341.js} +3 -3
  37. package/dist/cjs/{post-tabs-7a4fead7.js.map → post-tabs-dbe7c341.js.map} +1 -1
  38. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  39. package/dist/cjs/{post-tooltip-79a9c96d.js → post-tooltip-659af1e3.js} +9 -6
  40. package/dist/cjs/post-tooltip-659af1e3.js.map +1 -0
  41. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  42. package/dist/collection/animations/collapse.js +10 -5
  43. package/dist/collection/animations/collapse.js.map +1 -1
  44. package/dist/collection/collection-manifest.json +4 -3
  45. package/dist/collection/components/post-accordion/post-accordion.js +37 -36
  46. package/dist/collection/components/post-accordion/post-accordion.js.map +1 -1
  47. package/dist/collection/components/post-accordion-item/heading-levels.js.map +1 -0
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -0
  49. package/dist/collection/components/post-accordion-item/post-accordion-item.js +142 -0
  50. package/dist/collection/components/post-accordion-item/post-accordion-item.js.map +1 -0
  51. package/dist/collection/components/post-alert/post-alert.css +1 -1
  52. package/dist/collection/components/post-alert/post-alert.js.map +1 -1
  53. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  54. package/dist/collection/components/post-collapsible/post-collapsible.js +7 -48
  55. package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
  56. package/dist/collection/components/post-popover/post-popover.js.map +1 -1
  57. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +1 -1
  58. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  59. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  60. package/dist/collection/components/post-tooltip/post-tooltip.js +23 -2
  61. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
  62. package/dist/collection/utils/property-checkers/check-non-empty.js.map +1 -1
  63. package/dist/collection/utils/property-checkers/check-type.js.map +1 -1
  64. package/dist/components/package.js +1 -1
  65. package/dist/components/post-accordion-item.d.ts +11 -0
  66. package/dist/components/post-accordion-item.js +82 -0
  67. package/dist/components/post-accordion-item.js.map +1 -0
  68. package/dist/components/post-accordion2.js +33 -32
  69. package/dist/components/post-accordion2.js.map +1 -1
  70. package/dist/components/post-alert2.js +1 -1
  71. package/dist/components/post-alert2.js.map +1 -1
  72. package/dist/components/post-collapsible2.js +16 -29
  73. package/dist/components/post-collapsible2.js.map +1 -1
  74. package/dist/components/post-tooltip2.js +7 -3
  75. package/dist/components/post-tooltip2.js.map +1 -1
  76. package/dist/docs.json +189 -72
  77. package/dist/esm/{index-35998e08.js → index-74cf5c9d.js} +9 -5
  78. package/dist/esm/index-74cf5c9d.js.map +1 -0
  79. package/dist/esm/index.js +12 -12
  80. package/dist/esm/loader.js +3 -3
  81. package/dist/esm/package-af0ef704.js +5 -0
  82. package/dist/esm/package-af0ef704.js.map +1 -0
  83. package/dist/esm/post-accordion-3b137073.js +86 -0
  84. package/dist/esm/post-accordion-3b137073.js.map +1 -0
  85. package/dist/esm/post-accordion-item.entry.js +51 -0
  86. package/dist/esm/post-accordion-item.entry.js.map +1 -0
  87. package/dist/esm/post-accordion.entry.js +3 -3
  88. package/dist/esm/{post-alert-5e352303.js → post-alert-0dcc6ac7.js} +4 -4
  89. package/dist/esm/{post-alert-5e352303.js.map → post-alert-0dcc6ac7.js.map} +1 -1
  90. package/dist/esm/post-alert.entry.js +3 -3
  91. package/dist/esm/post-collapsible-a418570f.js +82 -0
  92. package/dist/esm/post-collapsible-a418570f.js.map +1 -0
  93. package/dist/esm/post-collapsible.entry.js +3 -3
  94. package/dist/esm/post-components.js +4 -4
  95. package/dist/esm/post-components.js.map +1 -1
  96. package/dist/esm/{post-icon-fdda3f99.js → post-icon-302d1767.js} +3 -3
  97. package/dist/esm/{post-icon-fdda3f99.js.map → post-icon-302d1767.js.map} +1 -1
  98. package/dist/esm/post-icon.entry.js +3 -3
  99. package/dist/esm/{post-popover-ff2c259f.js → post-popover-5725afc7.js} +3 -3
  100. package/dist/esm/{post-popover-ff2c259f.js.map → post-popover-5725afc7.js.map} +1 -1
  101. package/dist/esm/post-popover.entry.js +3 -3
  102. package/dist/esm/{post-popovercontainer-f4cd18cd.js → post-popovercontainer-1c050e83.js} +3 -3
  103. package/dist/esm/{post-popovercontainer-f4cd18cd.js.map → post-popovercontainer-1c050e83.js.map} +1 -1
  104. package/dist/esm/post-popovercontainer.entry.js +3 -3
  105. package/dist/esm/{post-tab-header-486b267b.js → post-tab-header-ede9f078.js} +3 -3
  106. package/dist/esm/{post-tab-header-486b267b.js.map → post-tab-header-ede9f078.js.map} +1 -1
  107. package/dist/esm/post-tab-header.entry.js +3 -3
  108. package/dist/esm/{post-tab-panel-13940300.js → post-tab-panel-16796ee3.js} +3 -3
  109. package/dist/esm/{post-tab-panel-13940300.js.map → post-tab-panel-16796ee3.js.map} +1 -1
  110. package/dist/esm/post-tab-panel.entry.js +3 -3
  111. package/dist/esm/{post-tabs-6f44ed1d.js → post-tabs-16f99043.js} +3 -3
  112. package/dist/esm/{post-tabs-6f44ed1d.js.map → post-tabs-16f99043.js.map} +1 -1
  113. package/dist/esm/post-tabs.entry.js +3 -3
  114. package/dist/esm/{post-tooltip-1d99cd0c.js → post-tooltip-03a6d578.js} +9 -6
  115. package/dist/esm/post-tooltip-03a6d578.js.map +1 -0
  116. package/dist/esm/post-tooltip.entry.js +3 -3
  117. package/dist/post-components/index.esm.js +1 -1
  118. package/dist/post-components/p-06566f88.js +2 -0
  119. package/dist/post-components/p-06566f88.js.map +1 -0
  120. package/dist/post-components/{p-28be44d7.js → p-12a0f4b9.js} +2 -2
  121. package/dist/post-components/{p-28be44d7.js.map → p-12a0f4b9.js.map} +1 -1
  122. package/dist/post-components/{p-aca6e9c1.js → p-26dad3c3.js} +2 -2
  123. package/dist/post-components/p-299a3e41.entry.js +2 -0
  124. package/dist/post-components/p-3241987a.entry.js +2 -0
  125. package/dist/post-components/p-3fd14a00.js +2 -0
  126. package/dist/post-components/p-3fd14a00.js.map +1 -0
  127. package/dist/post-components/p-4b950d70.js +2 -0
  128. package/dist/post-components/p-503ac49b.entry.js +2 -0
  129. package/dist/post-components/{p-7d08e4f1.js → p-6391f970.js} +2 -2
  130. package/dist/post-components/p-6d0226cd.entry.js +2 -0
  131. package/dist/post-components/p-775859cc.entry.js +2 -0
  132. package/dist/post-components/p-78589fac.entry.js +2 -0
  133. package/dist/post-components/p-78589fac.entry.js.map +1 -0
  134. package/dist/post-components/{p-bc27f061.js → p-803284de.js} +3 -3
  135. package/dist/post-components/{p-bc27f061.js.map → p-803284de.js.map} +1 -1
  136. package/dist/post-components/p-83cedb31.entry.js +2 -0
  137. package/dist/post-components/p-88481640.entry.js +2 -0
  138. package/dist/post-components/p-8f37921c.entry.js +2 -0
  139. package/dist/post-components/{p-723336f2.js → p-91236c61.js} +2 -2
  140. package/dist/post-components/{p-d3ed113e.js → p-91f2291a.js} +2 -2
  141. package/dist/post-components/{p-3ef3a1d2.js → p-93ab273b.js} +2 -2
  142. package/dist/post-components/{p-81591ad0.js → p-b4f01350.js} +1 -1
  143. package/dist/post-components/p-b4f01350.js.map +1 -0
  144. package/dist/post-components/p-d96fbe33.entry.js +2 -0
  145. package/dist/post-components/p-de4704fc.js +2 -0
  146. package/dist/post-components/p-fe7650bc.entry.js +2 -0
  147. package/dist/post-components/post-components.esm.js +1 -1
  148. package/dist/post-components/post-components.esm.js.map +1 -1
  149. package/dist/types/components/post-accordion/post-accordion.d.ts +8 -8
  150. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +24 -0
  151. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -10
  152. package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -0
  153. package/dist/types/components.d.ts +51 -18
  154. package/package.json +11 -3
  155. package/dist/cjs/index-c07c0cdb.js.map +0 -1
  156. package/dist/cjs/package-989e0b36.js +0 -7
  157. package/dist/cjs/package-989e0b36.js.map +0 -1
  158. package/dist/cjs/post-accordion-bc0c6f31.js +0 -87
  159. package/dist/cjs/post-accordion-bc0c6f31.js.map +0 -1
  160. package/dist/cjs/post-collapsible-85f8ace5.js +0 -93
  161. package/dist/cjs/post-collapsible-85f8ace5.js.map +0 -1
  162. package/dist/cjs/post-tooltip-79a9c96d.js.map +0 -1
  163. package/dist/collection/components/post-collapsible/heading-levels.js.map +0 -1
  164. package/dist/esm/index-35998e08.js.map +0 -1
  165. package/dist/esm/package-e13ef9ad.js +0 -5
  166. package/dist/esm/package-e13ef9ad.js.map +0 -1
  167. package/dist/esm/post-accordion-8e96598a.js +0 -85
  168. package/dist/esm/post-accordion-8e96598a.js.map +0 -1
  169. package/dist/esm/post-collapsible-3cc5dd87.js +0 -91
  170. package/dist/esm/post-collapsible-3cc5dd87.js.map +0 -1
  171. package/dist/esm/post-tooltip-1d99cd0c.js.map +0 -1
  172. package/dist/post-components/p-169b8ef7.entry.js +0 -2
  173. package/dist/post-components/p-4b94c2a1.entry.js +0 -2
  174. package/dist/post-components/p-4cbb5212.entry.js +0 -2
  175. package/dist/post-components/p-51ae6f46.entry.js +0 -2
  176. package/dist/post-components/p-668bf58c.entry.js +0 -2
  177. package/dist/post-components/p-67d0a4fa.entry.js +0 -2
  178. package/dist/post-components/p-6b3a5063.entry.js +0 -2
  179. package/dist/post-components/p-6cdc82c6.js +0 -2
  180. package/dist/post-components/p-6cdc82c6.js.map +0 -1
  181. package/dist/post-components/p-81591ad0.js.map +0 -1
  182. package/dist/post-components/p-9b1b6e06.entry.js +0 -2
  183. package/dist/post-components/p-a5a23448.js +0 -2
  184. package/dist/post-components/p-bd1d0117.js +0 -2
  185. package/dist/post-components/p-d8365401.entry.js +0 -2
  186. package/dist/post-components/p-e78d158d.entry.js +0 -2
  187. package/dist/post-components/p-f695aab4.js +0 -2
  188. package/dist/post-components/p-f695aab4.js.map +0 -1
  189. /package/dist/collection/components/{post-collapsible → post-accordion-item}/heading-levels.js +0 -0
  190. /package/dist/post-components/{p-aca6e9c1.js.map → p-26dad3c3.js.map} +0 -0
  191. /package/dist/post-components/{p-169b8ef7.entry.js.map → p-299a3e41.entry.js.map} +0 -0
  192. /package/dist/post-components/{p-4b94c2a1.entry.js.map → p-3241987a.entry.js.map} +0 -0
  193. /package/dist/post-components/{p-a5a23448.js.map → p-4b950d70.js.map} +0 -0
  194. /package/dist/post-components/{p-4cbb5212.entry.js.map → p-503ac49b.entry.js.map} +0 -0
  195. /package/dist/post-components/{p-7d08e4f1.js.map → p-6391f970.js.map} +0 -0
  196. /package/dist/post-components/{p-51ae6f46.entry.js.map → p-6d0226cd.entry.js.map} +0 -0
  197. /package/dist/post-components/{p-668bf58c.entry.js.map → p-775859cc.entry.js.map} +0 -0
  198. /package/dist/post-components/{p-67d0a4fa.entry.js.map → p-83cedb31.entry.js.map} +0 -0
  199. /package/dist/post-components/{p-6b3a5063.entry.js.map → p-88481640.entry.js.map} +0 -0
  200. /package/dist/post-components/{p-9b1b6e06.entry.js.map → p-8f37921c.entry.js.map} +0 -0
  201. /package/dist/post-components/{p-723336f2.js.map → p-91236c61.js.map} +0 -0
  202. /package/dist/post-components/{p-d3ed113e.js.map → p-91f2291a.js.map} +0 -0
  203. /package/dist/post-components/{p-3ef3a1d2.js.map → p-93ab273b.js.map} +0 -0
  204. /package/dist/post-components/{p-bd1d0117.js.map → p-d96fbe33.entry.js.map} +0 -0
  205. /package/dist/post-components/{p-d8365401.entry.js.map → p-de4704fc.js.map} +0 -0
  206. /package/dist/post-components/{p-e78d158d.entry.js.map → p-fe7650bc.entry.js.map} +0 -0
  207. /package/dist/types/components/{post-collapsible → post-accordion-item}/heading-levels.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- export { P as post_tooltip } from './post-tooltip-1d99cd0c.js';
2
- import './index-35998e08.js';
3
- import './package-e13ef9ad.js';
1
+ export { P as post_tooltip } from './post-tooltip-03a6d578.js';
2
+ import './index-74cf5c9d.js';
3
+ import './package-af0ef704.js';
4
4
 
5
5
  //# sourceMappingURL=post-tooltip.entry.js.map
@@ -1,2 +1,2 @@
1
- export{P as PostAccordion}from"./p-f695aab4.js";export{P as PostAlert}from"./p-28be44d7.js";export{P as PostCollapsible}from"./p-6cdc82c6.js";export{P as PostIcon}from"./p-d3ed113e.js";export{P as PostPopover}from"./p-3ef3a1d2.js";export{P as PostPopovercontainer}from"./p-7d08e4f1.js";export{P as PostTabs}from"./p-aca6e9c1.js";export{P as PostTabHeader}from"./p-723336f2.js";export{P as PostTabPanel}from"./p-a5a23448.js";export{P as PostTooltip}from"./p-bc27f061.js";import"./p-81591ad0.js";import"./p-bd1d0117.js";import"./p-2737eaf5.js";import"./p-96f4ebc4.js";import"./p-440193f4.js";import"./p-b095519d.js";
1
+ export{P as PostAccordion}from"./p-3fd14a00.js";export{P as PostAlert}from"./p-12a0f4b9.js";export{P as PostCollapsible}from"./p-06566f88.js";export{P as PostIcon}from"./p-91f2291a.js";export{P as PostPopover}from"./p-93ab273b.js";export{P as PostPopovercontainer}from"./p-6391f970.js";export{P as PostTabs}from"./p-26dad3c3.js";export{P as PostTabHeader}from"./p-91236c61.js";export{P as PostTabPanel}from"./p-4b950d70.js";export{P as PostTooltip}from"./p-803284de.js";import"./p-b4f01350.js";import"./p-de4704fc.js";import"./p-2737eaf5.js";import"./p-96f4ebc4.js";import"./p-440193f4.js";import"./p-b095519d.js";
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as e,H as i,g as o}from"./p-b4f01350.js";import{v as n}from"./p-de4704fc.js";import{d as r}from"./p-96f4ebc4.js";function a(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const h=350;const c="ease";const l={height:"0",overflow:"hidden"};const d={duration:h,easing:c,fill:"forwards"};const p=t=>{const s={height:window.getComputedStyle(t).height};return t.animate([s,l],d)};const f=t=>{const s={height:`${t.scrollHeight}px`,offset:1};const e={height:"auto"};return t.animate([l,s,e],d)};const u=":host{display:block}";const g=class{constructor(e){t(this,e);this.collapseChange=s(this,"collapseChange",7);this.isLoaded=false;this.id=undefined;this.isOpen=true;this.collapsed=false}validateCollapsed(t=this.collapsed){r(t,"boolean","The `collapsed` property of the `post-collapsible` must be a boolean.")}connectedCallback(){this.validateCollapsed()}componentWillRender(){this.id=this.host.id||`c${crypto.randomUUID()}`}componentDidLoad(){if(this.collapsed)void this.toggle(false);this.isLoaded=true}async toggle(t=!this.isOpen){if(t===this.isOpen)return t;this.isOpen=!this.isOpen;if(this.isLoaded)this.collapseChange.emit(this.isOpen);const s=t?f(this.collapsible):p(this.collapsible);if(!this.isLoaded||a())s.finish();await s.finished;s.commitStyles();return this.isOpen}render(){return e(i,{id:this.id,"data-version":n},e("div",{class:"collapse",id:`${this.id}--collapse`,ref:t=>this.collapsible=t},e("slot",null)))}get host(){return o(this)}static get watchers(){return{collapsed:["validateCollapsed"]}}};g.style=u;export{g as P};
2
+ //# sourceMappingURL=p-06566f88.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isMotionReduced","window","matchMedia","matches","collapseDuration","collapseEasing","collapsedKeyframe","height","overflow","animationOptions","duration","easing","fill","collapse","el","expandedKeyframe","getComputedStyle","animate","expand","scrollHeight","offset","finalKeyframe","postCollapsibleCss","PostCollapsible","this","isLoaded","validateCollapsed","newValue","collapsed","checkEmptyOrType","connectedCallback","componentWillRender","id","host","crypto","randomUUID","componentDidLoad","toggle","open","isOpen","collapseChange","emit","animation","collapsible","finish","finished","commitStyles","render","h","Host","version","class","ref"],"sources":["src/utils/is-motion-reduced.ts","src/animations/collapse.ts","src/components/post-collapsible/post-collapsible.scss?tag=post-collapsible&encapsulation=shadow","src/components/post-collapsible/post-collapsible.tsx"],"sourcesContent":["export function isMotionReduced(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","const collapseDuration = 350;\nconst collapseEasing = 'ease';\nconst collapsedKeyframe: Keyframe = { height: '0', overflow: 'hidden' };\n\nconst animationOptions: KeyframeAnimationOptions = {\n duration: collapseDuration,\n easing: collapseEasing,\n fill: 'forwards',\n};\n\nexport const collapse = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: window.getComputedStyle(el).height };\n\n return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);\n};\n\nexport const expand = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: `${el.scrollHeight}px`, offset: 1 };\n const finalKeyframe: Keyframe = { height: 'auto' };\n\n return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);\n};\n",":host {\n display: block;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { collapse, expand } from '../../animations/collapse';\nimport { checkEmptyOrType, isMotionReduced } from '../../utils';\n\n@Component({\n tag: 'post-collapsible',\n styleUrl: 'post-collapsible.scss',\n shadow: true,\n})\nexport class PostCollapsible {\n private isLoaded = false;\n private collapsible: HTMLElement;\n\n @Element() host: HTMLPostCollapsibleElement;\n\n @State() id: string;\n @State() isOpen = true;\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n @Watch('collapsed')\n validateCollapsed(newValue = this.collapsed) {\n checkEmptyOrType(\n newValue,\n 'boolean',\n 'The `collapsed` property of the `post-collapsible` must be a boolean.',\n );\n }\n\n /**\n * An event emitted when the collapse element is shown or hidden, before the transition.\n *\n * The event payload is a boolean: `true` if the collapsible was opened, `false` if it was closed.\n */\n @Event() collapseChange: EventEmitter<boolean>;\n\n connectedCallback() {\n this.validateCollapsed();\n }\n\n componentWillRender() {\n this.id = this.host.id || `c${crypto.randomUUID()}`;\n }\n\n componentDidLoad() {\n if (this.collapsed) void this.toggle(false);\n this.isLoaded = true;\n }\n\n /**\n * Triggers the collapse programmatically.\n *\n * If there is a collapsing transition running already, it will be reversed.\n */\n @Method()\n async toggle(open = !this.isOpen): Promise<boolean> {\n if (open === this.isOpen) return open;\n\n this.isOpen = !this.isOpen;\n if (this.isLoaded) this.collapseChange.emit(this.isOpen);\n\n const animation = open ? expand(this.collapsible) : collapse(this.collapsible);\n\n if (!this.isLoaded || isMotionReduced()) animation.finish();\n\n await animation.finished;\n\n animation.commitStyles();\n\n return this.isOpen;\n }\n\n render() {\n return (\n <Host id={this.id} data-version={version}>\n <div class=\"collapse\" id={`${this.id}--collapse`} ref={el => (this.collapsible = el)}>\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iJAAgBA,IACd,OAAOC,OAAOC,WAAW,oCAAoCC,OAC/D,CCFA,MAAMC,EAAmB,IACzB,MAAMC,EAAiB,OACvB,MAAMC,EAA8B,CAAEC,OAAQ,IAAKC,SAAU,UAE7D,MAAMC,EAA6C,CACjDC,SAAUN,EACVO,OAAQN,EACRO,KAAM,YAGD,MAAMC,EAAYC,IACvB,MAAMC,EAA6B,CAAER,OAAQN,OAAOe,iBAAiBF,GAAIP,QAEzE,OAAOO,EAAGG,QAAQ,CAACF,EAAkBT,GAAoBG,EAAiB,EAGrE,MAAMS,EAAUJ,IACrB,MAAMC,EAA6B,CAAER,OAAQ,GAAGO,EAAGK,iBAAkBC,OAAQ,GAC7E,MAAMC,EAA0B,CAAEd,OAAQ,QAE1C,OAAOO,EAAGG,QAAQ,CAACX,EAAmBS,EAAkBM,GAAgBZ,EAAiB,ECpB3F,MAAMa,EAAqB,uB,MCqBdC,EAAe,M,wEAClBC,KAAAC,SAAW,M,8BAMD,K,eAKqB,K,CAGvC,iBAAAC,CAAkBC,EAAWH,KAAKI,WAChCC,EACEF,EACA,UACA,wE,CAWJ,iBAAAG,GACEN,KAAKE,mB,CAGP,mBAAAK,GACEP,KAAKQ,GAAKR,KAAKS,KAAKD,IAAM,IAAIE,OAAOC,c,CAGvC,gBAAAC,GACE,GAAIZ,KAAKI,eAAgBJ,KAAKa,OAAO,OACrCb,KAAKC,SAAW,I,CASlB,YAAMY,CAAOC,GAAQd,KAAKe,QACxB,GAAID,IAASd,KAAKe,OAAQ,OAAOD,EAEjCd,KAAKe,QAAUf,KAAKe,OACpB,GAAIf,KAAKC,SAAUD,KAAKgB,eAAeC,KAAKjB,KAAKe,QAEjD,MAAMG,EAAYJ,EAAOpB,EAAOM,KAAKmB,aAAe9B,EAASW,KAAKmB,aAElE,IAAKnB,KAAKC,UAAYzB,IAAmB0C,EAAUE,eAE7CF,EAAUG,SAEhBH,EAAUI,eAEV,OAAOtB,KAAKe,M,CAGd,MAAAQ,GACE,OACEC,EAACC,EAAI,CAACjB,GAAIR,KAAKQ,GAAE,eAAgBkB,GAC/BF,EAAA,OAAKG,MAAM,WAAWnB,GAAI,GAAGR,KAAKQ,eAAgBoB,IAAKtC,GAAOU,KAAKmB,YAAc7B,GAC/EkC,EAAA,c"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,h as e,H as r,g as i}from"./p-81591ad0.js";import{v as a}from"./p-bd1d0117.js";import{f as s}from"./p-2737eaf5.js";import{c as n,a as l,b as c}from"./p-96f4ebc4.js";import{c as g}from"./p-b095519d.js";const p=["primary","success","danger","warning","info","gray"];const h="/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.alert-primary,.alert-success,.alert-danger,.alert-warning,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;background-color:rgba(0,0,0,0) !important;border:2px solid WindowText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn{flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1441px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1440px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 145, 28}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c911c}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";const d=class{constructor(e){t(this,e);this.dismissed=o(this,"dismissed",7);this.alertId=crypto.randomUUID();this.classes=undefined;this.hasActions=undefined;this.hasHeading=undefined;this.onDismissButtonClick=()=>this.dismiss();this.dismissible=false;this.dismissLabel=undefined;this.fixed=false;this.icon=undefined;this.type="primary"}validateDismissible(t=this.dismissible){n(t,"boolean",'The post-alert "dismissible" prop should be a boolean.');setTimeout((()=>this.validateDismissLabel()))}validateDismissLabel(t=this.dismissLabel){if(this.dismissible){g(t,'Dismissible post-alert\'s require a "dismiss-label" prop.')}}validateFixed(t=this.fixed){n(t,"boolean",'The post-alert "fixed" prop should be a boolean.')}validateIcon(t=this.icon){l(t,/\d{4}|none/,'The post-alert "icon" prop should be a 4-digits string.')}validateType(t=this.type){c(t,p,`The post-alert requires a type form: ${p.join(", ")}`)}connectedCallback(){this.validateDismissible();this.validateFixed();this.validateIcon();this.validateType()}componentWillRender(){var t;this.hasHeading=this.host.querySelectorAll("[slot=heading]").length>0;this.hasActions=this.host.querySelectorAll("[slot=actions]").length>0;this.classes=`alert alert-${(t=this.type)!==null&&t!==void 0?t:"primary"}`;if(this.dismissible)this.classes+=" alert-dismissible";if(this.hasActions)this.classes+=" alert-action";if(this.fixed)this.classes+=" alert-fixed-bottom";if(this.icon==="none")this.classes+=" no-icon"}async dismiss(){const t=s(this.host);await t.finished;this.host.remove();this.dismissed.emit()}render(){const t=[this.hasHeading&&e("div",{key:`${this.alertId}-heading`,class:"alert-heading"},e("slot",{name:"heading"})),e("slot",{key:`${this.alertId}-message`})];const o=[e("div",{key:`${this.alertId}-content`,class:"alert-content"},t),e("div",{key:`${this.alertId}-buttons`,class:"alert-buttons"},e("slot",{name:"actions"}))];return e(r,{"data-version":a},e("div",{role:"alert",class:this.classes},this.dismissible&&e("button",{class:"btn-close",onClick:this.onDismissButtonClick},e("span",{class:"visually-hidden"},this.dismissLabel)),this.icon&&this.icon!=="none"&&e("post-icon",{key:`${this.alertId}-icon`,name:this.icon}),this.hasActions?o:t))}get host(){return i(this)}static get watchers(){return{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}}};d.style=h;export{d as P};
2
- //# sourceMappingURL=p-28be44d7.js.map
1
+ import{r as t,c as o,h as e,H as r,g as i}from"./p-b4f01350.js";import{v as a}from"./p-de4704fc.js";import{f as s}from"./p-2737eaf5.js";import{c as n,a as l,b as c}from"./p-96f4ebc4.js";import{c as g}from"./p-b095519d.js";const p=["primary","success","danger","warning","info","gray"];const h="/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.alert-primary,.alert-success,.alert-danger,.alert-warning,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;background-color:rgba(0,0,0,0) !important;border:2px solid WindowText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn{flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1441px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1440px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 145, 28}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c911c}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";const d=class{constructor(e){t(this,e);this.dismissed=o(this,"dismissed",7);this.alertId=crypto.randomUUID();this.classes=undefined;this.hasActions=undefined;this.hasHeading=undefined;this.onDismissButtonClick=()=>this.dismiss();this.dismissible=false;this.dismissLabel=undefined;this.fixed=false;this.icon=undefined;this.type="primary"}validateDismissible(t=this.dismissible){n(t,"boolean",'The post-alert "dismissible" prop should be a boolean.');setTimeout((()=>this.validateDismissLabel()))}validateDismissLabel(t=this.dismissLabel){if(this.dismissible){g(t,'Dismissible post-alert\'s require a "dismiss-label" prop.')}}validateFixed(t=this.fixed){n(t,"boolean",'The post-alert "fixed" prop should be a boolean.')}validateIcon(t=this.icon){l(t,/\d{4}|none/,'The post-alert "icon" prop should be a 4-digits string.')}validateType(t=this.type){c(t,p,`The post-alert requires a type form: ${p.join(", ")}`)}connectedCallback(){this.validateDismissible();this.validateFixed();this.validateIcon();this.validateType()}componentWillRender(){var t;this.hasHeading=this.host.querySelectorAll("[slot=heading]").length>0;this.hasActions=this.host.querySelectorAll("[slot=actions]").length>0;this.classes=`alert alert-${(t=this.type)!==null&&t!==void 0?t:"primary"}`;if(this.dismissible)this.classes+=" alert-dismissible";if(this.hasActions)this.classes+=" alert-action";if(this.fixed)this.classes+=" alert-fixed-bottom";if(this.icon==="none")this.classes+=" no-icon"}async dismiss(){const t=s(this.host);await t.finished;this.host.remove();this.dismissed.emit()}render(){const t=[this.hasHeading&&e("div",{key:`${this.alertId}-heading`,class:"alert-heading"},e("slot",{name:"heading"})),e("slot",{key:`${this.alertId}-message`})];const o=[e("div",{key:`${this.alertId}-content`,class:"alert-content"},t),e("div",{key:`${this.alertId}-buttons`,class:"alert-buttons"},e("slot",{name:"actions"}))];return e(r,{"data-version":a},e("div",{role:"alert",class:this.classes},this.dismissible&&e("button",{class:"btn-close",onClick:this.onDismissButtonClick},e("span",{class:"visually-hidden"},this.dismissLabel)),this.icon&&this.icon!=="none"&&e("post-icon",{key:`${this.alertId}-icon`,name:this.icon}),this.hasActions?o:t))}get host(){return i(this)}static get watchers(){return{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}}};d.style=h;export{d as P};
2
+ //# sourceMappingURL=p-12a0f4b9.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ALERT_TYPES","postAlertCss","PostAlert","crypto","randomUUID","this","dismiss","validateDismissible","isDismissible","dismissible","checkType","setTimeout","validateDismissLabel","dismissLabel","checkNonEmpty","validateFixed","isFixed","fixed","validateIcon","icon","checkEmptyOrPattern","validateType","type","checkEmptyOrOneOf","join","connectedCallback","componentWillRender","hasHeading","host","querySelectorAll","length","hasActions","classes","_a","dismissal","fadeOut","finished","remove","dismissed","emit","render","defaultAlertContent","h","key","alertId","class","name","actionAlertContent","Host","version","role","onClick","onDismissButtonClick"],"sources":["src/components/post-alert/alert-types.ts","src/components/post-alert/post-alert.scss?tag=post-alert&encapsulation=shadow","src/components/post-alert/post-alert.tsx"],"sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n","@use '@swisspost/design-system-styles/components/alert';\n@use '@swisspost/design-system-styles/components/close';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n\n ::slotted(*) {\n margin: 0 !important;\n }\n}\n\n.visually-hidden {\n @include post.visually-hidden();\n}\n\n@for $i from 1 through 6 {\n .alert-heading > ::slotted(h#{$i}) {\n font-size: inherit !important;\n font-weight: inherit !important;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"8NAAO,MAAMA,EAAc,CAAC,UAAW,UAAW,SAAU,UAAW,OAAQ,QCA/E,MAAMC,EAAe,k2nB,MCWRC,EAAS,M,2EAGDC,OAAOC,a,qGAIM,IAAMC,KAAKC,U,iBAKH,M,uCAuBN,M,8BAsBC,S,CA1CnC,mBAAAC,CAAoBC,EAAgBH,KAAKI,aACvCC,EAAUF,EAAe,UAAW,0DACpCG,YAAW,IAAMN,KAAKO,wB,CASxB,oBAAAA,CAAqBC,EAAeR,KAAKQ,cACvC,GAAIR,KAAKI,YAAa,CACpBK,EAAcD,EAAc,4D,EAUhC,aAAAE,CAAcC,EAAUX,KAAKY,OAC3BP,EAAUM,EAAS,UAAW,mD,CAWhC,YAAAE,CAAaC,EAAOd,KAAKc,MACvBC,EAAoBD,EAAM,aAAc,0D,CAS1C,YAAAE,CAAaC,EAAOjB,KAAKiB,MACvBC,EAAkBD,EAAMtB,EAAa,wCAAwCA,EAAYwB,KAAK,Q,CAShG,iBAAAC,GACEpB,KAAKE,sBACLF,KAAKU,gBACLV,KAAKa,eACLb,KAAKgB,c,CAGP,mBAAAK,G,MACErB,KAAKsB,WAAatB,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EACxEzB,KAAK0B,WAAa1B,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EAExEzB,KAAK2B,QAAU,gBAAeC,EAAA5B,KAAKiB,QAAI,MAAAW,SAAA,EAAAA,EAAI,YAC3C,GAAI5B,KAAKI,YAAaJ,KAAK2B,SAAW,qBACtC,GAAI3B,KAAK0B,WAAY1B,KAAK2B,SAAW,gBACrC,GAAI3B,KAAKY,MAAOZ,KAAK2B,SAAW,sBAChC,GAAI3B,KAAKc,OAAS,OAAQd,KAAK2B,SAAW,U,CAO5C,aAAM1B,GACJ,MAAM4B,EAAYC,EAAQ9B,KAAKuB,YAEzBM,EAAUE,SAEhB/B,KAAKuB,KAAKS,SACVhC,KAAKiC,UAAUC,M,CAGjB,MAAAC,GACE,MAAMC,EAAsB,CAC1BpC,KAAKsB,YACHe,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,aAGfJ,EAAA,QAAMC,IAAK,GAAGtC,KAAKuC,qBAGrB,MAAMG,EAAqB,CACzBL,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACxCJ,GAEHC,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,cAIf,OACEJ,EAACM,EAAI,gBAAeC,GAClBP,EAAA,OAAKQ,KAAK,QAAQL,MAAOxC,KAAK2B,SAC3B3B,KAAKI,aACJiC,EAAA,UAAQG,MAAM,YAAYM,QAAS9C,KAAK+C,sBACtCV,EAAA,QAAMG,MAAM,mBAAmBxC,KAAKQ,eAIvCR,KAAKc,MAAQd,KAAKc,OAAS,QAC1BuB,EAAA,aAAWC,IAAK,GAAGtC,KAAKuC,eAAgBE,KAAMzC,KAAKc,OAGpDd,KAAK0B,WACFgB,EACAN,G"}
1
+ {"version":3,"names":["ALERT_TYPES","postAlertCss","PostAlert","crypto","randomUUID","this","dismiss","validateDismissible","isDismissible","dismissible","checkType","setTimeout","validateDismissLabel","dismissLabel","checkNonEmpty","validateFixed","isFixed","fixed","validateIcon","icon","checkEmptyOrPattern","validateType","type","checkEmptyOrOneOf","join","connectedCallback","componentWillRender","hasHeading","host","querySelectorAll","length","hasActions","classes","_a","dismissal","fadeOut","finished","remove","dismissed","emit","render","defaultAlertContent","h","key","alertId","class","name","actionAlertContent","Host","version","role","onClick","onDismissButtonClick"],"sources":["src/components/post-alert/alert-types.ts","src/components/post-alert/post-alert.scss?tag=post-alert&encapsulation=shadow","src/components/post-alert/post-alert.tsx"],"sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n","@use '@swisspost/design-system-styles/components/alert';\n@use '@swisspost/design-system-styles/components/close';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n\n ::slotted(*) {\n margin: 0 !important;\n }\n}\n\n.visually-hidden {\n @include post.visually-hidden();\n}\n\n@for $i from 1 through 6 {\n .alert-heading > ::slotted(h#{$i}) {\n font-size: inherit !important;\n font-weight: inherit !important;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"8NAAO,MAAMA,EAAc,CAAC,UAAW,UAAW,SAAU,UAAW,OAAQ,QCA/E,MAAMC,EAAe,kznB,MCWRC,EAAS,M,2EAGDC,OAAOC,a,qGAIM,IAAMC,KAAKC,U,iBAKH,M,uCAuBN,M,8BAsBC,S,CA1CnC,mBAAAC,CAAoBC,EAAgBH,KAAKI,aACvCC,EAAUF,EAAe,UAAW,0DACpCG,YAAW,IAAMN,KAAKO,wB,CASxB,oBAAAA,CAAqBC,EAAeR,KAAKQ,cACvC,GAAIR,KAAKI,YAAa,CACpBK,EAAcD,EAAc,4D,EAUhC,aAAAE,CAAcC,EAAUX,KAAKY,OAC3BP,EAAUM,EAAS,UAAW,mD,CAWhC,YAAAE,CAAaC,EAAOd,KAAKc,MACvBC,EAAoBD,EAAM,aAAc,0D,CAS1C,YAAAE,CAAaC,EAAOjB,KAAKiB,MACvBC,EAAkBD,EAAMtB,EAAa,wCAAwCA,EAAYwB,KAAK,Q,CAShG,iBAAAC,GACEpB,KAAKE,sBACLF,KAAKU,gBACLV,KAAKa,eACLb,KAAKgB,c,CAGP,mBAAAK,G,MACErB,KAAKsB,WAAatB,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EACxEzB,KAAK0B,WAAa1B,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EAExEzB,KAAK2B,QAAU,gBAAeC,EAAA5B,KAAKiB,QAAI,MAAAW,SAAA,EAAAA,EAAI,YAC3C,GAAI5B,KAAKI,YAAaJ,KAAK2B,SAAW,qBACtC,GAAI3B,KAAK0B,WAAY1B,KAAK2B,SAAW,gBACrC,GAAI3B,KAAKY,MAAOZ,KAAK2B,SAAW,sBAChC,GAAI3B,KAAKc,OAAS,OAAQd,KAAK2B,SAAW,U,CAO5C,aAAM1B,GACJ,MAAM4B,EAAYC,EAAQ9B,KAAKuB,YAEzBM,EAAUE,SAEhB/B,KAAKuB,KAAKS,SACVhC,KAAKiC,UAAUC,M,CAGjB,MAAAC,GACE,MAAMC,EAAsB,CAC1BpC,KAAKsB,YACHe,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,aAGfJ,EAAA,QAAMC,IAAK,GAAGtC,KAAKuC,qBAGrB,MAAMG,EAAqB,CACzBL,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACxCJ,GAEHC,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,cAIf,OACEJ,EAACM,EAAI,gBAAeC,GAClBP,EAAA,OAAKQ,KAAK,QAAQL,MAAOxC,KAAK2B,SAC3B3B,KAAKI,aACJiC,EAAA,UAAQG,MAAM,YAAYM,QAAS9C,KAAK+C,sBACtCV,EAAA,QAAMG,MAAM,mBAAmBxC,KAAKQ,eAIvCR,KAAKc,MAAQd,KAAKc,OAAS,QAC1BuB,EAAA,aAAWC,IAAK,GAAGtC,KAAKuC,eAAgBE,KAAMzC,KAAKc,OAGpDd,KAAK0B,WACFgB,EACAN,G"}
@@ -1,2 +1,2 @@
1
- import{r,c as t,h as a,H as o,g as s}from"./p-81591ad0.js";import{v as e}from"./p-bd1d0117.js";import{f as i,a as b}from"./p-2737eaf5.js";const c='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:#faf9f8}.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{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{margin-block:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-primary .tabs-wrapper{background-color:#333}.bg-white .tabs-wrapper{background-color:#fff}.bg-black .tabs-wrapper{background-color:#000}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success .tabs-wrapper{background-color:#2c911c}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-danger .tabs-wrapper{background-color:#a51728}.bg-nightblue .tabs-wrapper{background-color:#004976}.bg-nightblue-bright .tabs-wrapper{background-color:#0076a8}.bg-petrol .tabs-wrapper{background-color:#006d68}.bg-petrol-bright .tabs-wrapper{background-color:#00968f}.bg-coral .tabs-wrapper{background-color:#9e2a2f}.bg-coral-bright .tabs-wrapper{background-color:#e03c31}.bg-olive .tabs-wrapper{background-color:#716135}.bg-olive-bright .tabs-wrapper{background-color:#aa9d2e}.bg-purple .tabs-wrapper{background-color:#80276c}.bg-purple-bright .tabs-wrapper{background-color:#c5299b}.bg-aubergine .tabs-wrapper{background-color:#523178}.bg-aubergine-bright .tabs-wrapper{background-color:#7566a0}.bg-success-green .tabs-wrapper{background-color:#2c871d}.bg-error-red .tabs-wrapper{background-color:#a51728}.bg-warning-orange .tabs-wrapper{background-color:#f49e00}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-error-background .tabs-wrapper{background-color:#ffdade}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}:host{display:block}';const n=class{constructor(a){r(this,a);this.tabChange=t(this,"tabChange",7);this.isLoaded=false;this.activePanel=undefined}get tabs(){return this.host.querySelectorAll("post-tab-header")}componentDidLoad(){this.moveMisplacedTabs();this.enableTabs();const r=this.activePanel||this.tabs.item(0).panel;void this.show(r);this.isLoaded=true}async show(r){var t;if(r===((t=this.activeTab)===null||t===void 0?void 0:t.panel)){return}const a=this.activeTab;const o=this.host.querySelector(`post-tab-header[panel=${r}]`);this.activateTab(o);if(this.showing){this.showing.effect["target"].style.display="none";this.showing.finish()}if(a&&!this.showing&&!this.hiding){this.hidePanel(a.panel)}if(this.hiding){await this.hiding.finished}this.showSelectedPanel();if(this.showing){await this.showing.finished}this.tabChange.emit(this.activeTab.panel)}moveMisplacedTabs(){if(!this.tabs)return;this.tabs.forEach((r=>{if(r.getAttribute("slot")==="tabs")return;r.setAttribute("slot","tabs")}))}enableTabs(){if(!this.tabs)return;this.tabs.forEach((async r=>{await r.componentOnReady();const t=r.shadowRoot.querySelector(".tab-title");if(t.getAttribute("aria-controls"))return;const a=this.getPanel(r.panel).shadowRoot.querySelector(".tab-pane");t.setAttribute("aria-controls",a.id);a.setAttribute("aria-labelledby",t.id);r.addEventListener("click",(()=>{void this.show(r.panel)}));r.addEventListener("keydown",(({key:t})=>{if(t==="ArrowRight"||t==="ArrowLeft")this.navigateTabs(r,t)}))}));if(this.activeTab&&!this.activeTab.isConnected){void this.show(this.tabs.item(0).panel)}}activateTab(r){if(this.activeTab){const r=this.activeTab.shadowRoot.querySelector(".tab-title");r.setAttribute("aria-selected","false");r.setAttribute("tabindex","-1");r.classList.remove("active")}const t=r.shadowRoot.querySelector(".tab-title");t.setAttribute("aria-selected","true");t.removeAttribute("tabindex");t.classList.add("active");this.activeTab=r}hidePanel(r){const t=this.getPanel(r);if(!t)return;this.hiding=i(t);this.hiding.onfinish=()=>{t.style.display="none";this.hiding=null}}showSelectedPanel(){const r=this.getPanel(this.activeTab.panel);r.style.display="block";if(!this.isLoaded)return;this.showing=b(r);this.showing.onfinish=()=>{this.showing=null}}getPanel(r){return this.host.querySelector(`post-tab-panel[name=${r}]`)}navigateTabs(r,t){const a=Array.from(this.tabs).indexOf(r);let o;if(t==="ArrowRight"){o=this.tabs[a+1]||this.tabs[0]}else{o=this.tabs[a-1]||this.tabs[this.tabs.length-1]}if(!o)return;const s=o.shadowRoot.querySelector(".tab-title");s.focus()}render(){return a(o,{"data-version":e},a("div",{class:"tabs-wrapper"},a("div",{class:"tabs",role:"tablist"},a("slot",{name:"tabs",onSlotchange:()=>this.enableTabs()}))),a("div",{class:"tab-content"},a("slot",{onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return s(this)}};n.style=c;export{n as P};
2
- //# sourceMappingURL=p-aca6e9c1.js.map
1
+ import{r,c as t,h as a,H as o,g as s}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";import{f as i,a as b}from"./p-2737eaf5.js";const c='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:#faf9f8}.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{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{margin-block:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-primary .tabs-wrapper{background-color:#333}.bg-white .tabs-wrapper{background-color:#fff}.bg-black .tabs-wrapper{background-color:#000}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success .tabs-wrapper{background-color:#2c911c}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-danger .tabs-wrapper{background-color:#a51728}.bg-nightblue .tabs-wrapper{background-color:#004976}.bg-nightblue-bright .tabs-wrapper{background-color:#0076a8}.bg-petrol .tabs-wrapper{background-color:#006d68}.bg-petrol-bright .tabs-wrapper{background-color:#00968f}.bg-coral .tabs-wrapper{background-color:#9e2a2f}.bg-coral-bright .tabs-wrapper{background-color:#e03c31}.bg-olive .tabs-wrapper{background-color:#716135}.bg-olive-bright .tabs-wrapper{background-color:#aa9d2e}.bg-purple .tabs-wrapper{background-color:#80276c}.bg-purple-bright .tabs-wrapper{background-color:#c5299b}.bg-aubergine .tabs-wrapper{background-color:#523178}.bg-aubergine-bright .tabs-wrapper{background-color:#7566a0}.bg-success-green .tabs-wrapper{background-color:#2c871d}.bg-error-red .tabs-wrapper{background-color:#a51728}.bg-warning-orange .tabs-wrapper{background-color:#f49e00}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-error-background .tabs-wrapper{background-color:#ffdade}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}:host{display:block}';const n=class{constructor(a){r(this,a);this.tabChange=t(this,"tabChange",7);this.isLoaded=false;this.activePanel=undefined}get tabs(){return this.host.querySelectorAll("post-tab-header")}componentDidLoad(){this.moveMisplacedTabs();this.enableTabs();const r=this.activePanel||this.tabs.item(0).panel;void this.show(r);this.isLoaded=true}async show(r){var t;if(r===((t=this.activeTab)===null||t===void 0?void 0:t.panel)){return}const a=this.activeTab;const o=this.host.querySelector(`post-tab-header[panel=${r}]`);this.activateTab(o);if(this.showing){this.showing.effect["target"].style.display="none";this.showing.finish()}if(a&&!this.showing&&!this.hiding){this.hidePanel(a.panel)}if(this.hiding){await this.hiding.finished}this.showSelectedPanel();if(this.showing){await this.showing.finished}this.tabChange.emit(this.activeTab.panel)}moveMisplacedTabs(){if(!this.tabs)return;this.tabs.forEach((r=>{if(r.getAttribute("slot")==="tabs")return;r.setAttribute("slot","tabs")}))}enableTabs(){if(!this.tabs)return;this.tabs.forEach((async r=>{await r.componentOnReady();const t=r.shadowRoot.querySelector(".tab-title");if(t.getAttribute("aria-controls"))return;const a=this.getPanel(r.panel).shadowRoot.querySelector(".tab-pane");t.setAttribute("aria-controls",a.id);a.setAttribute("aria-labelledby",t.id);r.addEventListener("click",(()=>{void this.show(r.panel)}));r.addEventListener("keydown",(({key:t})=>{if(t==="ArrowRight"||t==="ArrowLeft")this.navigateTabs(r,t)}))}));if(this.activeTab&&!this.activeTab.isConnected){void this.show(this.tabs.item(0).panel)}}activateTab(r){if(this.activeTab){const r=this.activeTab.shadowRoot.querySelector(".tab-title");r.setAttribute("aria-selected","false");r.setAttribute("tabindex","-1");r.classList.remove("active")}const t=r.shadowRoot.querySelector(".tab-title");t.setAttribute("aria-selected","true");t.removeAttribute("tabindex");t.classList.add("active");this.activeTab=r}hidePanel(r){const t=this.getPanel(r);if(!t)return;this.hiding=i(t);this.hiding.onfinish=()=>{t.style.display="none";this.hiding=null}}showSelectedPanel(){const r=this.getPanel(this.activeTab.panel);r.style.display="block";if(!this.isLoaded)return;this.showing=b(r);this.showing.onfinish=()=>{this.showing=null}}getPanel(r){return this.host.querySelector(`post-tab-panel[name=${r}]`)}navigateTabs(r,t){const a=Array.from(this.tabs).indexOf(r);let o;if(t==="ArrowRight"){o=this.tabs[a+1]||this.tabs[0]}else{o=this.tabs[a-1]||this.tabs[this.tabs.length-1]}if(!o)return;const s=o.shadowRoot.querySelector(".tab-title");s.focus()}render(){return a(o,{"data-version":e},a("div",{class:"tabs-wrapper"},a("div",{class:"tabs",role:"tablist"},a("slot",{name:"tabs",onSlotchange:()=>this.enableTabs()}))),a("div",{class:"tab-content"},a("slot",{onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return s(this)}};n.style=c;export{n as P};
2
+ //# sourceMappingURL=p-26dad3c3.js.map
@@ -0,0 +1,2 @@
1
+ export{P as post_accordion}from"./p-3fd14a00.js";import"./p-b4f01350.js";import"./p-de4704fc.js";
2
+ //# sourceMappingURL=p-299a3e41.entry.js.map
@@ -0,0 +1,2 @@
1
+ export{P as post_tab_header}from"./p-91236c61.js";import"./p-b4f01350.js";import"./p-de4704fc.js";import"./p-b095519d.js";import"./p-440193f4.js";
2
+ //# sourceMappingURL=p-3241987a.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as s,h as t,H as i,g as o}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";const r=":host{display:block}";const a=class{constructor(t){s(this,t);this.expandedItems=new Set;this.multiple=false}componentWillLoad(){this.registerAccordionItems()}async toggle(s){const t=this.accordionItems.find((t=>t.id===s));if(!t)throw new Error(`No post-accordion-item found with id #${s}.`);await t.toggle()}collapseChangeHandler(s){s.stopPropagation();const t=s.target;const i=this.expandedItems.has(t);if(i){this.expandedItems.delete(t)}else{this.expandedItems.add(t)}if(this.multiple||i)return;Array.from(this.expandedItems.values()).filter((s=>s!==t)).forEach((s=>{s.toggle(false)}))}async expandAll(){if(this.multiple){await Promise.all(this.accordionItems.map((s=>s.toggle(true))))}else if(!this.expandedItems.size){await this.accordionItems[0].toggle(true)}}async collapseAll(){await Promise.all(this.accordionItems.map((s=>s.toggle(false))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item"));this.accordionItems.filter((s=>!s.collapsed||this.expandedItems.has(s))).forEach(((s,t)=>{if(!this.multiple&&t!==0){s.setAttribute("collapsed","");return}this.expandedItems.add(s)}))}render(){return t(i,{"data-version":e},t("div",{class:"accordion"},t("slot",{onSlotchange:()=>this.registerAccordionItems()})))}get host(){return o(this)}};a.style=r;export{a as P};
2
+ //# sourceMappingURL=p-3fd14a00.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["postAccordionCss","PostAccordion","this","expandedItems","Set","componentWillLoad","registerAccordionItems","toggle","id","itemToToggle","accordionItems","find","item","Error","collapseChangeHandler","event","stopPropagation","toggledItem","target","isClosing","has","delete","add","multiple","Array","from","values","filter","forEach","expandAll","Promise","all","map","size","collapseAll","host","querySelectorAll","collapsed","index","setAttribute","render","h","Host","version","class","onSlotchange"],"sources":["src/components/post-accordion/post-accordion.scss?tag=post-accordion&encapsulation=shadow","src/components/post-accordion/post-accordion.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Element, h, Host, Listen, Method, Prop } from '@stencil/core';\nimport { version } from '../../../package.json';\n\n@Component({\n tag: 'post-accordion',\n styleUrl: 'post-accordion.scss',\n shadow: true,\n})\nexport class PostAccordion {\n private accordionItems: HTMLPostAccordionItemElement[];\n private expandedItems = new Set<HTMLPostAccordionItemElement>();\n\n @Element() host: HTMLPostAccordionElement;\n\n /**\n * If `true`, multiple `post-accordion-item` can be open at the same time.\n */\n @Prop() readonly multiple: boolean = false;\n\n componentWillLoad() {\n this.registerAccordionItems();\n }\n\n /**\n * Toggles the `post-accordion-item` with the given id.\n */\n @Method()\n async toggle(id: string) {\n const itemToToggle = this.accordionItems.find(item => item.id === id);\n\n if (!itemToToggle) throw new Error(`No post-accordion-item found with id #${id}.`);\n\n await itemToToggle.toggle();\n }\n\n @Listen('collapseChange')\n collapseChangeHandler(event: CustomEvent<boolean>) {\n event.stopPropagation();\n\n const toggledItem = event.target as HTMLPostAccordionItemElement;\n const isClosing = this.expandedItems.has(toggledItem);\n\n if (isClosing) {\n this.expandedItems.delete(toggledItem);\n } else {\n this.expandedItems.add(toggledItem);\n }\n\n if (this.multiple || isClosing) return;\n\n // close other open accordion items to have only one opened at a time\n Array.from(this.expandedItems.values())\n .filter(item => item !== toggledItem)\n .forEach(item => {\n item.toggle(false);\n });\n }\n\n /**\n * Expands all `post-accordion-item`.\n *\n * If `close-others` is `true` and all items are closed, it will open the first one.\n * Otherwise, it will keep the opened one.\n */\n @Method()\n async expandAll() {\n if (this.multiple) {\n await Promise.all(this.accordionItems.map(item => item.toggle(true)));\n } else if (!this.expandedItems.size) {\n await this.accordionItems[0].toggle(true);\n }\n }\n\n /**\n * Collapses all `post-accordion-item`.\n */\n @Method()\n async collapseAll() {\n await Promise.all(this.accordionItems.map(item => item.toggle(false)));\n }\n\n private registerAccordionItems() {\n this.accordionItems = Array.from(this.host.querySelectorAll('post-accordion-item'));\n\n this.accordionItems\n .filter(item => {\n return !item.collapsed || this.expandedItems.has(item);\n })\n .forEach((item, index) => {\n if (!this.multiple && index !== 0) {\n item.setAttribute('collapsed', '');\n return;\n }\n\n this.expandedItems.add(item);\n });\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div class=\"accordion\">\n <slot onSlotchange={() => this.registerAccordionItems()} />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAmB,uB,MCQZC,EAAa,M,yBAEhBC,KAAAC,cAAgB,IAAIC,I,cAOS,K,CAErC,iBAAAC,GACEH,KAAKI,wB,CAOP,YAAMC,CAAOC,GACX,MAAMC,EAAeP,KAAKQ,eAAeC,MAAKC,GAAQA,EAAKJ,KAAOA,IAElE,IAAKC,EAAc,MAAM,IAAII,MAAM,yCAAyCL,YAEtEC,EAAaF,Q,CAIrB,qBAAAO,CAAsBC,GACpBA,EAAMC,kBAEN,MAAMC,EAAcF,EAAMG,OAC1B,MAAMC,EAAYjB,KAAKC,cAAciB,IAAIH,GAEzC,GAAIE,EAAW,CACbjB,KAAKC,cAAckB,OAAOJ,E,KACrB,CACLf,KAAKC,cAAcmB,IAAIL,E,CAGzB,GAAIf,KAAKqB,UAAYJ,EAAW,OAGhCK,MAAMC,KAAKvB,KAAKC,cAAcuB,UAC3BC,QAAOf,GAAQA,IAASK,IACxBW,SAAQhB,IACPA,EAAKL,OAAO,MAAM,G,CAWxB,eAAMsB,GACJ,GAAI3B,KAAKqB,SAAU,OACXO,QAAQC,IAAI7B,KAAKQ,eAAesB,KAAIpB,GAAQA,EAAKL,OAAO,Q,MACzD,IAAKL,KAAKC,cAAc8B,KAAM,OAC7B/B,KAAKQ,eAAe,GAAGH,OAAO,K,EAQxC,iBAAM2B,SACEJ,QAAQC,IAAI7B,KAAKQ,eAAesB,KAAIpB,GAAQA,EAAKL,OAAO,S,CAGxD,sBAAAD,GACNJ,KAAKQ,eAAiBc,MAAMC,KAAKvB,KAAKiC,KAAKC,iBAAiB,wBAE5DlC,KAAKQ,eACFiB,QAAOf,IACEA,EAAKyB,WAAanC,KAAKC,cAAciB,IAAIR,KAElDgB,SAAQ,CAAChB,EAAM0B,KACd,IAAKpC,KAAKqB,UAAYe,IAAU,EAAG,CACjC1B,EAAK2B,aAAa,YAAa,IAC/B,M,CAGFrC,KAAKC,cAAcmB,IAAIV,EAAK,G,CAIlC,MAAA4B,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,OAAKG,MAAM,aACTH,EAAA,QAAMI,aAAc,IAAM3C,KAAKI,4B"}
@@ -0,0 +1,2 @@
1
+ import{r as s,h as t,H as n,g as o}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";const r=":host{display:none}";const a=class{constructor(t){s(this,t);this.panelId=undefined;this.name=undefined}componentWillLoad(){this.panelId=`panel-${this.host.id||crypto.randomUUID()}`}render(){return t(n,{"data-version":e},t("div",{class:"tab-pane",id:this.panelId,role:"tabpanel"},t("slot",null)))}get host(){return o(this)}};a.style=r;export{a as P};
2
+ //# sourceMappingURL=p-4b950d70.js.map
@@ -0,0 +1,2 @@
1
+ export{P as post_icon}from"./p-91f2291a.js";import"./p-b4f01350.js";import"./p-96f4ebc4.js";import"./p-440193f4.js";import"./p-de4704fc.js";import"./p-b095519d.js";
2
+ //# sourceMappingURL=p-503ac49b.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as n,h as e,H as o,g as i}from"./p-81591ad0.js";import{v as r}from"./p-bd1d0117.js";const s=Math.min;const c=Math.max;const l=Math.round;const a=Math.floor;const f=t=>({x:t,y:t});const u={left:"right",right:"left",bottom:"top",top:"bottom"};const p={start:"end",end:"start"};function d(t,n,e){return c(t,s(n,e))}function h(t,n){return typeof t==="function"?t(n):t}function m(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function v(t){return t==="x"?"y":"x"}function y(t){return t==="y"?"height":"width"}function w(t){return["top","bottom"].includes(m(t))?"y":"x"}function b(t){return v(w(t))}function x(t,n,e){if(e===void 0){e=false}const o=g(t);const i=b(t);const r=y(i);let s=i==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[r]>n.floating[r]){s=M(s)}return[s,M(s)]}function A(t){const n=M(t);return[S(t),n,S(n)]}function S(t){return t.replace(/start|end/g,(t=>p[t]))}function T(t,n,e){const o=["left","right"];const i=["right","left"];const r=["top","bottom"];const s=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?i:o;return n?o:i;case"left":case"right":return n?r:s;default:return[]}}function E(t,n,e,o){const i=g(t);let r=T(m(t),e==="start",o);if(i){r=r.map((t=>t+"-"+i));if(n){r=r.concat(r.map(S))}}return r}function M(t){return t.replace(/left|right|bottom|top/g,(t=>u[t]))}function k(t){return{top:0,right:0,bottom:0,left:0,...t}}function L(t){return typeof t!=="number"?k(t):{top:t,right:t,bottom:t,left:t}}function D(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function H(t,n,e){let{reference:o,floating:i}=t;const r=w(n);const s=b(n);const c=y(s);const l=m(n);const a=r==="y";const f=o.x+o.width/2-i.width/2;const u=o.y+o.height/2-i.height/2;const p=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(g(n)){case"start":d[s]-=p*(e&&a?-1:1);break;case"end":d[s]+=p*(e&&a?-1:1);break}return d}const O=async(t,n,e)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=e;const c=r.filter(Boolean);const l=await(s.isRTL==null?void 0:s.isRTL(n));let a=await s.getElementRects({reference:t,floating:n,strategy:i});let{x:f,y:u}=H(a,o,l);let p=o;let d={};let h=0;for(let e=0;e<c.length;e++){const{name:r,fn:m}=c[e];const{x:g,y:v,data:y,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:n}});f=g!=null?g:f;u=v!=null?v:u;d={...d,[r]:{...d[r],...y}};if(w&&h<=50){h++;if(typeof w==="object"){if(w.placement){p=w.placement}if(w.rects){a=w.rects===true?await s.getElementRects({reference:t,floating:n,strategy:i}):w.rects}({x:f,y:u}=H(a,p,l))}e=-1;continue}}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function F(t,n){var e;if(n===void 0){n={}}const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t;const{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=false,padding:d=0}=h(n,t);const m=L(d);const g=u==="floating"?"reference":"floating";const v=c[p?g:u];const y=D(await r.getClippingRect({element:((e=await(r.isElement==null?void 0:r.isElement(v)))!=null?e:true)?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l}));const w=u==="floating"?{...s.floating,x:o,y:i}:s.reference;const b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating));const x=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1};const A=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-A.top+m.top)/x.y,bottom:(A.bottom-y.bottom+m.bottom)/x.y,left:(y.left-A.left+m.left)/x.x,right:(A.right-y.right+m.right)/x.x}}const R=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:i,rects:r,platform:c,elements:l,middlewareData:a}=n;const{element:f,padding:u=0}=h(t,n)||{};if(f==null){return{}}const p=L(u);const m={x:e,y:o};const v=b(i);const w=y(v);const x=await c.getDimensions(f);const A=v==="y";const S=A?"top":"left";const T=A?"bottom":"right";const E=A?"clientHeight":"clientWidth";const M=r.reference[w]+r.reference[v]-m[v]-r.floating[w];const k=m[v]-r.reference[v];const D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let H=D?D[E]:0;if(!H||!await(c.isElement==null?void 0:c.isElement(D))){H=l.floating[E]||r.floating[w]}const O=M/2-k/2;const F=H/2-x[w]/2-1;const R=s(p[S],F);const z=s(p[T],F);const P=R;const W=H-x[w]-z;const j=H/2-x[w]/2+O;const $=d(P,j,W);const q=!a.arrow&&g(i)!=null&&j!=$&&r.reference[w]/2-(j<P?R:z)-x[w]/2<0;const B=q?j<P?j-P:j-W:0;return{[v]:m[v]+B,data:{[v]:$,centerOffset:j-$-B,...q&&{alignmentOffset:B}},reset:q}}});const z=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=true,...y}=h(t,n);if((e=r.arrow)!=null&&e.alignmentOffset){return{}}const w=m(i);const b=m(c)===c;const S=await(l.isRTL==null?void 0:l.isRTL(a.floating));const T=p||(b||!v?[M(c)]:A(c));if(!p&&g!=="none"){T.push(...E(c,v,g,S))}const k=[c,...T];const L=await F(n,y);const D=[];let H=((o=r.flip)==null?void 0:o.overflows)||[];if(f){D.push(L[w])}if(u){const t=x(i,s,S);D.push(L[t[0]],L[t[1]])}H=[...H,{placement:i,overflows:D}];if(!D.every((t=>t<=0))){var O,R;const t=(((O=r.flip)==null?void 0:O.index)||0)+1;const n=k[t];if(n){return{data:{index:t,overflows:H},reset:{placement:n}}}let e=(R=H.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(d){case"bestFit":{var z;const t=(z=H.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:z[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(i!==e){return{reset:{placement:e}}}}return{}}}};function P(t){const n=s(...t.map((t=>t.left)));const e=s(...t.map((t=>t.top)));const o=c(...t.map((t=>t.right)));const i=c(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:i-e}}function W(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const i=n[t];if(!o||i.y-o.y>o.height/2){e.push([i])}else{e[e.length-1].push(i)}o=i}return e.map((t=>D(P(t))))}const j=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:i,platform:r,strategy:l}=n;const{padding:a=2,x:f,y:u}=h(t,n);const p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]);const d=W(p);const g=D(P(p));const v=L(a);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&u!=null){return d.find((t=>f>t.left-v.left&&f<t.right+v.right&&u>t.top-v.top&&u<t.bottom+v.bottom))||g}if(d.length>=2){if(w(e)==="y"){const t=d[0];const n=d[d.length-1];const o=m(e)==="top";const i=t.top;const r=n.bottom;const s=o?t.left:n.left;const c=o?t.right:n.right;const l=c-s;const a=r-i;return{top:i,bottom:r,left:s,right:c,width:l,height:a,x:s,y:i}}const t=m(e)==="left";const n=c(...d.map((t=>t.right)));const o=s(...d.map((t=>t.left)));const i=d.filter((e=>t?e.left===o:e.right===n));const r=i[0].top;const l=i[i.length-1].bottom;const a=o;const f=n;const u=f-a;const p=l-r;return{top:r,bottom:l,left:a,right:f,width:u,height:p,x:a,y:r}}return g}const b=await r.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:l});if(i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height){return{reset:{rects:b}}}return{}}}};async function $(t,n){const{placement:e,platform:o,elements:i}=t;const r=await(o.isRTL==null?void 0:o.isRTL(i.floating));const s=m(e);const c=g(e);const l=w(e)==="y";const a=["left","top"].includes(s)?-1:1;const f=r&&l?-1:1;const u=h(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof v==="number"){d=c==="end"?v*-1:v}return l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const q=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:i,y:r,placement:s,middlewareData:c}=n;const l=await $(n,t);if(s===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}};const B=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:i}=n;const{mainAxis:r=true,crossAxis:s=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=h(t,n);const a={x:e,y:o};const f=await F(n,l);const u=w(m(i));const p=v(u);let g=a[p];let y=a[u];if(r){const t=p==="y"?"top":"left";const n=p==="y"?"bottom":"right";const e=g+f[t];const o=g-f[n];g=d(e,g,o)}if(s){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=y+f[t];const o=y-f[n];y=d(e,y,o)}const b=c.fn({...n,[p]:g,[u]:y});return{...b,data:{x:b.x-e,y:b.y-o}}}}};const C=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:i,rects:r,middlewareData:s}=n;const{offset:c=0,mainAxis:l=true,crossAxis:a=true}=h(t,n);const f={x:e,y:o};const u=w(i);const p=v(u);let d=f[p];let g=f[u];const y=h(c,n);const b=typeof y==="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const t=p==="y"?"height":"width";const n=r.reference[p]-r.floating[t]+b.mainAxis;const e=r.reference[p]+r.reference[t]-b.mainAxis;if(d<n){d=n}else if(d>e){d=e}}if(a){var x,A;const t=p==="y"?"width":"height";const n=["top","left"].includes(m(i));const e=r.reference[u]-r.floating[t]+(n?((x=s.offset)==null?void 0:x[u])||0:0)+(n?0:b.crossAxis);const o=r.reference[u]+r.reference[t]+(n?0:((A=s.offset)==null?void 0:A[u])||0)-(n?b.crossAxis:0);if(g<e){g=e}else if(g>o){g=o}}return{[p]:d,[u]:g}}}};const I=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:i,elements:r}=n;const{apply:l=(()=>{}),...a}=h(t,n);const f=await F(n,a);const u=m(e);const p=g(e);const d=w(e)==="y";const{width:v,height:y}=o.floating;let b;let x;if(u==="top"||u==="bottom"){b=u;x=p===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"}else{x=u;b=p==="end"?"top":"bottom"}const A=y-f[b];const S=v-f[x];const T=!n.middlewareData.shift;let E=A;let M=S;if(d){const t=v-f.left-f.right;M=p||T?s(S,t):t}else{const t=y-f.top-f.bottom;E=p||T?s(A,t):t}if(T&&!p){const t=c(f.left,0);const n=c(f.right,0);const e=c(f.top,0);const o=c(f.bottom,0);if(d){M=v-2*(t!==0||n!==0?t+n:c(f.left,f.right))}else{E=y-2*(e!==0||o!==0?e+o:c(f.top,f.bottom))}}await l({...n,availableWidth:M,availableHeight:E});const k=await i.getDimensions(r.floating);if(v!==k.width||y!==k.height){return{reset:{rects:true}}}return{}}}};function N(t){if(X(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function G(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function V(t){var n;return(n=(X(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function X(t){return t instanceof Node||t instanceof G(t).Node}function Y(t){return t instanceof Element||t instanceof G(t).Element}function _(t){return t instanceof HTMLElement||t instanceof G(t).HTMLElement}function J(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof G(t).ShadowRoot}function K(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=et(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(i)}function Q(t){return["table","td","th"].includes(N(t))}function U(t){const n=tt();const e=et(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function Z(t){let n=it(t);while(_(n)&&!nt(n)){if(U(n)){return n}else{n=it(n)}}return null}function tt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(N(t))}function et(t){return G(t).getComputedStyle(t)}function ot(t){if(Y(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function it(t){if(N(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||J(t)&&t.host||V(t);return J(n)?n.host:n}function rt(t){const n=it(t);if(nt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(_(n)&&K(n)){return n}return rt(n)}function st(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const i=rt(t);const r=i===((o=t.ownerDocument)==null?void 0:o.body);const s=G(i);if(r){return n.concat(s,s.visualViewport||[],K(i)?i:[],s.frameElement&&e?st(s.frameElement):[])}return n.concat(i,st(i,[],e))}function ct(t){const n=et(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const i=_(t);const r=i?t.offsetWidth:e;const s=i?t.offsetHeight:o;const c=l(e)!==r||l(o)!==s;if(c){e=r;o=s}return{width:e,height:o,$:c}}function lt(t){return!Y(t)?t.contextElement:t}function at(t){const n=lt(t);if(!_(n)){return f(1)}const e=n.getBoundingClientRect();const{width:o,height:i,$:r}=ct(n);let s=(r?l(e.width):e.width)/o;let c=(r?l(e.height):e.height)/i;if(!s||!Number.isFinite(s)){s=1}if(!c||!Number.isFinite(c)){c=1}return{x:s,y:c}}const ft=f(0);function ut(t){const n=G(t);if(!tt()||!n.visualViewport){return ft}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pt(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==G(t)){return false}return n}function dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const i=t.getBoundingClientRect();const r=lt(t);let s=f(1);if(n){if(o){if(Y(o)){s=at(o)}}else{s=at(t)}}const c=pt(r,e,o)?ut(r):f(0);let l=(i.left+c.x)/s.x;let a=(i.top+c.y)/s.y;let u=i.width/s.x;let p=i.height/s.y;if(r){const t=G(r);const n=o&&Y(o)?G(o):o;let e=t.frameElement;while(e&&o&&n!==t){const t=at(e);const n=e.getBoundingClientRect();const o=et(e);const i=n.left+(e.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(e.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x;a*=t.y;u*=t.x;p*=t.y;l+=i;a+=r;e=G(e).frameElement}}return D({width:u,height:p,x:l,y:a})}function ht(t){let{rect:n,offsetParent:e,strategy:o}=t;const i=_(e);const r=V(e);if(e===r){return n}let s={scrollLeft:0,scrollTop:0};let c=f(1);const l=f(0);if(i||!i&&o!=="fixed"){if(N(e)!=="body"||K(r)){s=ot(e)}if(_(e)){const t=dt(e);c=at(e);l.x=t.x+e.clientLeft;l.y=t.y+e.clientTop}}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function mt(t){return Array.from(t.getClientRects())}function gt(t){return dt(V(t)).left+ot(t).scrollLeft}function vt(t){const n=V(t);const e=ot(t);const o=t.ownerDocument.body;const i=c(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const r=c(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let s=-e.scrollLeft+gt(t);const l=-e.scrollTop;if(et(o).direction==="rtl"){s+=c(n.clientWidth,o.clientWidth)-i}return{width:i,height:r,x:s,y:l}}function yt(t,n){const e=G(t);const o=V(t);const i=e.visualViewport;let r=o.clientWidth;let s=o.clientHeight;let c=0;let l=0;if(i){r=i.width;s=i.height;const t=tt();if(!t||t&&n==="fixed"){c=i.offsetLeft;l=i.offsetTop}}return{width:r,height:s,x:c,y:l}}function wt(t,n){const e=dt(t,true,n==="fixed");const o=e.top+t.clientTop;const i=e.left+t.clientLeft;const r=_(t)?at(t):f(1);const s=t.clientWidth*r.x;const c=t.clientHeight*r.y;const l=i*r.x;const a=o*r.y;return{width:s,height:c,x:l,y:a}}function bt(t,n,e){let o;if(n==="viewport"){o=yt(t,e)}else if(n==="document"){o=vt(V(t))}else if(Y(n)){o=wt(n,e)}else{const e=ut(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return D(o)}function xt(t,n){const e=it(t);if(e===n||!Y(e)||nt(e)){return false}return et(e).position==="fixed"||xt(e,n)}function At(t,n){const e=n.get(t);if(e){return e}let o=st(t,[],false).filter((t=>Y(t)&&N(t)!=="body"));let i=null;const r=et(t).position==="fixed";let s=r?it(t):t;while(Y(s)&&!nt(s)){const n=et(s);const e=U(s);if(!e&&n.position==="fixed"){i=null}const c=r?!e&&!i:!e&&n.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||K(s)&&!e&&xt(t,s);if(c){o=o.filter((t=>t!==s))}else{i=n}s=it(s)}n.set(t,o);return o}function St(t){let{element:n,boundary:e,rootBoundary:o,strategy:i}=t;const r=e==="clippingAncestors"?At(n,this._c):[].concat(e);const l=[...r,o];const a=l[0];const f=l.reduce(((t,e)=>{const o=bt(n,e,i);t.top=c(o.top,t.top);t.right=s(o.right,t.right);t.bottom=s(o.bottom,t.bottom);t.left=c(o.left,t.left);return t}),bt(n,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Tt(t){const{width:n,height:e}=ct(t);return{width:n,height:e}}function Et(t,n,e){const o=_(n);const i=V(n);const r=e==="fixed";const s=dt(t,true,r,n);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(o||!o&&!r){if(N(n)!=="body"||K(i)){c=ot(n)}if(o){const t=dt(n,true,r,n);l.x=t.x+n.clientLeft;l.y=t.y+n.clientTop}else if(i){l.x=gt(i)}}return{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function Mt(t,n){if(!_(t)||et(t).position==="fixed"){return null}if(n){return n(t)}return t.offsetParent}function kt(t,n){const e=G(t);if(!_(t)){return e}let o=Mt(t,n);while(o&&Q(o)&&et(o).position==="static"){o=Mt(o,n)}if(o&&(N(o)==="html"||N(o)==="body"&&et(o).position==="static"&&!U(o))){return e}return o||Z(t)||e}const Lt=async function(t){let{reference:n,floating:e,strategy:o}=t;const i=this.getOffsetParent||kt;const r=this.getDimensions;return{reference:Et(n,await i(e),o),floating:{x:0,y:0,...await r(e)}}};function Dt(t){return et(t).direction==="rtl"}const Ht={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:V,getClippingRect:St,getOffsetParent:kt,getElementRects:Lt,getClientRects:mt,getDimensions:Tt,getScale:at,isElement:Y,isRTL:Dt};function Ot(t,n){let e=null;let o;const i=V(t);function r(){clearTimeout(o);e&&e.disconnect();e=null}function l(f,u){if(f===void 0){f=false}if(u===void 0){u=1}r();const{left:p,top:d,width:h,height:m}=t.getBoundingClientRect();if(!f){n()}if(!h||!m){return}const g=a(d);const v=a(i.clientWidth-(p+h));const y=a(i.clientHeight-(d+m));const w=a(p);const b=-g+"px "+-v+"px "+-y+"px "+-w+"px";const x={rootMargin:b,threshold:c(0,s(1,u))||1};let A=true;function S(t){const n=t[0].intersectionRatio;if(n!==u){if(!A){return l()}if(!n){o=setTimeout((()=>{l(false,1e-7)}),100)}else{l(false,n)}}A=false}try{e=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch(t){e=new IntersectionObserver(S,x)}e.observe(t)}l(true);return r}function Ft(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver==="function",layoutShift:c=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=lt(t);const f=i||r?[...a?st(a):[],...st(n)]:[];f.forEach((t=>{i&&t.addEventListener("scroll",e,{passive:true});r&&t.addEventListener("resize",e)}));const u=a&&c?Ot(a,e):null;let p=-1;let d=null;if(s){d=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&d){d.unobserve(n);cancelAnimationFrame(p);p=requestAnimationFrame((()=>{d&&d.observe(n)}))}e()}));if(a&&!l){d.observe(a)}d.observe(n)}let h;let m=l?dt(t):null;if(l){g()}function g(){const n=dt(t);if(m&&(n.x!==m.x||n.y!==m.y||n.width!==m.width||n.height!==m.height)){e()}m=n;h=requestAnimationFrame(g)}e();return()=>{f.forEach((t=>{i&&t.removeEventListener("scroll",e);r&&t.removeEventListener("resize",e)}));u&&u();d&&d.disconnect();d=null;if(l){cancelAnimationFrame(h)}}}const Rt=B;const zt=z;const Pt=I;const Wt=R;const jt=j;const $t=C;const qt=(t,n,e)=>{const o=new Map;const i={platform:Ht,...e};const r={...i.platform,_c:o};return O(t,n,{...i,platform:r})};(()=>{var t=class extends Event{oldState;newState;constructor(t,{oldState:n="",newState:e="",...o}={}){super(t,o),this.oldState=String(n||""),this.newState=String(e||"")}},n=new WeakMap;function e(e,o,i){n.set(e,setTimeout((()=>{n.has(e)&&e.dispatchEvent(new t("toggle",{cancelable:!1,oldState:o,newState:i}))}),0))}var o=globalThis.ShadowRoot||function(){},i=globalThis.HTMLDialogElement||function(){},r=new WeakMap,s=new WeakMap,c=new WeakMap;function l(t){return c.get(t)||"hidden"}var a=new WeakMap;function f(t){let n=t.popoverTargetElement;if(!n)return;let e=l(n);t.popoverTargetAction==="show"&&e==="showing"||t.popoverTargetAction==="hide"&&e==="hidden"||(e==="showing"?T(n,!0,!0):u(n,!1)&&(a.set(n,t),S(n)))}function u(t,n){return!(t.popover!=="auto"&&t.popover!=="manual"||!t.isConnected||n&&l(t)!=="showing"||!n&&l(t)!=="hidden"||t instanceof i&&t.hasAttribute("open")||document.fullscreenElement===t)}function p(t){return t?Array.from(s.get(t.ownerDocument)||[]).indexOf(t)+1:0}function d(t){let n=g(t),e=v(t);return p(n)>p(e)?n:e}function h(t){let n=s.get(t);for(let t of n||[])if(!t.isConnected)n.delete(t);else return t;return null}function m(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?m(t.parentNode):t}function g(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&c.get(t)==="showing")return t;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function v(t){for(;t;){let n=t.popoverTargetElement;if(n)return n;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function y(t){let n=new Map,e=0,o=t.ownerDocument;for(let t of s.get(o)||[])n.set(t,e),e+=1;n.set(t,e),e+=1;let i=null;function r(t){let e=g(t);if(e===null)return null;let o=n.get(e);(i===null||n.get(i)<o)&&(i=e)}return r(t?.parentElement),i}function w(t){return t.hidden||(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&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:t.tabIndex!==-1}function b(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let n=t;n.shadowRoot&&(n=n.shadowRoot);let e=n.querySelector("[autofocus]");if(e)return e;let o=t.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=o.currentNode;for(;i;){if(w(i))return i;i=o.nextNode()}}function x(t){b(t)?.focus()}var A=new WeakMap;function S(n){if(!u(n,!1))return;let o=n.ownerDocument;if(!n.dispatchEvent(new t("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!u(n,!1))return;let i=!1;if(n.popover==="auto"){let t=n.getAttribute("popover"),e=y(n)||o;if(M(e,!1,!0),t!==n.getAttribute("popover")||!u(n,!1))return}h(o)||(i=!0),A.delete(n);let l=o.activeElement;n.classList.add(":popover-open"),c.set(n,"showing"),r.has(o)||r.set(o,new Set),r.get(o).add(n),x(n),n.popover==="auto"&&(s.has(o)||s.set(o,new Set),s.get(o).add(n),H(a.get(n),!0)),i&&l&&n.popover==="auto"&&A.set(n,l),e(n,"closed","open")}function T(n,o=!1,i=!1){if(!u(n,!0))return;let l=n.ownerDocument;if(n.popover==="auto"&&(M(n,o,i),!u(n,!0))||(H(a.get(n),!1),a.delete(n),i&&(n.dispatchEvent(new t("beforetoggle",{oldState:"open",newState:"closed"})),!u(n,!0))))return;r.get(l)?.delete(n),s.get(l)?.delete(n),n.classList.remove(":popover-open"),c.set(n,"hidden"),i&&e(n,"open","closed");let f=A.get(n);f&&(A.delete(n),o&&f.focus())}function E(t,n=!1,e=!1){let o=h(t);for(;o;)T(o,n,e),o=h(t)}function M(t,n,e){let o=t.ownerDocument||t;if(t instanceof Document)return E(o,n,e);let i=null,r=!1;for(let n of s.get(o)||[])if(n===t)r=!0;else if(r){i=n;break}if(!r)return E(o,n,e);for(;i&&l(i)==="showing"&&s.get(o)?.size;)T(i,n,e)}var k=new WeakMap;function L(t){if(!t.isTrusted)return;let n=t.composedPath()[0];if(!n)return;let e=n.ownerDocument;if(!h(e))return;let o=d(n);if(o&&t.type==="pointerdown")k.set(e,o);else if(t.type==="pointerup"){let t=k.get(e)===o;k.delete(e),t&&M(o||e,!1,!0)}}var D=new WeakMap;function H(t,n=!1){if(!t)return;D.has(t)||D.set(t,t.getAttribute("aria-expanded"));let e=t.popoverTargetElement;if(e&&e.popover==="auto")t.setAttribute("aria-expanded",String(n));else{let n=D.get(t);n?t.setAttribute("aria-expanded",n):t.removeAttribute("aria-expanded")}}var O=globalThis.ShadowRoot||function(){};function F(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function R(t,n,e){let o=t[n];Object.defineProperty(t,n,{value(t){return o.call(this,e(t))}})}var z=/(^|[^\\]):popover-open\b/g;function P(){window.ToggleEvent=window.ToggleEvent||t;function n(t){return t?.includes(":popover-open")&&(t=t.replace(z,"$1.\\:popover-open")),t}R(Document.prototype,"querySelector",n),R(Document.prototype,"querySelectorAll",n),R(Element.prototype,"querySelector",n),R(Element.prototype,"querySelectorAll",n),R(Element.prototype,"matches",n),R(Element.prototype,"closest",n),R(DocumentFragment.prototype,"querySelectorAll",n),R(DocumentFragment.prototype,"querySelectorAll",n),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return t===""||t=="auto"?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){S(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){T(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){c.get(this)==="showing"&&t===void 0||t===!1?T(this,!0,!0):(t===void 0||t===!0)&&S(this)}}});let e=new WeakMap;function o(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(t===null)this.removeAttribute("popovertarget"),e.delete(this);else if(t instanceof Element)this.setAttribute("popovertarget",""),e.set(this,t);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;let n=m(this),o=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof O)&&o&&n.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return t==="show"||t==="hide"?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}o(HTMLButtonElement),o(HTMLInputElement);let i=t=>{if(!t.isTrusted)return;let n=t.composedPath()[0];if(!(n instanceof Element)||n?.shadowRoot)return;let e=m(n);if(!(e instanceof O||e instanceof Document))return;let o=n.closest("[popovertargetaction],[popovertarget]");if(o){f(o);return}},r=t=>{let n=t.key,e=t.target;e&&(n==="Escape"||n==="Esc")&&M(e.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",r),t.addEventListener("pointerdown",L),t.addEventListener("pointerup",L)})(document)}F()||P()})();const Bt="@layer polyfill{[popover]{position:fixed;z-index:2147483647;inset:0;padding:.25em;width:fit-content;height:fit-content;border-width:initial;border-color:initial;border-image:initial;border-style:solid;background-color:canvas;color:canvastext;overflow:auto;margin:auto}[popover]:not(.\\:popover-open){display:none}[popover]:is(dialog[open]){display:revert}[anchor].\\:popover-open{inset:auto}@supports selector([popover]:popover-open){[popover]:not(.\\:popover-open,dialog[open]){display:revert}[anchor]:is(:popover-open){inset:auto}}@supports not (background-color: canvas){[popover]{background-color:white;color:black}}@supports(width: -moz-fit-content){[popover]{width:-moz-fit-content;height:-moz-fit-content}}@supports not (inset: 0){[popover]{top:0;left:0;right:0;bottom:0}}}.popover{box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:1px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}.arrow{position:absolute;width:.7071067812rem;height:.7071067812rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1;border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";const Ct={top:"bottom",right:"left",bottom:"top",left:"right"};const It=class{constructor(e){t(this,e);this.postPopoverToggled=n(this,"postPopoverToggled",7);this.placement="top";this.arrow=false}componentDidLoad(){this.popoverRef.setAttribute("popover","");this.popoverRef.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){if(this.popoverRef)this.popoverRef.removeEventListener("beforetoggle",(t=>this.toggle(t.target)));if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}async show(t){this.eventTarget=t;this.popoverRef.showPopover()}async hide(){this.eventTarget=null;this.popoverRef.hidePopover()}async toggle(t,n){this.eventTarget=t;this.popoverRef.togglePopover(n);return this.popoverRef.matches(":popover-open")}handleToggle(t){const n=t.newState==="open";if(n){this.startAutoupdates()}else{if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}this.postPopoverToggled.emit(n)}startAutoupdates(){this.clearAutoUpdate=Ft(this.eventTarget,this.popoverRef,this.calculatePosition.bind(this))}async calculatePosition(){const t=[zt(),jt(),Rt({padding:8,limiter:$t({offset:32})}),Pt({apply({availableWidth:t,elements:n}){Object.assign(n.floating.style,{maxWidth:`${t-16}px`})}}),q(this.arrow?12:8)];if(this.arrow){t.push(Wt({element:this.arrowRef,padding:8}))}const{x:n,y:e,middlewareData:o,placement:i}=await qt(this.eventTarget,this.popoverRef,{placement:this.placement||"top",strategy:"fixed",middleware:t});this.popoverRef.style.left=`${n}px`;this.popoverRef.style.top=`${e}px`;if(this.arrow){const t=i.split("-")[0];const{x:n,y:e}=o.arrow;const r=Ct[t];Object.assign(this.arrowRef.style,{top:e?`${e}px`:"",left:n?`${n}px`:"",[r]:`${-this.arrowRef.offsetWidth/2}px`})}}render(){return e(o,{"data-version":r},e("div",{class:"popover",part:"popover",ref:t=>this.popoverRef=t},this.arrow&&e("span",{class:"arrow",ref:t=>{this.arrowRef=t}}),e("slot",null)))}get host(){return i(this)}};It.style=Bt;export{It as P};
2
- //# sourceMappingURL=p-7d08e4f1.js.map
1
+ import{r as t,c as n,h as e,H as o,g as i}from"./p-b4f01350.js";import{v as r}from"./p-de4704fc.js";const s=Math.min;const c=Math.max;const l=Math.round;const a=Math.floor;const f=t=>({x:t,y:t});const u={left:"right",right:"left",bottom:"top",top:"bottom"};const p={start:"end",end:"start"};function d(t,n,e){return c(t,s(n,e))}function h(t,n){return typeof t==="function"?t(n):t}function m(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function v(t){return t==="x"?"y":"x"}function y(t){return t==="y"?"height":"width"}function w(t){return["top","bottom"].includes(m(t))?"y":"x"}function b(t){return v(w(t))}function x(t,n,e){if(e===void 0){e=false}const o=g(t);const i=b(t);const r=y(i);let s=i==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[r]>n.floating[r]){s=M(s)}return[s,M(s)]}function A(t){const n=M(t);return[S(t),n,S(n)]}function S(t){return t.replace(/start|end/g,(t=>p[t]))}function T(t,n,e){const o=["left","right"];const i=["right","left"];const r=["top","bottom"];const s=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?i:o;return n?o:i;case"left":case"right":return n?r:s;default:return[]}}function E(t,n,e,o){const i=g(t);let r=T(m(t),e==="start",o);if(i){r=r.map((t=>t+"-"+i));if(n){r=r.concat(r.map(S))}}return r}function M(t){return t.replace(/left|right|bottom|top/g,(t=>u[t]))}function k(t){return{top:0,right:0,bottom:0,left:0,...t}}function L(t){return typeof t!=="number"?k(t):{top:t,right:t,bottom:t,left:t}}function D(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function H(t,n,e){let{reference:o,floating:i}=t;const r=w(n);const s=b(n);const c=y(s);const l=m(n);const a=r==="y";const f=o.x+o.width/2-i.width/2;const u=o.y+o.height/2-i.height/2;const p=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(g(n)){case"start":d[s]-=p*(e&&a?-1:1);break;case"end":d[s]+=p*(e&&a?-1:1);break}return d}const O=async(t,n,e)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=e;const c=r.filter(Boolean);const l=await(s.isRTL==null?void 0:s.isRTL(n));let a=await s.getElementRects({reference:t,floating:n,strategy:i});let{x:f,y:u}=H(a,o,l);let p=o;let d={};let h=0;for(let e=0;e<c.length;e++){const{name:r,fn:m}=c[e];const{x:g,y:v,data:y,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:n}});f=g!=null?g:f;u=v!=null?v:u;d={...d,[r]:{...d[r],...y}};if(w&&h<=50){h++;if(typeof w==="object"){if(w.placement){p=w.placement}if(w.rects){a=w.rects===true?await s.getElementRects({reference:t,floating:n,strategy:i}):w.rects}({x:f,y:u}=H(a,p,l))}e=-1;continue}}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function F(t,n){var e;if(n===void 0){n={}}const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t;const{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=false,padding:d=0}=h(n,t);const m=L(d);const g=u==="floating"?"reference":"floating";const v=c[p?g:u];const y=D(await r.getClippingRect({element:((e=await(r.isElement==null?void 0:r.isElement(v)))!=null?e:true)?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l}));const w=u==="floating"?{...s.floating,x:o,y:i}:s.reference;const b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating));const x=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1};const A=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-A.top+m.top)/x.y,bottom:(A.bottom-y.bottom+m.bottom)/x.y,left:(y.left-A.left+m.left)/x.x,right:(A.right-y.right+m.right)/x.x}}const R=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:i,rects:r,platform:c,elements:l,middlewareData:a}=n;const{element:f,padding:u=0}=h(t,n)||{};if(f==null){return{}}const p=L(u);const m={x:e,y:o};const v=b(i);const w=y(v);const x=await c.getDimensions(f);const A=v==="y";const S=A?"top":"left";const T=A?"bottom":"right";const E=A?"clientHeight":"clientWidth";const M=r.reference[w]+r.reference[v]-m[v]-r.floating[w];const k=m[v]-r.reference[v];const D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let H=D?D[E]:0;if(!H||!await(c.isElement==null?void 0:c.isElement(D))){H=l.floating[E]||r.floating[w]}const O=M/2-k/2;const F=H/2-x[w]/2-1;const R=s(p[S],F);const z=s(p[T],F);const P=R;const W=H-x[w]-z;const j=H/2-x[w]/2+O;const $=d(P,j,W);const q=!a.arrow&&g(i)!=null&&j!=$&&r.reference[w]/2-(j<P?R:z)-x[w]/2<0;const B=q?j<P?j-P:j-W:0;return{[v]:m[v]+B,data:{[v]:$,centerOffset:j-$-B,...q&&{alignmentOffset:B}},reset:q}}});const z=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=true,...y}=h(t,n);if((e=r.arrow)!=null&&e.alignmentOffset){return{}}const w=m(i);const b=m(c)===c;const S=await(l.isRTL==null?void 0:l.isRTL(a.floating));const T=p||(b||!v?[M(c)]:A(c));if(!p&&g!=="none"){T.push(...E(c,v,g,S))}const k=[c,...T];const L=await F(n,y);const D=[];let H=((o=r.flip)==null?void 0:o.overflows)||[];if(f){D.push(L[w])}if(u){const t=x(i,s,S);D.push(L[t[0]],L[t[1]])}H=[...H,{placement:i,overflows:D}];if(!D.every((t=>t<=0))){var O,R;const t=(((O=r.flip)==null?void 0:O.index)||0)+1;const n=k[t];if(n){return{data:{index:t,overflows:H},reset:{placement:n}}}let e=(R=H.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(d){case"bestFit":{var z;const t=(z=H.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:z[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(i!==e){return{reset:{placement:e}}}}return{}}}};function P(t){const n=s(...t.map((t=>t.left)));const e=s(...t.map((t=>t.top)));const o=c(...t.map((t=>t.right)));const i=c(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:i-e}}function W(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const i=n[t];if(!o||i.y-o.y>o.height/2){e.push([i])}else{e[e.length-1].push(i)}o=i}return e.map((t=>D(P(t))))}const j=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:i,platform:r,strategy:l}=n;const{padding:a=2,x:f,y:u}=h(t,n);const p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]);const d=W(p);const g=D(P(p));const v=L(a);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&u!=null){return d.find((t=>f>t.left-v.left&&f<t.right+v.right&&u>t.top-v.top&&u<t.bottom+v.bottom))||g}if(d.length>=2){if(w(e)==="y"){const t=d[0];const n=d[d.length-1];const o=m(e)==="top";const i=t.top;const r=n.bottom;const s=o?t.left:n.left;const c=o?t.right:n.right;const l=c-s;const a=r-i;return{top:i,bottom:r,left:s,right:c,width:l,height:a,x:s,y:i}}const t=m(e)==="left";const n=c(...d.map((t=>t.right)));const o=s(...d.map((t=>t.left)));const i=d.filter((e=>t?e.left===o:e.right===n));const r=i[0].top;const l=i[i.length-1].bottom;const a=o;const f=n;const u=f-a;const p=l-r;return{top:r,bottom:l,left:a,right:f,width:u,height:p,x:a,y:r}}return g}const b=await r.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:l});if(i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height){return{reset:{rects:b}}}return{}}}};async function $(t,n){const{placement:e,platform:o,elements:i}=t;const r=await(o.isRTL==null?void 0:o.isRTL(i.floating));const s=m(e);const c=g(e);const l=w(e)==="y";const a=["left","top"].includes(s)?-1:1;const f=r&&l?-1:1;const u=h(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof v==="number"){d=c==="end"?v*-1:v}return l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const q=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:i,y:r,placement:s,middlewareData:c}=n;const l=await $(n,t);if(s===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}};const B=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:i}=n;const{mainAxis:r=true,crossAxis:s=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=h(t,n);const a={x:e,y:o};const f=await F(n,l);const u=w(m(i));const p=v(u);let g=a[p];let y=a[u];if(r){const t=p==="y"?"top":"left";const n=p==="y"?"bottom":"right";const e=g+f[t];const o=g-f[n];g=d(e,g,o)}if(s){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=y+f[t];const o=y-f[n];y=d(e,y,o)}const b=c.fn({...n,[p]:g,[u]:y});return{...b,data:{x:b.x-e,y:b.y-o}}}}};const C=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:i,rects:r,middlewareData:s}=n;const{offset:c=0,mainAxis:l=true,crossAxis:a=true}=h(t,n);const f={x:e,y:o};const u=w(i);const p=v(u);let d=f[p];let g=f[u];const y=h(c,n);const b=typeof y==="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const t=p==="y"?"height":"width";const n=r.reference[p]-r.floating[t]+b.mainAxis;const e=r.reference[p]+r.reference[t]-b.mainAxis;if(d<n){d=n}else if(d>e){d=e}}if(a){var x,A;const t=p==="y"?"width":"height";const n=["top","left"].includes(m(i));const e=r.reference[u]-r.floating[t]+(n?((x=s.offset)==null?void 0:x[u])||0:0)+(n?0:b.crossAxis);const o=r.reference[u]+r.reference[t]+(n?0:((A=s.offset)==null?void 0:A[u])||0)-(n?b.crossAxis:0);if(g<e){g=e}else if(g>o){g=o}}return{[p]:d,[u]:g}}}};const I=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:i,elements:r}=n;const{apply:l=(()=>{}),...a}=h(t,n);const f=await F(n,a);const u=m(e);const p=g(e);const d=w(e)==="y";const{width:v,height:y}=o.floating;let b;let x;if(u==="top"||u==="bottom"){b=u;x=p===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"}else{x=u;b=p==="end"?"top":"bottom"}const A=y-f[b];const S=v-f[x];const T=!n.middlewareData.shift;let E=A;let M=S;if(d){const t=v-f.left-f.right;M=p||T?s(S,t):t}else{const t=y-f.top-f.bottom;E=p||T?s(A,t):t}if(T&&!p){const t=c(f.left,0);const n=c(f.right,0);const e=c(f.top,0);const o=c(f.bottom,0);if(d){M=v-2*(t!==0||n!==0?t+n:c(f.left,f.right))}else{E=y-2*(e!==0||o!==0?e+o:c(f.top,f.bottom))}}await l({...n,availableWidth:M,availableHeight:E});const k=await i.getDimensions(r.floating);if(v!==k.width||y!==k.height){return{reset:{rects:true}}}return{}}}};function N(t){if(X(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function G(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function V(t){var n;return(n=(X(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function X(t){return t instanceof Node||t instanceof G(t).Node}function Y(t){return t instanceof Element||t instanceof G(t).Element}function _(t){return t instanceof HTMLElement||t instanceof G(t).HTMLElement}function J(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof G(t).ShadowRoot}function K(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=et(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(i)}function Q(t){return["table","td","th"].includes(N(t))}function U(t){const n=tt();const e=et(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function Z(t){let n=it(t);while(_(n)&&!nt(n)){if(U(n)){return n}else{n=it(n)}}return null}function tt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(N(t))}function et(t){return G(t).getComputedStyle(t)}function ot(t){if(Y(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function it(t){if(N(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||J(t)&&t.host||V(t);return J(n)?n.host:n}function rt(t){const n=it(t);if(nt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(_(n)&&K(n)){return n}return rt(n)}function st(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const i=rt(t);const r=i===((o=t.ownerDocument)==null?void 0:o.body);const s=G(i);if(r){return n.concat(s,s.visualViewport||[],K(i)?i:[],s.frameElement&&e?st(s.frameElement):[])}return n.concat(i,st(i,[],e))}function ct(t){const n=et(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const i=_(t);const r=i?t.offsetWidth:e;const s=i?t.offsetHeight:o;const c=l(e)!==r||l(o)!==s;if(c){e=r;o=s}return{width:e,height:o,$:c}}function lt(t){return!Y(t)?t.contextElement:t}function at(t){const n=lt(t);if(!_(n)){return f(1)}const e=n.getBoundingClientRect();const{width:o,height:i,$:r}=ct(n);let s=(r?l(e.width):e.width)/o;let c=(r?l(e.height):e.height)/i;if(!s||!Number.isFinite(s)){s=1}if(!c||!Number.isFinite(c)){c=1}return{x:s,y:c}}const ft=f(0);function ut(t){const n=G(t);if(!tt()||!n.visualViewport){return ft}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pt(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==G(t)){return false}return n}function dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const i=t.getBoundingClientRect();const r=lt(t);let s=f(1);if(n){if(o){if(Y(o)){s=at(o)}}else{s=at(t)}}const c=pt(r,e,o)?ut(r):f(0);let l=(i.left+c.x)/s.x;let a=(i.top+c.y)/s.y;let u=i.width/s.x;let p=i.height/s.y;if(r){const t=G(r);const n=o&&Y(o)?G(o):o;let e=t.frameElement;while(e&&o&&n!==t){const t=at(e);const n=e.getBoundingClientRect();const o=et(e);const i=n.left+(e.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(e.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x;a*=t.y;u*=t.x;p*=t.y;l+=i;a+=r;e=G(e).frameElement}}return D({width:u,height:p,x:l,y:a})}function ht(t){let{rect:n,offsetParent:e,strategy:o}=t;const i=_(e);const r=V(e);if(e===r){return n}let s={scrollLeft:0,scrollTop:0};let c=f(1);const l=f(0);if(i||!i&&o!=="fixed"){if(N(e)!=="body"||K(r)){s=ot(e)}if(_(e)){const t=dt(e);c=at(e);l.x=t.x+e.clientLeft;l.y=t.y+e.clientTop}}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function mt(t){return Array.from(t.getClientRects())}function gt(t){return dt(V(t)).left+ot(t).scrollLeft}function vt(t){const n=V(t);const e=ot(t);const o=t.ownerDocument.body;const i=c(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const r=c(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let s=-e.scrollLeft+gt(t);const l=-e.scrollTop;if(et(o).direction==="rtl"){s+=c(n.clientWidth,o.clientWidth)-i}return{width:i,height:r,x:s,y:l}}function yt(t,n){const e=G(t);const o=V(t);const i=e.visualViewport;let r=o.clientWidth;let s=o.clientHeight;let c=0;let l=0;if(i){r=i.width;s=i.height;const t=tt();if(!t||t&&n==="fixed"){c=i.offsetLeft;l=i.offsetTop}}return{width:r,height:s,x:c,y:l}}function wt(t,n){const e=dt(t,true,n==="fixed");const o=e.top+t.clientTop;const i=e.left+t.clientLeft;const r=_(t)?at(t):f(1);const s=t.clientWidth*r.x;const c=t.clientHeight*r.y;const l=i*r.x;const a=o*r.y;return{width:s,height:c,x:l,y:a}}function bt(t,n,e){let o;if(n==="viewport"){o=yt(t,e)}else if(n==="document"){o=vt(V(t))}else if(Y(n)){o=wt(n,e)}else{const e=ut(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return D(o)}function xt(t,n){const e=it(t);if(e===n||!Y(e)||nt(e)){return false}return et(e).position==="fixed"||xt(e,n)}function At(t,n){const e=n.get(t);if(e){return e}let o=st(t,[],false).filter((t=>Y(t)&&N(t)!=="body"));let i=null;const r=et(t).position==="fixed";let s=r?it(t):t;while(Y(s)&&!nt(s)){const n=et(s);const e=U(s);if(!e&&n.position==="fixed"){i=null}const c=r?!e&&!i:!e&&n.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||K(s)&&!e&&xt(t,s);if(c){o=o.filter((t=>t!==s))}else{i=n}s=it(s)}n.set(t,o);return o}function St(t){let{element:n,boundary:e,rootBoundary:o,strategy:i}=t;const r=e==="clippingAncestors"?At(n,this._c):[].concat(e);const l=[...r,o];const a=l[0];const f=l.reduce(((t,e)=>{const o=bt(n,e,i);t.top=c(o.top,t.top);t.right=s(o.right,t.right);t.bottom=s(o.bottom,t.bottom);t.left=c(o.left,t.left);return t}),bt(n,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Tt(t){const{width:n,height:e}=ct(t);return{width:n,height:e}}function Et(t,n,e){const o=_(n);const i=V(n);const r=e==="fixed";const s=dt(t,true,r,n);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(o||!o&&!r){if(N(n)!=="body"||K(i)){c=ot(n)}if(o){const t=dt(n,true,r,n);l.x=t.x+n.clientLeft;l.y=t.y+n.clientTop}else if(i){l.x=gt(i)}}return{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function Mt(t,n){if(!_(t)||et(t).position==="fixed"){return null}if(n){return n(t)}return t.offsetParent}function kt(t,n){const e=G(t);if(!_(t)){return e}let o=Mt(t,n);while(o&&Q(o)&&et(o).position==="static"){o=Mt(o,n)}if(o&&(N(o)==="html"||N(o)==="body"&&et(o).position==="static"&&!U(o))){return e}return o||Z(t)||e}const Lt=async function(t){let{reference:n,floating:e,strategy:o}=t;const i=this.getOffsetParent||kt;const r=this.getDimensions;return{reference:Et(n,await i(e),o),floating:{x:0,y:0,...await r(e)}}};function Dt(t){return et(t).direction==="rtl"}const Ht={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:V,getClippingRect:St,getOffsetParent:kt,getElementRects:Lt,getClientRects:mt,getDimensions:Tt,getScale:at,isElement:Y,isRTL:Dt};function Ot(t,n){let e=null;let o;const i=V(t);function r(){clearTimeout(o);e&&e.disconnect();e=null}function l(f,u){if(f===void 0){f=false}if(u===void 0){u=1}r();const{left:p,top:d,width:h,height:m}=t.getBoundingClientRect();if(!f){n()}if(!h||!m){return}const g=a(d);const v=a(i.clientWidth-(p+h));const y=a(i.clientHeight-(d+m));const w=a(p);const b=-g+"px "+-v+"px "+-y+"px "+-w+"px";const x={rootMargin:b,threshold:c(0,s(1,u))||1};let A=true;function S(t){const n=t[0].intersectionRatio;if(n!==u){if(!A){return l()}if(!n){o=setTimeout((()=>{l(false,1e-7)}),100)}else{l(false,n)}}A=false}try{e=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch(t){e=new IntersectionObserver(S,x)}e.observe(t)}l(true);return r}function Ft(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver==="function",layoutShift:c=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=lt(t);const f=i||r?[...a?st(a):[],...st(n)]:[];f.forEach((t=>{i&&t.addEventListener("scroll",e,{passive:true});r&&t.addEventListener("resize",e)}));const u=a&&c?Ot(a,e):null;let p=-1;let d=null;if(s){d=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&d){d.unobserve(n);cancelAnimationFrame(p);p=requestAnimationFrame((()=>{d&&d.observe(n)}))}e()}));if(a&&!l){d.observe(a)}d.observe(n)}let h;let m=l?dt(t):null;if(l){g()}function g(){const n=dt(t);if(m&&(n.x!==m.x||n.y!==m.y||n.width!==m.width||n.height!==m.height)){e()}m=n;h=requestAnimationFrame(g)}e();return()=>{f.forEach((t=>{i&&t.removeEventListener("scroll",e);r&&t.removeEventListener("resize",e)}));u&&u();d&&d.disconnect();d=null;if(l){cancelAnimationFrame(h)}}}const Rt=B;const zt=z;const Pt=I;const Wt=R;const jt=j;const $t=C;const qt=(t,n,e)=>{const o=new Map;const i={platform:Ht,...e};const r={...i.platform,_c:o};return O(t,n,{...i,platform:r})};(()=>{var t=class extends Event{oldState;newState;constructor(t,{oldState:n="",newState:e="",...o}={}){super(t,o),this.oldState=String(n||""),this.newState=String(e||"")}},n=new WeakMap;function e(e,o,i){n.set(e,setTimeout((()=>{n.has(e)&&e.dispatchEvent(new t("toggle",{cancelable:!1,oldState:o,newState:i}))}),0))}var o=globalThis.ShadowRoot||function(){},i=globalThis.HTMLDialogElement||function(){},r=new WeakMap,s=new WeakMap,c=new WeakMap;function l(t){return c.get(t)||"hidden"}var a=new WeakMap;function f(t){let n=t.popoverTargetElement;if(!n)return;let e=l(n);t.popoverTargetAction==="show"&&e==="showing"||t.popoverTargetAction==="hide"&&e==="hidden"||(e==="showing"?T(n,!0,!0):u(n,!1)&&(a.set(n,t),S(n)))}function u(t,n){return!(t.popover!=="auto"&&t.popover!=="manual"||!t.isConnected||n&&l(t)!=="showing"||!n&&l(t)!=="hidden"||t instanceof i&&t.hasAttribute("open")||document.fullscreenElement===t)}function p(t){return t?Array.from(s.get(t.ownerDocument)||[]).indexOf(t)+1:0}function d(t){let n=g(t),e=v(t);return p(n)>p(e)?n:e}function h(t){let n=s.get(t);for(let t of n||[])if(!t.isConnected)n.delete(t);else return t;return null}function m(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?m(t.parentNode):t}function g(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&c.get(t)==="showing")return t;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function v(t){for(;t;){let n=t.popoverTargetElement;if(n)return n;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function y(t){let n=new Map,e=0,o=t.ownerDocument;for(let t of s.get(o)||[])n.set(t,e),e+=1;n.set(t,e),e+=1;let i=null;function r(t){let e=g(t);if(e===null)return null;let o=n.get(e);(i===null||n.get(i)<o)&&(i=e)}return r(t?.parentElement),i}function w(t){return t.hidden||(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&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:t.tabIndex!==-1}function b(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let n=t;n.shadowRoot&&(n=n.shadowRoot);let e=n.querySelector("[autofocus]");if(e)return e;let o=t.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=o.currentNode;for(;i;){if(w(i))return i;i=o.nextNode()}}function x(t){b(t)?.focus()}var A=new WeakMap;function S(n){if(!u(n,!1))return;let o=n.ownerDocument;if(!n.dispatchEvent(new t("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!u(n,!1))return;let i=!1;if(n.popover==="auto"){let t=n.getAttribute("popover"),e=y(n)||o;if(M(e,!1,!0),t!==n.getAttribute("popover")||!u(n,!1))return}h(o)||(i=!0),A.delete(n);let l=o.activeElement;n.classList.add(":popover-open"),c.set(n,"showing"),r.has(o)||r.set(o,new Set),r.get(o).add(n),x(n),n.popover==="auto"&&(s.has(o)||s.set(o,new Set),s.get(o).add(n),H(a.get(n),!0)),i&&l&&n.popover==="auto"&&A.set(n,l),e(n,"closed","open")}function T(n,o=!1,i=!1){if(!u(n,!0))return;let l=n.ownerDocument;if(n.popover==="auto"&&(M(n,o,i),!u(n,!0))||(H(a.get(n),!1),a.delete(n),i&&(n.dispatchEvent(new t("beforetoggle",{oldState:"open",newState:"closed"})),!u(n,!0))))return;r.get(l)?.delete(n),s.get(l)?.delete(n),n.classList.remove(":popover-open"),c.set(n,"hidden"),i&&e(n,"open","closed");let f=A.get(n);f&&(A.delete(n),o&&f.focus())}function E(t,n=!1,e=!1){let o=h(t);for(;o;)T(o,n,e),o=h(t)}function M(t,n,e){let o=t.ownerDocument||t;if(t instanceof Document)return E(o,n,e);let i=null,r=!1;for(let n of s.get(o)||[])if(n===t)r=!0;else if(r){i=n;break}if(!r)return E(o,n,e);for(;i&&l(i)==="showing"&&s.get(o)?.size;)T(i,n,e)}var k=new WeakMap;function L(t){if(!t.isTrusted)return;let n=t.composedPath()[0];if(!n)return;let e=n.ownerDocument;if(!h(e))return;let o=d(n);if(o&&t.type==="pointerdown")k.set(e,o);else if(t.type==="pointerup"){let t=k.get(e)===o;k.delete(e),t&&M(o||e,!1,!0)}}var D=new WeakMap;function H(t,n=!1){if(!t)return;D.has(t)||D.set(t,t.getAttribute("aria-expanded"));let e=t.popoverTargetElement;if(e&&e.popover==="auto")t.setAttribute("aria-expanded",String(n));else{let n=D.get(t);n?t.setAttribute("aria-expanded",n):t.removeAttribute("aria-expanded")}}var O=globalThis.ShadowRoot||function(){};function F(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function R(t,n,e){let o=t[n];Object.defineProperty(t,n,{value(t){return o.call(this,e(t))}})}var z=/(^|[^\\]):popover-open\b/g;function P(){window.ToggleEvent=window.ToggleEvent||t;function n(t){return t?.includes(":popover-open")&&(t=t.replace(z,"$1.\\:popover-open")),t}R(Document.prototype,"querySelector",n),R(Document.prototype,"querySelectorAll",n),R(Element.prototype,"querySelector",n),R(Element.prototype,"querySelectorAll",n),R(Element.prototype,"matches",n),R(Element.prototype,"closest",n),R(DocumentFragment.prototype,"querySelectorAll",n),R(DocumentFragment.prototype,"querySelectorAll",n),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return t===""||t=="auto"?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){S(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){T(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){c.get(this)==="showing"&&t===void 0||t===!1?T(this,!0,!0):(t===void 0||t===!0)&&S(this)}}});let e=new WeakMap;function o(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(t===null)this.removeAttribute("popovertarget"),e.delete(this);else if(t instanceof Element)this.setAttribute("popovertarget",""),e.set(this,t);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;let n=m(this),o=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof O)&&o&&n.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return t==="show"||t==="hide"?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}o(HTMLButtonElement),o(HTMLInputElement);let i=t=>{if(!t.isTrusted)return;let n=t.composedPath()[0];if(!(n instanceof Element)||n?.shadowRoot)return;let e=m(n);if(!(e instanceof O||e instanceof Document))return;let o=n.closest("[popovertargetaction],[popovertarget]");if(o){f(o);return}},r=t=>{let n=t.key,e=t.target;e&&(n==="Escape"||n==="Esc")&&M(e.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",r),t.addEventListener("pointerdown",L),t.addEventListener("pointerup",L)})(document)}F()||P()})();const Bt="@layer polyfill{[popover]{position:fixed;z-index:2147483647;inset:0;padding:.25em;width:fit-content;height:fit-content;border-width:initial;border-color:initial;border-image:initial;border-style:solid;background-color:canvas;color:canvastext;overflow:auto;margin:auto}[popover]:not(.\\:popover-open){display:none}[popover]:is(dialog[open]){display:revert}[anchor].\\:popover-open{inset:auto}@supports selector([popover]:popover-open){[popover]:not(.\\:popover-open,dialog[open]){display:revert}[anchor]:is(:popover-open){inset:auto}}@supports not (background-color: canvas){[popover]{background-color:white;color:black}}@supports(width: -moz-fit-content){[popover]{width:-moz-fit-content;height:-moz-fit-content}}@supports not (inset: 0){[popover]{top:0;left:0;right:0;bottom:0}}}.popover{box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:1px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}.arrow{position:absolute;width:.7071067812rem;height:.7071067812rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1;border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";const Ct={top:"bottom",right:"left",bottom:"top",left:"right"};const It=class{constructor(e){t(this,e);this.postPopoverToggled=n(this,"postPopoverToggled",7);this.placement="top";this.arrow=false}componentDidLoad(){this.popoverRef.setAttribute("popover","");this.popoverRef.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){if(this.popoverRef)this.popoverRef.removeEventListener("beforetoggle",(t=>this.toggle(t.target)));if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}async show(t){this.eventTarget=t;this.popoverRef.showPopover()}async hide(){this.eventTarget=null;this.popoverRef.hidePopover()}async toggle(t,n){this.eventTarget=t;this.popoverRef.togglePopover(n);return this.popoverRef.matches(":popover-open")}handleToggle(t){const n=t.newState==="open";if(n){this.startAutoupdates()}else{if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}this.postPopoverToggled.emit(n)}startAutoupdates(){this.clearAutoUpdate=Ft(this.eventTarget,this.popoverRef,this.calculatePosition.bind(this))}async calculatePosition(){const t=[zt(),jt(),Rt({padding:8,limiter:$t({offset:32})}),Pt({apply({availableWidth:t,elements:n}){Object.assign(n.floating.style,{maxWidth:`${t-16}px`})}}),q(this.arrow?12:8)];if(this.arrow){t.push(Wt({element:this.arrowRef,padding:8}))}const{x:n,y:e,middlewareData:o,placement:i}=await qt(this.eventTarget,this.popoverRef,{placement:this.placement||"top",strategy:"fixed",middleware:t});this.popoverRef.style.left=`${n}px`;this.popoverRef.style.top=`${e}px`;if(this.arrow){const t=i.split("-")[0];const{x:n,y:e}=o.arrow;const r=Ct[t];Object.assign(this.arrowRef.style,{top:e?`${e}px`:"",left:n?`${n}px`:"",[r]:`${-this.arrowRef.offsetWidth/2}px`})}}render(){return e(o,{"data-version":r},e("div",{class:"popover",part:"popover",ref:t=>this.popoverRef=t},this.arrow&&e("span",{class:"arrow",ref:t=>{this.arrowRef=t}}),e("slot",null)))}get host(){return i(this)}};It.style=Bt;export{It as P};
2
+ //# sourceMappingURL=p-6391f970.js.map
@@ -0,0 +1,2 @@
1
+ export{P as post_popover}from"./p-93ab273b.js";import"./p-b4f01350.js";import"./p-de4704fc.js";
2
+ //# sourceMappingURL=p-6d0226cd.entry.js.map
@@ -0,0 +1,2 @@
1
+ export{P as post_tooltip}from"./p-803284de.js";import"./p-b4f01350.js";import"./p-de4704fc.js";
2
+ //# sourceMappingURL=p-775859cc.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as o,h as r,H as t,g as i}from"./p-b4f01350.js";import{v as c}from"./p-de4704fc.js";import{b as a}from"./p-96f4ebc4.js";import"./p-440193f4.js";const e=[1,2,3,4,5,6];const n="post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-danger post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.bg-success-green post-accordion-item::part(accordion-item),.bg-error-red post-accordion-item::part(accordion-item),.bg-warning-orange post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-primary .accordion-item,.bg-white .accordion-item,.bg-black .accordion-item,.bg-info .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-danger .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item,.bg-success-green .accordion-item,.bg-error-red .accordion-item,.bg-warning-orange .accordion-item,.bg-success-background .accordion-item,.bg-error-background .accordion-item,.bg-warning-background .accordion-item{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-danger post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.bg-success-green post-accordion-item::part(accordion-item),.bg-error-red post-accordion-item::part(accordion-item),.bg-warning-orange post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-primary .accordion-item,.bg-white .accordion-item,.bg-black .accordion-item,.bg-info .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-danger .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item,.bg-success-green .accordion-item,.bg-error-red .accordion-item,.bg-warning-orange .accordion-item,.bg-success-background .accordion-item,.bg-error-background .accordion-item,.bg-warning-background .accordion-item{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.accordion-item{--post-bg-rgb:244, 243, 241;border-block:2px solid #666}.bg-yellow .accordion-item{--post-bg-rgb:255, 255, 255}.bg-light .accordion-item{--post-bg-rgb:255, 255, 255}.bg-gray .accordion-item{--post-bg-rgb:255, 255, 255}.bg-dark .accordion-item{--post-bg-rgb:255, 255, 255}.bg-primary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-white .accordion-item{--post-bg-rgb:244, 243, 241}.bg-black .accordion-item{--post-bg-rgb:255, 255, 255}.bg-info .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning .accordion-item{--post-bg-rgb:255, 255, 255}.bg-danger .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success-green .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error-red .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning-orange .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning-background .accordion-item{--post-bg-rgb:255, 255, 255}.accordion-item+.accordion-item{border-block-start:0}.accordion-header{color:#333;font-size:1rem;font-weight:700;line-height:1.5;margin:0}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:3rem;text-align:start;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.accordion-button:focus-visible{outline:2px solid #1976c8}.accordion-button:hover{color:#000;background-color:#e6e6e6}.accordion-button:disabled{opacity:.4;pointer-events:none}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.5rem 1rem 1rem;font-weight:300}.accordion-button>*,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>*,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}.accordion-button{cursor:pointer}.accordion-button>::slotted(.text-truncate){display:block}post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-yellow post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-light post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-gray post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-dark post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-primary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-white post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-black post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-info post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-danger post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success-green post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error-red post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning-orange post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}post-accordion-item+post-accordion-item::part(accordion-item){border-block-start:0 !important}";const g=class{constructor(r){o(this,r);this.id=undefined;this.isOpen=undefined;this.collapsed=false;this.headingLevel=2}validateHeadingLevel(o=this.headingLevel){a(o,e,"The `headingLevel` property of the `post-accordion-item` must be a number between 1 and 6.")}connectedCallback(){this.validateHeadingLevel()}componentWillLoad(){this.isOpen=!this.collapsed;this.id=this.host.id||`a${crypto.randomUUID()}`}onCollapseChange(o){this.isOpen=o.detail}async toggle(o){return this.collapsible.toggle(o)}render(){var o;const i=`h${(o=this.headingLevel)!==null&&o!==void 0?o:2}`;return r(t,{id:this.id,"data-version":c},r("div",{part:"accordion-item",class:"accordion-item"},r(i,{class:"accordion-header",id:`${this.id}--header`},r("button",{"aria-controls":`${this.id}--collapse`,"aria-expanded":`${this.isOpen}`,class:`accordion-button${this.isOpen?"":" collapsed"}`,onClick:()=>this.toggle(),type:"button"},r("slot",{name:"header"}))),r("post-collapsible",{collapsed:this.collapsed,ref:o=>this.collapsible=o},r("div",{class:"accordion-body"},r("slot",null)))))}get host(){return i(this)}static get watchers(){return{headingLevel:["validateHeadingLevel"]}}};g.style=n;export{g as post_accordion_item};
2
+ //# sourceMappingURL=p-78589fac.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["HEADING_LEVELS","postAccordionItemCss","PostAccordionItem","validateHeadingLevel","newValue","this","headingLevel","checkEmptyOrOneOf","connectedCallback","componentWillLoad","isOpen","collapsed","id","host","crypto","randomUUID","onCollapseChange","event","detail","toggle","force","collapsible","render","HeadingTag","_a","h","Host","version","part","class","onClick","type","name","ref","el"],"sources":["src/components/post-accordion-item/heading-levels.ts","src/components/post-accordion-item/post-accordion-item.scss?tag=post-accordion-item&encapsulation=shadow","src/components/post-accordion-item/post-accordion-item.tsx"],"sourcesContent":["export const HEADING_LEVELS = [1, 2, 3, 4, 5, 6] as const;\n\nexport type HeadingLevel = typeof HEADING_LEVELS[number];\n","@use '@swisspost/design-system-styles/components/accordion';\n@use '@swisspost/design-system-styles/mixins/accordion' as accordion-mx;\n\n:host {\n display: block;\n}\n\n.accordion-button {\n cursor: pointer;\n\n > ::slotted(.text-truncate) {\n display: block;\n }\n}\n\npost-accordion-item::part(accordion-item) {\n @include accordion-mx.background-color;\n\n post-accordion-item + & {\n border-block-start: 0!important;\n }\n}\n","import { Component, Element, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkEmptyOrOneOf } from '../../utils';\nimport { HEADING_LEVELS, HeadingLevel } from './heading-levels';\n\n@Component({\n tag: 'post-accordion-item',\n styleUrl: 'post-accordion-item.scss',\n shadow: true,\n})\nexport class PostAccordionItem {\n private collapsible: HTMLPostCollapsibleElement;\n\n @Element() host: HTMLPostAccordionItemElement;\n\n @State() id: string;\n @State() isOpen: boolean;\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n /**\n * Defines the hierarchical level of the accordion item header within the headings structure.\n */\n @Prop() readonly headingLevel?: HeadingLevel = 2;\n\n @Watch('headingLevel')\n validateHeadingLevel(newValue = this.headingLevel) {\n checkEmptyOrOneOf(\n newValue,\n HEADING_LEVELS,\n 'The `headingLevel` property of the `post-accordion-item` must be a number between 1 and 6.',\n );\n }\n\n connectedCallback() {\n this.validateHeadingLevel();\n }\n\n componentWillLoad() {\n this.isOpen = !this.collapsed;\n this.id = this.host.id || `a${crypto.randomUUID()}`;\n }\n\n @Listen('collapseChange')\n onCollapseChange(event: CustomEvent<boolean>): void {\n this.isOpen = event.detail;\n }\n\n /**\n * Triggers the collapse programmatically.\n */\n @Method()\n async toggle(force?: boolean): Promise<boolean> {\n return this.collapsible.toggle(force);\n }\n\n render() {\n const HeadingTag = `h${this.headingLevel ?? 2}`;\n\n return (\n <Host id={this.id} data-version={version}>\n <div part=\"accordion-item\" class=\"accordion-item\">\n <HeadingTag class=\"accordion-header\" id={`${this.id}--header`}>\n <button\n aria-controls={`${this.id}--collapse`}\n aria-expanded={`${this.isOpen}`}\n class={`accordion-button${this.isOpen ? '' : ' collapsed'}`}\n onClick={() => this.toggle()}\n type=\"button\"\n >\n <slot name=\"header\" />\n </button>\n </HeadingTag>\n\n <post-collapsible collapsed={this.collapsed} ref={el => (this.collapsible = el)}>\n <div class=\"accordion-body\">\n <slot />\n </div>\n </post-collapsible>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yJAAO,MAAMA,EAAiB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GCA9C,MAAMC,EAAuB,qob,MCUhBC,EAAiB,M,gFAWW,M,kBAKQ,C,CAG/C,oBAAAC,CAAqBC,EAAWC,KAAKC,cACnCC,EACEH,EACAJ,EACA,6F,CAIJ,iBAAAQ,GACEH,KAAKF,sB,CAGP,iBAAAM,GACEJ,KAAKK,QAAUL,KAAKM,UACpBN,KAAKO,GAAKP,KAAKQ,KAAKD,IAAM,IAAIE,OAAOC,c,CAIvC,gBAAAC,CAAiBC,GACfZ,KAAKK,OAASO,EAAMC,M,CAOtB,YAAMC,CAAOC,GACX,OAAOf,KAAKgB,YAAYF,OAAOC,E,CAGjC,MAAAE,G,MACE,MAAMC,EAAa,KAAIC,EAAAnB,KAAKC,gBAAY,MAAAkB,SAAA,EAAAA,EAAI,IAE5C,OACEC,EAACC,EAAI,CAACd,GAAIP,KAAKO,GAAE,eAAgBe,GAC/BF,EAAA,OAAKG,KAAK,iBAAiBC,MAAM,kBAC/BJ,EAACF,EAAU,CAACM,MAAM,mBAAmBjB,GAAI,GAAGP,KAAKO,cAC/Ca,EAAA,0BACiB,GAAGpB,KAAKO,eAAc,gBACtB,GAAGP,KAAKK,SACvBmB,MAAO,mBAAmBxB,KAAKK,OAAS,GAAK,eAC7CoB,QAAS,IAAMzB,KAAKc,SACpBY,KAAK,UAELN,EAAA,QAAMO,KAAK,aAIfP,EAAA,oBAAkBd,UAAWN,KAAKM,UAAWsB,IAAKC,GAAO7B,KAAKgB,YAAca,GAC1ET,EAAA,OAAKI,MAAM,kBACTJ,EAAA,gB"}