@eightshift/ui-components 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/{Button-VbCAu4hd.js → Button-Xa6Ny0p_.js} +7 -7
  2. package/dist/{Color-BpLubxWI.js → Color-VsesNqCf.js} +5 -17
  3. package/dist/{ColorSwatch-CinC14s3.js → ColorSwatch-xOFAZO_h.js} +4 -4
  4. package/dist/ComboBox-CP_SqnqT.js +1886 -0
  5. package/dist/Dialog-jcIYer1n.js +2177 -0
  6. package/dist/{FieldError-BttM1Nxd.js → FieldError-BPe3YgNH.js} +2 -2
  7. package/dist/{FocusScope-CtCX0OGo.js → FocusScope-uV-xoRHT.js} +8 -9
  8. package/dist/{Group-XzWUooix.js → Group-Bvmb49y7.js} +5 -5
  9. package/dist/{Heading-DZelepHV.js → Heading-Bfhyr4ZC.js} +1 -1
  10. package/dist/{Hidden-CcFqOzrp.js → Hidden-7ZhNuLM9.js} +2 -2
  11. package/dist/{Input-CV1qVS6t.js → Input-C2dTSp9z.js} +10 -10
  12. package/dist/{Label-BwqMVkuV.js → Label-DqNX_sAU.js} +2 -2
  13. package/dist/{List-Bx2anbX-.js → List-C7L49CxW.js} +1 -1
  14. package/dist/{ListBox-DuZPdnkk.js → ListBox-B9r1QoSm.js} +19 -18
  15. package/dist/{NumberFormatter-U_Gx0UDq.js → NumberFormatter-DA8u1Ot7.js} +4 -6
  16. package/dist/OverlayArrow-ClRhYjQu.js +567 -0
  17. package/dist/{Select-c7902d94.esm-DtzFQzf-.js → Select-aab027f3.esm-B8nEum75.js} +4 -4
  18. package/dist/{SelectionManager-x27KqnAT.js → SelectionManager-DP537Pbu.js} +177 -141
  19. package/dist/{Separator-BM58t3PP.js → Separator-Dmxzf3m_.js} +62 -52
  20. package/dist/{Slider-D9Cs6yKr.js → Slider-BgHBCyI7.js} +16 -14
  21. package/dist/{Text-BVIXT8qq.js → Text-DImhB4rT.js} +1 -1
  22. package/dist/{VisuallyHidden-WhC7vZaL.js → VisuallyHidden-wryJF4qQ.js} +2 -2
  23. package/dist/assets/style.css +1 -1
  24. package/dist/assets/wp-ui-enhancements.css +1 -1
  25. package/dist/components/animated-visibility/animated-visibility.js +141 -113
  26. package/dist/components/base-control/base-control.js +1 -1
  27. package/dist/components/button/button.js +10 -7
  28. package/dist/components/checkbox/checkbox.js +19 -11
  29. package/dist/components/color-pickers/color-picker.js +1 -1
  30. package/dist/components/color-pickers/color-swatch.js +3 -3
  31. package/dist/components/color-pickers/gradient-editor.js +2 -2
  32. package/dist/components/color-pickers/solid-color-picker.js +21 -21
  33. package/dist/components/component-toggle/component-toggle.js +1 -1
  34. package/dist/components/draggable/draggable-handle.js +2 -2
  35. package/dist/components/draggable/draggable.js +2 -2
  36. package/dist/components/draggable-list/draggable-list-item.js +2 -2
  37. package/dist/components/draggable-list/draggable-list.js +2 -2
  38. package/dist/components/expandable/expandable.js +3 -3
  39. package/dist/components/index.js +8 -4
  40. package/dist/components/input-field/input-field.js +7 -7
  41. package/dist/components/item-collection/item-collection.js +1 -1
  42. package/dist/components/link-input/link-input.js +10 -1872
  43. package/dist/components/list-box/list-box.js +2 -2
  44. package/dist/components/matrix-align/matrix-align.js +2 -2
  45. package/dist/components/menu/menu.js +7 -974
  46. package/dist/components/modal/modal.js +7 -7
  47. package/dist/components/number-picker/number-picker.js +10 -10
  48. package/dist/components/option-select/option-select.js +1 -1
  49. package/dist/components/options-panel/options-panel.js +1 -1
  50. package/dist/components/placeholders/file-placeholder.js +1 -1
  51. package/dist/components/popover/popover.js +2 -2
  52. package/dist/components/radio/radio.js +13 -13
  53. package/dist/components/repeater/repeater-item.js +1 -1
  54. package/dist/components/repeater/repeater.js +2 -2
  55. package/dist/components/responsive/mini-responsive.js +3 -3
  56. package/dist/components/responsive/responsive-legacy.js +2 -2
  57. package/dist/components/responsive/responsive.js +2 -2
  58. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  59. package/dist/components/select/async-multi-select.js +3 -3
  60. package/dist/components/select/async-single-select.js +2 -2
  61. package/dist/components/select/custom-select-default-components.js +1 -1
  62. package/dist/components/select/multi-select-components.js +1 -1
  63. package/dist/components/select/multi-select.js +3 -3
  64. package/dist/components/select/react-select-component-wrappers.js +1 -1
  65. package/dist/components/select/single-select.js +2 -2
  66. package/dist/components/select/v2/async-select.js +307 -0
  67. package/dist/components/select/v2/shared.js +24 -0
  68. package/dist/components/select/v2/single-select.js +993 -0
  69. package/dist/components/slider/column-config-slider.js +3 -3
  70. package/dist/components/slider/slider.js +3 -3
  71. package/dist/components/slider/utils.js +1 -1
  72. package/dist/components/tabs/tabs.js +16 -16
  73. package/dist/components/toggle/switch.js +6 -6
  74. package/dist/components/toggle/toggle.js +1 -1
  75. package/dist/components/toggle-button/toggle-button.js +55 -12
  76. package/dist/components/tooltip/tooltip.js +532 -8
  77. package/dist/{context-Cs-ZD1nu.js → context-BI3VdU0Z.js} +2 -2
  78. package/dist/{default-i18n-DRnM8y4w.js → default-i18n-CM1-Xvzf.js} +183 -176
  79. package/dist/{focusSafely-CgFLw4FA.js → focusSafely-Cl9cN7Qx.js} +14 -14
  80. package/dist/icons/icons.js +171 -1
  81. package/dist/icons/jsx-svg.js +16 -3
  82. package/dist/{index-a301f526.esm-BMg114iK.js → index-641ee5b8.esm-BclOH4xf.js} +165 -29
  83. package/dist/{index-BTCzc3zb.js → index-D0mHceYg.js} +81 -17
  84. package/dist/index.js +7 -3
  85. package/dist/{multi-select-components-DTvEidE3.js → multi-select-components-BGQBvx-z.js} +55 -44
  86. package/dist/{react-jsx-parser.min-B5HVwW_W.js → react-jsx-parser.min-CVit0rZn.js} +5620 -7409
  87. package/dist/{react-select-async.esm-CxA8wpeT.js → react-select-async.esm-B8kK0aL4.js} +3 -3
  88. package/dist/{react-select.esm-CeE7o5M9.js → react-select.esm-ucYwBxq5.js} +3 -3
  89. package/dist/{textSelection-CvK0YHTZ.js → textSelection-DDDNsS-g.js} +1 -1
  90. package/dist/{useButton-Cy9eEev7.js → useButton-CRKy9xk2.js} +4 -4
  91. package/dist/{useEvent-LZebwyrb.js → useEvent-D54lIBrO.js} +1 -1
  92. package/dist/{useFocusRing-BMOTWmOx.js → useFocusRing-DKxoCzVD.js} +1 -1
  93. package/dist/{useFocusable-ByyKSVQv.js → useFocusable-CPKTGWPn.js} +4 -4
  94. package/dist/{useFormReset-B8m1uz1J.js → useFormReset-CTp--h9B.js} +1 -1
  95. package/dist/{useFormValidationState-BjMhz_VI.js → useFormValidation-BNBrliSj.js} +92 -88
  96. package/dist/{useLabel-B6uO0wVK.js → useLabel-CzGdEzIq.js} +2 -2
  97. package/dist/{useLabels-5dFkeiXx.js → useLabels-eGSmZC_Z.js} +1 -1
  98. package/dist/{useListState-eKxv7HPC.js → useListState-D7mE1Y00.js} +1 -1
  99. package/dist/{useLocalizedStringFormatter-BaKmjFNp.js → useLocalizedStringFormatter-BBeUyA9l.js} +1 -1
  100. package/dist/{useNumberField-DMMUTZ-h.js → useNumberField-BmEJmL3K.js} +27 -20
  101. package/dist/{useNumberFormatter-Cyx5Dxkf.js → useNumberFormatter-CTY_UZxq.js} +2 -2
  102. package/dist/{usePress-D8nPoIQm.js → usePress-BG9At5Lb.js} +4 -4
  103. package/dist/{useSingleSelectListState-CABciySJ.js → useSingleSelectListState-DeJEr7lC.js} +2 -2
  104. package/dist/{useToggle-BmltE9Zr.js → useToggle-QlyoyPYv.js} +4 -4
  105. package/dist/{useToggleState-DZXLEnA_.js → useToggleState-C1mnFRiI.js} +1 -1
  106. package/dist/utilities/text-helpers.js +6 -0
  107. package/dist/{utils-BCJajCwh.js → utils-BSxcP7tv.js} +15 -14
  108. package/package.json +20 -20
  109. package/dist/Dialog-BN5EE7UH.js +0 -934
  110. package/dist/isScrollable-Dh9D9IOd.js +0 -9
  111. package/dist/tooltip-eKaARDoV.js +0 -1084
  112. package/dist/useMenuTrigger-4fwEmto8.js +0 -246
@@ -0,0 +1,1886 @@
1
+ import React__default, { useCallback, useMemo, useRef, useEffect, useState, useReducer, createContext, forwardRef } from "react";
2
+ import { b as $319e236875307eab$export$a9b970dcc4ae71a9, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-Xa6Ny0p_.js";
3
+ import { q as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a } from "./utils-BSxcP7tv.js";
4
+ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-BPe3YgNH.js";
5
+ import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
6
+ import { a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-Bvmb49y7.js";
7
+ import { b as $2d73ec29415bd339$export$712718f7aec83d5, a as $3985021b0ad6602f$export$37fb8590cf2c088c } from "./Input-C2dTSp9z.js";
8
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DqNX_sAU.js";
9
+ import { d as $b1f0cad8af73213b$export$3585ede4d035bf14, e as $b1f0cad8af73213b$export$9145995848b05025, b as $eed445e0843c11d0$export$7ff8f37d2d81a48d, c as $eed445e0843c11d0$export$7c5906fe4f1f2af2 } from "./ListBox-B9r1QoSm.js";
10
+ import { n as $168583247155ddda$export$dc9c12ed27dd1b49, j as $5e3802645cc19319$export$1c3ebcada18427bf, k as $de32f1b87079253c$export$d2f961adcb0afbe, o as $07b14b47974efb58$export$9b9a0cd73afb7ca4 } from "./Dialog-jcIYer1n.js";
11
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-DImhB4rT.js";
12
+ import { k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, l as $c5a24bc478652b5f$export$1005530eda016c13, f as $e1995378a142960e$export$bf788dd355e3a401 } from "./SelectionManager-DP537Pbu.js";
13
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
14
+ import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, d as $9daab02d461809db$export$683480f191c0e3ea } from "./OverlayArrow-ClRhYjQu.js";
15
+ import { d as $325a3faab7a68acd$export$a16aca283550c30d, e as $2a25aae57d74318e$export$a05409b8bb224a5a, c as $453cc9f0df89c0a5$export$77d5aafae4e095b2 } from "./Separator-Dmxzf3m_.js";
16
+ import { b as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "./useFormValidation-BNBrliSj.js";
17
+ import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "./useSingleSelectListState-DeJEr7lC.js";
18
+ import { a as $a02d57049d202695$export$d085fb9e920b5ca7 } from "./useListState-D7mE1Y00.js";
19
+ import { v as $c87311424ea30a05$export$e1865c3bedcd822b, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-Cl9cN7Qx.js";
20
+ import { b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572 } from "./usePress-BG9At5Lb.js";
21
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-eGSmZC_Z.js";
22
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BBeUyA9l.js";
23
+ function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
24
+ let collator = $325a3faab7a68acd$export$a16aca283550c30d({
25
+ usage: "search",
26
+ ...options
27
+ });
28
+ let startsWith = useCallback((string, substring) => {
29
+ if (substring.length === 0) return true;
30
+ string = string.normalize("NFC");
31
+ substring = substring.normalize("NFC");
32
+ return collator.compare(string.slice(0, substring.length), substring) === 0;
33
+ }, [
34
+ collator
35
+ ]);
36
+ let endsWith = useCallback((string, substring) => {
37
+ if (substring.length === 0) return true;
38
+ string = string.normalize("NFC");
39
+ substring = substring.normalize("NFC");
40
+ return collator.compare(string.slice(-substring.length), substring) === 0;
41
+ }, [
42
+ collator
43
+ ]);
44
+ let contains = useCallback((string, substring) => {
45
+ if (substring.length === 0) return true;
46
+ string = string.normalize("NFC");
47
+ substring = substring.normalize("NFC");
48
+ let scan = 0;
49
+ let sliceLen = substring.length;
50
+ for (; scan + sliceLen <= string.length; scan++) {
51
+ let slice = string.slice(scan, scan + sliceLen);
52
+ if (collator.compare(substring, slice) === 0) return true;
53
+ }
54
+ return false;
55
+ }, [
56
+ collator
57
+ ]);
58
+ return useMemo(() => ({
59
+ startsWith,
60
+ endsWith,
61
+ contains
62
+ }), [
63
+ startsWith,
64
+ endsWith,
65
+ contains
66
+ ]);
67
+ }
68
+ var $02cb4c75c506befe$exports = {};
69
+ $02cb4c75c506befe$exports = {
70
+ "buttonLabel": `عرض المقترحات`,
71
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
72
+ one: () => `${formatter.number(args.optionCount)} خيار`,
73
+ other: () => `${formatter.number(args.optionCount)} خيارات`
74
+ })} متاحة.`,
75
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
76
+ true: () => `المجموعة المدخلة ${args.groupTitle}, مع ${formatter.plural(args.groupCount, {
77
+ one: () => `${formatter.number(args.groupCount)} خيار`,
78
+ other: () => `${formatter.number(args.groupCount)} خيارات`
79
+ })}. `,
80
+ other: ``
81
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
82
+ true: `, محدد`,
83
+ other: ``
84
+ }, args.isSelected)}`,
85
+ "listboxLabel": `مقترحات`,
86
+ "selectedAnnouncement": (args) => `${args.optionText}، محدد`
87
+ };
88
+ var $568b8163f1e56faf$exports = {};
89
+ $568b8163f1e56faf$exports = {
90
+ "buttonLabel": `Покажи предложения`,
91
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
92
+ one: () => `${formatter.number(args.optionCount)} опция`,
93
+ other: () => `${formatter.number(args.optionCount)} опции`
94
+ })} на разположение.`,
95
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
96
+ true: () => `Въведена група ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
97
+ one: () => `${formatter.number(args.groupCount)} опция`,
98
+ other: () => `${formatter.number(args.groupCount)} опции`
99
+ })}. `,
100
+ other: ``
101
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
102
+ true: `, избрани`,
103
+ other: ``
104
+ }, args.isSelected)}`,
105
+ "listboxLabel": `Предложения`,
106
+ "selectedAnnouncement": (args) => `${args.optionText}, избрани`
107
+ };
108
+ var $87581c0202d106b8$exports = {};
109
+ $87581c0202d106b8$exports = {
110
+ "buttonLabel": `Zobrazit doporučení`,
111
+ "countAnnouncement": (args, formatter) => `K dispozici ${formatter.plural(args.optionCount, {
112
+ one: () => `je ${formatter.number(args.optionCount)} možnost`,
113
+ other: () => `jsou/je ${formatter.number(args.optionCount)} možnosti/-í`
114
+ })}.`,
115
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
116
+ true: () => `Zadaná skupina „${args.groupTitle}“ ${formatter.plural(args.groupCount, {
117
+ one: () => `s ${formatter.number(args.groupCount)} možností`,
118
+ other: () => `se ${formatter.number(args.groupCount)} možnostmi`
119
+ })}. `,
120
+ other: ``
121
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
122
+ true: ` (vybráno)`,
123
+ other: ``
124
+ }, args.isSelected)}`,
125
+ "listboxLabel": `Návrhy`,
126
+ "selectedAnnouncement": (args) => `${args.optionText}, vybráno`
127
+ };
128
+ var $a10a0369f5433ed1$exports = {};
129
+ $a10a0369f5433ed1$exports = {
130
+ "buttonLabel": `Vis forslag`,
131
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
132
+ one: () => `${formatter.number(args.optionCount)} mulighed tilgængelig`,
133
+ other: () => `${formatter.number(args.optionCount)} muligheder tilgængelige`
134
+ })}.`,
135
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
136
+ true: () => `Angivet gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
137
+ one: () => `${formatter.number(args.groupCount)} mulighed`,
138
+ other: () => `${formatter.number(args.groupCount)} muligheder`
139
+ })}. `,
140
+ other: ``
141
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
142
+ true: `, valgt`,
143
+ other: ``
144
+ }, args.isSelected)}`,
145
+ "listboxLabel": `Forslag`,
146
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
147
+ };
148
+ var $bfd288727d5cb166$exports = {};
149
+ $bfd288727d5cb166$exports = {
150
+ "buttonLabel": `Empfehlungen anzeigen`,
151
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
152
+ one: () => `${formatter.number(args.optionCount)} Option`,
153
+ other: () => `${formatter.number(args.optionCount)} Optionen`
154
+ })} verfügbar.`,
155
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
156
+ true: () => `Eingetretene Gruppe ${args.groupTitle}, mit ${formatter.plural(args.groupCount, {
157
+ one: () => `${formatter.number(args.groupCount)} Option`,
158
+ other: () => `${formatter.number(args.groupCount)} Optionen`
159
+ })}. `,
160
+ other: ``
161
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
162
+ true: `, ausgewählt`,
163
+ other: ``
164
+ }, args.isSelected)}`,
165
+ "listboxLabel": `Empfehlungen`,
166
+ "selectedAnnouncement": (args) => `${args.optionText}, ausgewählt`
167
+ };
168
+ var $ca177778f9a74e3c$exports = {};
169
+ $ca177778f9a74e3c$exports = {
170
+ "buttonLabel": `Προβολή προτάσεων`,
171
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
172
+ one: () => `${formatter.number(args.optionCount)} επιλογή`,
173
+ other: () => `${formatter.number(args.optionCount)} επιλογές `
174
+ })} διαθέσιμες.`,
175
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
176
+ true: () => `Εισαγμένη ομάδα ${args.groupTitle}, με ${formatter.plural(args.groupCount, {
177
+ one: () => `${formatter.number(args.groupCount)} επιλογή`,
178
+ other: () => `${formatter.number(args.groupCount)} επιλογές`
179
+ })}. `,
180
+ other: ``
181
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
182
+ true: `, επιλεγμένο`,
183
+ other: ``
184
+ }, args.isSelected)}`,
185
+ "listboxLabel": `Προτάσεις`,
186
+ "selectedAnnouncement": (args) => `${args.optionText}, επιλέχθηκε`
187
+ };
188
+ var $9b5aa79ef84beb6c$exports = {};
189
+ $9b5aa79ef84beb6c$exports = {
190
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
191
+ true: () => `Entered group ${args.groupTitle}, with ${formatter.plural(args.groupCount, {
192
+ one: () => `${formatter.number(args.groupCount)} option`,
193
+ other: () => `${formatter.number(args.groupCount)} options`
194
+ })}. `,
195
+ other: ``
196
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
197
+ true: `, selected`,
198
+ other: ``
199
+ }, args.isSelected)}`,
200
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
201
+ one: () => `${formatter.number(args.optionCount)} option`,
202
+ other: () => `${formatter.number(args.optionCount)} options`
203
+ })} available.`,
204
+ "selectedAnnouncement": (args) => `${args.optionText}, selected`,
205
+ "buttonLabel": `Show suggestions`,
206
+ "listboxLabel": `Suggestions`
207
+ };
208
+ var $57968e8209de2557$exports = {};
209
+ $57968e8209de2557$exports = {
210
+ "buttonLabel": `Mostrar sugerencias`,
211
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
212
+ one: () => `${formatter.number(args.optionCount)} opción`,
213
+ other: () => `${formatter.number(args.optionCount)} opciones`
214
+ })} disponible(s).`,
215
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
216
+ true: () => `Se ha unido al grupo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
217
+ one: () => `${formatter.number(args.groupCount)} opción`,
218
+ other: () => `${formatter.number(args.groupCount)} opciones`
219
+ })}. `,
220
+ other: ``
221
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
222
+ true: `, seleccionado`,
223
+ other: ``
224
+ }, args.isSelected)}`,
225
+ "listboxLabel": `Sugerencias`,
226
+ "selectedAnnouncement": (args) => `${args.optionText}, seleccionado`
227
+ };
228
+ var $60690790bf4c1c6a$exports = {};
229
+ $60690790bf4c1c6a$exports = {
230
+ "buttonLabel": `Kuva soovitused`,
231
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
232
+ one: () => `${formatter.number(args.optionCount)} valik`,
233
+ other: () => `${formatter.number(args.optionCount)} valikud`
234
+ })} saadaval.`,
235
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
236
+ true: () => `Sisestatud rühm ${args.groupTitle}, valikuga ${formatter.plural(args.groupCount, {
237
+ one: () => `${formatter.number(args.groupCount)} valik`,
238
+ other: () => `${formatter.number(args.groupCount)} valikud`
239
+ })}. `,
240
+ other: ``
241
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
242
+ true: `, valitud`,
243
+ other: ``
244
+ }, args.isSelected)}`,
245
+ "listboxLabel": `Soovitused`,
246
+ "selectedAnnouncement": (args) => `${args.optionText}, valitud`
247
+ };
248
+ var $1101246e8c7d9357$exports = {};
249
+ $1101246e8c7d9357$exports = {
250
+ "buttonLabel": `Näytä ehdotukset`,
251
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
252
+ one: () => `${formatter.number(args.optionCount)} vaihtoehto`,
253
+ other: () => `${formatter.number(args.optionCount)} vaihtoehdot`
254
+ })} saatavilla.`,
255
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
256
+ true: () => `Mentiin ryhmään ${args.groupTitle}, ${formatter.plural(args.groupCount, {
257
+ one: () => `${formatter.number(args.groupCount)} vaihtoehdon`,
258
+ other: () => `${formatter.number(args.groupCount)} vaihtoehdon`
259
+ })} kanssa.`,
260
+ other: ``
261
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
262
+ true: `, valittu`,
263
+ other: ``
264
+ }, args.isSelected)}`,
265
+ "listboxLabel": `Ehdotukset`,
266
+ "selectedAnnouncement": (args) => `${args.optionText}, valittu`
267
+ };
268
+ var $6404b5cb5b241730$exports = {};
269
+ $6404b5cb5b241730$exports = {
270
+ "buttonLabel": `Afficher les suggestions`,
271
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
272
+ one: () => `${formatter.number(args.optionCount)} option`,
273
+ other: () => `${formatter.number(args.optionCount)} options`
274
+ })} disponible(s).`,
275
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
276
+ true: () => `Groupe ${args.groupTitle} rejoint, avec ${formatter.plural(args.groupCount, {
277
+ one: () => `${formatter.number(args.groupCount)} option`,
278
+ other: () => `${formatter.number(args.groupCount)} options`
279
+ })}. `,
280
+ other: ``
281
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
282
+ true: `, sélectionné(s)`,
283
+ other: ``
284
+ }, args.isSelected)}`,
285
+ "listboxLabel": `Suggestions`,
286
+ "selectedAnnouncement": (args) => `${args.optionText}, sélectionné`
287
+ };
288
+ var $dfeafa702e92e31f$exports = {};
289
+ $dfeafa702e92e31f$exports = {
290
+ "buttonLabel": `הצג הצעות`,
291
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
292
+ one: () => `אפשרות ${formatter.number(args.optionCount)}`,
293
+ other: () => `${formatter.number(args.optionCount)} אפשרויות`
294
+ })} במצב זמין.`,
295
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
296
+ true: () => `נכנס לקבוצה ${args.groupTitle}, עם ${formatter.plural(args.groupCount, {
297
+ one: () => `אפשרות ${formatter.number(args.groupCount)}`,
298
+ other: () => `${formatter.number(args.groupCount)} אפשרויות`
299
+ })}. `,
300
+ other: ``
301
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
302
+ true: `, נבחר`,
303
+ other: ``
304
+ }, args.isSelected)}`,
305
+ "listboxLabel": `הצעות`,
306
+ "selectedAnnouncement": (args) => `${args.optionText}, נבחר`
307
+ };
308
+ var $2d125e0b34676352$exports = {};
309
+ $2d125e0b34676352$exports = {
310
+ "buttonLabel": `Prikaži prijedloge`,
311
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
312
+ one: () => `${formatter.number(args.optionCount)} opcija`,
313
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
314
+ })}.`,
315
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
316
+ true: () => `Unesena skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
317
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
318
+ other: () => `${formatter.number(args.groupCount)} opcije/a`
319
+ })}. `,
320
+ other: ``
321
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
322
+ true: `, odabranih`,
323
+ other: ``
324
+ }, args.isSelected)}`,
325
+ "listboxLabel": `Prijedlozi`,
326
+ "selectedAnnouncement": (args) => `${args.optionText}, odabrano`
327
+ };
328
+ var $ea029611d7634059$exports = {};
329
+ $ea029611d7634059$exports = {
330
+ "buttonLabel": `Javaslatok megjelenítése`,
331
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
332
+ one: () => `${formatter.number(args.optionCount)} lehetőség`,
333
+ other: () => `${formatter.number(args.optionCount)} lehetőség`
334
+ })} áll rendelkezésre.`,
335
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
336
+ true: () => `Belépett a(z) ${args.groupTitle} csoportba, amely ${formatter.plural(args.groupCount, {
337
+ one: () => `${formatter.number(args.groupCount)} lehetőséget`,
338
+ other: () => `${formatter.number(args.groupCount)} lehetőséget`
339
+ })} tartalmaz. `,
340
+ other: ``
341
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
342
+ true: `, kijelölve`,
343
+ other: ``
344
+ }, args.isSelected)}`,
345
+ "listboxLabel": `Javaslatok`,
346
+ "selectedAnnouncement": (args) => `${args.optionText}, kijelölve`
347
+ };
348
+ var $77f075bb86ad7091$exports = {};
349
+ $77f075bb86ad7091$exports = {
350
+ "buttonLabel": `Mostra suggerimenti`,
351
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
352
+ one: () => `${formatter.number(args.optionCount)} opzione disponibile`,
353
+ other: () => `${formatter.number(args.optionCount)} opzioni disponibili`
354
+ })}.`,
355
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
356
+ true: () => `Ingresso nel gruppo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
357
+ one: () => `${formatter.number(args.groupCount)} opzione`,
358
+ other: () => `${formatter.number(args.groupCount)} opzioni`
359
+ })}. `,
360
+ other: ``
361
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
362
+ true: `, selezionato`,
363
+ other: ``
364
+ }, args.isSelected)}`,
365
+ "listboxLabel": `Suggerimenti`,
366
+ "selectedAnnouncement": (args) => `${args.optionText}, selezionato`
367
+ };
368
+ var $6e87462e84907983$exports = {};
369
+ $6e87462e84907983$exports = {
370
+ "buttonLabel": `候補を表示`,
371
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
372
+ one: () => `${formatter.number(args.optionCount)} 個のオプション`,
373
+ other: () => `${formatter.number(args.optionCount)} 個のオプション`
374
+ })}を利用できます。`,
375
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
376
+ true: () => `入力されたグループ ${args.groupTitle}、${formatter.plural(args.groupCount, {
377
+ one: () => `${formatter.number(args.groupCount)} 個のオプション`,
378
+ other: () => `${formatter.number(args.groupCount)} 個のオプション`
379
+ })}を含む。`,
380
+ other: ``
381
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
382
+ true: `、選択済み`,
383
+ other: ``
384
+ }, args.isSelected)}`,
385
+ "listboxLabel": `候補`,
386
+ "selectedAnnouncement": (args) => `${args.optionText}、選択済み`
387
+ };
388
+ var $9246f2c6edc6b232$exports = {};
389
+ $9246f2c6edc6b232$exports = {
390
+ "buttonLabel": `제안 사항 표시`,
391
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
392
+ one: () => `${formatter.number(args.optionCount)}개 옵션`,
393
+ other: () => `${formatter.number(args.optionCount)}개 옵션`
394
+ })}을 사용할 수 있습니다.`,
395
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
396
+ true: () => `입력한 그룹 ${args.groupTitle}, ${formatter.plural(args.groupCount, {
397
+ one: () => `${formatter.number(args.groupCount)}개 옵션`,
398
+ other: () => `${formatter.number(args.groupCount)}개 옵션`
399
+ })}. `,
400
+ other: ``
401
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
402
+ true: `, 선택됨`,
403
+ other: ``
404
+ }, args.isSelected)}`,
405
+ "listboxLabel": `제안`,
406
+ "selectedAnnouncement": (args) => `${args.optionText}, 선택됨`
407
+ };
408
+ var $e587accc6c0a434c$exports = {};
409
+ $e587accc6c0a434c$exports = {
410
+ "buttonLabel": `Rodyti pasiūlymus`,
411
+ "countAnnouncement": (args, formatter) => `Yra ${formatter.plural(args.optionCount, {
412
+ one: () => `${formatter.number(args.optionCount)} parinktis`,
413
+ other: () => `${formatter.number(args.optionCount)} parinktys (-ių)`
414
+ })}.`,
415
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
416
+ true: () => `Įvesta grupė ${args.groupTitle}, su ${formatter.plural(args.groupCount, {
417
+ one: () => `${formatter.number(args.groupCount)} parinktimi`,
418
+ other: () => `${formatter.number(args.groupCount)} parinktimis (-ių)`
419
+ })}. `,
420
+ other: ``
421
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
422
+ true: `, pasirinkta`,
423
+ other: ``
424
+ }, args.isSelected)}`,
425
+ "listboxLabel": `Pasiūlymai`,
426
+ "selectedAnnouncement": (args) => `${args.optionText}, pasirinkta`
427
+ };
428
+ var $03a1900e7400b5ab$exports = {};
429
+ $03a1900e7400b5ab$exports = {
430
+ "buttonLabel": `Rādīt ieteikumus`,
431
+ "countAnnouncement": (args, formatter) => `Pieejamo opciju skaits: ${formatter.plural(args.optionCount, {
432
+ one: () => `${formatter.number(args.optionCount)} opcija`,
433
+ other: () => `${formatter.number(args.optionCount)} opcijas`
434
+ })}.`,
435
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
436
+ true: () => `Ievadīta grupa ${args.groupTitle}, ar ${formatter.plural(args.groupCount, {
437
+ one: () => `${formatter.number(args.groupCount)} opciju`,
438
+ other: () => `${formatter.number(args.groupCount)} opcijām`
439
+ })}. `,
440
+ other: ``
441
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
442
+ true: `, atlasīta`,
443
+ other: ``
444
+ }, args.isSelected)}`,
445
+ "listboxLabel": `Ieteikumi`,
446
+ "selectedAnnouncement": (args) => `${args.optionText}, atlasīta`
447
+ };
448
+ var $1387676441be6cf6$exports = {};
449
+ $1387676441be6cf6$exports = {
450
+ "buttonLabel": `Vis forslag`,
451
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
452
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
453
+ other: () => `${formatter.number(args.optionCount)} alternativer`
454
+ })} finnes.`,
455
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
456
+ true: () => `Angitt gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
457
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
458
+ other: () => `${formatter.number(args.groupCount)} alternativer`
459
+ })}. `,
460
+ other: ``
461
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
462
+ true: `, valgt`,
463
+ other: ``
464
+ }, args.isSelected)}`,
465
+ "listboxLabel": `Forslag`,
466
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
467
+ };
468
+ var $17e82ebf0f8ab91f$exports = {};
469
+ $17e82ebf0f8ab91f$exports = {
470
+ "buttonLabel": `Suggesties weergeven`,
471
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
472
+ one: () => `${formatter.number(args.optionCount)} optie`,
473
+ other: () => `${formatter.number(args.optionCount)} opties`
474
+ })} beschikbaar.`,
475
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
476
+ true: () => `Groep ${args.groupTitle} ingevoerd met ${formatter.plural(args.groupCount, {
477
+ one: () => `${formatter.number(args.groupCount)} optie`,
478
+ other: () => `${formatter.number(args.groupCount)} opties`
479
+ })}. `,
480
+ other: ``
481
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
482
+ true: `, geselecteerd`,
483
+ other: ``
484
+ }, args.isSelected)}`,
485
+ "listboxLabel": `Suggesties`,
486
+ "selectedAnnouncement": (args) => `${args.optionText}, geselecteerd`
487
+ };
488
+ var $2f5377d3471630e5$exports = {};
489
+ $2f5377d3471630e5$exports = {
490
+ "buttonLabel": `Wyświetlaj sugestie`,
491
+ "countAnnouncement": (args, formatter) => `dostępna/dostępne(-nych) ${formatter.plural(args.optionCount, {
492
+ one: () => `${formatter.number(args.optionCount)} opcja`,
493
+ other: () => `${formatter.number(args.optionCount)} opcje(-i)`
494
+ })}.`,
495
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
496
+ true: () => `Dołączono do grupy ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
497
+ one: () => `${formatter.number(args.groupCount)} opcją`,
498
+ other: () => `${formatter.number(args.groupCount)} opcjami`
499
+ })}. `,
500
+ other: ``
501
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
502
+ true: `, wybrano`,
503
+ other: ``
504
+ }, args.isSelected)}`,
505
+ "listboxLabel": `Sugestie`,
506
+ "selectedAnnouncement": (args) => `${args.optionText}, wybrano`
507
+ };
508
+ var $dee9868b6fa95ffe$exports = {};
509
+ $dee9868b6fa95ffe$exports = {
510
+ "buttonLabel": `Mostrar sugestões`,
511
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
512
+ one: () => `${formatter.number(args.optionCount)} opção`,
513
+ other: () => `${formatter.number(args.optionCount)} opções`
514
+ })} disponível.`,
515
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
516
+ true: () => `Grupo inserido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
517
+ one: () => `${formatter.number(args.groupCount)} opção`,
518
+ other: () => `${formatter.number(args.groupCount)} opções`
519
+ })}. `,
520
+ other: ``
521
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
522
+ true: `, selecionado`,
523
+ other: ``
524
+ }, args.isSelected)}`,
525
+ "listboxLabel": `Sugestões`,
526
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
527
+ };
528
+ var $f8b2e63637cbb5a6$exports = {};
529
+ $f8b2e63637cbb5a6$exports = {
530
+ "buttonLabel": `Apresentar sugestões`,
531
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
532
+ one: () => `${formatter.number(args.optionCount)} opção`,
533
+ other: () => `${formatter.number(args.optionCount)} opções`
534
+ })} disponível.`,
535
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
536
+ true: () => `Grupo introduzido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
537
+ one: () => `${formatter.number(args.groupCount)} opção`,
538
+ other: () => `${formatter.number(args.groupCount)} opções`
539
+ })}. `,
540
+ other: ``
541
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
542
+ true: `, selecionado`,
543
+ other: ``
544
+ }, args.isSelected)}`,
545
+ "listboxLabel": `Sugestões`,
546
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
547
+ };
548
+ var $46a885db3b44ea95$exports = {};
549
+ $46a885db3b44ea95$exports = {
550
+ "buttonLabel": `Afișare sugestii`,
551
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
552
+ one: () => `${formatter.number(args.optionCount)} opțiune`,
553
+ other: () => `${formatter.number(args.optionCount)} opțiuni`
554
+ })} disponibile.`,
555
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
556
+ true: () => `Grup ${args.groupTitle} introdus, cu ${formatter.plural(args.groupCount, {
557
+ one: () => `${formatter.number(args.groupCount)} opțiune`,
558
+ other: () => `${formatter.number(args.groupCount)} opțiuni`
559
+ })}. `,
560
+ other: ``
561
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
562
+ true: `, selectat`,
563
+ other: ``
564
+ }, args.isSelected)}`,
565
+ "listboxLabel": `Sugestii`,
566
+ "selectedAnnouncement": (args) => `${args.optionText}, selectat`
567
+ };
568
+ var $50d8a8f0afa9dee5$exports = {};
569
+ $50d8a8f0afa9dee5$exports = {
570
+ "buttonLabel": `Показать предложения`,
571
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
572
+ one: () => `${formatter.number(args.optionCount)} параметр`,
573
+ other: () => `${formatter.number(args.optionCount)} параметров`
574
+ })} доступно.`,
575
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
576
+ true: () => `Введенная группа ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
577
+ one: () => `${formatter.number(args.groupCount)} параметром`,
578
+ other: () => `${formatter.number(args.groupCount)} параметрами`
579
+ })}. `,
580
+ other: ``
581
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
582
+ true: `, выбранными`,
583
+ other: ``
584
+ }, args.isSelected)}`,
585
+ "listboxLabel": `Предложения`,
586
+ "selectedAnnouncement": (args) => `${args.optionText}, выбрано`
587
+ };
588
+ var $2867ee6173245507$exports = {};
589
+ $2867ee6173245507$exports = {
590
+ "buttonLabel": `Zobraziť návrhy`,
591
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
592
+ one: () => `${formatter.number(args.optionCount)} možnosť`,
593
+ other: () => `${formatter.number(args.optionCount)} možnosti/-í`
594
+ })} k dispozícii.`,
595
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
596
+ true: () => `Zadaná skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
597
+ one: () => `${formatter.number(args.groupCount)} možnosťou`,
598
+ other: () => `${formatter.number(args.groupCount)} možnosťami`
599
+ })}. `,
600
+ other: ``
601
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
602
+ true: `, vybraté`,
603
+ other: ``
604
+ }, args.isSelected)}`,
605
+ "listboxLabel": `Návrhy`,
606
+ "selectedAnnouncement": (args) => `${args.optionText}, vybraté`
607
+ };
608
+ var $0631b65beeb09b50$exports = {};
609
+ $0631b65beeb09b50$exports = {
610
+ "buttonLabel": `Prikaži predloge`,
611
+ "countAnnouncement": (args, formatter) => `Na voljo je ${formatter.plural(args.optionCount, {
612
+ one: () => `${formatter.number(args.optionCount)} opcija`,
613
+ other: () => `${formatter.number(args.optionCount)} opcije`
614
+ })}.`,
615
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
616
+ true: () => `Vnesena skupina ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
617
+ one: () => `${formatter.number(args.groupCount)} opcija`,
618
+ other: () => `${formatter.number(args.groupCount)} opcije`
619
+ })}. `,
620
+ other: ``
621
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
622
+ true: `, izbrano`,
623
+ other: ``
624
+ }, args.isSelected)}`,
625
+ "listboxLabel": `Predlogi`,
626
+ "selectedAnnouncement": (args) => `${args.optionText}, izbrano`
627
+ };
628
+ var $65fc749265dcd686$exports = {};
629
+ $65fc749265dcd686$exports = {
630
+ "buttonLabel": `Prikaži predloge`,
631
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
632
+ one: () => `${formatter.number(args.optionCount)} opcija`,
633
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
634
+ })}.`,
635
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
636
+ true: () => `Unesena grupa ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
637
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
638
+ other: () => `${formatter.number(args.groupCount)} optione/a`
639
+ })}. `,
640
+ other: ``
641
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
642
+ true: `, izabranih`,
643
+ other: ``
644
+ }, args.isSelected)}`,
645
+ "listboxLabel": `Predlozi`,
646
+ "selectedAnnouncement": (args) => `${args.optionText}, izabrano`
647
+ };
648
+ var $69ba655c7853c08e$exports = {};
649
+ $69ba655c7853c08e$exports = {
650
+ "buttonLabel": `Visa förslag`,
651
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
652
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
653
+ other: () => `${formatter.number(args.optionCount)} alternativ`
654
+ })} tillgängliga.`,
655
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
656
+ true: () => `Ingick i gruppen ${args.groupTitle} med ${formatter.plural(args.groupCount, {
657
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
658
+ other: () => `${formatter.number(args.groupCount)} alternativ`
659
+ })}. `,
660
+ other: ``
661
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
662
+ true: `, valda`,
663
+ other: ``
664
+ }, args.isSelected)}`,
665
+ "listboxLabel": `Förslag`,
666
+ "selectedAnnouncement": (args) => `${args.optionText}, valda`
667
+ };
668
+ var $a79794784d61577c$exports = {};
669
+ $a79794784d61577c$exports = {
670
+ "buttonLabel": `Önerileri göster`,
671
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
672
+ one: () => `${formatter.number(args.optionCount)} seçenek`,
673
+ other: () => `${formatter.number(args.optionCount)} seçenekler`
674
+ })} kullanılabilir.`,
675
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
676
+ true: () => `Girilen grup ${args.groupTitle}, ile ${formatter.plural(args.groupCount, {
677
+ one: () => `${formatter.number(args.groupCount)} seçenek`,
678
+ other: () => `${formatter.number(args.groupCount)} seçenekler`
679
+ })}. `,
680
+ other: ``
681
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
682
+ true: `, seçildi`,
683
+ other: ``
684
+ }, args.isSelected)}`,
685
+ "listboxLabel": `Öneriler`,
686
+ "selectedAnnouncement": (args) => `${args.optionText}, seçildi`
687
+ };
688
+ var $c2845791417ebaf4$exports = {};
689
+ $c2845791417ebaf4$exports = {
690
+ "buttonLabel": `Показати пропозиції`,
691
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
692
+ one: () => `${formatter.number(args.optionCount)} параметр`,
693
+ other: () => `${formatter.number(args.optionCount)} параметри(-ів)`
694
+ })} доступно.`,
695
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
696
+ true: () => `Введена група ${args.groupTitle}, з ${formatter.plural(args.groupCount, {
697
+ one: () => `${formatter.number(args.groupCount)} параметр`,
698
+ other: () => `${formatter.number(args.groupCount)} параметри(-ів)`
699
+ })}. `,
700
+ other: ``
701
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
702
+ true: `, вибрано`,
703
+ other: ``
704
+ }, args.isSelected)}`,
705
+ "listboxLabel": `Пропозиції`,
706
+ "selectedAnnouncement": (args) => `${args.optionText}, вибрано`
707
+ };
708
+ var $29b642d0025cc7a4$exports = {};
709
+ $29b642d0025cc7a4$exports = {
710
+ "buttonLabel": `显示建议`,
711
+ "countAnnouncement": (args, formatter) => `有 ${formatter.plural(args.optionCount, {
712
+ one: () => `${formatter.number(args.optionCount)} 个选项`,
713
+ other: () => `${formatter.number(args.optionCount)} 个选项`
714
+ })}可用。`,
715
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
716
+ true: () => `进入了 ${args.groupTitle} 组,其中有 ${formatter.plural(args.groupCount, {
717
+ one: () => `${formatter.number(args.groupCount)} 个选项`,
718
+ other: () => `${formatter.number(args.groupCount)} 个选项`
719
+ })}. `,
720
+ other: ``
721
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
722
+ true: `, 已选择`,
723
+ other: ``
724
+ }, args.isSelected)}`,
725
+ "listboxLabel": `建议`,
726
+ "selectedAnnouncement": (args) => `${args.optionText}, 已选择`
727
+ };
728
+ var $cd36dd33f9d46936$exports = {};
729
+ $cd36dd33f9d46936$exports = {
730
+ "buttonLabel": `顯示建議`,
731
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
732
+ one: () => `${formatter.number(args.optionCount)} 選項`,
733
+ other: () => `${formatter.number(args.optionCount)} 選項`
734
+ })} 可用。`,
735
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
736
+ true: () => `輸入的群組 ${args.groupTitle}, 有 ${formatter.plural(args.groupCount, {
737
+ one: () => `${formatter.number(args.groupCount)} 選項`,
738
+ other: () => `${formatter.number(args.groupCount)} 選項`
739
+ })}. `,
740
+ other: ``
741
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
742
+ true: `, 已選取`,
743
+ other: ``
744
+ }, args.isSelected)}`,
745
+ "listboxLabel": `建議`,
746
+ "selectedAnnouncement": (args) => `${args.optionText}, 已選取`
747
+ };
748
+ var $de5926a92e8ebc5b$exports = {};
749
+ $de5926a92e8ebc5b$exports = {
750
+ "ar-AE": $02cb4c75c506befe$exports,
751
+ "bg-BG": $568b8163f1e56faf$exports,
752
+ "cs-CZ": $87581c0202d106b8$exports,
753
+ "da-DK": $a10a0369f5433ed1$exports,
754
+ "de-DE": $bfd288727d5cb166$exports,
755
+ "el-GR": $ca177778f9a74e3c$exports,
756
+ "en-US": $9b5aa79ef84beb6c$exports,
757
+ "es-ES": $57968e8209de2557$exports,
758
+ "et-EE": $60690790bf4c1c6a$exports,
759
+ "fi-FI": $1101246e8c7d9357$exports,
760
+ "fr-FR": $6404b5cb5b241730$exports,
761
+ "he-IL": $dfeafa702e92e31f$exports,
762
+ "hr-HR": $2d125e0b34676352$exports,
763
+ "hu-HU": $ea029611d7634059$exports,
764
+ "it-IT": $77f075bb86ad7091$exports,
765
+ "ja-JP": $6e87462e84907983$exports,
766
+ "ko-KR": $9246f2c6edc6b232$exports,
767
+ "lt-LT": $e587accc6c0a434c$exports,
768
+ "lv-LV": $03a1900e7400b5ab$exports,
769
+ "nb-NO": $1387676441be6cf6$exports,
770
+ "nl-NL": $17e82ebf0f8ab91f$exports,
771
+ "pl-PL": $2f5377d3471630e5$exports,
772
+ "pt-BR": $dee9868b6fa95ffe$exports,
773
+ "pt-PT": $f8b2e63637cbb5a6$exports,
774
+ "ro-RO": $46a885db3b44ea95$exports,
775
+ "ru-RU": $50d8a8f0afa9dee5$exports,
776
+ "sk-SK": $2867ee6173245507$exports,
777
+ "sl-SI": $0631b65beeb09b50$exports,
778
+ "sr-SP": $65fc749265dcd686$exports,
779
+ "sv-SE": $69ba655c7853c08e$exports,
780
+ "tr-TR": $a79794784d61577c$exports,
781
+ "uk-UA": $c2845791417ebaf4$exports,
782
+ "zh-CN": $29b642d0025cc7a4$exports,
783
+ "zh-TW": $cd36dd33f9d46936$exports
784
+ };
785
+ function $parcel$interopDefault(a) {
786
+ return a && a.__esModule ? a.default : a;
787
+ }
788
+ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
789
+ let { buttonRef, popoverRef, inputRef, listBoxRef, keyboardDelegate, layoutDelegate, shouldFocusWrap, isReadOnly, isDisabled } = props;
790
+ let backupBtnRef = useRef(null);
791
+ buttonRef = buttonRef !== null && buttonRef !== void 0 ? buttonRef : backupBtnRef;
792
+ let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($de5926a92e8ebc5b$exports), "@react-aria/combobox");
793
+ let { menuTriggerProps, menuProps } = $168583247155ddda$export$dc9c12ed27dd1b49({
794
+ type: "listbox",
795
+ isDisabled: isDisabled || isReadOnly
796
+ }, state, buttonRef);
797
+ $b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
798
+ id: menuProps.id
799
+ });
800
+ let { collection } = state;
801
+ let { disabledKeys } = state.selectionManager;
802
+ let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
803
+ collection,
804
+ disabledKeys,
805
+ ref: listBoxRef,
806
+ layoutDelegate
807
+ }), [
808
+ keyboardDelegate,
809
+ layoutDelegate,
810
+ collection,
811
+ disabledKeys,
812
+ listBoxRef
813
+ ]);
814
+ let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
815
+ selectionManager: state.selectionManager,
816
+ keyboardDelegate: delegate,
817
+ disallowTypeAhead: true,
818
+ disallowEmptySelection: true,
819
+ shouldFocusWrap,
820
+ ref: inputRef,
821
+ // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
822
+ isVirtualized: true
823
+ });
824
+ let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
825
+ let onKeyDown = (e) => {
826
+ if (e.nativeEvent.isComposing) return;
827
+ switch (e.key) {
828
+ case "Enter":
829
+ case "Tab":
830
+ if (state.isOpen && e.key === "Enter") e.preventDefault();
831
+ if (state.isOpen && listBoxRef.current && state.selectionManager.focusedKey != null && state.selectionManager.isLink(state.selectionManager.focusedKey)) {
832
+ let item = listBoxRef.current.querySelector(`[data-key="${CSS.escape(state.selectionManager.focusedKey.toString())}"]`);
833
+ if (e.key === "Enter" && item instanceof HTMLAnchorElement) {
834
+ let collectionItem = state.collection.getItem(state.selectionManager.focusedKey);
835
+ if (collectionItem) router.open(item, e, collectionItem.props.href, collectionItem.props.routerOptions);
836
+ }
837
+ state.close();
838
+ } else state.commit();
839
+ break;
840
+ case "Escape":
841
+ if (state.selectedKey !== null || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
842
+ state.revert();
843
+ break;
844
+ case "ArrowDown":
845
+ state.open("first", "manual");
846
+ break;
847
+ case "ArrowUp":
848
+ state.open("last", "manual");
849
+ break;
850
+ case "ArrowLeft":
851
+ case "ArrowRight":
852
+ state.selectionManager.setFocusedKey(null);
853
+ break;
854
+ }
855
+ };
856
+ let onBlur = (e) => {
857
+ var _popoverRef_current;
858
+ let blurFromButton = (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && buttonRef.current === e.relatedTarget;
859
+ let blurIntoPopover = (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(e.relatedTarget);
860
+ if (blurFromButton || blurIntoPopover) return;
861
+ if (props.onBlur) props.onBlur(e);
862
+ state.setFocused(false);
863
+ };
864
+ let onFocus = (e) => {
865
+ if (state.isFocused) return;
866
+ if (props.onFocus) props.onFocus(e);
867
+ state.setFocused(true);
868
+ };
869
+ let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
870
+ let { labelProps, inputProps, descriptionProps, errorMessageProps } = $2d73ec29415bd339$export$712718f7aec83d5({
871
+ ...props,
872
+ onChange: state.setInputValue,
873
+ onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown) : props.onKeyDown,
874
+ onBlur,
875
+ value: state.inputValue,
876
+ onFocus,
877
+ autoComplete: "off",
878
+ validate: void 0,
879
+ [$e5be200c675c3b3a$export$a763b9476acd3eb]: state
880
+ }, inputRef);
881
+ let onPress = (e) => {
882
+ if (e.pointerType === "touch") {
883
+ var _inputRef_current;
884
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
885
+ state.toggle(null, "manual");
886
+ }
887
+ };
888
+ let onPressStart = (e) => {
889
+ if (e.pointerType !== "touch") {
890
+ var _inputRef_current;
891
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
892
+ state.toggle(e.pointerType === "keyboard" || e.pointerType === "virtual" ? "first" : null, "manual");
893
+ }
894
+ };
895
+ let triggerLabelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
896
+ id: menuTriggerProps.id,
897
+ "aria-label": stringFormatter.format("buttonLabel"),
898
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
899
+ });
900
+ let listBoxProps = $313b98861ee5dd6c$export$d6875122194c7b44({
901
+ id: menuProps.id,
902
+ "aria-label": stringFormatter.format("listboxLabel"),
903
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
904
+ });
905
+ let lastEventTime = useRef(0);
906
+ let onTouchEnd = (e) => {
907
+ if (isDisabled || isReadOnly) return;
908
+ if (e.timeStamp - lastEventTime.current < 500) {
909
+ var _inputRef_current;
910
+ e.preventDefault();
911
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
912
+ return;
913
+ }
914
+ let rect = e.target.getBoundingClientRect();
915
+ let touch = e.changedTouches[0];
916
+ let centerX = Math.ceil(rect.left + 0.5 * rect.width);
917
+ let centerY = Math.ceil(rect.top + 0.5 * rect.height);
918
+ if (touch.clientX === centerX && touch.clientY === centerY) {
919
+ var _inputRef_current1;
920
+ e.preventDefault();
921
+ (_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.focus();
922
+ state.toggle(null, "manual");
923
+ lastEventTime.current = e.timeStamp;
924
+ }
925
+ };
926
+ let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : void 0;
927
+ var _focusedItem_parentKey;
928
+ let sectionKey = (_focusedItem_parentKey = focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) !== null && _focusedItem_parentKey !== void 0 ? _focusedItem_parentKey : null;
929
+ var _state_selectionManager_focusedKey;
930
+ let itemKey = (_state_selectionManager_focusedKey = state.selectionManager.focusedKey) !== null && _state_selectionManager_focusedKey !== void 0 ? _state_selectionManager_focusedKey : null;
931
+ let lastSection = useRef(sectionKey);
932
+ let lastItem = useRef(itemKey);
933
+ useEffect(() => {
934
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && focusedItem != null && itemKey != null && itemKey !== lastItem.current) {
935
+ let isSelected = state.selectionManager.isSelected(itemKey);
936
+ let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
937
+ let sectionTitle = (section === null || section === void 0 ? void 0 : section["aria-label"]) || (typeof (section === null || section === void 0 ? void 0 : section.rendered) === "string" ? section.rendered : "") || "";
938
+ var _ref;
939
+ let announcement = stringFormatter.format("focusAnnouncement", {
940
+ isGroupChange: (_ref = section && sectionKey !== lastSection.current) !== null && _ref !== void 0 ? _ref : false,
941
+ groupTitle: sectionTitle,
942
+ groupCount: section ? [
943
+ ...$c5a24bc478652b5f$export$1005530eda016c13(section, state.collection)
944
+ ].length : 0,
945
+ optionText: focusedItem["aria-label"] || focusedItem.textValue || "",
946
+ isSelected
947
+ });
948
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
949
+ }
950
+ lastSection.current = sectionKey;
951
+ lastItem.current = itemKey;
952
+ });
953
+ let optionCount = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
954
+ let lastSize = useRef(optionCount);
955
+ let lastOpen = useRef(state.isOpen);
956
+ useEffect(() => {
957
+ let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || $c87311424ea30a05$export$e1865c3bedcd822b());
958
+ if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
959
+ let announcement = stringFormatter.format("countAnnouncement", {
960
+ optionCount
961
+ });
962
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
963
+ }
964
+ lastSize.current = optionCount;
965
+ lastOpen.current = state.isOpen;
966
+ });
967
+ let lastSelectedKey = useRef(state.selectedKey);
968
+ useEffect(() => {
969
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
970
+ let optionText = state.selectedItem["aria-label"] || state.selectedItem.textValue || "";
971
+ let announcement = stringFormatter.format("selectedAnnouncement", {
972
+ optionText
973
+ });
974
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
975
+ }
976
+ lastSelectedKey.current = state.selectedKey;
977
+ });
978
+ useEffect(() => {
979
+ if (state.isOpen) return $5e3802645cc19319$export$1c3ebcada18427bf([
980
+ inputRef.current,
981
+ popoverRef.current
982
+ ].filter((element) => element != null));
983
+ }, [
984
+ state.isOpen,
985
+ inputRef,
986
+ popoverRef
987
+ ]);
988
+ return {
989
+ labelProps,
990
+ buttonProps: {
991
+ ...menuTriggerProps,
992
+ ...triggerLabelProps,
993
+ excludeFromTabOrder: true,
994
+ preventFocusOnPress: true,
995
+ onPress,
996
+ onPressStart,
997
+ isDisabled: isDisabled || isReadOnly
998
+ },
999
+ inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, {
1000
+ role: "combobox",
1001
+ "aria-expanded": menuTriggerProps["aria-expanded"],
1002
+ "aria-controls": state.isOpen ? menuProps.id : void 0,
1003
+ // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
1004
+ "aria-autocomplete": "list",
1005
+ "aria-activedescendant": focusedItem ? $b1f0cad8af73213b$export$9145995848b05025(state, focusedItem.key) : void 0,
1006
+ onTouchEnd,
1007
+ // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
1008
+ autoCorrect: "off",
1009
+ // This disable's the macOS Safari spell check auto corrections.
1010
+ spellCheck: "false"
1011
+ }),
1012
+ listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(menuProps, listBoxProps, {
1013
+ autoFocus: state.focusStrategy,
1014
+ shouldUseVirtualFocus: true,
1015
+ shouldSelectOnPressUp: true,
1016
+ shouldFocusOnHover: true,
1017
+ linkBehavior: "selection"
1018
+ }),
1019
+ descriptionProps,
1020
+ errorMessageProps,
1021
+ isInvalid,
1022
+ validationErrors,
1023
+ validationDetails
1024
+ };
1025
+ }
1026
+ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
1027
+ var _collection_getItem;
1028
+ let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true } = props;
1029
+ let [showAllItems, setShowAllItems] = useState(false);
1030
+ let [isFocused, setFocusedState] = useState(false);
1031
+ let [focusStrategy, setFocusStrategy] = useState(null);
1032
+ let onSelectionChange = (key) => {
1033
+ if (props.onSelectionChange) props.onSelectionChange(key);
1034
+ if (key === selectedKey) {
1035
+ resetInputValue();
1036
+ closeMenu();
1037
+ }
1038
+ };
1039
+ var _props_items;
1040
+ let { collection, selectionManager, selectedKey, setSelectedKey, selectedItem, disabledKeys } = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
1041
+ ...props,
1042
+ onSelectionChange,
1043
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
1044
+ });
1045
+ let defaultInputValue = props.defaultInputValue;
1046
+ if (defaultInputValue == null) {
1047
+ var _collection_getItem1;
1048
+ var _collection_getItem_textValue;
1049
+ if (selectedKey == null) defaultInputValue = "";
1050
+ else defaultInputValue = (_collection_getItem_textValue = (_collection_getItem1 = collection.getItem(selectedKey)) === null || _collection_getItem1 === void 0 ? void 0 : _collection_getItem1.textValue) !== null && _collection_getItem_textValue !== void 0 ? _collection_getItem_textValue : "";
1051
+ }
1052
+ let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.inputValue, defaultInputValue, props.onInputChange);
1053
+ let originalCollection = collection;
1054
+ let filteredCollection = useMemo(() => (
1055
+ // No default filter if items are controlled.
1056
+ props.items != null || !defaultFilter ? collection : $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, defaultFilter)
1057
+ ), [
1058
+ collection,
1059
+ inputValue,
1060
+ defaultFilter,
1061
+ props.items
1062
+ ]);
1063
+ let [lastCollection, setLastCollection] = useState(filteredCollection);
1064
+ let menuOpenTrigger = useRef("focus");
1065
+ let onOpenChange = (open2) => {
1066
+ if (props.onOpenChange) props.onOpenChange(open2, open2 ? menuOpenTrigger.current : void 0);
1067
+ selectionManager.setFocused(open2);
1068
+ if (!open2) selectionManager.setFocusedKey(null);
1069
+ };
1070
+ let triggerState = $fc909762b330b746$export$61c6a8c84e605fb6({
1071
+ ...props,
1072
+ onOpenChange,
1073
+ isOpen: void 0,
1074
+ defaultOpen: void 0
1075
+ });
1076
+ let open = (focusStrategy2 = null, trigger) => {
1077
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
1078
+ if (allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) {
1079
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
1080
+ setShowAllItems(true);
1081
+ menuOpenTrigger.current = trigger;
1082
+ setFocusStrategy(focusStrategy2);
1083
+ triggerState.open();
1084
+ }
1085
+ };
1086
+ let toggle = (focusStrategy2 = null, trigger) => {
1087
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
1088
+ if (!(allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) && !triggerState.isOpen) return;
1089
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
1090
+ setShowAllItems(true);
1091
+ if (!triggerState.isOpen) menuOpenTrigger.current = trigger;
1092
+ toggleMenu(focusStrategy2);
1093
+ };
1094
+ let updateLastCollection = useCallback(() => {
1095
+ setLastCollection(showAllItems ? originalCollection : filteredCollection);
1096
+ }, [
1097
+ showAllItems,
1098
+ originalCollection,
1099
+ filteredCollection
1100
+ ]);
1101
+ let toggleMenu = useCallback((focusStrategy2 = null) => {
1102
+ if (triggerState.isOpen) updateLastCollection();
1103
+ setFocusStrategy(focusStrategy2);
1104
+ triggerState.toggle();
1105
+ }, [
1106
+ triggerState,
1107
+ updateLastCollection
1108
+ ]);
1109
+ let closeMenu = useCallback(() => {
1110
+ if (triggerState.isOpen) {
1111
+ updateLastCollection();
1112
+ triggerState.close();
1113
+ }
1114
+ }, [
1115
+ triggerState,
1116
+ updateLastCollection
1117
+ ]);
1118
+ let [lastValue, setLastValue] = useState(inputValue);
1119
+ let resetInputValue = () => {
1120
+ var _collection_getItem2;
1121
+ var _collection_getItem_textValue2;
1122
+ let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
1123
+ setLastValue(itemText);
1124
+ setInputValue(itemText);
1125
+ };
1126
+ var _props_selectedKey, _ref;
1127
+ let lastSelectedKey = useRef((_ref = (_props_selectedKey = props.selectedKey) !== null && _props_selectedKey !== void 0 ? _props_selectedKey : props.defaultSelectedKey) !== null && _ref !== void 0 ? _ref : null);
1128
+ var _collection_getItem_textValue1;
1129
+ let lastSelectedKeyText = useRef(selectedKey != null ? (_collection_getItem_textValue1 = (_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue) !== null && _collection_getItem_textValue1 !== void 0 ? _collection_getItem_textValue1 : "" : "");
1130
+ useEffect(() => {
1131
+ var _collection_getItem2;
1132
+ if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
1133
+ if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) closeMenu();
1134
+ if (selectedKey != null && selectedKey !== lastSelectedKey.current) closeMenu();
1135
+ if (inputValue !== lastValue) {
1136
+ selectionManager.setFocusedKey(null);
1137
+ setShowAllItems(false);
1138
+ if (inputValue === "" && (props.inputValue === void 0 || props.selectedKey === void 0)) setSelectedKey(null);
1139
+ }
1140
+ if (selectedKey !== lastSelectedKey.current && (props.inputValue === void 0 || props.selectedKey === void 0)) resetInputValue();
1141
+ else if (lastValue !== inputValue) setLastValue(inputValue);
1142
+ var _collection_getItem_textValue2;
1143
+ let selectedItemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
1144
+ if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey === lastSelectedKey.current) {
1145
+ if (lastSelectedKeyText.current !== selectedItemText) {
1146
+ setLastValue(selectedItemText);
1147
+ setInputValue(selectedItemText);
1148
+ }
1149
+ }
1150
+ lastSelectedKey.current = selectedKey;
1151
+ lastSelectedKeyText.current = selectedItemText;
1152
+ });
1153
+ let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
1154
+ ...props,
1155
+ value: useMemo(() => ({
1156
+ inputValue,
1157
+ selectedKey
1158
+ }), [
1159
+ inputValue,
1160
+ selectedKey
1161
+ ])
1162
+ });
1163
+ let revert = () => {
1164
+ if (allowsCustomValue && selectedKey == null) commitCustomValue();
1165
+ else commitSelection();
1166
+ };
1167
+ let commitCustomValue = () => {
1168
+ lastSelectedKey.current = null;
1169
+ setSelectedKey(null);
1170
+ closeMenu();
1171
+ };
1172
+ let commitSelection = () => {
1173
+ if (props.selectedKey !== void 0 && props.inputValue !== void 0) {
1174
+ var _props_onSelectionChange, _collection_getItem2;
1175
+ (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, selectedKey);
1176
+ var _collection_getItem_textValue2;
1177
+ let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
1178
+ setLastValue(itemText);
1179
+ closeMenu();
1180
+ } else {
1181
+ resetInputValue();
1182
+ closeMenu();
1183
+ }
1184
+ };
1185
+ const commitValue = () => {
1186
+ if (allowsCustomValue) {
1187
+ var _collection_getItem2;
1188
+ var _collection_getItem_textValue2;
1189
+ const itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
1190
+ inputValue === itemText ? commitSelection() : commitCustomValue();
1191
+ } else
1192
+ commitSelection();
1193
+ };
1194
+ let commit = () => {
1195
+ if (triggerState.isOpen && selectionManager.focusedKey != null) {
1196
+ if (selectedKey === selectionManager.focusedKey) commitSelection();
1197
+ else setSelectedKey(selectionManager.focusedKey);
1198
+ } else commitValue();
1199
+ };
1200
+ let valueOnFocus = useRef(inputValue);
1201
+ let setFocused = (isFocused2) => {
1202
+ if (isFocused2) {
1203
+ valueOnFocus.current = inputValue;
1204
+ if (menuTrigger === "focus" && !props.isReadOnly) open(null, "focus");
1205
+ } else {
1206
+ if (shouldCloseOnBlur) commitValue();
1207
+ if (inputValue !== valueOnFocus.current) validation.commitValidation();
1208
+ }
1209
+ setFocusedState(isFocused2);
1210
+ };
1211
+ let displayedCollection = useMemo(() => {
1212
+ if (triggerState.isOpen) {
1213
+ if (showAllItems) return originalCollection;
1214
+ else return filteredCollection;
1215
+ } else return lastCollection;
1216
+ }, [
1217
+ triggerState.isOpen,
1218
+ originalCollection,
1219
+ filteredCollection,
1220
+ showAllItems,
1221
+ lastCollection
1222
+ ]);
1223
+ return {
1224
+ ...validation,
1225
+ ...triggerState,
1226
+ focusStrategy,
1227
+ toggle,
1228
+ open,
1229
+ close: commitValue,
1230
+ selectionManager,
1231
+ selectedKey,
1232
+ setSelectedKey,
1233
+ disabledKeys,
1234
+ isFocused,
1235
+ setFocused,
1236
+ selectedItem,
1237
+ collection: displayedCollection,
1238
+ inputValue,
1239
+ setInputValue,
1240
+ commit,
1241
+ revert
1242
+ };
1243
+ }
1244
+ function $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, filter) {
1245
+ return new $a02d57049d202695$export$d085fb9e920b5ca7($a9e7382a7d111cb5$var$filterNodes(collection, collection, inputValue, filter));
1246
+ }
1247
+ function $a9e7382a7d111cb5$var$filterNodes(collection, nodes, inputValue, filter) {
1248
+ let filteredNode = [];
1249
+ for (let node of nodes) {
1250
+ if (node.type === "section" && node.hasChildNodes) {
1251
+ let filtered = $a9e7382a7d111cb5$var$filterNodes(collection, $c5a24bc478652b5f$export$1005530eda016c13(node, collection), inputValue, filter);
1252
+ if ([
1253
+ ...filtered
1254
+ ].some((node2) => node2.type === "item")) filteredNode.push({
1255
+ ...node,
1256
+ childNodes: filtered
1257
+ });
1258
+ } else if (node.type === "item" && filter(node.textValue, inputValue)) filteredNode.push({
1259
+ ...node
1260
+ });
1261
+ else if (node.type !== "item") filteredNode.push({
1262
+ ...node
1263
+ });
1264
+ }
1265
+ return filteredNode;
1266
+ }
1267
+ function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(opts, dispatch) {
1268
+ let { cursor, getKey } = opts;
1269
+ return {
1270
+ setSelectedKeys(selectedKeys) {
1271
+ dispatch((state) => ({
1272
+ ...state,
1273
+ selectedKeys
1274
+ }));
1275
+ },
1276
+ setFilterText(filterText) {
1277
+ dispatch((state) => ({
1278
+ ...state,
1279
+ filterText
1280
+ }));
1281
+ },
1282
+ insert(index, ...values) {
1283
+ dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, index, ...values));
1284
+ },
1285
+ insertBefore(key, ...values) {
1286
+ dispatch((state) => {
1287
+ let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
1288
+ if (index === -1) {
1289
+ if (state.items.length === 0) index = 0;
1290
+ else return state;
1291
+ }
1292
+ return $0d86e9c8f07f9a7b$var$insert(state, index, ...values);
1293
+ });
1294
+ },
1295
+ insertAfter(key, ...values) {
1296
+ dispatch((state) => {
1297
+ let index = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
1298
+ if (index === -1) {
1299
+ if (state.items.length === 0) index = 0;
1300
+ else return state;
1301
+ }
1302
+ return $0d86e9c8f07f9a7b$var$insert(state, index + 1, ...values);
1303
+ });
1304
+ },
1305
+ prepend(...values) {
1306
+ dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, 0, ...values));
1307
+ },
1308
+ append(...values) {
1309
+ dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, state.items.length, ...values));
1310
+ },
1311
+ remove(...keys) {
1312
+ dispatch((state) => {
1313
+ let keySet = new Set(keys);
1314
+ let items = state.items.filter((item) => !keySet.has(getKey(item)));
1315
+ let selection = "all";
1316
+ if (state.selectedKeys !== "all") {
1317
+ selection = new Set(state.selectedKeys);
1318
+ for (let key of keys) selection.delete(key);
1319
+ }
1320
+ if (cursor == null && items.length === 0) selection = /* @__PURE__ */ new Set();
1321
+ return {
1322
+ ...state,
1323
+ items,
1324
+ selectedKeys: selection
1325
+ };
1326
+ });
1327
+ },
1328
+ removeSelectedItems() {
1329
+ dispatch((state) => {
1330
+ if (state.selectedKeys === "all") return {
1331
+ ...state,
1332
+ items: [],
1333
+ selectedKeys: /* @__PURE__ */ new Set()
1334
+ };
1335
+ let selectedKeys = state.selectedKeys;
1336
+ let items = state.items.filter((item) => !selectedKeys.has(getKey(item)));
1337
+ return {
1338
+ ...state,
1339
+ items,
1340
+ selectedKeys: /* @__PURE__ */ new Set()
1341
+ };
1342
+ });
1343
+ },
1344
+ move(key, toIndex) {
1345
+ dispatch((state) => {
1346
+ let index = state.items.findIndex((item2) => getKey(item2) === key);
1347
+ if (index === -1) return state;
1348
+ let copy = state.items.slice();
1349
+ let [item] = copy.splice(index, 1);
1350
+ copy.splice(toIndex, 0, item);
1351
+ return {
1352
+ ...state,
1353
+ items: copy
1354
+ };
1355
+ });
1356
+ },
1357
+ moveBefore(key, keys) {
1358
+ dispatch((state) => {
1359
+ let toIndex = state.items.findIndex((item) => getKey(item) === key);
1360
+ if (toIndex === -1) return state;
1361
+ let keyArray = Array.isArray(keys) ? keys : [
1362
+ ...keys
1363
+ ];
1364
+ let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
1365
+ return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex);
1366
+ });
1367
+ },
1368
+ moveAfter(key, keys) {
1369
+ dispatch((state) => {
1370
+ let toIndex = state.items.findIndex((item) => getKey(item) === key);
1371
+ if (toIndex === -1) return state;
1372
+ let keyArray = Array.isArray(keys) ? keys : [
1373
+ ...keys
1374
+ ];
1375
+ let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
1376
+ return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex + 1);
1377
+ });
1378
+ },
1379
+ update(key, newValue) {
1380
+ dispatch((state) => {
1381
+ let index = state.items.findIndex((item) => getKey(item) === key);
1382
+ if (index === -1) return state;
1383
+ return {
1384
+ ...state,
1385
+ items: [
1386
+ ...state.items.slice(0, index),
1387
+ newValue,
1388
+ ...state.items.slice(index + 1)
1389
+ ]
1390
+ };
1391
+ });
1392
+ }
1393
+ };
1394
+ }
1395
+ function $0d86e9c8f07f9a7b$var$insert(state, index, ...values) {
1396
+ return {
1397
+ ...state,
1398
+ items: [
1399
+ ...state.items.slice(0, index),
1400
+ ...values,
1401
+ ...state.items.slice(index)
1402
+ ]
1403
+ };
1404
+ }
1405
+ function $0d86e9c8f07f9a7b$var$move(state, indices, toIndex) {
1406
+ toIndex -= indices.filter((index) => index < toIndex).length;
1407
+ let moves = indices.map((from) => ({
1408
+ from,
1409
+ to: toIndex++
1410
+ }));
1411
+ for (let i = 0; i < moves.length; i++) {
1412
+ let a = moves[i].from;
1413
+ for (let j = i; j < moves.length; j++) {
1414
+ let b = moves[j].from;
1415
+ if (b > a) moves[j].from--;
1416
+ }
1417
+ }
1418
+ for (let i = 0; i < moves.length; i++) {
1419
+ let a = moves[i];
1420
+ for (let j = moves.length - 1; j > i; j--) {
1421
+ let b = moves[j];
1422
+ if (b.from < a.to) a.to++;
1423
+ else b.from++;
1424
+ }
1425
+ }
1426
+ let copy = state.items.slice();
1427
+ for (let move of moves) {
1428
+ let [item] = copy.splice(move.from, 1);
1429
+ copy.splice(move.to, 0, item);
1430
+ }
1431
+ return {
1432
+ ...state,
1433
+ items: copy
1434
+ };
1435
+ }
1436
+ function $f86e6c1ec7da6ebb$var$reducer(data, action) {
1437
+ let selectedKeys;
1438
+ switch (data.state) {
1439
+ case "idle":
1440
+ case "error":
1441
+ switch (action.type) {
1442
+ case "loading":
1443
+ case "loadingMore":
1444
+ case "sorting":
1445
+ case "filtering":
1446
+ var _action_filterText, _action_sortDescriptor;
1447
+ return {
1448
+ ...data,
1449
+ filterText: (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText,
1450
+ state: action.type,
1451
+ // Reset items to an empty list if loading, but not when sorting.
1452
+ items: action.type === "loading" ? [] : data.items,
1453
+ sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
1454
+ abortController: action.abortController
1455
+ };
1456
+ case "update":
1457
+ var _action_updater;
1458
+ return {
1459
+ ...data,
1460
+ ...(_action_updater = action.updater) === null || _action_updater === void 0 ? void 0 : _action_updater.call(action, data)
1461
+ };
1462
+ case "success":
1463
+ case "error":
1464
+ return data;
1465
+ default:
1466
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
1467
+ }
1468
+ case "loading":
1469
+ case "sorting":
1470
+ case "filtering":
1471
+ switch (action.type) {
1472
+ case "success":
1473
+ if (action.abortController !== data.abortController) return data;
1474
+ var _action_selectedKeys;
1475
+ selectedKeys = (_action_selectedKeys = action.selectedKeys) !== null && _action_selectedKeys !== void 0 ? _action_selectedKeys : data.selectedKeys;
1476
+ var _action_filterText1, _action_items, _action_sortDescriptor1;
1477
+ return {
1478
+ ...data,
1479
+ filterText: (_action_filterText1 = action.filterText) !== null && _action_filterText1 !== void 0 ? _action_filterText1 : data.filterText,
1480
+ state: "idle",
1481
+ items: [
1482
+ ...(_action_items = action.items) !== null && _action_items !== void 0 ? _action_items : []
1483
+ ],
1484
+ selectedKeys: selectedKeys === "all" ? "all" : new Set(selectedKeys),
1485
+ sortDescriptor: (_action_sortDescriptor1 = action.sortDescriptor) !== null && _action_sortDescriptor1 !== void 0 ? _action_sortDescriptor1 : data.sortDescriptor,
1486
+ abortController: void 0,
1487
+ cursor: action.cursor
1488
+ };
1489
+ case "error":
1490
+ if (action.abortController !== data.abortController) return data;
1491
+ return {
1492
+ ...data,
1493
+ state: "error",
1494
+ error: action.error,
1495
+ abortController: void 0
1496
+ };
1497
+ case "loading":
1498
+ case "loadingMore":
1499
+ case "sorting":
1500
+ case "filtering":
1501
+ var _data_abortController;
1502
+ (_data_abortController = data.abortController) === null || _data_abortController === void 0 ? void 0 : _data_abortController.abort();
1503
+ var _action_filterText2;
1504
+ return {
1505
+ ...data,
1506
+ filterText: (_action_filterText2 = action.filterText) !== null && _action_filterText2 !== void 0 ? _action_filterText2 : data.filterText,
1507
+ state: action.type,
1508
+ // Reset items to an empty list if loading, but not when sorting.
1509
+ items: action.type === "loading" ? [] : data.items,
1510
+ abortController: action.abortController
1511
+ };
1512
+ case "update":
1513
+ var _action_updater1;
1514
+ return {
1515
+ ...data,
1516
+ ...(_action_updater1 = action.updater) === null || _action_updater1 === void 0 ? void 0 : _action_updater1.call(action, data)
1517
+ };
1518
+ default:
1519
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
1520
+ }
1521
+ case "loadingMore":
1522
+ switch (action.type) {
1523
+ case "success":
1524
+ var _action_selectedKeys1;
1525
+ selectedKeys = data.selectedKeys === "all" || action.selectedKeys === "all" ? "all" : /* @__PURE__ */ new Set([
1526
+ ...data.selectedKeys,
1527
+ ...(_action_selectedKeys1 = action.selectedKeys) !== null && _action_selectedKeys1 !== void 0 ? _action_selectedKeys1 : []
1528
+ ]);
1529
+ var _action_items1, _action_sortDescriptor2;
1530
+ return {
1531
+ ...data,
1532
+ state: "idle",
1533
+ items: [
1534
+ ...data.items,
1535
+ ...(_action_items1 = action.items) !== null && _action_items1 !== void 0 ? _action_items1 : []
1536
+ ],
1537
+ selectedKeys,
1538
+ sortDescriptor: (_action_sortDescriptor2 = action.sortDescriptor) !== null && _action_sortDescriptor2 !== void 0 ? _action_sortDescriptor2 : data.sortDescriptor,
1539
+ abortController: void 0,
1540
+ cursor: action.cursor
1541
+ };
1542
+ case "error":
1543
+ if (action.abortController !== data.abortController) return data;
1544
+ return {
1545
+ ...data,
1546
+ state: "error",
1547
+ error: action.error
1548
+ };
1549
+ case "loading":
1550
+ case "sorting":
1551
+ case "filtering":
1552
+ var _data_abortController1;
1553
+ (_data_abortController1 = data.abortController) === null || _data_abortController1 === void 0 ? void 0 : _data_abortController1.abort();
1554
+ var _action_filterText3;
1555
+ return {
1556
+ ...data,
1557
+ filterText: (_action_filterText3 = action.filterText) !== null && _action_filterText3 !== void 0 ? _action_filterText3 : data.filterText,
1558
+ state: action.type,
1559
+ // Reset items to an empty list if loading, but not when sorting.
1560
+ items: action.type === "loading" ? [] : data.items,
1561
+ abortController: action.abortController
1562
+ };
1563
+ case "loadingMore":
1564
+ var _action_abortController;
1565
+ (_action_abortController = action.abortController) === null || _action_abortController === void 0 ? void 0 : _action_abortController.abort();
1566
+ return data;
1567
+ case "update":
1568
+ var _action_updater2;
1569
+ return {
1570
+ ...data,
1571
+ ...(_action_updater2 = action.updater) === null || _action_updater2 === void 0 ? void 0 : _action_updater2.call(action, data)
1572
+ };
1573
+ default:
1574
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
1575
+ }
1576
+ default:
1577
+ throw new Error(`Invalid state "${data.state}"`);
1578
+ }
1579
+ }
1580
+ function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
1581
+ const { load, sort, initialSelectedKeys, initialSortDescriptor, getKey = (item) => item.id || item.key, initialFilterText = "" } = options;
1582
+ let [data, dispatch] = useReducer($f86e6c1ec7da6ebb$var$reducer, {
1583
+ state: "idle",
1584
+ error: void 0,
1585
+ items: [],
1586
+ selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys),
1587
+ sortDescriptor: initialSortDescriptor,
1588
+ filterText: initialFilterText
1589
+ });
1590
+ const dispatchFetch = async (action, fn) => {
1591
+ let abortController = new AbortController();
1592
+ try {
1593
+ dispatch({
1594
+ ...action,
1595
+ abortController
1596
+ });
1597
+ var _action_filterText;
1598
+ let previousFilterText = (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText;
1599
+ var _action_sortDescriptor;
1600
+ let response = await fn({
1601
+ items: data.items.slice(),
1602
+ selectedKeys: data.selectedKeys,
1603
+ sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
1604
+ signal: abortController.signal,
1605
+ cursor: action.type === "loadingMore" ? data.cursor : void 0,
1606
+ filterText: previousFilterText
1607
+ });
1608
+ var _response_filterText;
1609
+ let filterText = (_response_filterText = response.filterText) !== null && _response_filterText !== void 0 ? _response_filterText : previousFilterText;
1610
+ dispatch({
1611
+ type: "success",
1612
+ ...response,
1613
+ abortController
1614
+ });
1615
+ if (filterText && filterText !== previousFilterText && !abortController.signal.aborted) dispatchFetch({
1616
+ type: "filtering",
1617
+ filterText
1618
+ }, load);
1619
+ } catch (e) {
1620
+ dispatch({
1621
+ type: "error",
1622
+ error: e,
1623
+ abortController
1624
+ });
1625
+ }
1626
+ };
1627
+ let didDispatchInitialFetch = useRef(false);
1628
+ useEffect(() => {
1629
+ if (!didDispatchInitialFetch.current) {
1630
+ dispatchFetch({
1631
+ type: "loading"
1632
+ }, load);
1633
+ didDispatchInitialFetch.current = true;
1634
+ }
1635
+ }, []);
1636
+ return {
1637
+ items: data.items,
1638
+ selectedKeys: data.selectedKeys,
1639
+ sortDescriptor: data.sortDescriptor,
1640
+ isLoading: data.state === "loading" || data.state === "loadingMore" || data.state === "sorting" || data.state === "filtering",
1641
+ loadingState: data.state,
1642
+ error: data.error,
1643
+ filterText: data.filterText,
1644
+ getItem(key) {
1645
+ return data.items.find((item) => getKey(item) === key);
1646
+ },
1647
+ reload() {
1648
+ dispatchFetch({
1649
+ type: "loading"
1650
+ }, load);
1651
+ },
1652
+ loadMore() {
1653
+ if (data.state === "loadingMore" || data.state === "filtering" || data.cursor == null) return;
1654
+ dispatchFetch({
1655
+ type: "loadingMore"
1656
+ }, load);
1657
+ },
1658
+ sort(sortDescriptor) {
1659
+ dispatchFetch({
1660
+ type: "sorting",
1661
+ sortDescriptor
1662
+ }, sort || load);
1663
+ },
1664
+ ...$0d86e9c8f07f9a7b$export$79c0c687a5963b0a({
1665
+ ...options,
1666
+ getKey,
1667
+ cursor: data.cursor
1668
+ }, (fn) => {
1669
+ dispatch({
1670
+ type: "update",
1671
+ updater: fn
1672
+ });
1673
+ }),
1674
+ setFilterText(filterText) {
1675
+ dispatchFetch({
1676
+ type: "filtering",
1677
+ filterText
1678
+ }, load);
1679
+ }
1680
+ };
1681
+ }
1682
+ const $d01f2c01039c0eec$export$d414ccceff7063c3 = /* @__PURE__ */ createContext(null);
1683
+ const $d01f2c01039c0eec$export$c02625b26074192c = /* @__PURE__ */ createContext(null);
1684
+ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
1685
+ [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d01f2c01039c0eec$export$d414ccceff7063c3);
1686
+ let { children, isDisabled = false, isInvalid = false, isRequired = false } = props;
1687
+ let content = useMemo(() => {
1688
+ var _props_items;
1689
+ return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider, {
1690
+ value: {
1691
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
1692
+ }
1693
+ }, typeof children === "function" ? children({
1694
+ isOpen: false,
1695
+ isDisabled,
1696
+ isInvalid,
1697
+ isRequired,
1698
+ defaultChildren: null
1699
+ }) : children);
1700
+ }, [
1701
+ children,
1702
+ isDisabled,
1703
+ isInvalid,
1704
+ isRequired,
1705
+ props.items,
1706
+ props.defaultItems
1707
+ ]);
1708
+ return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
1709
+ content
1710
+ }, (collection) => /* @__PURE__ */ React__default.createElement($d01f2c01039c0eec$var$ComboBoxInner, {
1711
+ props,
1712
+ collection,
1713
+ comboBoxRef: ref
1714
+ }));
1715
+ }
1716
+ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
1717
+ let { name, formValue = "key", allowsCustomValue } = props;
1718
+ if (allowsCustomValue) formValue = "text";
1719
+ let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
1720
+ var _props_validationBehavior, _ref;
1721
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
1722
+ let { contains } = $bb77f239b46e8c72$export$3274cf84b703fff({
1723
+ sensitivity: "base"
1724
+ });
1725
+ let state = $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({
1726
+ defaultFilter: props.defaultFilter || contains,
1727
+ ...props,
1728
+ // If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
1729
+ items: props.items,
1730
+ children: void 0,
1731
+ collection,
1732
+ validationBehavior
1733
+ });
1734
+ let buttonRef = useRef(null);
1735
+ let inputRef = useRef(null);
1736
+ let listBoxRef = useRef(null);
1737
+ let popoverRef = useRef(null);
1738
+ let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
1739
+ let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $c350ade66beef0af$export$8c18d1b4f7232bbf({
1740
+ ...$64fa3d84918910a7$export$ef03459518577ad4(props),
1741
+ label,
1742
+ inputRef,
1743
+ buttonRef,
1744
+ listBoxRef,
1745
+ popoverRef,
1746
+ name: formValue === "text" ? name : void 0,
1747
+ validationBehavior
1748
+ }, state);
1749
+ let [menuWidth, setMenuWidth] = useState(null);
1750
+ let onResize = useCallback(() => {
1751
+ if (inputRef.current) {
1752
+ var _buttonRef_current;
1753
+ let buttonRect = (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.getBoundingClientRect();
1754
+ let inputRect = inputRef.current.getBoundingClientRect();
1755
+ let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
1756
+ let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
1757
+ setMenuWidth(maxX - minX + "px");
1758
+ }
1759
+ }, [
1760
+ buttonRef,
1761
+ inputRef,
1762
+ setMenuWidth
1763
+ ]);
1764
+ $9daab02d461809db$export$683480f191c0e3ea({
1765
+ ref: inputRef,
1766
+ onResize
1767
+ });
1768
+ let renderPropsState = useMemo(() => ({
1769
+ isOpen: state.isOpen,
1770
+ isDisabled: props.isDisabled || false,
1771
+ isInvalid: validation.isInvalid || false,
1772
+ isRequired: props.isRequired || false
1773
+ }), [
1774
+ state.isOpen,
1775
+ props.isDisabled,
1776
+ validation.isInvalid,
1777
+ props.isRequired
1778
+ ]);
1779
+ let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
1780
+ ...props,
1781
+ values: renderPropsState,
1782
+ defaultClassName: "react-aria-ComboBox"
1783
+ });
1784
+ let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
1785
+ delete DOMProps.id;
1786
+ var _state_selectedKey;
1787
+ return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
1788
+ values: [
1789
+ [
1790
+ $d01f2c01039c0eec$export$c02625b26074192c,
1791
+ state
1792
+ ],
1793
+ [
1794
+ $01b77f81d0f07f68$export$75b6ee27786ba447,
1795
+ {
1796
+ ...labelProps,
1797
+ ref: labelRef
1798
+ }
1799
+ ],
1800
+ [
1801
+ $d2b4bc8c273e7be6$export$24d547caef80ccd1,
1802
+ {
1803
+ ...buttonProps,
1804
+ ref: buttonRef,
1805
+ isPressed: state.isOpen
1806
+ }
1807
+ ],
1808
+ [
1809
+ $3985021b0ad6602f$export$37fb8590cf2c088c,
1810
+ {
1811
+ ...inputProps,
1812
+ ref: inputRef
1813
+ }
1814
+ ],
1815
+ [
1816
+ $de32f1b87079253c$export$d2f961adcb0afbe,
1817
+ state
1818
+ ],
1819
+ [
1820
+ $07b14b47974efb58$export$9b9a0cd73afb7ca4,
1821
+ {
1822
+ ref: popoverRef,
1823
+ triggerRef: inputRef,
1824
+ scrollRef: listBoxRef,
1825
+ placement: "bottom start",
1826
+ isNonModal: true,
1827
+ trigger: "ComboBox",
1828
+ style: {
1829
+ "--trigger-width": menuWidth
1830
+ }
1831
+ }
1832
+ ],
1833
+ [
1834
+ $eed445e0843c11d0$export$7ff8f37d2d81a48d,
1835
+ {
1836
+ ...listBoxProps,
1837
+ ref: listBoxRef
1838
+ }
1839
+ ],
1840
+ [
1841
+ $eed445e0843c11d0$export$7c5906fe4f1f2af2,
1842
+ state
1843
+ ],
1844
+ [
1845
+ $514c0188e459b4c0$export$9afb8bc826b033ea,
1846
+ {
1847
+ slots: {
1848
+ description: descriptionProps,
1849
+ errorMessage: errorMessageProps
1850
+ }
1851
+ }
1852
+ ],
1853
+ [
1854
+ $a049562f99e7db0e$export$f9c6924e160136d1,
1855
+ {
1856
+ isInvalid: validation.isInvalid,
1857
+ isDisabled: props.isDisabled || false
1858
+ }
1859
+ ],
1860
+ [
1861
+ $ee014567cb39d3f0$export$ff05c3ac10437e03,
1862
+ validation
1863
+ ]
1864
+ ]
1865
+ }, /* @__PURE__ */ React__default.createElement("div", {
1866
+ ...DOMProps,
1867
+ ...renderProps,
1868
+ ref,
1869
+ slot: props.slot || void 0,
1870
+ "data-focused": state.isFocused || void 0,
1871
+ "data-open": state.isOpen || void 0,
1872
+ "data-disabled": props.isDisabled || void 0,
1873
+ "data-invalid": validation.isInvalid || void 0,
1874
+ "data-required": props.isRequired || void 0
1875
+ }), name && formValue === "key" && /* @__PURE__ */ React__default.createElement("input", {
1876
+ type: "hidden",
1877
+ name,
1878
+ value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
1879
+ }));
1880
+ }
1881
+ const $d01f2c01039c0eec$export$72b9695b8216309a = /* @__PURE__ */ forwardRef($d01f2c01039c0eec$var$ComboBox);
1882
+ export {
1883
+ $f86e6c1ec7da6ebb$export$bc3384a35de93d66 as $,
1884
+ $d01f2c01039c0eec$export$72b9695b8216309a as a,
1885
+ $d01f2c01039c0eec$export$c02625b26074192c as b
1886
+ };