@covalent/components 8.2.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/action-ribbon.js +3 -2
  2. package/action-ribbon.mjs +10 -9
  3. package/alert.js +3 -2
  4. package/alert.mjs +10 -9
  5. package/app-shell.js +2 -1
  6. package/app-shell.mjs +20 -19
  7. package/{base-element-atp_8bvP.js → base-element-58a3f9ea.js} +1 -1
  8. package/{base-element--jaKdI-8.mjs → base-element-67ae173f.mjs} +2 -2
  9. package/button.js +3 -2
  10. package/button.mjs +16 -15
  11. package/card.js +3 -2
  12. package/card.mjs +5 -4
  13. package/check-list-item.js +15 -11
  14. package/check-list-item.mjs +68 -62
  15. package/checkbox.js +2 -1
  16. package/checkbox.mjs +25 -23
  17. package/circular-progress.js +1 -1
  18. package/circular-progress.mjs +7 -7
  19. package/{class-map-YPXv0Hj4.mjs → class-map-4b94b017.mjs} +1 -1
  20. package/{class-map-wtcW44Of.js → class-map-b5efe8da.js} +1 -1
  21. package/code-snippet-2137b11c.js +13 -0
  22. package/code-snippet-ccca324f.mjs +12278 -0
  23. package/code-snippet.js +1 -12
  24. package/code-snippet.mjs +7 -12251
  25. package/{dialog-tIMorfuj.mjs → dialog-3ca1b701.mjs} +62 -60
  26. package/{dialog-SpbwRuWY.js → dialog-82b03745.js} +7 -6
  27. package/dialog.js +1 -1
  28. package/dialog.mjs +10 -10
  29. package/{directive-helpers--rJ2jf3N.js → directive-helpers-0ce1f995.js} +1 -1
  30. package/{directive-helpers-9566lOOl.mjs → directive-helpers-e3ea6592.mjs} +1 -1
  31. package/drawer.js +3 -2
  32. package/drawer.mjs +12 -11
  33. package/empty-state.js +2 -1
  34. package/empty-state.mjs +6 -5
  35. package/{event-options-2TJPtsKy.js → event-options-3f5eb195.js} +1 -1
  36. package/{event-options-0xzSdemG.mjs → event-options-78d6cf94.mjs} +1 -1
  37. package/{form-element-5s8gft-A.js → form-element-c553d6f5.js} +1 -1
  38. package/{form-element-gM33WEq3.mjs → form-element-ffcf59ff.mjs} +4 -4
  39. package/{foundation-3Wg80pI7.mjs → foundation-39dc72d2.mjs} +1 -1
  40. package/{foundation-1Vzfdey_.js → foundation-786bf879.js} +1 -1
  41. package/icon-button.js +3 -2
  42. package/icon-button.mjs +15 -14
  43. package/icon-check-toggle.js +5 -4
  44. package/icon-check-toggle.mjs +24 -22
  45. package/icon-radio-toggle.js +5 -4
  46. package/icon-radio-toggle.mjs +27 -25
  47. package/icon.js +5 -1
  48. package/icon.mjs +21 -15
  49. package/{if-defined-BH_l2PVl.mjs → if-defined-c367f208.mjs} +1 -1
  50. package/{if-defined-lAIUwAsA.js → if-defined-f1c45245.js} +1 -1
  51. package/index.js +560 -1
  52. package/index.mjs +3654 -124
  53. package/{inert.esm-vhZXthJr.mjs → inert.esm-359d4581.mjs} +1 -1
  54. package/linear-progress.js +3 -2
  55. package/linear-progress.mjs +13 -12
  56. package/{mwc-list-item.css-d-SHhq7Q.mjs → list-item-1fc0d619.mjs} +9 -199
  57. package/{mwc-list-item.css-yJ5bjNGc.js → list-item-209613bf.js} +6 -28
  58. package/list-item.js +3 -3
  59. package/list-item.mjs +25 -25
  60. package/list.js +8 -3
  61. package/list.mjs +37 -31
  62. package/menu.js +5 -1
  63. package/menu.mjs +34 -28
  64. package/mwc-checkbox-base-3d8c9549.js +41 -0
  65. package/mwc-checkbox-base-f10fd709.mjs +198 -0
  66. package/{mwc-checkbox.css-c44nPIEs.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +3 -198
  67. package/{mwc-checkbox.css-JOD-Qh-9.js → mwc-checkbox.css-b3434429.js} +2 -42
  68. package/{mwc-drawer-base-8e_1aSuf.mjs → mwc-drawer-base-135de8a5.mjs} +26 -24
  69. package/{mwc-drawer-base-Fv3JVYPS.js → mwc-drawer-base-798b11f8.js} +5 -5
  70. package/{mwc-icon-eaW72Ei7.mjs → mwc-icon-bf656cf5.mjs} +5 -6
  71. package/{mwc-icon-r2y4-AXI.js → mwc-icon-f87639bc.js} +2 -2
  72. package/{mwc-line-ripple-directive-iRoAkPnW.js → mwc-line-ripple-directive-a6b39a3c.js} +1 -1
  73. package/{mwc-line-ripple-directive-Q_HMRGPE.mjs → mwc-line-ripple-directive-b24a914e.mjs} +6 -6
  74. package/mwc-list-base-400b00e2.js +111 -0
  75. package/{mwc-list.css-_OVL_dbR.mjs → mwc-list-base-76e37212.mjs} +212 -213
  76. package/mwc-list-item-base-297d86b0.js +28 -0
  77. package/mwc-list-item-base-fe4398c3.mjs +202 -0
  78. package/{mwc-menu.css-cKtc1ZD4.mjs → mwc-menu-base-c4bc88ea.mjs} +75 -74
  79. package/mwc-menu-base-c75ca473.js +190 -0
  80. package/mwc-radio-base-913e02e2.js +101 -0
  81. package/{mwc-radio.css-_lt-Vcvl.mjs → mwc-radio-base-a374fbd9.mjs} +117 -123
  82. package/mwc-radio.css-4e140252.js +5 -0
  83. package/mwc-radio.css-7454bb11.mjs +10 -0
  84. package/{mwc-slider.css-md7hPAE7.mjs → mwc-slider.css-8b6f275c.mjs} +11 -11
  85. package/{mwc-slider.css-lCfMVbO5.js → mwc-slider.css-c7107d94.js} +1 -1
  86. package/{mwc-tab.css-lT5vTf5I.mjs → mwc-tab-base-be0c887f.mjs} +123 -127
  87. package/{mwc-tab.css-q4Jsbyp5.js → mwc-tab-base-f28722aa.js} +22 -26
  88. package/{mwc-top-app-bar-base-nm6mdCR3.mjs → mwc-top-app-bar-base-55da3fe4.mjs} +13 -12
  89. package/{mwc-top-app-bar-base-8qOIX1me.js → mwc-top-app-bar-base-aec60f27.js} +3 -3
  90. package/nav-list-item.js +6 -5
  91. package/nav-list-item.mjs +38 -37
  92. package/package.json +1 -1
  93. package/{query-duvhtfSs.js → query-680f1868.js} +1 -1
  94. package/{query-assigned-nodes-1p7z6CEm.js → query-assigned-nodes-99eae71d.js} +1 -1
  95. package/{query-assigned-nodes-6yHI5ePh.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
  96. package/{query-1WmuF6Bq.mjs → query-d843aa92.mjs} +1 -1
  97. package/radio-list-item.js +13 -9
  98. package/radio-list-item.mjs +64 -58
  99. package/radio.js +2 -1
  100. package/radio.mjs +25 -23
  101. package/{ripple-handlers-HeGhXgD2.js → ripple-handlers-5d5b21db.js} +8 -8
  102. package/{ripple-handlers-BwaZu9Ps.mjs → ripple-handlers-f37f21cf.mjs} +17 -16
  103. package/select.js +15 -10
  104. package/select.mjs +147 -139
  105. package/side-sheet.js +2 -1
  106. package/side-sheet.mjs +12 -11
  107. package/slider-range.js +1 -1
  108. package/slider-range.mjs +14 -14
  109. package/slider.js +1 -1
  110. package/slider.mjs +16 -16
  111. package/snackbar.js +11 -10
  112. package/snackbar.mjs +36 -34
  113. package/{state-LqPxt99W.js → state-0974a8e5.js} +1 -1
  114. package/{state-inNZe6rL.mjs → state-b5e865db.mjs} +1 -1
  115. package/status-header-item.js +2 -1
  116. package/status-header-item.mjs +4 -3
  117. package/status-header.js +3 -2
  118. package/status-header.mjs +5 -4
  119. package/{style-map-66_3wrLx.js → style-map-88d2563f.js} +1 -1
  120. package/{style-map-8yp6DGeh.mjs → style-map-bc3ed3e0.mjs} +2 -2
  121. package/style.css +1 -1
  122. package/switch.js +3 -2
  123. package/switch.mjs +16 -15
  124. package/tab-bar.js +22 -18
  125. package/tab-bar.mjs +203 -195
  126. package/tab.js +6 -1
  127. package/tab.mjs +32 -26
  128. package/text-lockup.js +2 -1
  129. package/text-lockup.mjs +9 -8
  130. package/textarea.js +19 -15
  131. package/textarea.mjs +65 -59
  132. package/textfield-62e16cc2.js +133 -0
  133. package/textfield-63d1859a.mjs +932 -0
  134. package/textfield.js +7 -3
  135. package/textfield.mjs +36 -30
  136. package/toolbar.js +2 -1
  137. package/toolbar.mjs +10 -9
  138. package/tooltip.js +3 -2
  139. package/tooltip.mjs +10 -9
  140. package/{top-app-bar-qcW2ucE3.js → top-app-bar-a531c1b4.js} +3 -2
  141. package/{top-app-bar-h0V-USh_.mjs → top-app-bar-f83386e0.mjs} +3 -2
  142. package/top-app-bar-fixed.js +6 -6
  143. package/top-app-bar-fixed.mjs +28 -27
  144. package/top-app-bar.js +1 -1
  145. package/top-app-bar.mjs +9 -9
  146. package/tree-list-item.js +2 -1
  147. package/tree-list-item.mjs +7 -6
  148. package/tree-list.js +2 -1
  149. package/tree-list.mjs +3 -2
  150. package/{tslib.es6-S8SvF2K1.mjs → tslib.es6-f3e988cd.mjs} +5 -5
  151. package/typography.js +2 -1
  152. package/typography.mjs +4 -3
  153. package/_commonjsHelpers-ZPn_iTGj.mjs +0 -28
  154. package/_commonjsHelpers-fFrWAeZI.js +0 -1
  155. package/chip-M5Vb5Kd6.js +0 -492
  156. package/chip-m2mKzWQT.mjs +0 -3115
  157. package/chip-set.js +0 -75
  158. package/chip-set.mjs +0 -531
  159. package/chip.js +0 -1
  160. package/chip.mjs +0 -12
  161. package/expansion-panel-item.js +0 -24
  162. package/expansion-panel-item.mjs +0 -106
  163. package/expansion-panel.js +0 -7
  164. package/expansion-panel.mjs +0 -59
  165. package/formfield.js +0 -79
  166. package/formfield.mjs +0 -275
  167. package/list-item-F2e6aWaj.mjs +0 -11
  168. package/list-item-Ze98reWt.js +0 -5
  169. package/mwc-list.css-DjU8XB1m.js +0 -111
  170. package/mwc-menu.css-qavo4jer.js +0 -190
  171. package/mwc-radio.css-h_Wv0Eag.js +0 -105
  172. package/textfield-7aU1kEO6.mjs +0 -936
  173. package/textfield-jvevIGSw.js +0 -136
  174. /package/{aria-property-52VAcg_f.js → aria-property-849c8816.js} +0 -0
  175. /package/{aria-property-wYjPNXcK.mjs → aria-property-fa2717fe.mjs} +0 -0
  176. /package/{inert.esm-TSRtlTFV.js → inert.esm-2cee6f2e.js} +0 -0
  177. /package/{observer-LlGBroG9.js → observer-a096ab43.js} +0 -0
  178. /package/{observer-cKAgu-MI.mjs → observer-be7b92e2.mjs} +0 -0
  179. /package/{property-iZpLBvy-.js → property-57f6f6fe.js} +0 -0
  180. /package/{property-K7hFBmOi.mjs → property-9b6ea53b.mjs} +0 -0
  181. /package/{query-assigned-elements-yFWOzcsT.mjs → query-assigned-elements-4a39219d.mjs} +0 -0
  182. /package/{query-assigned-elements-j_5ZiL65.js → query-assigned-elements-f623705d.js} +0 -0
  183. /package/{tslib.es6-5xG0QhxF.js → tslib.es6-98719205.js} +0 -0
  184. /package/{utils-xAXEDL0Y.mjs → utils-2932417c.mjs} +0 -0
  185. /package/{utils-W3ENJhq-.js → utils-a8190a39.js} +0 -0
@@ -0,0 +1,190 @@
1
+ "use strict";const s=require("./tslib.es6-98719205.js"),A=require("./query-assigned-elements-f623705d.js"),K=require("./mwc-list-base-400b00e2.js"),U=require("./base-element-58a3f9ea.js"),E=require("./observer-a096ab43.js"),N=require("./utils-a8190a39.js"),a=require("./property-57f6f6fe.js"),v=require("./state-0974a8e5.js"),F=require("./query-680f1868.js"),P=require("./class-map-b5efe8da.js"),j=require("./style-map-88d2563f.js");/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-LIcense-Identifier: Apache-2.0
5
+ */const W=A.i`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;/**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ * SPDX-License-Identifier: Apache-2.0
9
+ */let k=class extends K.ListBase{};k.styles=[W];k=s.__decorate([A.e("mwc-list")],k);/**
10
+ * @license
11
+ * Copyright 2018 Google Inc.
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ * copies of the Software, and to permit persons to whom the Software is
18
+ * furnished to do so, subject to the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be included in
21
+ * all copies or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+ * THE SOFTWARE.
30
+ */var X={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},Q={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},L={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30},l;(function(n){n[n.BOTTOM=1]="BOTTOM",n[n.CENTER=2]="CENTER",n[n.RIGHT=4]="RIGHT",n[n.FLIP_RTL=8]="FLIP_RTL"})(l||(l={}));var m;(function(n){n[n.TOP_LEFT=0]="TOP_LEFT",n[n.TOP_RIGHT=4]="TOP_RIGHT",n[n.BOTTOM_LEFT=1]="BOTTOM_LEFT",n[n.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",n[n.TOP_START=8]="TOP_START",n[n.TOP_END=12]="TOP_END",n[n.BOTTOM_START=9]="BOTTOM_START",n[n.BOTTOM_END=13]="BOTTOM_END"})(m||(m={}));/**
31
+ * @license
32
+ * Copyright 2016 Google Inc.
33
+ *
34
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
35
+ * of this software and associated documentation files (the "Software"), to deal
36
+ * in the Software without restriction, including without limitation the rights
37
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
38
+ * copies of the Software, and to permit persons to whom the Software is
39
+ * furnished to do so, subject to the following conditions:
40
+ *
41
+ * The above copyright notice and this permission notice shall be included in
42
+ * all copies or substantial portions of the Software.
43
+ *
44
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
49
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
50
+ * THE SOFTWARE.
51
+ */var q=function(){function n(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(n,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),n.prototype.init=function(){},n.prototype.destroy=function(){},n}();/**
52
+ * @license
53
+ * Copyright 2018 Google Inc.
54
+ *
55
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
56
+ * of this software and associated documentation files (the "Software"), to deal
57
+ * in the Software without restriction, including without limitation the rights
58
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
59
+ * copies of the Software, and to permit persons to whom the Software is
60
+ * furnished to do so, subject to the following conditions:
61
+ *
62
+ * The above copyright notice and this permission notice shall be included in
63
+ * all copies or substantial portions of the Software.
64
+ *
65
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
66
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
67
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
68
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
69
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
70
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
71
+ * THE SOFTWARE.
72
+ */var V=function(n){s.__extends(e,n);function e(t){var i=n.call(this,s.__assign(s.__assign({},e.defaultAdapter),t))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.isHorizontallyCenteredOnViewport=!1,i.maxHeight=0,i.openBottomBias=0,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=m.TOP_START,i.originCorner=m.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return Object.defineProperty(e,"cssClasses",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Q},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,i=t.ROOT,o=t.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(o)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^l.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(i)?i:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},L.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var i=this;if(t===void 0&&(t=!1),!!this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen){this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose();return}this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(e.cssClasses.OPEN),i.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},L.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var i=t.target;this.adapter.isElementInContainer(i)||this.close()},e.prototype.handleKeydown=function(t){var i=t.keyCode,o=t.key,r=o==="Escape"||i===27;r&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),o=this.getMenuSurfaceMaxHeight(i),r=this.hasBit(i,l.BOTTOM)?"bottom":"top",c=this.hasBit(i,l.RIGHT)?"right":"left",f=this.getHorizontalOriginOffset(i),M=this.getVerticalOriginOffset(i),y=this.measurements,I=y.anchorSize,S=y.surfaceSize,p=(t={},t[c]=f,t[r]=M,t);I.width/S.width>L.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(c="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(p),this.adapter.setTransformOrigin(c+" "+r),this.adapter.setPosition(p),this.adapter.setMaxHeight(o?o+"px":""),this.hasBit(i,l.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),o=this.adapter.getWindowDimensions(),r=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:o.width-t.right,bottom:o.height-t.bottom,left:t.left},viewportSize:o,windowScroll:r}},e.prototype.getoriginCorner=function(){var t=this.originCorner,i=this.measurements,o=i.viewportDistance,r=i.anchorSize,c=i.surfaceSize,f=e.numbers.MARGIN_TO_EDGE,M=this.hasBit(this.anchorCorner,l.BOTTOM),y,I;M?(y=o.top-f+this.anchorMargin.bottom,I=o.bottom-f-this.anchorMargin.bottom):(y=o.top-f+this.anchorMargin.top,I=o.bottom-f+r.height-this.anchorMargin.top);var S=I-c.height>0;!S&&y>I+this.openBottomBias&&(t=this.setBit(t,l.BOTTOM));var p=this.adapter.isRtl(),T=this.hasBit(this.anchorCorner,l.FLIP_RTL),_=this.hasBit(this.anchorCorner,l.RIGHT)||this.hasBit(t,l.RIGHT),C=!1;p&&T?C=!_:C=_;var w,B;C?(w=o.left+r.width+this.anchorMargin.right,B=o.right-this.anchorMargin.right):(w=o.left+this.anchorMargin.left,B=o.right+r.width-this.anchorMargin.left);var D=w-c.width>0,G=B-c.width>0,$=this.hasBit(t,l.FLIP_RTL)&&this.hasBit(t,l.RIGHT);return G&&$&&p||!D&&$?t=this.unsetBit(t,l.RIGHT):(D&&C&&p||D&&!C&&_||!G&&w>=B)&&(t=this.setBit(t,l.RIGHT)),t},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,o=0,r=this.hasBit(t,l.BOTTOM),c=this.hasBit(this.anchorCorner,l.BOTTOM),f=e.numbers.MARGIN_TO_EDGE;return r?(o=i.top+this.anchorMargin.top-f,c||(o+=this.measurements.anchorSize.height)):(o=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-f,c&&(o-=this.measurements.anchorSize.height)),o},e.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize,o=this.hasBit(t,l.RIGHT),r=this.hasBit(this.anchorCorner,l.RIGHT);if(o){var c=r?i.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?c-(this.measurements.viewportSize.width-this.measurements.bodySize.width):c}return r?i.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize,o=this.hasBit(t,l.BOTTOM),r=this.hasBit(this.anchorCorner,l.BOTTOM),c=0;return o?c=r?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:c=r?i.height+this.anchorMargin.bottom:this.anchorMargin.top,c},e.prototype.adjustPositionForHoistedElement=function(t){var i,o,r=this.measurements,c=r.windowScroll,f=r.viewportDistance,M=r.surfaceSize,y=r.viewportSize,I=Object.keys(t);try{for(var S=s.__values(I),p=S.next();!p.done;p=S.next()){var T=p.value,_=t[T]||0;if(this.isHorizontallyCenteredOnViewport&&(T==="left"||T==="right")){t[T]=(y.width-M.width)/2;continue}_+=f[T],this.isFixedPosition||(T==="top"?_+=c.y:T==="bottom"?_-=c.y:T==="left"?_+=c.x:_-=c.x),t[T]=_}}catch(C){i={error:C}}finally{try{p&&!p.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,i=this.adapter.isFocused(),o=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,r=o.activeElement&&this.adapter.isElementInContainer(o.activeElement);(i||r)&&setTimeout(function(){t.adapter.restoreFocus()},L.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,i){return!!(t&i)},e.prototype.setBit=function(t,i){return t|i},e.prototype.unsetBit=function(t,i){return t^i},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(q);const Y=V;/**
73
+ * @license
74
+ * Copyright 2020 Google LLC
75
+ * SPDX-License-Identifier: Apache-2.0
76
+ */const Z={TOP_LEFT:m.TOP_LEFT,TOP_RIGHT:m.TOP_RIGHT,BOTTOM_LEFT:m.BOTTOM_LEFT,BOTTOM_RIGHT:m.BOTTOM_RIGHT,TOP_START:m.TOP_START,TOP_END:m.TOP_END,BOTTOM_START:m.BOTTOM_START,BOTTOM_END:m.BOTTOM_END};class h extends U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=Y,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=m.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){return this.renderSurface()}renderSurface(){const e=this.getRootClasses(),t=this.getRootStyles();return A.x`
77
+ <div
78
+ class=${P.o(e)}
79
+ style="${j.o(t)}"
80
+ @keydown=${this.onKeydown}
81
+ @opened=${this.registerBodyClick}
82
+ @closed=${this.deregisterBodyClick}>
83
+ ${this.renderContent()}
84
+ </div>`}getRootClasses(){return{"mdc-menu-surface":!0,"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth}}getRootStyles(){return{top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin}}renderContent(){return A.x`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},N.addHasRemoveClass(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("closed",e);this.open=!1,this.mdcRoot.dispatchEvent(t)},notifyClosing:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("closing",e);this.mdcRoot.dispatchEvent(t)},notifyOpen:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("opened",e);this.open=!0,this.mdcRoot.dispatchEvent(t)},notifyOpening:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("opening",e);this.mdcRoot.dispatchEvent(t)},isElementInContainer:()=>!1,isRtl:()=>this.mdcRoot?getComputedStyle(this.mdcRoot).direction==="rtl":!1,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>N.doesElementContainFocus(this),saveFocus:()=>{const e=N.deepActiveElementPath(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;e.composedPath().indexOf(this)===-1&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}onOpenChanged(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():t!==void 0&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}s.__decorate([F.i(".mdc-menu-surface")],h.prototype,"mdcRoot",void 0);s.__decorate([F.i("slot")],h.prototype,"slotElement",void 0);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(n)})],h.prototype,"absolute",void 0);s.__decorate([a.n({type:Boolean})],h.prototype,"fullwidth",void 0);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(n)})],h.prototype,"fixed",void 0);s.__decorate([a.n({type:Number}),E.observer(function(n){this.mdcFoundation&&this.y!==null&&n!==null&&(this.mdcFoundation.setAbsolutePosition(n,this.y),this.mdcFoundation.setAnchorMargin({left:n,top:this.y,right:-n,bottom:this.y}))})],h.prototype,"x",void 0);s.__decorate([a.n({type:Number}),E.observer(function(n){this.mdcFoundation&&this.x!==null&&n!==null&&(this.mdcFoundation.setAbsolutePosition(this.x,n),this.mdcFoundation.setAnchorMargin({left:this.x,top:n,right:-this.x,bottom:n}))})],h.prototype,"y",void 0);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(n)})],h.prototype,"quick",void 0);s.__decorate([a.n({type:Boolean,reflect:!0}),E.observer(function(n,e){this.onOpenChanged(n,e)})],h.prototype,"open",void 0);s.__decorate([a.n({type:Boolean})],h.prototype,"stayOpenOnBodyClick",void 0);s.__decorate([v.t(),E.observer(function(n){this.mdcFoundation&&(n?this.mdcFoundation.setAnchorCorner(n):this.mdcFoundation.setAnchorCorner(n))})],h.prototype,"bitwiseCorner",void 0);s.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation){const e=n==="START"||n==="END",t=this.previousMenuCorner===null,i=!t&&n!==this.previousMenuCorner;e&&(i||t&&n==="END")&&(this.bitwiseCorner=this.bitwiseCorner^l.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=n)}})],h.prototype,"menuCorner",void 0);s.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation&&n){let e=Z[n];this.menuCorner==="END"&&(e=e^l.RIGHT),this.bitwiseCorner=e}})],h.prototype,"corner",void 0);s.__decorate([v.t()],h.prototype,"styleTop",void 0);s.__decorate([v.t()],h.prototype,"styleLeft",void 0);s.__decorate([v.t()],h.prototype,"styleRight",void 0);s.__decorate([v.t()],h.prototype,"styleBottom",void 0);s.__decorate([v.t()],h.prototype,"styleMaxHeight",void 0);s.__decorate([v.t()],h.prototype,"styleTransformOrigin",void 0);/**
85
+ * @license
86
+ * Copyright 2021 Google LLC
87
+ * SPDX-LIcense-Identifier: Apache-2.0
88
+ */const J=A.i`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;/**
89
+ * @license
90
+ * Copyright 2020 Google LLC
91
+ * SPDX-License-Identifier: Apache-2.0
92
+ */let z=class extends h{};z.styles=[J];z=s.__decorate([A.e("mwc-menu-surface")],z);/**
93
+ * @license
94
+ * Copyright 2018 Google Inc.
95
+ *
96
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
97
+ * of this software and associated documentation files (the "Software"), to deal
98
+ * in the Software without restriction, including without limitation the rights
99
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
100
+ * copies of the Software, and to permit persons to whom the Software is
101
+ * furnished to do so, subject to the following conditions:
102
+ *
103
+ * The above copyright notice and this permission notice shall be included in
104
+ * all copies or substantial portions of the Software.
105
+ *
106
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
107
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
108
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
109
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
110
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
111
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
112
+ * THE SOFTWARE.
113
+ */var H={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},x={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},tt={FOCUS_ROOT_INDEX:-1},b;(function(n){n[n.NONE=0]="NONE",n[n.LIST_ROOT=1]="LIST_ROOT",n[n.FIRST_ITEM=2]="FIRST_ITEM",n[n.LAST_ITEM=3]="LAST_ITEM"})(b||(b={}));/**
114
+ * @license
115
+ * Copyright 2018 Google Inc.
116
+ *
117
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
118
+ * of this software and associated documentation files (the "Software"), to deal
119
+ * in the Software without restriction, including without limitation the rights
120
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
121
+ * copies of the Software, and to permit persons to whom the Software is
122
+ * furnished to do so, subject to the following conditions:
123
+ *
124
+ * The above copyright notice and this permission notice shall be included in
125
+ * all copies or substantial portions of the Software.
126
+ *
127
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
128
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
129
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
130
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
131
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
132
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
133
+ * THE SOFTWARE.
134
+ */var O,g,d={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"};O={},O[""+d.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",O[""+d.LIST_ITEM_CLASS]="mdc-list-item",O[""+d.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",O[""+d.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",O[""+d.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",O[""+d.ROOT]="mdc-list";var R=(g={},g[""+d.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",g[""+d.LIST_ITEM_CLASS]="mdc-deprecated-list-item",g[""+d.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",g[""+d.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",g[""+d.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",g[""+d.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",g[""+d.ROOT]="mdc-deprecated-list",g);""+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+R[d.LIST_ITEM_CLASS]+R[d.LIST_ITEM_CLASS],""+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+R[d.LIST_ITEM_CLASS]+R[d.LIST_ITEM_CLASS]+R[d.LIST_ITEM_CLASS]+R[d.LIST_ITEM_CLASS];/**
135
+ * @license
136
+ * Copyright 2018 Google Inc.
137
+ *
138
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
139
+ * of this software and associated documentation files (the "Software"), to deal
140
+ * in the Software without restriction, including without limitation the rights
141
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
142
+ * copies of the Software, and to permit persons to whom the Software is
143
+ * furnished to do so, subject to the following conditions:
144
+ *
145
+ * The above copyright notice and this permission notice shall be included in
146
+ * all copies or substantial portions of the Software.
147
+ *
148
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
149
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
150
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
151
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
152
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
153
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
154
+ * THE SOFTWARE.
155
+ */var et=function(n){s.__extends(e,n);function e(t){var i=n.call(this,s.__assign(s.__assign({},e.defaultAdapter),t))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=b.LIST_ROOT,i.selectedIndex=-1,i}return Object.defineProperty(e,"cssClasses",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var i=t.key,o=t.keyCode,r=i==="Tab"||o===9;r&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var i=this,o=this.adapter.getElementIndex(t);if(!(o<0)){this.adapter.notifySelected({index:o});var r=this.adapter.getAttributeFromElementAtIndex(o,x.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(r),this.closeAnimationEndTimerId=setTimeout(function(){var c=i.adapter.getElementIndex(t);c>=0&&i.adapter.isSelectableItemAtIndex(c)&&i.setSelectedIndex(c)},V.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case b.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case b.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case b.NONE:break;default:this.adapter.focusListRoot();break}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var i=this.adapter.getSelectedSiblingOfItemAtIndex(t);i>=0&&(this.adapter.removeAttributeFromElementAtIndex(i,x.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(i,H.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,H.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,i){this.validatedIndex(t),i?(this.adapter.removeClassFromElementAtIndex(t,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var i=this.adapter.getMenuItemCount(),o=t>=0&&t<i;if(!o)throw new Error("MDCMenuFoundation: No list item at specified index.")},e}(q);const it=et;/**
156
+ * @license
157
+ * Copyright 2020 Google LLC
158
+ * SPDX-License-Identifier: Apache-2.0
159
+ */class u extends U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=it,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_?this.listElement_:(this.listElement_=this.renderRoot.querySelector("mwc-list"),this.listElement_)}get items(){const e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){return this.renderSurface()}renderSurface(){const e=this.getSurfaceClasses();return A.x`
160
+ <mwc-menu-surface
161
+ ?hidden=${!this.open}
162
+ .anchor=${this.anchor}
163
+ .open=${this.open}
164
+ .quick=${this.quick}
165
+ .corner=${this.corner}
166
+ .x=${this.x}
167
+ .y=${this.y}
168
+ .absolute=${this.absolute}
169
+ .fixed=${this.fixed}
170
+ .fullwidth=${this.fullwidth}
171
+ .menuCorner=${this.menuCorner}
172
+ ?stayOpenOnBodyClick=${this.stayOpenOnBodyClick}
173
+ class=${P.o(e)}
174
+ @closed=${this.onClosed}
175
+ @opened=${this.onOpened}
176
+ @keydown=${this.onKeydown}>
177
+ ${this.renderList()}
178
+ </mwc-menu-surface>`}getSurfaceClasses(){return{"mdc-menu":!0,"mdc-menu-surface":!0}}renderList(){const e=this.innerRole==="menu"?"menuitem":"option",t=this.renderListClasses();return A.x`
179
+ <mwc-list
180
+ rootTabbable
181
+ .innerAriaLabel=${this.innerAriaLabel}
182
+ .innerRole=${this.innerRole}
183
+ .multi=${this.multi}
184
+ class=${P.o(t)}
185
+ .itemRoles=${e}
186
+ .wrapFocus=${this.wrapFocus}
187
+ .activatable=${this.activatable}
188
+ @action=${this.onAction}>
189
+ <slot></slot>
190
+ </mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&(t==="mdc-menu-item--selected"?this.forceGroupSelection&&!o.selected&&i.toggle(e,!0):o.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&(t==="mdc-menu-item--selected"?o.selected&&i.toggle(e,!1):o.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const o=this.listElement;if(!o)return;const r=o.items[e];r&&r.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&o.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const o=i.items[e];return o?o.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let o=0;o<t.items.length;o++){if(o===e)continue;const r=t.items[o];if(r.selected&&r.group===i.group)return o}return-1},isSelectableItemAtIndex:e=>{const t=this.listElement;if(!t)return!1;const i=t.items[e];return i?i.hasAttribute("group"):!1}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,o=t.items[i];o&&this.mdcFoundation.handleItemAction(o)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){return await this._listUpdateComplete,await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}s.__decorate([F.i(".mdc-menu")],u.prototype,"mdcRoot",void 0);s.__decorate([F.i("slot")],u.prototype,"slotElement",void 0);s.__decorate([a.n({type:Object})],u.prototype,"anchor",void 0);s.__decorate([a.n({type:Boolean,reflect:!0})],u.prototype,"open",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"quick",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"wrapFocus",void 0);s.__decorate([a.n({type:String})],u.prototype,"innerRole",void 0);s.__decorate([a.n({type:String})],u.prototype,"innerAriaLabel",void 0);s.__decorate([a.n({type:String})],u.prototype,"corner",void 0);s.__decorate([a.n({type:Number})],u.prototype,"x",void 0);s.__decorate([a.n({type:Number})],u.prototype,"y",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"absolute",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"multi",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"activatable",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"fixed",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"forceGroupSelection",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"fullwidth",void 0);s.__decorate([a.n({type:String})],u.prototype,"menuCorner",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"stayOpenOnBodyClick",void 0);s.__decorate([a.n({type:String}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(b[n])})],u.prototype,"defaultFocus",void 0);exports.MenuBase=u;
@@ -0,0 +1,101 @@
1
+ "use strict";const r=require("./tslib.es6-98719205.js"),p=require("./ripple-handlers-5d5b21db.js"),f=require("./aria-property-849c8816.js"),v=require("./form-element-c553d6f5.js"),m=require("./observer-a096ab43.js"),c=require("./query-assigned-elements-f623705d.js"),a=require("./property-57f6f6fe.js"),d=require("./state-0974a8e5.js"),g=require("./event-options-3f5eb195.js"),b=require("./query-680f1868.js"),_=require("./class-map-b5efe8da.js"),u=require("./if-defined-f1c45245.js"),y=require("./utils-a8190a39.js");/**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */const h=Symbol("selection controller");class R{constructor(){this.selected=null,this.ordered=null,this.set=new Set}}class l{constructor(e){this.sets={},this.focusedSet=null,this.mouseIsDown=!1,this.updating=!1,e.addEventListener("keydown",t=>{this.keyDownHandler(t)}),e.addEventListener("mousedown",()=>{this.mousedownHandler()}),e.addEventListener("mouseup",()=>{this.mouseupHandler()})}static getController(e){const s=!("global"in e)||"global"in e&&e.global?document:e.getRootNode();let n=s[h];return n===void 0&&(n=new l(s),s[h]=n),n}keyDownHandler(e){const t=e.target;"checked"in t&&this.has(t)&&(e.key=="ArrowRight"||e.key=="ArrowDown"?this.selectNext(t):(e.key=="ArrowLeft"||e.key=="ArrowUp")&&this.selectPrevious(t))}mousedownHandler(){this.mouseIsDown=!0}mouseupHandler(){this.mouseIsDown=!1}has(e){return this.getSet(e.name).set.has(e)}selectPrevious(e){const t=this.getOrdered(e),s=t.indexOf(e),n=t[s-1]||t[t.length-1];return this.select(n),n}selectNext(e){const t=this.getOrdered(e),s=t.indexOf(e),n=t[s+1]||t[0];return this.select(n),n}select(e){e.click()}focus(e){if(this.mouseIsDown)return;const t=this.getSet(e.name),s=this.focusedSet;this.focusedSet=t,s!=t&&t.selected&&t.selected!=e&&t.selected.focus()}isAnySelected(e){const t=this.getSet(e.name);for(const s of t.set)if(s.checked)return!0;return!1}getOrdered(e){const t=this.getSet(e.name);return t.ordered||(t.ordered=Array.from(t.set),t.ordered.sort((s,n)=>s.compareDocumentPosition(n)==Node.DOCUMENT_POSITION_PRECEDING?1:0)),t.ordered}getSet(e){return this.sets[e]||(this.sets[e]=new R),this.sets[e]}register(e){const t=e.name||e.getAttribute("name")||"",s=this.getSet(t);s.set.add(e),s.ordered=null}unregister(e){const t=this.getSet(e.name);t.set.delete(e),t.ordered=null,t.selected==e&&(t.selected=null)}update(e){if(this.updating)return;this.updating=!0;const t=this.getSet(e.name);if(e.checked){for(const s of t.set)s!=e&&(s.checked=!1);t.selected=e}if(this.isAnySelected(e))for(const s of t.set){if(s.formElementTabIndex===void 0)break;s.formElementTabIndex=s.checked?0:-1}this.updating=!1}}/**
6
+ * @license
7
+ * Copyright 2016 Google Inc.
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in
17
+ * all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ * THE SOFTWARE.
26
+ */var E=function(){function o(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(o,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),o.prototype.init=function(){},o.prototype.destroy=function(){},o}();/**
27
+ * @license
28
+ * Copyright 2016 Google Inc.
29
+ *
30
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31
+ * of this software and associated documentation files (the "Software"), to deal
32
+ * in the Software without restriction, including without limitation the rights
33
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
+ * copies of the Software, and to permit persons to whom the Software is
35
+ * furnished to do so, subject to the following conditions:
36
+ *
37
+ * The above copyright notice and this permission notice shall be included in
38
+ * all copies or substantial portions of the Software.
39
+ *
40
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46
+ * THE SOFTWARE.
47
+ */var C={NATIVE_CONTROL_SELECTOR:".mdc-radio__native-control"},k={DISABLED:"mdc-radio--disabled",ROOT:"mdc-radio"};/**
48
+ * @license
49
+ * Copyright 2016 Google Inc.
50
+ *
51
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
52
+ * of this software and associated documentation files (the "Software"), to deal
53
+ * in the Software without restriction, including without limitation the rights
54
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55
+ * copies of the Software, and to permit persons to whom the Software is
56
+ * furnished to do so, subject to the following conditions:
57
+ *
58
+ * The above copyright notice and this permission notice shall be included in
59
+ * all copies or substantial portions of the Software.
60
+ *
61
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
+ * THE SOFTWARE.
68
+ */var D=function(o){r.__extends(e,o);function e(t){return o.call(this,r.__assign(r.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return k},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return C},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setDisabled=function(t){var s=e.cssClasses.DISABLED;this.adapter.setNativeControlDisabled(t),t?this.adapter.addClass(s):this.adapter.removeClass(s)},e}(E);const S=D;/**
69
+ * @license
70
+ * Copyright 2018 Google LLC
71
+ * SPDX-License-Identifier: Apache-2.0
72
+ */class i extends v.FormElement{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=S,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new p.RippleHandlers(()=>(this.shouldRenderRipple=!0,this.ripple.then(e=>{this.rippleElement=e}),this.ripple))}get checked(){return this._checked}set checked(e){var t,s;const n=this._checked;e!==n&&(this._checked=e,this.formElement&&(this.formElement.checked=e),(t=this._selectionController)===null||t===void 0||t.update(this),e===!1&&((s=this.formElement)===null||s===void 0||s.blur()),this.requestUpdate("checked",n),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(e){this.formElement.value=e}renderRipple(){return this.shouldRenderRipple?c.x`<mwc-ripple unbounded accent
73
+ .internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"
74
+ .disabled="${this.disabled}"></mwc-ripple>`:""}get isRippleActive(){var e;return((e=this.rippleElement)===null||e===void 0?void 0:e.isActive)||!1}connectedCallback(){super.connectedCallback(),this._selectionController=l.getController(this),this._selectionController.register(this),this._selectionController.update(this)}disconnectedCallback(){this._selectionController.unregister(this),this._selectionController=void 0}focus(){this.formElement.focus()}createAdapter(){return Object.assign(Object.assign({},y.addHasRemoveClass(this.mdcRoot)),{setNativeControlDisabled:e=>{this.formElement.disabled=e}})}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleClick(){this.formElement.focus()}handleBlur(){this.focused=!1,this.formElement.blur(),this.rippleHandlers.endFocus()}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}render(){const e={"mdc-radio--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-radio--disabled":this.disabled};return c.x`
75
+ <div class="mdc-radio ${_.o(e)}">
76
+ <input
77
+ tabindex="${this.formElementTabIndex}"
78
+ class="mdc-radio__native-control"
79
+ type="radio"
80
+ name="${this.name}"
81
+ aria-label="${u.l(this.ariaLabel)}"
82
+ aria-labelledby="${u.l(this.ariaLabelledBy)}"
83
+ .checked="${this.checked}"
84
+ .value="${this.value}"
85
+ ?disabled="${this.disabled}"
86
+ @change="${this.changeHandler}"
87
+ @focus="${this.handleFocus}"
88
+ @click="${this.handleClick}"
89
+ @blur="${this.handleBlur}"
90
+ @mousedown="${this.handleRippleMouseDown}"
91
+ @mouseenter="${this.handleRippleMouseEnter}"
92
+ @mouseleave="${this.handleRippleMouseLeave}"
93
+ @touchstart="${this.handleRippleTouchStart}"
94
+ @touchend="${this.handleRippleDeactivate}"
95
+ @touchcancel="${this.handleRippleDeactivate}">
96
+ <div class="mdc-radio__background">
97
+ <div class="mdc-radio__outer-circle"></div>
98
+ <div class="mdc-radio__inner-circle"></div>
99
+ </div>
100
+ ${this.renderRipple()}
101
+ </div>`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}changeHandler(){this.checked=this.formElement.checked}}r.__decorate([b.i(".mdc-radio")],i.prototype,"mdcRoot",void 0);r.__decorate([b.i("input")],i.prototype,"formElement",void 0);r.__decorate([d.t()],i.prototype,"useStateLayerCustomProperties",void 0);r.__decorate([a.n({type:Boolean})],i.prototype,"global",void 0);r.__decorate([a.n({type:Boolean,reflect:!0})],i.prototype,"checked",null);r.__decorate([a.n({type:Boolean}),m.observer(function(o){this.mdcFoundation.setDisabled(o)})],i.prototype,"disabled",void 0);r.__decorate([a.n({type:String}),m.observer(function(o){this._handleUpdatedValue(o)})],i.prototype,"value",void 0);r.__decorate([a.n({type:String})],i.prototype,"name",void 0);r.__decorate([a.n({type:Boolean})],i.prototype,"reducedTouchTarget",void 0);r.__decorate([a.n({type:Number})],i.prototype,"formElementTabIndex",void 0);r.__decorate([d.t()],i.prototype,"focused",void 0);r.__decorate([d.t()],i.prototype,"shouldRenderRipple",void 0);r.__decorate([p.e("mwc-ripple")],i.prototype,"ripple",void 0);r.__decorate([f.ariaProperty,a.n({attribute:"aria-label"})],i.prototype,"ariaLabel",void 0);r.__decorate([f.ariaProperty,a.n({attribute:"aria-labelledby"})],i.prototype,"ariaLabelledBy",void 0);r.__decorate([g.e({passive:!0})],i.prototype,"handleRippleTouchStart",null);exports.RadioBase=i;