@hortiview/shared-components 0.0.11176 → 0.0.11587

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 (190) hide show
  1. package/README.md +58 -8
  2. package/dist/BigLoadingSpinner-iegTbDcD.js +16 -0
  3. package/dist/GenericCard-6J558OgP.js +350 -0
  4. package/dist/ListAreaService-DOwtdRa4.js +109 -0
  5. package/dist/_MapCache-B75yWNNd.js +376 -0
  6. package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
  7. package/dist/_getTag-BCf9b56Z.js +81 -0
  8. package/dist/animationframe-EMBh6XeO.js +54 -0
  9. package/dist/assets/HashTabView.css +1 -1
  10. package/dist/assets/Select.css +1 -0
  11. package/dist/component-DsB0poTj.js +571 -0
  12. package/dist/component-neHBNHRu.js +114 -0
  13. package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
  14. package/dist/components/AlertBanner/AlertBanner.js +15 -15
  15. package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
  16. package/dist/components/BaseView/BaseView.d.ts +1 -1
  17. package/dist/components/BaseView/BaseView.js +27 -28
  18. package/dist/components/BaseView/BaseView.test.js +25 -25
  19. package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
  20. package/dist/components/BasicHeading/BasicHeading.js +17 -17
  21. package/dist/components/BasicHeading/BasicHeading.test.js +10 -10
  22. package/dist/components/BlockView/BlockView.d.ts +1 -0
  23. package/dist/components/BlockView/BlockView.js +24 -25
  24. package/dist/components/BlockView/BlockView.test.js +2 -2
  25. package/dist/components/ChipCard/ChipCard.js +1765 -15
  26. package/dist/components/ChipCard/ChipCard.test.js +2 -2
  27. package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
  28. package/dist/components/ContextMenu/ContextMenu.js +28 -28
  29. package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
  30. package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
  31. package/dist/components/DeleteModal/DeleteModal.js +53 -51
  32. package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
  33. package/dist/components/Disclaimer/Disclaimer.js +12 -11
  34. package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
  35. package/dist/components/EmptyView/EmptyView.d.ts +1 -0
  36. package/dist/components/EmptyView/EmptyView.js +258 -19
  37. package/dist/components/EmptyView/EmptyView.test.js +2 -2
  38. package/dist/components/Filter/Filter.d.ts +1 -0
  39. package/dist/components/Filter/Filter.js +81 -77
  40. package/dist/components/Filter/Filter.test.js +2 -2
  41. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
  42. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
  43. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
  44. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
  45. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5975 -6389
  46. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
  47. package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
  48. package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -14
  49. package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
  50. package/dist/components/FormComponents/FormNumber/FormNumber.js +2 -2
  51. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
  52. package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
  53. package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
  54. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
  55. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
  56. package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
  57. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
  58. package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
  59. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
  60. package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
  61. package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
  62. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
  63. package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
  64. package/dist/components/FormComponents/FormText/FormText.js +28 -28
  65. package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
  66. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
  67. package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
  68. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
  69. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
  70. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
  71. package/dist/components/GenericTable/GenericTable.d.ts +1 -0
  72. package/dist/components/GenericTable/GenericTable.js +10487 -76
  73. package/dist/components/GenericTable/GenericTable.test.js +2 -2
  74. package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
  75. package/dist/components/GenericTable/GenericTableService.js +41 -41
  76. package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
  77. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
  78. package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
  79. package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
  80. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
  81. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
  82. package/dist/components/HashTabView/HashTabView.d.ts +6 -1
  83. package/dist/components/HashTabView/HashTabView.js +1805 -72
  84. package/dist/components/HashTabView/HashTabView.test.js +2 -2
  85. package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
  86. package/dist/components/HeaderFilter/HeaderFilter.js +14 -14
  87. package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
  88. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +19 -17
  89. package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
  90. package/dist/components/Iconify/Iconify.d.ts +2 -3
  91. package/dist/components/Iconify/Iconify.js +44 -45
  92. package/dist/components/Iconify/Iconify.test.js +2 -2
  93. package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
  94. package/dist/components/InfoGroup/InfoGroup.js +30 -29
  95. package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
  96. package/dist/components/ListArea/ListArea.d.ts +1 -1
  97. package/dist/components/ListArea/ListArea.js +29 -27
  98. package/dist/components/ListArea/ListArea.test.js +5 -5
  99. package/dist/components/ListArea/ListAreaService.d.ts +9 -8
  100. package/dist/components/ListArea/ListAreaService.js +7 -5
  101. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  102. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
  103. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -38
  104. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
  105. package/dist/components/Modal/Modal.d.ts +2 -1
  106. package/dist/components/Modal/Modal.js +926 -10
  107. package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
  108. package/dist/components/ModulePadding/ModulePadding.js +28 -0
  109. package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
  110. package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
  111. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
  112. package/dist/components/OverflowTooltip/OverflowTooltip.js +13 -14
  113. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
  114. package/dist/components/Scrollbar/Scrollbar.js +5 -6
  115. package/dist/components/Scrollbar/scrollbar.test.js +2 -2
  116. package/dist/components/SearchBar/SearchBar.js +11 -11
  117. package/dist/components/SearchBar/SearchBar.test.js +2 -2
  118. package/dist/components/Select/Select.d.ts +14 -0
  119. package/dist/components/Select/Select.js +34 -0
  120. package/dist/components/Select/Select.test.d.ts +1 -0
  121. package/dist/components/Select/Select.test.js +28 -0
  122. package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
  123. package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
  124. package/dist/floating-ui.dom-CeD8zknG.js +978 -0
  125. package/dist/get-7ACccM2X.js +114 -0
  126. package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
  127. package/dist/hooks/useBreakpoints.test.js +2 -2
  128. package/dist/hooks/useHelperText.d.ts +1 -0
  129. package/dist/hooks/useHelperText.js +1 -1
  130. package/dist/identity-DLWZln-X.js +1763 -0
  131. package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
  132. package/dist/index.es-0lQcz8m1.js +444 -0
  133. package/dist/index.es-25EARqhH.js +2027 -0
  134. package/dist/index.es-3043KTnb.js +1066 -0
  135. package/dist/index.es-41ztjcFT.js +724 -0
  136. package/dist/index.es-6TJ1S8Jr.js +954 -0
  137. package/dist/index.es-8GOVkuo-.js +374 -0
  138. package/dist/index.es-B-_jXDuz.js +216 -0
  139. package/dist/index.es-BWgXLqXn.js +102 -0
  140. package/dist/index.es-BtjV0oNv.js +360 -0
  141. package/dist/index.es-BvrQnJ3j.js +509 -0
  142. package/dist/index.es-CF_xy2ns.js +674 -0
  143. package/dist/index.es-CL_Heu1n.js +54 -0
  144. package/dist/index.es-CiqbARoC.js +306 -0
  145. package/dist/index.es-D-CKRzIB.js +63 -0
  146. package/dist/index.es-D6N-XWHe.js +56 -0
  147. package/dist/index.es-DKDgy7Kt.js +45 -0
  148. package/dist/index.es-DntoATwO.js +159 -0
  149. package/dist/index.es-UHKFl8Da.js +7075 -0
  150. package/dist/index.es-d5xhUpJZ.js +3242 -0
  151. package/dist/index.es-da0cf7oE.js +569 -0
  152. package/dist/index.es-h2lMdt7G.js +107 -0
  153. package/dist/index.es-zr101OF5.js +4853 -0
  154. package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
  155. package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
  156. package/dist/isEmpty-B4GG2s-V.js +31 -0
  157. package/dist/isPlainObject-C273y67K.js +40 -0
  158. package/dist/isString-BW9UHONv.js +21 -0
  159. package/dist/keyboard-Bpt0aBqQ.js +107 -0
  160. package/dist/main.d.ts +3 -0
  161. package/dist/main.js +58 -54
  162. package/dist/orderBy-Bd48bw88.js +316 -0
  163. package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
  164. package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
  165. package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
  166. package/dist/services/BlockService.d.ts +1 -0
  167. package/dist/services/NumberService.d.ts +1 -0
  168. package/dist/services/UtilService.d.ts +1 -0
  169. package/dist/services/UtilService.js +2 -2
  170. package/dist/services/services.test.js +1 -1
  171. package/dist/toString-CrgB_7Pe.js +54 -0
  172. package/dist/tslib.es6-BDCynO9F.js +162 -0
  173. package/dist/types/GenericTable.d.ts +2 -2
  174. package/dist/types/HashTab.d.ts +0 -1
  175. package/dist/types/ListElement.d.ts +0 -1
  176. package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
  177. package/dist/uniqueId-NU3-C36A.js +18 -0
  178. package/dist/util-DA21pZXj.js +78 -0
  179. package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
  180. package/package.json +15 -15
  181. package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
  182. package/dist/GenericCard-B8x1DMa8.js +0 -81
  183. package/dist/ListAreaService-CRX4eEUJ.js +0 -108
  184. package/dist/_Map-Dtlps7IZ.js +0 -113
  185. package/dist/_overArg-_0pUmCsX.js +0 -14
  186. package/dist/get-P-5PYZOE.js +0 -426
  187. package/dist/isEmpty-BimaZd5G.js +0 -225
  188. package/dist/isString-BOHPtrlm.js +0 -44
  189. package/dist/orderBy-BVQIswlJ.js +0 -765
  190. package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
@@ -1,25 +1,1775 @@
1
- import "../../assets/ChipCard.css";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { Card as e, Chips as o } from "@element/react-components";
4
- import { OverflowTooltip as a } from "../OverflowTooltip/OverflowTooltip.js";
5
- const d = "_entityContainer_1g0x2_1", c = {
6
- entityContainer: d
7
- }, C = ({ label: t, icon: r, className: n = "" }) => /* @__PURE__ */ i(
8
- e,
1
+ import { jsx as lt } from "react/jsx-runtime";
2
+ import { o as Ut, e as jt, i as qt, C as $t } from "../../index.es-6TJ1S8Jr.js";
3
+ import { _ as Kt, c as ut, P as l } from "../../identity-DLWZln-X.js";
4
+ import C, { useEffect as ft, useState as $, useMemo as ht, useCallback as I, useRef as Mt, forwardRef as Xt, useImperativeHandle as zt } from "react";
5
+ import { u as Jt, f as Qt, h as Zt } from "../../index.es-da0cf7oE.js";
6
+ import { e as te, c as A, b as U } from "../../tslib.es6-BDCynO9F.js";
7
+ import { M as _t, a as Et } from "../../component-neHBNHRu.js";
8
+ import { M as et, b as kt } from "../../component-DsB0poTj.js";
9
+ import { n as ee, i as ie, K as L } from "../../keyboard-Bpt0aBqQ.js";
10
+ import { I as Rt } from "../../index.es-3043KTnb.js";
11
+ import { g as ne } from "../../_commonjsHelpers-BkfeUUK-.js";
12
+ import { b as oe } from "../../isArray-DN9s620O.js";
13
+ import { OverflowTooltip as re } from "../OverflowTooltip/OverflowTooltip.js";
14
+ import '../../assets/ChipCard.css';var ae = qt ? window : null, Nt = function(o) {
15
+ return !!o.addEventListener;
16
+ }, Ot = function(o) {
17
+ return !!o.on;
18
+ }, dt = function(o, e, t, i) {
19
+ t === void 0 && (t = ae), ft(function() {
20
+ if (e && t)
21
+ return Nt(t) ? Ut(t, o, e, i) : Ot(t) && t.on(o, e, i), function() {
22
+ Nt(t) ? jt(t, o, e, i) : Ot(t) && t.off(o, e, i);
23
+ };
24
+ }, [o, e, t, JSON.stringify(i)]);
25
+ }, se = function(o) {
26
+ o === void 0 && (o = {});
27
+ var e = $(o), t = e[0], i = e[1], n = ht(function() {
28
+ return {
29
+ set: function(s, d) {
30
+ i(function(E) {
31
+ var _;
32
+ return A(A({}, E), (_ = {}, _[s] = d, _));
33
+ });
34
+ },
35
+ setAll: function(s) {
36
+ i(s);
37
+ },
38
+ remove: function(s) {
39
+ i(function(d) {
40
+ var E = d, _ = s;
41
+ E[_];
42
+ var g = te(E, [typeof _ == "symbol" ? _ : _ + ""]);
43
+ return g;
44
+ });
45
+ },
46
+ reset: function() {
47
+ return i(o);
48
+ }
49
+ };
50
+ }, [i]), r = A({ get: I(function(s) {
51
+ return t[s];
52
+ }, [t]) }, n);
53
+ return [t, r];
54
+ };
55
+ /**
56
+ * @license
57
+ * Copyright 2020 Google Inc.
58
+ *
59
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
60
+ * of this software and associated documentation files (the "Software"), to deal
61
+ * in the Software without restriction, including without limitation the rights
62
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63
+ * copies of the Software, and to permit persons to whom the Software is
64
+ * furnished to do so, subject to the following conditions:
65
+ *
66
+ * The above copyright notice and this permission notice shall be included in
67
+ * all copies or substantial portions of the Software.
68
+ *
69
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
75
+ * THE SOFTWARE.
76
+ */
77
+ var F;
78
+ (function(o) {
79
+ o[o.UNSPECIFIED = 0] = "UNSPECIFIED", o[o.CLICK = 1] = "CLICK", o[o.BACKSPACE_KEY = 2] = "BACKSPACE_KEY", o[o.DELETE_KEY = 3] = "DELETE_KEY", o[o.SPACEBAR_KEY = 4] = "SPACEBAR_KEY", o[o.ENTER_KEY = 5] = "ENTER_KEY";
80
+ })(F || (F = {}));
81
+ var y = {
82
+ ARIA_HIDDEN: "aria-hidden",
83
+ INTERACTION_EVENT: "MDCChipTrailingAction:interaction",
84
+ NAVIGATION_EVENT: "MDCChipTrailingAction:navigation",
85
+ TAB_INDEX: "tabindex"
86
+ };
87
+ /**
88
+ * @license
89
+ * Copyright 2020 Google Inc.
90
+ *
91
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
92
+ * of this software and associated documentation files (the "Software"), to deal
93
+ * in the Software without restriction, including without limitation the rights
94
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
95
+ * copies of the Software, and to permit persons to whom the Software is
96
+ * furnished to do so, subject to the following conditions:
97
+ *
98
+ * The above copyright notice and this permission notice shall be included in
99
+ * all copies or substantial portions of the Software.
100
+ *
101
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
102
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
103
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
104
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
107
+ * THE SOFTWARE.
108
+ */
109
+ var Yt = (
110
+ /** @class */
111
+ function(o) {
112
+ U(e, o);
113
+ function e(t) {
114
+ return o.call(this, A(A({}, e.defaultAdapter), t)) || this;
115
+ }
116
+ return Object.defineProperty(e, "strings", {
117
+ get: function() {
118
+ return y;
119
+ },
120
+ enumerable: !1,
121
+ configurable: !0
122
+ }), Object.defineProperty(e, "defaultAdapter", {
123
+ get: function() {
124
+ return {
125
+ focus: function() {
126
+ },
127
+ getAttribute: function() {
128
+ return null;
129
+ },
130
+ setAttribute: function() {
131
+ },
132
+ notifyInteraction: function() {
133
+ },
134
+ notifyNavigation: function() {
135
+ }
136
+ };
137
+ },
138
+ enumerable: !1,
139
+ configurable: !0
140
+ }), e.prototype.handleClick = function(t) {
141
+ t.stopPropagation(), this.adapter.notifyInteraction(F.CLICK);
142
+ }, e.prototype.handleKeydown = function(t) {
143
+ t.stopPropagation();
144
+ var i = ee(t);
145
+ if (this.shouldNotifyInteractionFromKey_(i)) {
146
+ var n = this.getTriggerFromKey_(i);
147
+ this.adapter.notifyInteraction(n);
148
+ return;
149
+ }
150
+ if (ie(t)) {
151
+ this.adapter.notifyNavigation(i);
152
+ return;
153
+ }
154
+ }, e.prototype.removeFocus = function() {
155
+ this.adapter.setAttribute(y.TAB_INDEX, "-1");
156
+ }, e.prototype.focus = function() {
157
+ this.adapter.setAttribute(y.TAB_INDEX, "0"), this.adapter.focus();
158
+ }, e.prototype.isNavigable = function() {
159
+ return this.adapter.getAttribute(y.ARIA_HIDDEN) !== "true";
160
+ }, e.prototype.shouldNotifyInteractionFromKey_ = function(t) {
161
+ var i = t === L.ENTER || t === L.SPACEBAR, n = t === L.BACKSPACE || t === L.DELETE;
162
+ return i || n;
163
+ }, e.prototype.getTriggerFromKey_ = function(t) {
164
+ return t === L.SPACEBAR ? F.SPACEBAR_KEY : t === L.ENTER ? F.ENTER_KEY : t === L.DELETE ? F.DELETE_KEY : t === L.BACKSPACE ? F.BACKSPACE_KEY : F.UNSPECIFIED;
165
+ }, e;
166
+ }(_t)
167
+ );
168
+ /**
169
+ * @license
170
+ * Copyright 2020 Google Inc.
171
+ *
172
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
173
+ * of this software and associated documentation files (the "Software"), to deal
174
+ * in the Software without restriction, including without limitation the rights
175
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
176
+ * copies of the Software, and to permit persons to whom the Software is
177
+ * furnished to do so, subject to the following conditions:
178
+ *
179
+ * The above copyright notice and this permission notice shall be included in
180
+ * all copies or substantial portions of the Software.
181
+ *
182
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
183
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
185
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
186
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
187
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
188
+ * THE SOFTWARE.
189
+ */
190
+ var xt = (
191
+ /** @class */
192
+ function(o) {
193
+ U(e, o);
194
+ function e() {
195
+ return o !== null && o.apply(this, arguments) || this;
196
+ }
197
+ return Object.defineProperty(e.prototype, "ripple", {
198
+ get: function() {
199
+ return this.ripple_;
200
+ },
201
+ enumerable: !1,
202
+ configurable: !0
203
+ }), e.attachTo = function(t) {
204
+ return new e(t);
205
+ }, e.prototype.initialize = function(t) {
206
+ t === void 0 && (t = function(n, r) {
207
+ return new et(n, r);
208
+ });
209
+ var i = et.createAdapter(this);
210
+ this.ripple_ = t(this.root, new kt(i));
211
+ }, e.prototype.initialSyncWithDOM = function() {
212
+ var t = this;
213
+ this.handleClick_ = function(i) {
214
+ t.foundation.handleClick(i);
215
+ }, this.handleKeydown_ = function(i) {
216
+ t.foundation.handleKeydown(i);
217
+ }, this.listen("click", this.handleClick_), this.listen("keydown", this.handleKeydown_);
218
+ }, e.prototype.destroy = function() {
219
+ this.ripple_.destroy(), this.unlisten("click", this.handleClick_), this.unlisten("keydown", this.handleKeydown_), o.prototype.destroy.call(this);
220
+ }, e.prototype.getDefaultFoundation = function() {
221
+ var t = this, i = {
222
+ focus: function() {
223
+ t.root.focus();
224
+ },
225
+ getAttribute: function(n) {
226
+ return t.root.getAttribute(n);
227
+ },
228
+ notifyInteraction: function(n) {
229
+ return t.emit(
230
+ y.INTERACTION_EVENT,
231
+ { trigger: n },
232
+ !0
233
+ /* shouldBubble */
234
+ );
235
+ },
236
+ notifyNavigation: function(n) {
237
+ t.emit(
238
+ y.NAVIGATION_EVENT,
239
+ { key: n },
240
+ !0
241
+ /* shouldBubble */
242
+ );
243
+ },
244
+ setAttribute: function(n, r) {
245
+ t.root.setAttribute(n, r);
246
+ }
247
+ };
248
+ return new Yt(i);
249
+ }, e.prototype.isNavigable = function() {
250
+ return this.foundation.isNavigable();
251
+ }, e.prototype.focus = function() {
252
+ this.foundation.focus();
253
+ }, e.prototype.removeFocus = function() {
254
+ this.foundation.removeFocus();
255
+ }, e;
256
+ }(Et)
257
+ );
258
+ /**
259
+ * @license
260
+ * Copyright 2016 Google Inc.
261
+ *
262
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
263
+ * of this software and associated documentation files (the "Software"), to deal
264
+ * in the Software without restriction, including without limitation the rights
265
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
266
+ * copies of the Software, and to permit persons to whom the Software is
267
+ * furnished to do so, subject to the following conditions:
268
+ *
269
+ * The above copyright notice and this permission notice shall be included in
270
+ * all copies or substantial portions of the Software.
271
+ *
272
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
274
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
278
+ * THE SOFTWARE.
279
+ */
280
+ var T;
281
+ (function(o) {
282
+ o.LEFT = "left", o.RIGHT = "right";
283
+ })(T || (T = {}));
284
+ var O;
285
+ (function(o) {
286
+ o.PRIMARY = "primary", o.TRAILING = "trailing", o.NONE = "none";
287
+ })(O || (O = {}));
288
+ var a = {
289
+ ADDED_ANNOUNCEMENT_ATTRIBUTE: "data-mdc-chip-added-announcement",
290
+ ARIA_CHECKED: "aria-checked",
291
+ ARROW_DOWN_KEY: "ArrowDown",
292
+ ARROW_LEFT_KEY: "ArrowLeft",
293
+ ARROW_RIGHT_KEY: "ArrowRight",
294
+ ARROW_UP_KEY: "ArrowUp",
295
+ BACKSPACE_KEY: "Backspace",
296
+ CHECKMARK_SELECTOR: ".mdc-chip__checkmark",
297
+ DELETE_KEY: "Delete",
298
+ END_KEY: "End",
299
+ ENTER_KEY: "Enter",
300
+ ENTRY_ANIMATION_NAME: "mdc-chip-entry",
301
+ HOME_KEY: "Home",
302
+ IE_ARROW_DOWN_KEY: "Down",
303
+ IE_ARROW_LEFT_KEY: "Left",
304
+ IE_ARROW_RIGHT_KEY: "Right",
305
+ IE_ARROW_UP_KEY: "Up",
306
+ IE_DELETE_KEY: "Del",
307
+ INTERACTION_EVENT: "MDCChip:interaction",
308
+ LEADING_ICON_SELECTOR: ".mdc-chip__icon--leading",
309
+ NAVIGATION_EVENT: "MDCChip:navigation",
310
+ PRIMARY_ACTION_SELECTOR: ".mdc-chip__primary-action",
311
+ REMOVED_ANNOUNCEMENT_ATTRIBUTE: "data-mdc-chip-removed-announcement",
312
+ REMOVAL_EVENT: "MDCChip:removal",
313
+ SELECTION_EVENT: "MDCChip:selection",
314
+ SPACEBAR_KEY: " ",
315
+ TAB_INDEX: "tabindex",
316
+ TRAILING_ACTION_SELECTOR: ".mdc-chip-trailing-action",
317
+ TRAILING_ICON_INTERACTION_EVENT: "MDCChip:trailingIconInteraction",
318
+ TRAILING_ICON_SELECTOR: ".mdc-chip__icon--trailing"
319
+ }, f = {
320
+ CHECKMARK: "mdc-chip__checkmark",
321
+ CHIP_EXIT: "mdc-chip--exit",
322
+ DELETABLE: "mdc-chip--deletable",
323
+ EDITABLE: "mdc-chip--editable",
324
+ EDITING: "mdc-chip--editing",
325
+ HIDDEN_LEADING_ICON: "mdc-chip__icon--leading-hidden",
326
+ LEADING_ICON: "mdc-chip__icon--leading",
327
+ PRIMARY_ACTION: "mdc-chip__primary-action",
328
+ PRIMARY_ACTION_FOCUSED: "mdc-chip--primary-action-focused",
329
+ SELECTED: "mdc-chip--selected",
330
+ TEXT: "mdc-chip__text",
331
+ TRAILING_ACTION: "mdc-chip__trailing-action",
332
+ TRAILING_ICON: "mdc-chip__icon--trailing"
333
+ }, m = /* @__PURE__ */ new Set();
334
+ m.add(a.ARROW_LEFT_KEY);
335
+ m.add(a.ARROW_RIGHT_KEY);
336
+ m.add(a.ARROW_DOWN_KEY);
337
+ m.add(a.ARROW_UP_KEY);
338
+ m.add(a.END_KEY);
339
+ m.add(a.HOME_KEY);
340
+ m.add(a.IE_ARROW_LEFT_KEY);
341
+ m.add(a.IE_ARROW_RIGHT_KEY);
342
+ m.add(a.IE_ARROW_DOWN_KEY);
343
+ m.add(a.IE_ARROW_UP_KEY);
344
+ var P = /* @__PURE__ */ new Set();
345
+ P.add(a.ARROW_UP_KEY);
346
+ P.add(a.ARROW_DOWN_KEY);
347
+ P.add(a.HOME_KEY);
348
+ P.add(a.END_KEY);
349
+ P.add(a.IE_ARROW_UP_KEY);
350
+ P.add(a.IE_ARROW_DOWN_KEY);
351
+ /**
352
+ * @license
353
+ * Copyright 2016 Google Inc.
354
+ *
355
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
356
+ * of this software and associated documentation files (the "Software"), to deal
357
+ * in the Software without restriction, including without limitation the rights
358
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
359
+ * copies of the Software, and to permit persons to whom the Software is
360
+ * furnished to do so, subject to the following conditions:
361
+ *
362
+ * The above copyright notice and this permission notice shall be included in
363
+ * all copies or substantial portions of the Software.
364
+ *
365
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
366
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
367
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
368
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
369
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
370
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
371
+ * THE SOFTWARE.
372
+ */
373
+ var St = {
374
+ bottom: 0,
375
+ height: 0,
376
+ left: 0,
377
+ right: 0,
378
+ top: 0,
379
+ width: 0
380
+ }, G;
381
+ (function(o) {
382
+ o[o.SHOULD_FOCUS = 0] = "SHOULD_FOCUS", o[o.SHOULD_NOT_FOCUS = 1] = "SHOULD_NOT_FOCUS";
383
+ })(G || (G = {}));
384
+ var Ct = (
385
+ /** @class */
386
+ function(o) {
387
+ U(e, o);
388
+ function e(t) {
389
+ var i = o.call(this, A(A({}, e.defaultAdapter), t)) || this;
390
+ return i.shouldRemoveOnTrailingIconClick_ = !0, i.shouldFocusPrimaryActionOnClick_ = !0, i;
391
+ }
392
+ return Object.defineProperty(e, "strings", {
393
+ get: function() {
394
+ return a;
395
+ },
396
+ enumerable: !1,
397
+ configurable: !0
398
+ }), Object.defineProperty(e, "cssClasses", {
399
+ get: function() {
400
+ return f;
401
+ },
402
+ enumerable: !1,
403
+ configurable: !0
404
+ }), Object.defineProperty(e, "defaultAdapter", {
405
+ get: function() {
406
+ return {
407
+ addClass: function() {
408
+ },
409
+ addClassToLeadingIcon: function() {
410
+ },
411
+ eventTargetHasClass: function() {
412
+ return !1;
413
+ },
414
+ focusPrimaryAction: function() {
415
+ },
416
+ focusTrailingAction: function() {
417
+ },
418
+ getAttribute: function() {
419
+ return null;
420
+ },
421
+ getCheckmarkBoundingClientRect: function() {
422
+ return St;
423
+ },
424
+ getComputedStyleValue: function() {
425
+ return "";
426
+ },
427
+ getRootBoundingClientRect: function() {
428
+ return St;
429
+ },
430
+ hasClass: function() {
431
+ return !1;
432
+ },
433
+ hasLeadingIcon: function() {
434
+ return !1;
435
+ },
436
+ isRTL: function() {
437
+ return !1;
438
+ },
439
+ isTrailingActionNavigable: function() {
440
+ return !1;
441
+ },
442
+ notifyEditFinish: function() {
443
+ },
444
+ notifyEditStart: function() {
445
+ },
446
+ notifyInteraction: function() {
447
+ },
448
+ notifyNavigation: function() {
449
+ },
450
+ notifyRemoval: function() {
451
+ },
452
+ notifySelection: function() {
453
+ },
454
+ notifyTrailingIconInteraction: function() {
455
+ },
456
+ removeClass: function() {
457
+ },
458
+ removeClassFromLeadingIcon: function() {
459
+ },
460
+ removeTrailingActionFocus: function() {
461
+ },
462
+ setPrimaryActionAttr: function() {
463
+ },
464
+ setStyleProperty: function() {
465
+ }
466
+ };
467
+ },
468
+ enumerable: !1,
469
+ configurable: !0
470
+ }), e.prototype.isSelected = function() {
471
+ return this.adapter.hasClass(f.SELECTED);
472
+ }, e.prototype.isEditable = function() {
473
+ return this.adapter.hasClass(f.EDITABLE);
474
+ }, e.prototype.isEditing = function() {
475
+ return this.adapter.hasClass(f.EDITING);
476
+ }, e.prototype.setSelected = function(t) {
477
+ this.setSelected_(t), this.notifySelection_(t);
478
+ }, e.prototype.setSelectedFromChipSet = function(t, i) {
479
+ this.setSelected_(t), i && this.notifyIgnoredSelection_(t);
480
+ }, e.prototype.getShouldRemoveOnTrailingIconClick = function() {
481
+ return this.shouldRemoveOnTrailingIconClick_;
482
+ }, e.prototype.setShouldRemoveOnTrailingIconClick = function(t) {
483
+ this.shouldRemoveOnTrailingIconClick_ = t;
484
+ }, e.prototype.setShouldFocusPrimaryActionOnClick = function(t) {
485
+ this.shouldFocusPrimaryActionOnClick_ = t;
486
+ }, e.prototype.getDimensions = function() {
487
+ var t = this, i = function() {
488
+ return t.adapter.getRootBoundingClientRect();
489
+ }, n = function() {
490
+ return t.adapter.getCheckmarkBoundingClientRect();
491
+ };
492
+ if (!this.adapter.hasLeadingIcon()) {
493
+ var r = n();
494
+ if (r) {
495
+ var s = i();
496
+ return {
497
+ bottom: s.bottom,
498
+ height: s.height,
499
+ left: s.left,
500
+ right: s.right,
501
+ top: s.top,
502
+ width: s.width + r.height
503
+ };
504
+ }
505
+ }
506
+ return i();
507
+ }, e.prototype.beginExit = function() {
508
+ this.adapter.addClass(f.CHIP_EXIT);
509
+ }, e.prototype.handleClick = function() {
510
+ this.adapter.notifyInteraction(), this.setPrimaryActionFocusable_(this.getFocusBehavior_());
511
+ }, e.prototype.handleDoubleClick = function() {
512
+ this.isEditable() && this.startEditing();
513
+ }, e.prototype.handleTransitionEnd = function(t) {
514
+ var i = this, n = this.adapter.eventTargetHasClass(t.target, f.CHIP_EXIT), r = t.propertyName === "width", s = t.propertyName === "opacity";
515
+ if (n && s) {
516
+ var d = this.adapter.getComputedStyleValue("width");
517
+ requestAnimationFrame(function() {
518
+ i.adapter.setStyleProperty("width", d), i.adapter.setStyleProperty("padding", "0"), i.adapter.setStyleProperty("margin", "0"), requestAnimationFrame(function() {
519
+ i.adapter.setStyleProperty("width", "0");
520
+ });
521
+ });
522
+ return;
523
+ }
524
+ if (n && r) {
525
+ this.removeFocus();
526
+ var E = this.adapter.getAttribute(a.REMOVED_ANNOUNCEMENT_ATTRIBUTE);
527
+ this.adapter.notifyRemoval(E);
528
+ }
529
+ if (s) {
530
+ var _ = this.adapter.eventTargetHasClass(t.target, f.LEADING_ICON) && this.adapter.hasClass(f.SELECTED), g = this.adapter.eventTargetHasClass(t.target, f.CHECKMARK) && !this.adapter.hasClass(f.SELECTED);
531
+ if (_) {
532
+ this.adapter.addClassToLeadingIcon(f.HIDDEN_LEADING_ICON);
533
+ return;
534
+ }
535
+ if (g) {
536
+ this.adapter.removeClassFromLeadingIcon(f.HIDDEN_LEADING_ICON);
537
+ return;
538
+ }
539
+ }
540
+ }, e.prototype.handleFocusIn = function(t) {
541
+ this.eventFromPrimaryAction_(t) && this.adapter.addClass(f.PRIMARY_ACTION_FOCUSED);
542
+ }, e.prototype.handleFocusOut = function(t) {
543
+ this.eventFromPrimaryAction_(t) && (this.isEditing() && this.finishEditing(), this.adapter.removeClass(f.PRIMARY_ACTION_FOCUSED));
544
+ }, e.prototype.handleTrailingActionInteraction = function() {
545
+ this.adapter.notifyTrailingIconInteraction(), this.removeChip_();
546
+ }, e.prototype.handleKeydown = function(t) {
547
+ if (this.isEditing()) {
548
+ this.shouldFinishEditing(t) && (t.preventDefault(), this.finishEditing());
549
+ return;
550
+ }
551
+ if (this.isEditable() && this.shouldStartEditing(t) && (t.preventDefault(), this.startEditing()), this.shouldNotifyInteraction_(t)) {
552
+ this.adapter.notifyInteraction(), this.setPrimaryActionFocusable_(this.getFocusBehavior_());
553
+ return;
554
+ }
555
+ if (this.isDeleteAction_(t)) {
556
+ t.preventDefault(), this.removeChip_();
557
+ return;
558
+ }
559
+ m.has(t.key) && (t.preventDefault(), this.focusNextAction_(t.key, O.PRIMARY));
560
+ }, e.prototype.handleTrailingActionNavigation = function(t) {
561
+ return this.focusNextAction_(t.detail.key, O.TRAILING);
562
+ }, e.prototype.removeFocus = function() {
563
+ this.adapter.setPrimaryActionAttr(a.TAB_INDEX, "-1"), this.adapter.removeTrailingActionFocus();
564
+ }, e.prototype.focusPrimaryAction = function() {
565
+ this.setPrimaryActionFocusable_(G.SHOULD_FOCUS);
566
+ }, e.prototype.focusTrailingAction = function() {
567
+ var t = this.adapter.isTrailingActionNavigable();
568
+ if (t) {
569
+ this.adapter.setPrimaryActionAttr(a.TAB_INDEX, "-1"), this.adapter.focusTrailingAction();
570
+ return;
571
+ }
572
+ this.focusPrimaryAction();
573
+ }, e.prototype.setPrimaryActionFocusable_ = function(t) {
574
+ this.adapter.setPrimaryActionAttr(a.TAB_INDEX, "0"), t === G.SHOULD_FOCUS && this.adapter.focusPrimaryAction(), this.adapter.removeTrailingActionFocus();
575
+ }, e.prototype.getFocusBehavior_ = function() {
576
+ return this.shouldFocusPrimaryActionOnClick_ ? G.SHOULD_FOCUS : G.SHOULD_NOT_FOCUS;
577
+ }, e.prototype.focusNextAction_ = function(t, i) {
578
+ var n = this.adapter.isTrailingActionNavigable(), r = this.getDirection_(t);
579
+ if (P.has(t) || !n)
580
+ return this.adapter.notifyNavigation(t, i);
581
+ if (i === O.PRIMARY && r === T.RIGHT)
582
+ return this.focusTrailingAction();
583
+ if (i === O.TRAILING && r === T.LEFT)
584
+ return this.focusPrimaryAction();
585
+ this.adapter.notifyNavigation(t, O.NONE);
586
+ }, e.prototype.getDirection_ = function(t) {
587
+ var i = this.adapter.isRTL(), n = t === a.ARROW_LEFT_KEY || t === a.IE_ARROW_LEFT_KEY, r = t === a.ARROW_RIGHT_KEY || t === a.IE_ARROW_RIGHT_KEY;
588
+ return !i && n || i && r ? T.LEFT : T.RIGHT;
589
+ }, e.prototype.removeChip_ = function() {
590
+ this.shouldRemoveOnTrailingIconClick_ && this.beginExit();
591
+ }, e.prototype.shouldStartEditing = function(t) {
592
+ return this.eventFromPrimaryAction_(t) && t.key === a.ENTER_KEY;
593
+ }, e.prototype.shouldFinishEditing = function(t) {
594
+ return t.key === a.ENTER_KEY;
595
+ }, e.prototype.shouldNotifyInteraction_ = function(t) {
596
+ return t.key === a.ENTER_KEY || t.key === a.SPACEBAR_KEY;
597
+ }, e.prototype.isDeleteAction_ = function(t) {
598
+ var i = this.adapter.hasClass(f.DELETABLE);
599
+ return i && (t.key === a.BACKSPACE_KEY || t.key === a.DELETE_KEY || t.key === a.IE_DELETE_KEY);
600
+ }, e.prototype.setSelected_ = function(t) {
601
+ t ? (this.adapter.addClass(f.SELECTED), this.adapter.setPrimaryActionAttr(a.ARIA_CHECKED, "true")) : (this.adapter.removeClass(f.SELECTED), this.adapter.setPrimaryActionAttr(a.ARIA_CHECKED, "false"));
602
+ }, e.prototype.notifySelection_ = function(t) {
603
+ this.adapter.notifySelection(t, !1);
604
+ }, e.prototype.notifyIgnoredSelection_ = function(t) {
605
+ this.adapter.notifySelection(t, !0);
606
+ }, e.prototype.eventFromPrimaryAction_ = function(t) {
607
+ return this.adapter.eventTargetHasClass(t.target, f.PRIMARY_ACTION);
608
+ }, e.prototype.startEditing = function() {
609
+ this.adapter.addClass(f.EDITING), this.adapter.notifyEditStart();
610
+ }, e.prototype.finishEditing = function() {
611
+ this.adapter.removeClass(f.EDITING), this.adapter.notifyEditFinish();
612
+ }, e;
613
+ }(_t)
614
+ );
615
+ /**
616
+ * @license
617
+ * Copyright 2016 Google Inc.
618
+ *
619
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
620
+ * of this software and associated documentation files (the "Software"), to deal
621
+ * in the Software without restriction, including without limitation the rights
622
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
623
+ * copies of the Software, and to permit persons to whom the Software is
624
+ * furnished to do so, subject to the following conditions:
625
+ *
626
+ * The above copyright notice and this permission notice shall be included in
627
+ * all copies or substantial portions of the Software.
628
+ *
629
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
630
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
631
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
632
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
633
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
634
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
635
+ * THE SOFTWARE.
636
+ */
637
+ var wt = (
638
+ /** @class */
639
+ function(o) {
640
+ U(e, o);
641
+ function e() {
642
+ return o !== null && o.apply(this, arguments) || this;
643
+ }
644
+ return Object.defineProperty(e.prototype, "selected", {
645
+ /**
646
+ * @return Whether the chip is selected.
647
+ */
648
+ get: function() {
649
+ return this.foundation.isSelected();
650
+ },
651
+ /**
652
+ * Sets selected state on the chip.
653
+ */
654
+ set: function(t) {
655
+ this.foundation.setSelected(t);
656
+ },
657
+ enumerable: !1,
658
+ configurable: !0
659
+ }), Object.defineProperty(e.prototype, "shouldRemoveOnTrailingIconClick", {
660
+ /**
661
+ * @return Whether a trailing icon click should trigger exit/removal of the chip.
662
+ */
663
+ get: function() {
664
+ return this.foundation.getShouldRemoveOnTrailingIconClick();
665
+ },
666
+ /**
667
+ * Sets whether a trailing icon click should trigger exit/removal of the chip.
668
+ */
669
+ set: function(t) {
670
+ this.foundation.setShouldRemoveOnTrailingIconClick(t);
671
+ },
672
+ enumerable: !1,
673
+ configurable: !0
674
+ }), Object.defineProperty(e.prototype, "setShouldFocusPrimaryActionOnClick", {
675
+ /**
676
+ * Sets whether a clicking on the chip should focus the primary action.
677
+ */
678
+ set: function(t) {
679
+ this.foundation.setShouldFocusPrimaryActionOnClick(t);
680
+ },
681
+ enumerable: !1,
682
+ configurable: !0
683
+ }), Object.defineProperty(e.prototype, "ripple", {
684
+ get: function() {
685
+ return this.ripple_;
686
+ },
687
+ enumerable: !1,
688
+ configurable: !0
689
+ }), Object.defineProperty(e.prototype, "id", {
690
+ get: function() {
691
+ return this.root.id;
692
+ },
693
+ enumerable: !1,
694
+ configurable: !0
695
+ }), e.attachTo = function(t) {
696
+ return new e(t);
697
+ }, e.prototype.initialize = function(t, i) {
698
+ var n = this;
699
+ t === void 0 && (t = function(d, E) {
700
+ return new et(d, E);
701
+ }), i === void 0 && (i = function(d) {
702
+ return new xt(d);
703
+ }), this.leadingIcon_ = this.root.querySelector(a.LEADING_ICON_SELECTOR), this.checkmark_ = this.root.querySelector(a.CHECKMARK_SELECTOR), this.primaryAction_ = this.root.querySelector(a.PRIMARY_ACTION_SELECTOR);
704
+ var r = this.root.querySelector(a.TRAILING_ACTION_SELECTOR);
705
+ r && (this.trailingAction_ = i(r));
706
+ var s = A(A({}, et.createAdapter(this)), { computeBoundingRect: function() {
707
+ return n.foundation.getDimensions();
708
+ } });
709
+ this.ripple_ = t(this.root, new kt(s));
710
+ }, e.prototype.initialSyncWithDOM = function() {
711
+ var t = this;
712
+ this.handleTrailingActionInteraction_ = function() {
713
+ t.foundation.handleTrailingActionInteraction();
714
+ }, this.handleTrailingActionNavigation_ = function(i) {
715
+ t.foundation.handleTrailingActionNavigation(i);
716
+ }, this.handleClick_ = function() {
717
+ t.foundation.handleClick();
718
+ }, this.handleKeydown_ = function(i) {
719
+ t.foundation.handleKeydown(i);
720
+ }, this.handleTransitionEnd_ = function(i) {
721
+ t.foundation.handleTransitionEnd(i);
722
+ }, this.handleFocusIn_ = function(i) {
723
+ t.foundation.handleFocusIn(i);
724
+ }, this.handleFocusOut_ = function(i) {
725
+ t.foundation.handleFocusOut(i);
726
+ }, this.listen("transitionend", this.handleTransitionEnd_), this.listen("click", this.handleClick_), this.listen("keydown", this.handleKeydown_), this.listen("focusin", this.handleFocusIn_), this.listen("focusout", this.handleFocusOut_), this.trailingAction_ && (this.listen(y.INTERACTION_EVENT, this.handleTrailingActionInteraction_), this.listen(y.NAVIGATION_EVENT, this.handleTrailingActionNavigation_));
727
+ }, e.prototype.destroy = function() {
728
+ this.ripple_.destroy(), this.unlisten("transitionend", this.handleTransitionEnd_), this.unlisten("keydown", this.handleKeydown_), this.unlisten("click", this.handleClick_), this.unlisten("focusin", this.handleFocusIn_), this.unlisten("focusout", this.handleFocusOut_), this.trailingAction_ && (this.unlisten(y.INTERACTION_EVENT, this.handleTrailingActionInteraction_), this.unlisten(y.NAVIGATION_EVENT, this.handleTrailingActionNavigation_)), o.prototype.destroy.call(this);
729
+ }, e.prototype.beginExit = function() {
730
+ this.foundation.beginExit();
731
+ }, e.prototype.getDefaultFoundation = function() {
732
+ var t = this, i = {
733
+ addClass: function(n) {
734
+ return t.root.classList.add(n);
735
+ },
736
+ addClassToLeadingIcon: function(n) {
737
+ t.leadingIcon_ && t.leadingIcon_.classList.add(n);
738
+ },
739
+ eventTargetHasClass: function(n, r) {
740
+ return n ? n.classList.contains(r) : !1;
741
+ },
742
+ focusPrimaryAction: function() {
743
+ t.primaryAction_ && t.primaryAction_.focus();
744
+ },
745
+ focusTrailingAction: function() {
746
+ t.trailingAction_ && t.trailingAction_.focus();
747
+ },
748
+ getAttribute: function(n) {
749
+ return t.root.getAttribute(n);
750
+ },
751
+ getCheckmarkBoundingClientRect: function() {
752
+ return t.checkmark_ ? t.checkmark_.getBoundingClientRect() : null;
753
+ },
754
+ getComputedStyleValue: function(n) {
755
+ return window.getComputedStyle(t.root).getPropertyValue(n);
756
+ },
757
+ getRootBoundingClientRect: function() {
758
+ return t.root.getBoundingClientRect();
759
+ },
760
+ hasClass: function(n) {
761
+ return t.root.classList.contains(n);
762
+ },
763
+ hasLeadingIcon: function() {
764
+ return !!t.leadingIcon_;
765
+ },
766
+ isRTL: function() {
767
+ return window.getComputedStyle(t.root).getPropertyValue("direction") === "rtl";
768
+ },
769
+ isTrailingActionNavigable: function() {
770
+ return t.trailingAction_ ? t.trailingAction_.isNavigable() : !1;
771
+ },
772
+ notifyInteraction: function() {
773
+ return t.emit(
774
+ a.INTERACTION_EVENT,
775
+ { chipId: t.id },
776
+ !0
777
+ /* shouldBubble */
778
+ );
779
+ },
780
+ notifyNavigation: function(n, r) {
781
+ return t.emit(
782
+ a.NAVIGATION_EVENT,
783
+ { chipId: t.id, key: n, source: r },
784
+ !0
785
+ /* shouldBubble */
786
+ );
787
+ },
788
+ notifyRemoval: function(n) {
789
+ t.emit(
790
+ a.REMOVAL_EVENT,
791
+ { chipId: t.id, removedAnnouncement: n },
792
+ !0
793
+ /* shouldBubble */
794
+ );
795
+ },
796
+ notifySelection: function(n, r) {
797
+ return t.emit(
798
+ a.SELECTION_EVENT,
799
+ { chipId: t.id, selected: n, shouldIgnore: r },
800
+ !0
801
+ /* shouldBubble */
802
+ );
803
+ },
804
+ notifyTrailingIconInteraction: function() {
805
+ return t.emit(
806
+ a.TRAILING_ICON_INTERACTION_EVENT,
807
+ { chipId: t.id },
808
+ !0
809
+ /* shouldBubble */
810
+ );
811
+ },
812
+ notifyEditStart: function() {
813
+ },
814
+ notifyEditFinish: function() {
815
+ },
816
+ removeClass: function(n) {
817
+ return t.root.classList.remove(n);
818
+ },
819
+ removeClassFromLeadingIcon: function(n) {
820
+ t.leadingIcon_ && t.leadingIcon_.classList.remove(n);
821
+ },
822
+ removeTrailingActionFocus: function() {
823
+ t.trailingAction_ && t.trailingAction_.removeFocus();
824
+ },
825
+ setPrimaryActionAttr: function(n, r) {
826
+ t.primaryAction_ && t.primaryAction_.setAttribute(n, r);
827
+ },
828
+ setStyleProperty: function(n, r) {
829
+ return t.root.style.setProperty(n, r);
830
+ }
831
+ };
832
+ return new Ct(i);
833
+ }, e.prototype.setSelectedFromChipSet = function(t, i) {
834
+ this.foundation.setSelectedFromChipSet(t, i);
835
+ }, e.prototype.focusPrimaryAction = function() {
836
+ this.foundation.focusPrimaryAction();
837
+ }, e.prototype.focusTrailingAction = function() {
838
+ this.foundation.focusTrailingAction();
839
+ }, e.prototype.removeFocus = function() {
840
+ this.foundation.removeFocus();
841
+ }, e.prototype.remove = function() {
842
+ var t = this.root.parentNode;
843
+ t !== null && t.removeChild(this.root);
844
+ }, e;
845
+ }(Et)
846
+ );
847
+ /**
848
+ * @license
849
+ * Copyright 2020 Google Inc.
850
+ *
851
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
852
+ * of this software and associated documentation files (the "Software"), to deal
853
+ * in the Software without restriction, including without limitation the rights
854
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
855
+ * copies of the Software, and to permit persons to whom the Software is
856
+ * furnished to do so, subject to the following conditions:
857
+ *
858
+ * The above copyright notice and this permission notice shall be included in
859
+ * all copies or substantial portions of the Software.
860
+ *
861
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
862
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
863
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
864
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
865
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
866
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
867
+ * THE SOFTWARE.
868
+ */
869
+ var pt;
870
+ (function(o) {
871
+ o.POLITE = "polite", o.ASSERTIVE = "assertive";
872
+ })(pt || (pt = {}));
873
+ var ce = "data-mdc-dom-announce";
874
+ function le(o, e) {
875
+ de.getInstance().say(o, e);
876
+ }
877
+ var de = (
878
+ /** @class */
879
+ function() {
880
+ function o() {
881
+ this.liveRegions = /* @__PURE__ */ new Map();
882
+ }
883
+ return o.getInstance = function() {
884
+ return o.instance || (o.instance = new o()), o.instance;
885
+ }, o.prototype.say = function(e, t) {
886
+ t === void 0 && (t = pt.POLITE);
887
+ var i = this.getLiveRegion(t);
888
+ i.textContent = "", setTimeout(function() {
889
+ i.textContent = e, document.addEventListener("click", n);
890
+ }, 1);
891
+ function n() {
892
+ i.textContent = "", document.removeEventListener("click", n);
893
+ }
894
+ }, o.prototype.getLiveRegion = function(e) {
895
+ var t = this.liveRegions.get(e);
896
+ if (t && document.body.contains(t))
897
+ return t;
898
+ var i = this.createLiveRegion(e);
899
+ return this.liveRegions.set(e, i), i;
900
+ }, o.prototype.createLiveRegion = function(e) {
901
+ var t = document.createElement("div");
902
+ return t.style.position = "absolute", t.style.top = "-9999px", t.style.left = "-9999px", t.style.height = "1px", t.style.overflow = "hidden", t.setAttribute("aria-atomic", "true"), t.setAttribute("aria-live", e), t.setAttribute(ce, "true"), document.body.appendChild(t), t;
903
+ }, o;
904
+ }()
905
+ );
906
+ /**
907
+ * @license
908
+ * Copyright 2016 Google Inc.
909
+ *
910
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
911
+ * of this software and associated documentation files (the "Software"), to deal
912
+ * in the Software without restriction, including without limitation the rights
913
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
914
+ * copies of the Software, and to permit persons to whom the Software is
915
+ * furnished to do so, subject to the following conditions:
916
+ *
917
+ * The above copyright notice and this permission notice shall be included in
918
+ * all copies or substantial portions of the Software.
919
+ *
920
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
921
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
922
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
923
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
924
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
925
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
926
+ * THE SOFTWARE.
927
+ */
928
+ var Ht = {
929
+ CHIP_SELECTOR: ".mdc-chip"
930
+ }, q = {
931
+ CHOICE: "mdc-chip-set--choice",
932
+ FILTER: "mdc-chip-set--filter"
933
+ };
934
+ /**
935
+ * @license
936
+ * Copyright 2017 Google Inc.
937
+ *
938
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
939
+ * of this software and associated documentation files (the "Software"), to deal
940
+ * in the Software without restriction, including without limitation the rights
941
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
942
+ * copies of the Software, and to permit persons to whom the Software is
943
+ * furnished to do so, subject to the following conditions:
944
+ *
945
+ * The above copyright notice and this permission notice shall be included in
946
+ * all copies or substantial portions of the Software.
947
+ *
948
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
949
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
950
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
951
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
952
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
953
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
954
+ * THE SOFTWARE.
955
+ */
956
+ var It = (
957
+ /** @class */
958
+ function(o) {
959
+ U(e, o);
960
+ function e(t) {
961
+ var i = o.call(this, A(A({}, e.defaultAdapter), t)) || this;
962
+ return i.selectedChipIds_ = [], i;
963
+ }
964
+ return Object.defineProperty(e, "strings", {
965
+ get: function() {
966
+ return Ht;
967
+ },
968
+ enumerable: !1,
969
+ configurable: !0
970
+ }), Object.defineProperty(e, "cssClasses", {
971
+ get: function() {
972
+ return q;
973
+ },
974
+ enumerable: !1,
975
+ configurable: !0
976
+ }), Object.defineProperty(e, "defaultAdapter", {
977
+ get: function() {
978
+ return {
979
+ announceMessage: function() {
980
+ },
981
+ focusChipPrimaryActionAtIndex: function() {
982
+ },
983
+ focusChipTrailingActionAtIndex: function() {
984
+ },
985
+ getChipListCount: function() {
986
+ return -1;
987
+ },
988
+ getIndexOfChipById: function() {
989
+ return -1;
990
+ },
991
+ hasClass: function() {
992
+ return !1;
993
+ },
994
+ isRTL: function() {
995
+ return !1;
996
+ },
997
+ removeChipAtIndex: function() {
998
+ },
999
+ removeFocusFromChipAtIndex: function() {
1000
+ },
1001
+ selectChipAtIndex: function() {
1002
+ }
1003
+ };
1004
+ },
1005
+ enumerable: !1,
1006
+ configurable: !0
1007
+ }), e.prototype.getSelectedChipIds = function() {
1008
+ return this.selectedChipIds_.slice();
1009
+ }, e.prototype.select = function(t) {
1010
+ this.select_(t, !1);
1011
+ }, e.prototype.handleChipInteraction = function(t) {
1012
+ var i = t.chipId, n = this.adapter.getIndexOfChipById(i);
1013
+ this.removeFocusFromChipsExcept_(n), (this.adapter.hasClass(q.CHOICE) || this.adapter.hasClass(q.FILTER)) && this.toggleSelect_(i);
1014
+ }, e.prototype.handleChipSelection = function(t) {
1015
+ var i = t.chipId, n = t.selected, r = t.shouldIgnore;
1016
+ if (!r) {
1017
+ var s = this.selectedChipIds_.indexOf(i) >= 0;
1018
+ n && !s ? this.select(i) : !n && s && this.deselect_(i);
1019
+ }
1020
+ }, e.prototype.handleChipRemoval = function(t) {
1021
+ var i = t.chipId, n = t.removedAnnouncement;
1022
+ n && this.adapter.announceMessage(n);
1023
+ var r = this.adapter.getIndexOfChipById(i);
1024
+ this.deselectAndNotifyClients_(i), this.adapter.removeChipAtIndex(r);
1025
+ var s = this.adapter.getChipListCount() - 1;
1026
+ if (!(s < 0)) {
1027
+ var d = Math.min(r, s);
1028
+ this.removeFocusFromChipsExcept_(d), this.adapter.focusChipTrailingActionAtIndex(d);
1029
+ }
1030
+ }, e.prototype.handleChipNavigation = function(t) {
1031
+ var i = t.chipId, n = t.key, r = t.source, s = this.adapter.getChipListCount() - 1, d = this.adapter.getIndexOfChipById(i);
1032
+ if (!(d === -1 || !m.has(n))) {
1033
+ var E = this.adapter.isRTL(), _ = n === a.ARROW_LEFT_KEY || n === a.IE_ARROW_LEFT_KEY, g = n === a.ARROW_RIGHT_KEY || n === a.IE_ARROW_RIGHT_KEY, S = n === a.ARROW_DOWN_KEY || n === a.IE_ARROW_DOWN_KEY, k = !E && g || E && _ || S, R = n === a.HOME_KEY, b = n === a.END_KEY;
1034
+ k ? d++ : R ? d = 0 : b ? d = s : d--, !(d < 0 || d > s) && (this.removeFocusFromChipsExcept_(d), this.focusChipAction_(d, n, r));
1035
+ }
1036
+ }, e.prototype.focusChipAction_ = function(t, i, n) {
1037
+ var r = P.has(i);
1038
+ if (r && n === O.PRIMARY)
1039
+ return this.adapter.focusChipPrimaryActionAtIndex(t);
1040
+ if (r && n === O.TRAILING)
1041
+ return this.adapter.focusChipTrailingActionAtIndex(t);
1042
+ var s = this.getDirection_(i);
1043
+ if (s === T.LEFT)
1044
+ return this.adapter.focusChipTrailingActionAtIndex(t);
1045
+ if (s === T.RIGHT)
1046
+ return this.adapter.focusChipPrimaryActionAtIndex(t);
1047
+ }, e.prototype.getDirection_ = function(t) {
1048
+ var i = this.adapter.isRTL(), n = t === a.ARROW_LEFT_KEY || t === a.IE_ARROW_LEFT_KEY, r = t === a.ARROW_RIGHT_KEY || t === a.IE_ARROW_RIGHT_KEY;
1049
+ return !i && n || i && r ? T.LEFT : T.RIGHT;
1050
+ }, e.prototype.deselect_ = function(t, i) {
1051
+ i === void 0 && (i = !1);
1052
+ var n = this.selectedChipIds_.indexOf(t);
1053
+ if (n >= 0) {
1054
+ this.selectedChipIds_.splice(n, 1);
1055
+ var r = this.adapter.getIndexOfChipById(t);
1056
+ this.adapter.selectChipAtIndex(
1057
+ r,
1058
+ /** isSelected */
1059
+ !1,
1060
+ i
1061
+ );
1062
+ }
1063
+ }, e.prototype.deselectAndNotifyClients_ = function(t) {
1064
+ this.deselect_(t, !0);
1065
+ }, e.prototype.toggleSelect_ = function(t) {
1066
+ this.selectedChipIds_.indexOf(t) >= 0 ? this.deselectAndNotifyClients_(t) : this.selectAndNotifyClients_(t);
1067
+ }, e.prototype.removeFocusFromChipsExcept_ = function(t) {
1068
+ for (var i = this.adapter.getChipListCount(), n = 0; n < i; n++)
1069
+ n !== t && this.adapter.removeFocusFromChipAtIndex(n);
1070
+ }, e.prototype.selectAndNotifyClients_ = function(t) {
1071
+ this.select_(t, !0);
1072
+ }, e.prototype.select_ = function(t, i) {
1073
+ if (!(this.selectedChipIds_.indexOf(t) >= 0)) {
1074
+ if (this.adapter.hasClass(q.CHOICE) && this.selectedChipIds_.length > 0) {
1075
+ var n = this.selectedChipIds_[0], r = this.adapter.getIndexOfChipById(n);
1076
+ this.selectedChipIds_ = [], this.adapter.selectChipAtIndex(
1077
+ r,
1078
+ /** isSelected */
1079
+ !1,
1080
+ i
1081
+ );
1082
+ }
1083
+ this.selectedChipIds_.push(t);
1084
+ var s = this.adapter.getIndexOfChipById(t);
1085
+ this.adapter.selectChipAtIndex(
1086
+ s,
1087
+ /** isSelected */
1088
+ !0,
1089
+ i
1090
+ );
1091
+ }
1092
+ }, e;
1093
+ }(_t)
1094
+ );
1095
+ /**
1096
+ * @license
1097
+ * Copyright 2016 Google Inc.
1098
+ *
1099
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1100
+ * of this software and associated documentation files (the "Software"), to deal
1101
+ * in the Software without restriction, including without limitation the rights
1102
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1103
+ * copies of the Software, and to permit persons to whom the Software is
1104
+ * furnished to do so, subject to the following conditions:
1105
+ *
1106
+ * The above copyright notice and this permission notice shall be included in
1107
+ * all copies or substantial portions of the Software.
1108
+ *
1109
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1110
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1111
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1112
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1113
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1114
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1115
+ * THE SOFTWARE.
1116
+ */
1117
+ var it = Ct.strings, bt = it.INTERACTION_EVENT, Dt = it.SELECTION_EVENT, Lt = it.REMOVAL_EVENT, Ft = it.NAVIGATION_EVENT, ue = It.strings.CHIP_SELECTOR, Pt = 0, he = (
1118
+ /** @class */
1119
+ function(o) {
1120
+ U(e, o);
1121
+ function e() {
1122
+ return o !== null && o.apply(this, arguments) || this;
1123
+ }
1124
+ return e.attachTo = function(t) {
1125
+ return new e(t);
1126
+ }, Object.defineProperty(e.prototype, "chips", {
1127
+ get: function() {
1128
+ return this.chips_.slice();
1129
+ },
1130
+ enumerable: !1,
1131
+ configurable: !0
1132
+ }), Object.defineProperty(e.prototype, "selectedChipIds", {
1133
+ /**
1134
+ * @return An array of the IDs of all selected chips.
1135
+ */
1136
+ get: function() {
1137
+ return this.foundation.getSelectedChipIds();
1138
+ },
1139
+ enumerable: !1,
1140
+ configurable: !0
1141
+ }), e.prototype.initialize = function(t) {
1142
+ t === void 0 && (t = function(i) {
1143
+ return new wt(i);
1144
+ }), this.chipFactory_ = t, this.chips_ = this.instantiateChips_(this.chipFactory_);
1145
+ }, e.prototype.initialSyncWithDOM = function() {
1146
+ var t = this;
1147
+ this.chips_.forEach(function(i) {
1148
+ i.id && i.selected && t.foundation.select(i.id);
1149
+ }), this.handleChipInteraction_ = function(i) {
1150
+ return t.foundation.handleChipInteraction(i.detail);
1151
+ }, this.handleChipSelection_ = function(i) {
1152
+ return t.foundation.handleChipSelection(i.detail);
1153
+ }, this.handleChipRemoval_ = function(i) {
1154
+ return t.foundation.handleChipRemoval(i.detail);
1155
+ }, this.handleChipNavigation_ = function(i) {
1156
+ return t.foundation.handleChipNavigation(i.detail);
1157
+ }, this.listen(bt, this.handleChipInteraction_), this.listen(Dt, this.handleChipSelection_), this.listen(Lt, this.handleChipRemoval_), this.listen(Ft, this.handleChipNavigation_);
1158
+ }, e.prototype.destroy = function() {
1159
+ this.chips_.forEach(function(t) {
1160
+ t.destroy();
1161
+ }), this.unlisten(bt, this.handleChipInteraction_), this.unlisten(Dt, this.handleChipSelection_), this.unlisten(Lt, this.handleChipRemoval_), this.unlisten(Ft, this.handleChipNavigation_), o.prototype.destroy.call(this);
1162
+ }, e.prototype.addChip = function(t) {
1163
+ t.id = t.id || "mdc-chip-" + ++Pt, this.chips_.push(this.chipFactory_(t));
1164
+ }, e.prototype.getDefaultFoundation = function() {
1165
+ var t = this, i = {
1166
+ announceMessage: function(n) {
1167
+ le(n);
1168
+ },
1169
+ focusChipPrimaryActionAtIndex: function(n) {
1170
+ t.chips_[n].focusPrimaryAction();
1171
+ },
1172
+ focusChipTrailingActionAtIndex: function(n) {
1173
+ t.chips_[n].focusTrailingAction();
1174
+ },
1175
+ getChipListCount: function() {
1176
+ return t.chips_.length;
1177
+ },
1178
+ getIndexOfChipById: function(n) {
1179
+ return t.findChipIndex_(n);
1180
+ },
1181
+ hasClass: function(n) {
1182
+ return t.root.classList.contains(n);
1183
+ },
1184
+ isRTL: function() {
1185
+ return window.getComputedStyle(t.root).getPropertyValue("direction") === "rtl";
1186
+ },
1187
+ removeChipAtIndex: function(n) {
1188
+ n >= 0 && n < t.chips_.length && (t.chips_[n].destroy(), t.chips_[n].remove(), t.chips_.splice(n, 1));
1189
+ },
1190
+ removeFocusFromChipAtIndex: function(n) {
1191
+ t.chips_[n].removeFocus();
1192
+ },
1193
+ selectChipAtIndex: function(n, r, s) {
1194
+ n >= 0 && n < t.chips_.length && t.chips_[n].setSelectedFromChipSet(r, s);
1195
+ }
1196
+ };
1197
+ return new It(i);
1198
+ }, e.prototype.instantiateChips_ = function(t) {
1199
+ var i = [].slice.call(this.root.querySelectorAll(ue));
1200
+ return i.map(function(n) {
1201
+ return n.id = n.id || "mdc-chip-" + ++Pt, t(n);
1202
+ });
1203
+ }, e.prototype.findChipIndex_ = function(t) {
1204
+ for (var i = 0; i < this.chips_.length; i++)
1205
+ if (this.chips_[i].id === t)
1206
+ return i;
1207
+ return -1;
1208
+ }, e;
1209
+ }(Et)
1210
+ );
1211
+ /**
1212
+ * @license
1213
+ * Copyright 2019 Google Inc.
1214
+ *
1215
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1216
+ * of this software and associated documentation files (the "Software"), to deal
1217
+ * in the Software without restriction, including without limitation the rights
1218
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1219
+ * copies of the Software, and to permit persons to whom the Software is
1220
+ * furnished to do so, subject to the following conditions:
1221
+ *
1222
+ * The above copyright notice and this permission notice shall be included in
1223
+ * all copies or substantial portions of the Software.
1224
+ *
1225
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1226
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1227
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1228
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1229
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1230
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1231
+ * THE SOFTWARE.
1232
+ */
1233
+ const pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1234
+ __proto__: null,
1235
+ MDCChip: wt,
1236
+ MDCChipFoundation: Ct,
1237
+ MDCChipSet: he,
1238
+ MDCChipSetFoundation: It,
1239
+ MDCChipTrailingAction: xt,
1240
+ MDCChipTrailingActionFoundation: Yt,
1241
+ chipCssClasses: f,
1242
+ chipSetCssClasses: q,
1243
+ chipSetStrings: Ht,
1244
+ chipStrings: a,
1245
+ trailingActionStrings: y
1246
+ }, Symbol.toStringTag, { value: "Module" }));
1247
+ var fe = oe();
1248
+ const _e = /* @__PURE__ */ ne(fe), Ee = {
1249
+ /**
1250
+ * The property on each chip that represents the id. If one is not provided material will generate an automatic ID.
1251
+ *
1252
+ * Defaults to **empty string**.
1253
+ */
1254
+ chipIdField: l.string,
1255
+ /**
1256
+ * The property on each chip that is used as a unique key.
1257
+ *
1258
+ * Defaults to **'id'**.
1259
+ */
1260
+ chipKeyField: l.string,
1261
+ /**
1262
+ * The property for the label on each chip. The `labelRenderer` overrides the rendering of the label field
1263
+ *
1264
+ * Defaults to **'label'**.
1265
+ */
1266
+ chipLabelField: l.string,
1267
+ /**
1268
+ * Array of chips to manager and render.
1269
+ *
1270
+ * Defaults to **[]**.
1271
+ */
1272
+ chips: l.array.isRequired,
1273
+ /**
1274
+ * Prevent the user from interacting with the chips.
1275
+ *
1276
+ * Defaults to **false**.
1277
+ */
1278
+ disabled: l.bool,
1279
+ /**
1280
+ * Allows chips to be dynamically added and removed upon trailing icon interaction.
1281
+ *
1282
+ * Defaults to **false**.
1283
+ */
1284
+ input: l.bool,
1285
+ /**
1286
+ * Returns the label to be rendered on each chip. Receives the chipData.
1287
+ *
1288
+ * Defaults to **null**.
1289
+ */
1290
+ labelRenderer: l.oneOfType([l.node, l.func]),
1291
+ /**
1292
+ * Leading icon render function. `chip` and `iconProps` is passed into the params. `iconProps` contains all the props for the icon component. If unused, a material icon rendering the `leadingIconField` of each chip is used
1293
+ *
1294
+ * Defaults to **null**.
1295
+ */
1296
+ leadingIcon: l.func,
1297
+ /**
1298
+ * Leading icon property name for each chip. The leading icon property can either be a string corresponding to an icon, or an object containing all the properties for the icon component.
1299
+ *
1300
+ * Defaults to **'leadingIcon'**.
1301
+ */
1302
+ leadingIconField: l.string,
1303
+ /**
1304
+ * Fired when the chip is interacted with (via click/tap or Enter key).
1305
+ *
1306
+ * Defaults to **null**.
1307
+ */
1308
+ onInteraction: l.func,
1309
+ /**
1310
+ * Fired when a chip is removed.
1311
+ *
1312
+ * Defaults to **null**.
1313
+ */
1314
+ onRemoval: l.func,
1315
+ /**
1316
+ * Fired when the chips are removed (*input chips* only).
1317
+ *
1318
+ * Defaults to **null**.
1319
+ */
1320
+ onUpdateChips: l.func,
1321
+ /**
1322
+ * Fired when the selected chips are updated (choice and filter chips only).
1323
+ *
1324
+ * Defaults to **null**.
1325
+ */
1326
+ onUpdateSelectedChips: l.func,
1327
+ /**
1328
+ * Prevents choice chips from being deselected upon interaction.
1329
+ *
1330
+ * Defaults to **false**.
1331
+ */
1332
+ preventChoiceDeselection: l.bool,
1333
+ /**
1334
+ * Chips do not break on a newline. The user must scroll horizontally if there is any overflow.
1335
+ *
1336
+ * Defaults to **false**.
1337
+ */
1338
+ scrollable: l.bool,
1339
+ /**
1340
+ * Array of currently selected chips.
1341
+ *
1342
+ * Defaults to **[]**.
1343
+ */
1344
+ selectedChips: l.array,
1345
+ /**
1346
+ * Filter enables selection of multiple chips and will add a check mark to selected chips. Choice allows only one selected chip.
1347
+ *
1348
+ * Defaults to **'default'**.
1349
+ */
1350
+ selectionType: l.oneOf(["default", "choice", "filter"]),
1351
+ /**
1352
+ * Trailing icon render function. `chip` and `iconProps` is passed into the params. `iconProps` contains all the props for the icon component. If unused, a material icon rendering the `trailingIconField` of each chip is used
1353
+ *
1354
+ * Defaults to **null**.
1355
+ */
1356
+ trailingIcon: l.func,
1357
+ /**
1358
+ * Trailing icon property name for each chip. The trailing icon property can either be a string corresponding to an icon, or an object containing all the properties for the icon component.
1359
+ *
1360
+ * Defaults to **'trailingIcon'**.
1361
+ */
1362
+ trailingIconField: l.string,
1363
+ /**
1364
+ * Shows chips as `filled` or `outlined`.
1365
+ *
1366
+ * Defaults to **'filled'**.
1367
+ */
1368
+ variant: l.oneOf(["filled", "outlined"])
1369
+ }, Ce = {
1370
+ chipIdField: "",
1371
+ chipKeyField: "id",
1372
+ chipLabelField: "label",
1373
+ chips: [],
1374
+ disabled: !1,
1375
+ input: !1,
1376
+ labelRenderer: null,
1377
+ leadingIcon: null,
1378
+ leadingIconField: "leadingIcon",
1379
+ preventChoiceDeselection: !1,
1380
+ scrollable: !1,
1381
+ selectedChips: [],
1382
+ selectionType: "default",
1383
+ trailingIcon: null,
1384
+ trailingIconField: "trailingIcon",
1385
+ variant: "filled"
1386
+ }, Ie = {
1387
+ /**
1388
+ * Chip data to be rendered. If no `label` is passed in, `chipData` will be used. If using an object, use the `chipLabelField` to set property to be rendered as the label. You may also set `leadingIconField` and `trailingIconField`, as well as labelRenderer for additional control.
1389
+ *
1390
+ * Defaults to **null**.
1391
+ */
1392
+ chipData: l.any.isRequired,
1393
+ /**
1394
+ * The property on the chip that represents the id. If one is not provided material will generate an automatic ID.
1395
+ *
1396
+ * Defaults to **empty string**.
1397
+ */
1398
+ chipIdField: l.string,
1399
+ /**
1400
+ * The property on the chip that is the label. The default slot overrides the rendering of the label.
1401
+ *
1402
+ * Defaults to **empty string**.
1403
+ */
1404
+ chipLabelField: l.string.isRequired,
1405
+ /**
1406
+ * Prevent the user from interacting with the chip.
1407
+ *
1408
+ * Defaults to **false**.
1409
+ */
1410
+ disabled: l.bool,
1411
+ /**
1412
+ * Custom id.
1413
+ *
1414
+ * Defaults to **undefined**.
1415
+ */
1416
+ id: l.string,
1417
+ /**
1418
+ * If the chip is selected on mount.
1419
+ *
1420
+ * Defaults to **null**.
1421
+ */
1422
+ initiallySelected: l.bool.isRequired,
1423
+ /**
1424
+ * Allows chip to be dynamically added and removed upon trailing icon interaction.
1425
+ *
1426
+ * Defaults to **null**.
1427
+ */
1428
+ input: l.bool.isRequired,
1429
+ /**
1430
+ * The label to be rendered on each chip. Optionally `chipData` and `chipLabelField` may be used instead of `label`.
1431
+ *
1432
+ * Defaults to **null**.
1433
+ */
1434
+ label: l.node,
1435
+ /**
1436
+ * Returns the label to be rendered on each chip. Receives the chipData.
1437
+ *
1438
+ * Defaults to **null**.
1439
+ */
1440
+ labelRenderer: l.oneOfType([l.node, l.func]),
1441
+ /**
1442
+ * Slot for leading icon. `chip` and `iconProps` is passed into the slots params. `iconProps` contains all the props for the icon component. If there is no leading icon, a material icon rendering the `leadingIconPropName` of each chip is used.
1443
+ *
1444
+ * Defaults to **null**.
1445
+ */
1446
+ leadingIcon: l.func,
1447
+ /**
1448
+ * Leading icon property name for the chip. The leading icon property can either be a string corresponding to an icon, or an object containing all the properties for the icon component.
1449
+ *
1450
+ * Defaults to **empty string**.
1451
+ */
1452
+ leadingIconField: l.string.isRequired,
1453
+ /**
1454
+ * Called when chip is clicked.
1455
+ *
1456
+ * Defaults to **null**.
1457
+ */
1458
+ onClick: l.func,
1459
+ /**
1460
+ * Fired when the chip is destroyed.
1461
+ *
1462
+ * Defaults to **null**.
1463
+ */
1464
+ onDestroy: l.func,
1465
+ /**
1466
+ * Called when Enter is pressed.
1467
+ *
1468
+ * Defaults to **null**.
1469
+ */
1470
+ onEnter: l.func,
1471
+ /**
1472
+ * Fired when the chip is mounted.
1473
+ *
1474
+ * Defaults to **null**.
1475
+ */
1476
+ onMounted: l.func,
1477
+ /**
1478
+ * The type`filter` enables selection of multiple chips and will add a check mark to selected chips. The type`choice` allows only one selected chip.
1479
+ *
1480
+ * Defaults to **'default'**.
1481
+ */
1482
+ selectionType: l.oneOf(["default", "choice", "filter"]),
1483
+ /**
1484
+ * Slot for trailing icon. `chip` and `iconProps` is passed into the slots params. `iconProps` contains all the props for the icon component. If there is no trailing icon, a material icon rendering the `trailingIconPropName` of each chip is used.
1485
+ *
1486
+ * Defaults to **null**.
1487
+ */
1488
+ trailingIcon: l.func,
1489
+ /**
1490
+ * Trailing icon property name for the chip. The trailing icon property can either be a string corresponding to an icon, or an object containing all the properties for the icon component.
1491
+ *
1492
+ * Defaults to **empty string**.
1493
+ */
1494
+ trailingIconField: l.string.isRequired,
1495
+ /**
1496
+ * Applies the selected style.
1497
+ *
1498
+ * Defaults to **'filled'**.
1499
+ */
1500
+ variant: l.oneOf(["filled", "outlined"]).isRequired
1501
+ }, ge = {
1502
+ chipData: null,
1503
+ chipIdField: "",
1504
+ chipLabelField: "",
1505
+ disabled: !1,
1506
+ id: void 0,
1507
+ initiallySelected: null,
1508
+ input: null,
1509
+ label: null,
1510
+ labelRenderer: null,
1511
+ leadingIcon: null,
1512
+ leadingIconField: "",
1513
+ selectionType: "default",
1514
+ trailingIcon: null,
1515
+ trailingIconField: "",
1516
+ variant: "filled"
1517
+ }, Bt = (o, e) => {
1518
+ var t;
1519
+ const i = o == null || (t = o.chipData) === null || t === void 0 ? void 0 : t[e];
1520
+ if (i) {
1521
+ if (typeof i == "string")
1522
+ return {
1523
+ icon: i
1524
+ };
1525
+ if (typeof i == "object")
1526
+ return i;
1527
+ Zt(`${e} chip field must be of type string or object`);
1528
+ }
1529
+ return {};
1530
+ }, me = (o) => {
1531
+ const e = Bt(o, o.leadingIconField), t = o.initiallySelected ? "mdc-chip__icon--leading-hidden" : "";
1532
+ return {
1533
+ chip: o.chipData,
1534
+ iconProps: {
1535
+ ...e,
1536
+ className: `mdc-chip__icon mdc-chip__icon--leading ${t}`,
1537
+ tabIndex: "-1",
1538
+ role: "gridcell"
1539
+ }
1540
+ };
1541
+ }, ye = (o) => {
1542
+ const {
1543
+ icon: e,
1544
+ ...t
1545
+ } = Bt(o, o.trailingIconField);
1546
+ return {
1547
+ chip: o.chipData,
1548
+ iconProps: {
1549
+ ...t,
1550
+ icon: e || "cancel",
1551
+ className: "mdc-chip__icon mdc-chip__icon--trailing mdc-chip-trailing-action",
1552
+ role: "button",
1553
+ tabIndex: "0"
1554
+ }
1555
+ };
1556
+ }, Ae = /* @__PURE__ */ C.createElement("span", {
1557
+ className: "mdc-chip__checkmark"
1558
+ }, /* @__PURE__ */ C.createElement("svg", {
1559
+ className: "mdc-chip__checkmark-svg",
1560
+ viewBox: "-2 -3 30 30"
1561
+ }, /* @__PURE__ */ C.createElement("path", {
1562
+ className: "mdc-chip__checkmark-path",
1563
+ fill: "none",
1564
+ stroke: "black",
1565
+ d: "M1.73,12.91 8.1,19.28 22.79,4.59"
1566
+ }))), nt = /* @__PURE__ */ Xt((o, e) => {
1567
+ const {
1568
+ chipData: t,
1569
+ chipIdField: i,
1570
+ chipLabelField: n,
1571
+ disabled: r,
1572
+ id: s,
1573
+ initiallySelected: d,
1574
+ input: E,
1575
+ label: _,
1576
+ labelRenderer: g,
1577
+ leadingIcon: S,
1578
+ leadingIconField: k,
1579
+ onDestroy: R,
1580
+ onMounted: b,
1581
+ selectionType: X,
1582
+ trailingIcon: Y,
1583
+ trailingIconField: N,
1584
+ variant: z,
1585
+ onClick: x,
1586
+ onEnter: w,
1587
+ ...j
1588
+ } = o, [rt] = $(() => {
1589
+ var u;
1590
+ return s || i && (t == null || (u = t[i]) === null || u === void 0 ? void 0 : u.toString()) || Qt();
1591
+ }), K = Mt();
1592
+ zt(e, () => K.current, []), ft(() => (b?.(t, K.current), () => {
1593
+ R?.(t);
1594
+ }), []);
1595
+ let H, B;
1596
+ const V = me(o);
1597
+ if (S ? B = S(V) : V.iconProps.icon && (B = /* @__PURE__ */ C.createElement(Rt, V.iconProps)), E) {
1598
+ const u = ye(o);
1599
+ Y ? H = Y(u) : H = /* @__PURE__ */ C.createElement(Rt, u.iconProps);
1600
+ }
1601
+ const D = () => _ || (g ? g({
1602
+ chip: t
1603
+ }) : _e(t) ? t[n] : t), at = ut("lmnt", "mdc-chip", "mdc-chip--touch", d && "mdc-chip--selected", z === "outlined" && "mdc-chip--outline", r && "lmnt-chip--disabled"), h = (u) => {
1604
+ r || x?.(u);
1605
+ }, st = (u) => {
1606
+ u.key === "Enter" && w?.(u);
1607
+ };
1608
+ return /* @__PURE__ */ C.createElement("div", Kt({
1609
+ ref: K,
1610
+ className: at,
1611
+ id: rt,
1612
+ role: "row",
1613
+ onClick: h,
1614
+ tabIndex: 0,
1615
+ onKeyUp: st
1616
+ }, j), /* @__PURE__ */ C.createElement("div", {
1617
+ className: "lmnt mdc-chip__ripple"
1618
+ }), B, X === "filter" && Ae, /* @__PURE__ */ C.createElement("span", {
1619
+ role: "gridcell"
1620
+ }, /* @__PURE__ */ C.createElement("span", {
1621
+ role: "checkbox",
1622
+ "aria-checked": "false",
1623
+ tabIndex: "0",
1624
+ className: "mdc-chip__primary-action"
1625
+ }, /* @__PURE__ */ C.createElement("span", {
1626
+ className: "mdc-chip__text"
1627
+ }, D()))), H);
1628
+ });
1629
+ nt.displayName = "Chip";
1630
+ nt.propTypes = Ie;
1631
+ nt.defaultProps = ge;
1632
+ var ve = /* @__PURE__ */ C.memo(nt);
1633
+ const {
1634
+ MDCChipSet: Te
1635
+ } = {
1636
+ ...pe
1637
+ }, Re = (o) => {
1638
+ const e = Te.attachTo(o);
1639
+ return e.foundation.adapter.removeChipAtIndex = (t) => {
1640
+ t >= 0 && t < e.chips_.length && (e.chips_[t].destroy(), e.chips_.splice(t, 1));
1641
+ }, e;
1642
+ }, ot = (o) => {
1643
+ let {
1644
+ children: e,
1645
+ chipIdField: t,
1646
+ chipKeyField: i,
1647
+ chipLabelField: n,
1648
+ chips: r,
1649
+ input: s,
1650
+ labelRenderer: d,
1651
+ leadingIcon: E,
1652
+ leadingIconField: _,
1653
+ onInteraction: g,
1654
+ onRemoval: S,
1655
+ onUpdateChips: k,
1656
+ onUpdateSelectedChips: R,
1657
+ preventChoiceDeselection: b,
1658
+ scrollable: X,
1659
+ selectedChips: Y,
1660
+ selectionType: N,
1661
+ trailingIcon: z,
1662
+ trailingIconField: x,
1663
+ variant: w,
1664
+ disabled: j,
1665
+ ...rt
1666
+ } = o;
1667
+ const K = Mt(!1), [H, {
1668
+ remove: B,
1669
+ set: V
1670
+ }] = se(), [D, at] = $(null), [h, st] = $(null), u = I((c) => c[i] || c, [i]), [gt] = $(() => new Set(Y.map((c) => u(c)))), mt = ht(() => new Set(Y.map((c) => u(c))), [u, Y]);
1671
+ Jt(() => {
1672
+ K.current = !1;
1673
+ const c = D ? Re(D) : null;
1674
+ return st(c), () => {
1675
+ c && (K.current = !0, c.destroy());
1676
+ };
1677
+ }, [D]);
1678
+ const v = I((c) => H[u(c)], [H, u]), J = I((c) => r.find((p) => v(p) === c), [r, v]), Q = I((c) => h?.chips.find((p) => p.id === c), [h]), yt = I((c) => mt.has(u(c)), [u, mt]), At = I((c) => !!gt.has(u(c)), [u, gt]), vt = I((c, p) => {
1679
+ V(u(c), p.id), h?.addChip(p);
1680
+ }, [V, u, h]), Z = I(() => {
1681
+ if (R) {
1682
+ const c = new Set(h?.selectedChipIds);
1683
+ R(r.filter((p) => c.has(v(p))));
1684
+ }
1685
+ }, [h, R, r, v]), ct = I(() => {
1686
+ N !== "choice" && Z();
1687
+ }, [N, Z]), tt = I((c) => {
1688
+ if (!s)
1689
+ return;
1690
+ const p = new Set(h?.chips.map((M) => M.id)), W = r.filter((M) => p.has(v(M)));
1691
+ k && k(W), S && S(c);
1692
+ }, [r, v, s, h, S, k]), Vt = I((c) => {
1693
+ tt(J(c.detail.chipId));
1694
+ }, [J, tt]), Wt = I((c) => {
1695
+ if (g) {
1696
+ const p = J(c.detail.chipId);
1697
+ g(p);
1698
+ }
1699
+ if (N === "choice") {
1700
+ if (b) {
1701
+ const p = Q(c.detail.chipId);
1702
+ if (!p.selected) {
1703
+ p.selected = !0;
1704
+ return;
1705
+ }
1706
+ }
1707
+ Z();
1708
+ }
1709
+ }, [Z, J, Q, g, b, N]), Tt = I((c) => {
1710
+ if (K.current)
1711
+ return;
1712
+ const p = v(c), W = u(c);
1713
+ B(W), Q(p) && (h.foundation.handleChipRemoval({
1714
+ chipId: p
1715
+ }), ct(), tt(c));
1716
+ }, [v, u, Q, h, tt, ct, B]);
1717
+ ft(() => {
1718
+ const c = new Map(h?.chips.map((p) => [p.id, p]));
1719
+ for (const p of r) {
1720
+ const W = yt(p), M = c.get(v(p));
1721
+ M && W !== M.selected && (M.selected = W);
1722
+ }
1723
+ }, [r, v, yt, h]), dt("MDCChip:removal", Vt, D), dt("MDCChip:selection", ct, D), dt("MDCChip:interaction", Wt, D);
1724
+ const Gt = ht(() => r.map((c) => /* @__PURE__ */ C.createElement(ve, {
1725
+ key: u(c),
1726
+ chipData: c,
1727
+ chipIdField: t,
1728
+ chipLabelField: n,
1729
+ initiallySelected: At(c),
1730
+ input: s,
1731
+ label: c[n],
1732
+ labelRenderer: d,
1733
+ leadingIcon: E,
1734
+ leadingIconField: _,
1735
+ onDestroy: Tt,
1736
+ onMounted: vt,
1737
+ selectionType: N,
1738
+ trailingIcon: z,
1739
+ trailingIconField: x,
1740
+ variant: w,
1741
+ disabled: j || c.disabled
1742
+ })), [t, n, r, j, u, s, At, d, E, _, Tt, vt, N, z, x, w]);
1743
+ return /* @__PURE__ */ C.createElement("div", Kt({
1744
+ className: ut("lmnt", X && "mdc-chip-set-scrollable-wrapper")
1745
+ }, rt), /* @__PURE__ */ C.createElement("div", {
1746
+ ref: at,
1747
+ role: "grid",
1748
+ className: ut("lmnt", "mdc-chip-set", N === "choice" && "mdc-chip-set--choice", N === "filter" && "mdc-chip-set--filter", s && "mdc-chip-set--input", X && "mdc-chip-set--input-scroll", j && "lmnt-chips--disabled")
1749
+ }, Gt));
1750
+ };
1751
+ ot.displayName = "Chips";
1752
+ ot.propTypes = Ee;
1753
+ ot.defaultProps = Ce;
1754
+ var Ne = /* @__PURE__ */ C.memo(ot);
1755
+ const Oe = "_entityContainer_1g0x2_1", Se = {
1756
+ entityContainer: Oe
1757
+ }, Ve = ({ label: o, icon: e, className: t = "" }) => /* @__PURE__ */ lt(
1758
+ $t,
9
1759
  {
10
1760
  "data-testid": "chip-card",
11
1761
  variant: "flat",
12
1762
  bodyAlignment: "centered",
13
1763
  themeColor: "primary-50",
14
- className: `${c.entityContainer} ${n}`,
15
- children: /* @__PURE__ */ i(a, { id: `chip_card_${t}`, text: t, children: /* @__PURE__ */ i(
16
- o,
1764
+ className: `${Se.entityContainer} ${t}`,
1765
+ children: /* @__PURE__ */ lt(re, { id: `chip_card_${o}`, text: o, children: /* @__PURE__ */ lt(
1766
+ Ne,
17
1767
  {
18
- "data-testid": `${t}-chip`,
1768
+ "data-testid": `${o}-chip`,
19
1769
  chips: [
20
1770
  {
21
- label: t,
22
- leadingIcon: r
1771
+ label: o,
1772
+ leadingIcon: e
23
1773
  }
24
1774
  ],
25
1775
  variant: "outlined"
@@ -28,5 +1778,5 @@ const d = "_entityContainer_1g0x2_1", c = {
28
1778
  }
29
1779
  );
30
1780
  export {
31
- C as ChipCard
1781
+ Ve as ChipCard
32
1782
  };