ng-select2-component 8.0.6 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.md +46 -38
  3. package/esm2020/lib/select2-const.mjs +48 -0
  4. package/esm2020/lib/select2-hint.component.mjs +11 -0
  5. package/esm2020/lib/select2-interfaces.mjs +2 -0
  6. package/esm2020/lib/select2-label.component.mjs +11 -0
  7. package/esm2020/lib/select2-utils.mjs +280 -0
  8. package/esm2020/lib/select2.component.mjs +871 -0
  9. package/esm2020/lib/select2.module.mjs +23 -0
  10. package/esm2020/ng-select2-component.mjs +5 -0
  11. package/esm2020/public_api.mjs +12 -0
  12. package/fesm2015/ng-select2-component.mjs +1241 -0
  13. package/fesm2015/ng-select2-component.mjs.map +1 -0
  14. package/fesm2020/ng-select2-component.mjs +1242 -0
  15. package/fesm2020/ng-select2-component.mjs.map +1 -0
  16. package/index.d.ts +6 -0
  17. package/lib/select2-const.d.ts +1 -0
  18. package/lib/select2-const.d.ts.map +1 -0
  19. package/lib/select2-hint.component.d.ts +4 -0
  20. package/lib/select2-hint.component.d.ts.map +1 -0
  21. package/lib/select2-interfaces.d.ts +1 -0
  22. package/lib/select2-interfaces.d.ts.map +1 -0
  23. package/lib/select2-label.component.d.ts +4 -0
  24. package/lib/select2-label.component.d.ts.map +1 -0
  25. package/lib/select2-utils.d.ts +11 -6
  26. package/lib/select2-utils.d.ts.map +1 -0
  27. package/lib/select2.component.d.ts +15 -6
  28. package/lib/select2.component.d.ts.map +1 -0
  29. package/lib/select2.module.d.ts +12 -0
  30. package/lib/select2.module.d.ts.map +1 -0
  31. package/ng-select2-component.d.ts.map +1 -0
  32. package/package.json +26 -14
  33. package/public_api.d.ts +1 -0
  34. package/public_api.d.ts.map +1 -0
  35. package/bundles/ng-select2-component.umd.js +0 -2587
  36. package/bundles/ng-select2-component.umd.js.map +0 -1
  37. package/bundles/ng-select2-component.umd.min.js +0 -2
  38. package/bundles/ng-select2-component.umd.min.js.map +0 -1
  39. package/esm2015/lib/select2-const.js +0 -57
  40. package/esm2015/lib/select2-hint.component.js +0 -12
  41. package/esm2015/lib/select2-interfaces.js +0 -134
  42. package/esm2015/lib/select2-label.component.js +0 -12
  43. package/esm2015/lib/select2-utils.js +0 -388
  44. package/esm2015/lib/select2.component.js +0 -1500
  45. package/esm2015/lib/select2.module.js +0 -23
  46. package/esm2015/ng-select2-component.js +0 -10
  47. package/esm2015/public_api.js +0 -17
  48. package/fesm2015/ng-select2-component.js +0 -2130
  49. package/fesm2015/ng-select2-component.js.map +0 -1
  50. package/ng-select2-component.d.ts +0 -4
  51. package/ng-select2-component.metadata.json +0 -1
@@ -0,0 +1,1242 @@
1
+ import * as i4 from '@angular/cdk/overlay';
2
+ import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, TemplateRef, Component, Optional, Self, Attribute, Input, Output, HostBinding, ViewChild, ViewChildren, Directive, NgModule } from '@angular/core';
5
+ import { Subject } from 'rxjs';
6
+ import * as i1 from '@angular/cdk/scrolling';
7
+ import * as i2 from '@angular/forms';
8
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i3 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import * as i5 from 'ngx-infinite-scroll';
12
+ import { InfiniteScrollModule } from 'ngx-infinite-scroll';
13
+
14
+ const timeout = 200;
15
+ const unicodePatterns = [
16
+ { l: 'a', s: /[ⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ]/gi },
17
+ { l: 'aa', s: /ꜳ/gi },
18
+ { l: 'ae', s: /[æǽǣ]/gi },
19
+ { l: 'ao', s: /ꜵ/gi },
20
+ { l: 'au', s: /ꜷ/gi },
21
+ { l: 'av', s: /[ꜹꜻ]/gi },
22
+ { l: 'ay', s: /ꜽ/gi },
23
+ { l: 'b', s: /[ⓑbḃḅḇƀƃɓ]/gi },
24
+ { l: 'c', s: /[ⓒcćĉċčçḉƈȼꜿↄ]/gi },
25
+ { l: 'd', s: /[ⓓdḋďḍḑḓḏđƌɖɗꝺ]/gi },
26
+ { l: 'dz', s: /[dzdž]/gi },
27
+ { l: 'e', s: /[ⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ]/gi },
28
+ { l: 'f', s: /[ⓕfḟƒꝼ]/gi },
29
+ { l: 'g', s: /[ⓖgǵĝḡğġǧģǥɠꞡᵹꝿ]/gi },
30
+ { l: 'h', s: /[ⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ]/gi },
31
+ { l: 'hv', s: /ƕ/gi },
32
+ { l: 'i', s: /[ⓘiìíîĩīĭİïḯỉǐȉȋịįḭɨı]/gi },
33
+ { l: 'j', s: /[ⓙjĵǰɉ]/gi },
34
+ { l: 'k', s: /[ⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ]/gi },
35
+ { l: 'l', s: /[ⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇꝆ]/gi },
36
+ { l: 'lj', s: /lj/gi },
37
+ { l: 'm', s: /[ⓜmḿṁṃɱɯ]/gi },
38
+ { l: 'n', s: /[ⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ]/gi },
39
+ { l: 'nj', s: /nj/gi },
40
+ { l: 'o', s: /[ⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔƟꝋꝍɵ]/gi },
41
+ { l: 'oi', s: /ƣ/gi },
42
+ { l: 'oe', s: /œ/gi },
43
+ { l: 'oo', s: /ꝏ/gi },
44
+ { l: 'ou', s: /ȣ/gi },
45
+ { l: 'p', s: /[ⓟpṕṗƥᵽꝑꝓꝕ]/gi },
46
+ { l: 'q', s: /[ⓠqɋꝗꝙ]/gi },
47
+ { l: 'r', s: /[ⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ]/gi },
48
+ { l: 's', s: /[ⓢsßẞśṥŝṡšṧṣṩșşȿꞩꞅẛ]/gi },
49
+ { l: 't', s: /[ⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ]/gi },
50
+ { l: 'tz', s: /ꜩ/gi },
51
+ { l: 'u', s: /[ⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ]/gi },
52
+ { l: 'v', s: /[ⓥvṽṿʋꝟʌ]/gi },
53
+ { l: 'vy', s: /ꝡ/gi },
54
+ { l: 'w', s: /[ⓦwẁẃŵẇẅẘẉⱳ]/gi },
55
+ { l: 'x', s: /[ⓧxẋẍ]/gi },
56
+ { l: 'y', s: /[ⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ]/gi },
57
+ { l: 'z', s: /[ⓩzźẑżžẓẕƶȥɀⱬꝣ]/gi },
58
+ ];
59
+ const defaultMinCountForSearch = 6;
60
+ const protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
61
+
62
+ class Select2Utils {
63
+ static getOptionByValue(data, value) {
64
+ if (Array.isArray(data)) {
65
+ for (const groupOrOption of data) {
66
+ const options = groupOrOption.options;
67
+ if (options) {
68
+ for (const option of options) {
69
+ if (option.value === value) {
70
+ return option;
71
+ }
72
+ }
73
+ }
74
+ else if (groupOrOption.value === value) {
75
+ return groupOrOption;
76
+ }
77
+ }
78
+ }
79
+ return null;
80
+ }
81
+ static getOptionsByValue(data, value, multiple) {
82
+ if (multiple) {
83
+ const values = Array.isArray(value) ? value : [];
84
+ const result = [];
85
+ for (const v of values) {
86
+ const option = Select2Utils.getOptionByValue(data, v);
87
+ if (option) {
88
+ result.push(option);
89
+ }
90
+ }
91
+ return result;
92
+ }
93
+ return Select2Utils.getOptionByValue(data, value);
94
+ }
95
+ static getFirstAvailableOption(data) {
96
+ if (Array.isArray(data)) {
97
+ for (const groupOrOption of data) {
98
+ const options = groupOrOption.options;
99
+ if (options) {
100
+ for (const option of options) {
101
+ if (!option.disabled) {
102
+ return option.value;
103
+ }
104
+ }
105
+ }
106
+ else {
107
+ const option = groupOrOption;
108
+ if (!option.disabled) {
109
+ return option.value;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ return null;
115
+ }
116
+ static valueIsNotInFilteredData(filteredData, value) {
117
+ if (Select2Utils.isNullOrUndefined(value)) {
118
+ return true;
119
+ }
120
+ for (const groupOrOption of filteredData) {
121
+ const options = groupOrOption.options;
122
+ if (options) {
123
+ for (const option of options) {
124
+ if (option.value === value) {
125
+ return false;
126
+ }
127
+ }
128
+ }
129
+ else if (groupOrOption.value === value) {
130
+ return false;
131
+ }
132
+ }
133
+ return true;
134
+ }
135
+ // eslint-disable-next-line
136
+ static getPreviousOption(filteredData, hoveringValue) {
137
+ let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
138
+ for (let i = filteredData.length - 1; i >= 0; i--) {
139
+ const groupOrOption = filteredData[i];
140
+ const options = groupOrOption.options;
141
+ if (options) {
142
+ for (let j = options.length - 1; j >= 0; j--) {
143
+ const option = options[j];
144
+ if (findIt && !option.disabled && !option.hide) {
145
+ return option;
146
+ }
147
+ if (!findIt) {
148
+ findIt = option.value === hoveringValue;
149
+ }
150
+ }
151
+ }
152
+ else {
153
+ const option = groupOrOption;
154
+ if (findIt && !option.disabled && !option.hide) {
155
+ return option;
156
+ }
157
+ if (!findIt) {
158
+ findIt = option.value === hoveringValue;
159
+ }
160
+ }
161
+ }
162
+ return null;
163
+ }
164
+ // eslint-disable-next-line
165
+ static getNextOption(filteredData, hoveringValue) {
166
+ let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
167
+ for (const groupOrOption of filteredData) {
168
+ const options = groupOrOption.options;
169
+ if (options) {
170
+ for (const option of options) {
171
+ if (findIt) {
172
+ if (!option.disabled && !option.hide) {
173
+ return option;
174
+ }
175
+ }
176
+ else if (!findIt) {
177
+ findIt = option.value === hoveringValue;
178
+ }
179
+ }
180
+ }
181
+ else {
182
+ const option = groupOrOption;
183
+ if (findIt) {
184
+ if (!option.disabled && !option.hide) {
185
+ return option;
186
+ }
187
+ }
188
+ else if (!findIt) {
189
+ findIt = option.value === hoveringValue;
190
+ }
191
+ }
192
+ }
193
+ return null;
194
+ }
195
+ static getReduceData(data, maxResults = 0) {
196
+ if (maxResults > 0) {
197
+ let counter = 0;
198
+ const result = [];
199
+ // debugger;
200
+ for (const groupOrOption of data) {
201
+ const options = groupOrOption.options;
202
+ if (options) {
203
+ const group = {
204
+ ...groupOrOption,
205
+ options: [],
206
+ };
207
+ result.push(group);
208
+ for (const item of options) {
209
+ group.options.push(item);
210
+ counter++;
211
+ if (counter === maxResults) {
212
+ return { result, reduce: true };
213
+ }
214
+ }
215
+ }
216
+ else {
217
+ result.push(groupOrOption);
218
+ counter++;
219
+ }
220
+ if (counter === maxResults) {
221
+ return { result, reduce: true };
222
+ }
223
+ }
224
+ return { result, reduce: false };
225
+ }
226
+ else {
227
+ return { result: data, reduce: false };
228
+ }
229
+ }
230
+ static getFilteredData(data, searchText, editPattern) {
231
+ if (searchText) {
232
+ const result = [];
233
+ for (const groupOrOption of data) {
234
+ const options = groupOrOption.options;
235
+ if (options) {
236
+ if (options.some(group => Select2Utils.containSearchText(group.label, searchText, editPattern))) {
237
+ const filteredOptions = options.filter(group => Select2Utils.containSearchText(group.label, searchText, editPattern));
238
+ result.push({
239
+ ...groupOrOption,
240
+ options: filteredOptions,
241
+ });
242
+ }
243
+ }
244
+ else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
245
+ result.push(groupOrOption);
246
+ }
247
+ }
248
+ return result;
249
+ }
250
+ else {
251
+ return data;
252
+ }
253
+ }
254
+ static getFilteredSelectedData(data, selectedOptions) {
255
+ const result = [];
256
+ for (const groupOrOption of data) {
257
+ const options = groupOrOption.options;
258
+ if (options) {
259
+ const filteredOptions = options.filter(group => Select2Utils.isSelected(selectedOptions, group, true) === 'false');
260
+ if (filteredOptions.length) {
261
+ result.push({
262
+ ...groupOrOption,
263
+ options: filteredOptions,
264
+ });
265
+ }
266
+ }
267
+ else if (Select2Utils.isSelected(selectedOptions, groupOrOption, true) === 'false') {
268
+ result.push(groupOrOption);
269
+ }
270
+ }
271
+ return result;
272
+ }
273
+ static isSearchboxHiddex(data, minCountForSearch) {
274
+ if (minCountForSearch === '' ||
275
+ minCountForSearch === undefined ||
276
+ minCountForSearch === null ||
277
+ isNaN(+minCountForSearch)) {
278
+ minCountForSearch = defaultMinCountForSearch;
279
+ }
280
+ const optionCount = Select2Utils.getOptionsCount(data);
281
+ return optionCount < +minCountForSearch;
282
+ }
283
+ static isSelected(options, option, multiple) {
284
+ return multiple
285
+ ? options && options.some(op => op.value === option.value)
286
+ ? 'true'
287
+ : 'false'
288
+ : options && option.value === options.value
289
+ ? 'true'
290
+ : 'false';
291
+ }
292
+ static removeSelection(options, option) {
293
+ for (let i = 0; i < options.length; i++) {
294
+ if (options[i].value === option.value) {
295
+ options.splice(i, 1);
296
+ return;
297
+ }
298
+ }
299
+ }
300
+ static getOptionsCount(data) {
301
+ let count = 0;
302
+ if (Array.isArray(data)) {
303
+ for (const groupOrOption of data) {
304
+ const options = groupOrOption.options;
305
+ if (options) {
306
+ count += options.length;
307
+ }
308
+ else {
309
+ count++;
310
+ }
311
+ }
312
+ }
313
+ return count;
314
+ }
315
+ static isNullOrUndefined(value) {
316
+ return value === null || value === undefined;
317
+ }
318
+ static containSearchText(label, searchText, editPattern) {
319
+ return searchText
320
+ ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
321
+ : true;
322
+ }
323
+ static protectPattern(str) {
324
+ return str.replace(protectRegexp, '\\$&');
325
+ }
326
+ static formatSansUnicode(str) {
327
+ for (const unicodePattern of unicodePatterns) {
328
+ str = str.replace(unicodePattern.s, unicodePattern.l);
329
+ }
330
+ return str;
331
+ }
332
+ static formatPattern(str, editPattern) {
333
+ str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
334
+ if (editPattern && typeof editPattern === 'function') {
335
+ str = editPattern(str);
336
+ }
337
+ return str;
338
+ }
339
+ }
340
+
341
+ let nextUniqueId = 0;
342
+ const displaySearchStatusList = ['default', 'hidden', 'always'];
343
+ class Select2 {
344
+ constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
345
+ this._viewportRuler = _viewportRuler;
346
+ this._changeDetectorRef = _changeDetectorRef;
347
+ this._parentForm = _parentForm;
348
+ this._parentFormGroup = _parentFormGroup;
349
+ this._control = _control;
350
+ this.minCharForSearch = 0;
351
+ this.limitSelection = 0;
352
+ this.listPosition = 'below';
353
+ /** use the material style */
354
+ this.styleMode = 'default';
355
+ /** maximum results limit (0 = no limit) */
356
+ this.maxResults = 0;
357
+ /** message when maximum results */
358
+ this.maxResultsMessage = 'Too many results…';
359
+ /** infinite scroll distance */
360
+ this.infiniteScrollDistance = 1.5;
361
+ /** infinite scroll distance */
362
+ this.infiniteScrollThrottle = 150;
363
+ /** the max height of the results container when opening the select */
364
+ this.resultMaxHeight = '200px';
365
+ this.update = new EventEmitter();
366
+ this.open = new EventEmitter();
367
+ this.close = new EventEmitter();
368
+ this.focus = new EventEmitter();
369
+ this.blur = new EventEmitter();
370
+ this.search = new EventEmitter();
371
+ this.scroll = new EventEmitter();
372
+ this.removeOption = new EventEmitter();
373
+ this.option = null;
374
+ this.isOpen = false;
375
+ /** Whether the element is focused or not. */
376
+ this.focused = false;
377
+ this.hoveringValue = null;
378
+ this.innerSearchText = '';
379
+ this._stateChanges = new Subject();
380
+ this._disabled = false;
381
+ this._required = false;
382
+ this._readonly = false;
383
+ this._multiple = false;
384
+ this._overlay = false;
385
+ this._resettable = false;
386
+ this._hideSelectedItems = false;
387
+ this._clickDetection = false;
388
+ this._uid = `select2-${nextUniqueId++}`;
389
+ this._infiniteScroll = true;
390
+ /** View -> model callback called when select has been touched */
391
+ this._onTouched = () => {
392
+ // do nothing
393
+ };
394
+ /** View -> model callback called when value changes */
395
+ this._onChange = () => {
396
+ // do nothing
397
+ };
398
+ // eslint-disable-next-line no-self-assign
399
+ this.id = this.id;
400
+ this._tabIndex = parseInt(tabIndex, 10) || 0;
401
+ if (this._control) {
402
+ this._control.valueAccessor = this;
403
+ }
404
+ this._clickDetectionFc = this.clickDetection.bind(this);
405
+ }
406
+ /** data of options & optiongrps */
407
+ set data(data) {
408
+ this._data = data;
409
+ this.updateFilteredData();
410
+ }
411
+ get multiple() {
412
+ return this._multiple;
413
+ }
414
+ set multiple(value) {
415
+ this._multiple = this._coerceBooleanProperty(value);
416
+ this.ngOnInit();
417
+ }
418
+ /** use the material style */
419
+ get overlay() {
420
+ return this._overlay;
421
+ }
422
+ set overlay(value) {
423
+ this._overlay = this._coerceBooleanProperty(value);
424
+ }
425
+ /** infinite scroll activated */
426
+ get infiniteScroll() {
427
+ return this._infiniteScroll;
428
+ }
429
+ set infiniteScroll(value) {
430
+ this._infiniteScroll = this._coerceBooleanProperty(value);
431
+ }
432
+ get select2Options() {
433
+ return this.multiple ? this.option : null;
434
+ }
435
+ get select2Option() {
436
+ return this.multiple ? null : this.option;
437
+ }
438
+ get searchText() {
439
+ return this.innerSearchText;
440
+ }
441
+ set searchText(text) {
442
+ if (this.customSearchEnabled) {
443
+ this.search.emit({
444
+ component: this,
445
+ value: this._value,
446
+ search: text,
447
+ });
448
+ }
449
+ this.innerSearchText = text;
450
+ }
451
+ /** minimal data of show the search field */
452
+ get minCountForSearch() {
453
+ return this._minCountForSearch;
454
+ }
455
+ set minCountForSearch(value) {
456
+ this._minCountForSearch = value;
457
+ this.updateSearchBox();
458
+ }
459
+ /** Unique id of the element. */
460
+ get id() {
461
+ return this._id;
462
+ }
463
+ set id(value) {
464
+ this._id = value || this._uid;
465
+ }
466
+ /** Whether the element is required. */
467
+ get required() {
468
+ return this._required;
469
+ }
470
+ set required(value) {
471
+ this._required = this._coerceBooleanProperty(value);
472
+ }
473
+ /** Whether selected items should be hidden. */
474
+ get disabled() {
475
+ return this._control ? this._control.disabled : this._disabled;
476
+ }
477
+ set disabled(value) {
478
+ this._disabled = this._coerceBooleanProperty(value);
479
+ }
480
+ /** Whether items are hidden when has. */
481
+ get hideSelectedItems() {
482
+ return this._hideSelectedItems;
483
+ }
484
+ set hideSelectedItems(value) {
485
+ this._hideSelectedItems = this._coerceBooleanProperty(value);
486
+ }
487
+ /** Whether the element is readonly. */
488
+ get readonly() {
489
+ return this._readonly;
490
+ }
491
+ set readonly(value) {
492
+ this._readonly = this._coerceBooleanProperty(value);
493
+ }
494
+ /** The input element's value. */
495
+ get value() {
496
+ return this._value;
497
+ }
498
+ set value(value) {
499
+ if (this.testValueChange(this._value, value)) {
500
+ setTimeout(() => {
501
+ this._value = value;
502
+ this.writeValue(value);
503
+ }, 10);
504
+ }
505
+ }
506
+ /** Tab index for the select2 element. */
507
+ get tabIndex() {
508
+ return this.disabled ? -1 : this._tabIndex;
509
+ }
510
+ set tabIndex(value) {
511
+ if (typeof value !== 'undefined') {
512
+ this._tabIndex = value;
513
+ }
514
+ }
515
+ /** reset with no selected value */
516
+ get resettable() {
517
+ return this._resettable;
518
+ }
519
+ set resettable(value) {
520
+ this._resettable = this._coerceBooleanProperty(value);
521
+ }
522
+ get ariaInvalid() {
523
+ return this._isErrorState();
524
+ }
525
+ get classMaterial() {
526
+ return this.styleMode === 'material';
527
+ }
528
+ get classNostyle() {
529
+ return this.styleMode === 'noStyle';
530
+ }
531
+ get select2above() {
532
+ return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
533
+ }
534
+ get _positions() {
535
+ if (this.listPosition === 'auto') {
536
+ [
537
+ {
538
+ originX: 'start',
539
+ originY: 'bottom',
540
+ overlayX: 'start',
541
+ overlayY: 'bottom',
542
+ },
543
+ {
544
+ originX: 'start',
545
+ originY: 'top',
546
+ overlayX: 'start',
547
+ overlayY: 'top',
548
+ },
549
+ ];
550
+ }
551
+ else {
552
+ return null;
553
+ }
554
+ }
555
+ get resultsElement() {
556
+ return this.resultContainer?.nativeElement;
557
+ }
558
+ ngOnInit() {
559
+ this._viewportRuler.change(100).subscribe(() => {
560
+ if (this.isOpen) {
561
+ this.triggerRect();
562
+ }
563
+ });
564
+ const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
565
+ if (option !== null) {
566
+ this.option = option;
567
+ }
568
+ if (!Array.isArray(option)) {
569
+ this.hoveringValue = this.value;
570
+ }
571
+ this.updateSearchBox();
572
+ }
573
+ ngAfterViewInit() {
574
+ this.cdkConnectedOverlay.positionChange.subscribe((posChange) => {
575
+ if (this.listPosition === 'auto' &&
576
+ posChange.connectionPair?.originY &&
577
+ this._overlayPosition !== posChange.connectionPair.originY) {
578
+ this.triggerRect();
579
+ this._overlayPosition = posChange.connectionPair.originY;
580
+ this._changeDetectorRef.detectChanges();
581
+ }
582
+ });
583
+ this.selectionElement = this.selection.nativeElement;
584
+ this.triggerRect();
585
+ }
586
+ ngDoCheck() {
587
+ this.updateSearchBox();
588
+ this._dirtyCheckNativeValue();
589
+ if (this._triggerRect) {
590
+ if (this.overlayWidth !== this._triggerRect.width) {
591
+ this.overlayWidth = this._triggerRect.width;
592
+ }
593
+ if (this._dropdownRect?.height > 0 && this.overlayHeight !== this._dropdownRect.height) {
594
+ this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
595
+ }
596
+ }
597
+ }
598
+ ngOnDestroy() {
599
+ window.document.body.removeEventListener('click', this._clickDetectionFc);
600
+ }
601
+ updateSearchBox() {
602
+ const hidden = this.customSearchEnabled
603
+ ? false
604
+ : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
605
+ if (this.isSearchboxHidden !== hidden) {
606
+ this.isSearchboxHidden = hidden;
607
+ }
608
+ }
609
+ hideSearch() {
610
+ const displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
611
+ return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
612
+ }
613
+ getOptionStyle(option) {
614
+ return ('select2-results__option ' +
615
+ (option.hide ? 'select2-results__option--hide ' : '') +
616
+ (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
617
+ (option.classes || ''));
618
+ }
619
+ mouseenter(option) {
620
+ if (!option.disabled) {
621
+ this.hoveringValue = option.value;
622
+ }
623
+ }
624
+ click(option) {
625
+ if (this.testSelection(option)) {
626
+ this.select(option);
627
+ }
628
+ }
629
+ reset(e) {
630
+ this.select(null);
631
+ e.preventDefault();
632
+ e.stopPropagation();
633
+ }
634
+ prevChange(event) {
635
+ event.stopPropagation();
636
+ }
637
+ toggleOpenAndClose() {
638
+ if (this.disabled) {
639
+ return;
640
+ }
641
+ this._focus(true);
642
+ this.isOpen = !this.isOpen;
643
+ if (this.isOpen) {
644
+ this.innerSearchText = '';
645
+ this.updateFilteredData();
646
+ this._focusSearchboxOrResultsElement();
647
+ setTimeout(() => {
648
+ if (this.option) {
649
+ const option = this.option instanceof Array ? this.option[0] : this.option;
650
+ this.updateScrollFromOption(option);
651
+ }
652
+ else if (this.resultsElement) {
653
+ this.resultsElement.scrollTop = 0;
654
+ }
655
+ setTimeout(() => {
656
+ this.triggerRect();
657
+ this.cdkConnectedOverlay?.overlayRef?.updatePosition();
658
+ }, 100);
659
+ });
660
+ this.open.emit(this);
661
+ }
662
+ else {
663
+ this.close.emit(this);
664
+ }
665
+ if (this.isOpen && !this._clickDetection) {
666
+ setTimeout(() => {
667
+ window.document.body.addEventListener('click', this._clickDetectionFc, false);
668
+ this._clickDetection = true;
669
+ }, timeout);
670
+ }
671
+ this._changeDetectorRef.markForCheck();
672
+ }
673
+ hasTemplate(option, defaut) {
674
+ return (this.templates instanceof TemplateRef ||
675
+ this.templates?.[option.templateId] instanceof TemplateRef ||
676
+ this.templates?.[defaut] instanceof TemplateRef);
677
+ }
678
+ getTemplate(option, defaut) {
679
+ return this.hasTemplate(option, defaut)
680
+ ? this.templates[option.templateId] || this.templates[defaut] || this.templates
681
+ : undefined;
682
+ }
683
+ triggerRect() {
684
+ this._triggerRect = this.selectionElement.getBoundingClientRect();
685
+ this._dropdownRect = this.dropdown?.nativeElement
686
+ ? this.dropdown.nativeElement.getBoundingClientRect()
687
+ : undefined;
688
+ }
689
+ testSelection(option) {
690
+ if (option.disabled) {
691
+ return false;
692
+ }
693
+ if (!this.multiple ||
694
+ !this.limitSelection ||
695
+ (Array.isArray(this._value) && this._value.length < this.limitSelection)) {
696
+ return true;
697
+ }
698
+ return false;
699
+ }
700
+ testValueChange(value1, value2) {
701
+ if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
702
+ value1 === value2) {
703
+ return false;
704
+ }
705
+ if (this.multiple &&
706
+ value1?.length &&
707
+ value2?.length &&
708
+ value1.length === value2.length) {
709
+ for (const e1 of value1) {
710
+ const test = value2.indexOf(e1) > -1;
711
+ if (!test) {
712
+ return true;
713
+ }
714
+ }
715
+ return false;
716
+ }
717
+ return true;
718
+ }
719
+ updateFilteredData() {
720
+ setTimeout(() => {
721
+ let result = this._data;
722
+ if (this.multiple && this.hideSelectedItems) {
723
+ result = Select2Utils.getFilteredSelectedData(result, this.option);
724
+ }
725
+ if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
726
+ result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
727
+ }
728
+ if (this.maxResults > 0) {
729
+ const data = Select2Utils.getReduceData(result, +this.maxResults);
730
+ result = data.result;
731
+ this.maxResultsExceeded = data.reduce;
732
+ }
733
+ else {
734
+ this.maxResultsExceeded = false;
735
+ }
736
+ if (Select2Utils.valueIsNotInFilteredData(result, this.hoveringValue)) {
737
+ this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
738
+ }
739
+ this.filteredData = result;
740
+ this._changeDetectorRef.markForCheck();
741
+ });
742
+ }
743
+ clickDetection(e) {
744
+ if (!this.ifParentContainsClass(e.target, 'selection')) {
745
+ if (this.isOpen && !this.ifParentContainsClass(e.target, 'select2-dropdown')) {
746
+ this.toggleOpenAndClose();
747
+ }
748
+ if (!this.ifParentContainsId(e.target, this._id)) {
749
+ this.clickExit();
750
+ }
751
+ }
752
+ else if (this.isOpen && !this.ifParentContainsId(e.target, this._id)) {
753
+ this.toggleOpenAndClose();
754
+ this.clickExit();
755
+ }
756
+ }
757
+ clickExit() {
758
+ this._focus(false);
759
+ window.document.body.removeEventListener('click', this._clickDetectionFc);
760
+ this._clickDetection = false;
761
+ }
762
+ ifParentContainsClass(element, cssClass) {
763
+ return this.getParentElementByClass(element, cssClass) !== null;
764
+ }
765
+ ifParentContainsId(element, id) {
766
+ return this.getParentElementById(element, id) !== null;
767
+ }
768
+ getParentElementByClass(element, cssClass) {
769
+ if (this.containClasses(element, cssClass.trim().split(/\s+/))) {
770
+ return element;
771
+ }
772
+ return element.parentElement ? this.getParentElementByClass(element.parentElement, cssClass) : null;
773
+ }
774
+ getParentElementById(element, id) {
775
+ if (element.id === id) {
776
+ return element;
777
+ }
778
+ return element.parentElement ? this.getParentElementById(element.parentElement, id) : null;
779
+ }
780
+ containClasses(element, cssClasses) {
781
+ if (!element.classList) {
782
+ return false;
783
+ }
784
+ for (const cssClass of cssClasses) {
785
+ if (!element.classList.contains(cssClass)) {
786
+ return false;
787
+ }
788
+ }
789
+ return true;
790
+ }
791
+ focusin() {
792
+ if (!this.disabled) {
793
+ this._focus(true);
794
+ }
795
+ }
796
+ focusout() {
797
+ if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
798
+ this._focus(false);
799
+ this._onTouched();
800
+ }
801
+ }
802
+ select(option) {
803
+ let value;
804
+ if (option !== null) {
805
+ if (this.multiple) {
806
+ const options = this.option;
807
+ const index = options.findIndex(op => op.value === option.value);
808
+ if (index === -1) {
809
+ options.push(option);
810
+ }
811
+ else {
812
+ options.splice(index, 1);
813
+ }
814
+ value = this.option.map(op => op.value);
815
+ }
816
+ else {
817
+ this.option = option;
818
+ if (this.isOpen) {
819
+ this.isOpen = false;
820
+ this.close.emit(this);
821
+ if (this.selectionElement) {
822
+ this.selectionElement.focus();
823
+ }
824
+ }
825
+ value = this.option.value;
826
+ }
827
+ }
828
+ else {
829
+ this.option = null;
830
+ }
831
+ if (this.multiple && this.hideSelectedItems) {
832
+ this.updateFilteredData();
833
+ }
834
+ if (this._control) {
835
+ this._onChange(value);
836
+ }
837
+ else {
838
+ this._value = value;
839
+ }
840
+ this.update.emit({
841
+ component: this,
842
+ value: value,
843
+ options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
844
+ });
845
+ }
846
+ keyDown(e) {
847
+ if (this._testKey(e, ['ArrowDown', 40])) {
848
+ this.moveDown();
849
+ e.preventDefault();
850
+ }
851
+ else if (this._testKey(e, ['ArrowUp', 38])) {
852
+ this.moveUp();
853
+ e.preventDefault();
854
+ }
855
+ else if (this._testKey(e, ['Enter', 13])) {
856
+ this.selectByEnter();
857
+ e.preventDefault();
858
+ }
859
+ else if (this._testKey(e, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
860
+ this.toggleOpenAndClose();
861
+ this._focus(false);
862
+ }
863
+ }
864
+ openKey(e) {
865
+ if (this._testKey(e, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
866
+ this.toggleOpenAndClose();
867
+ e.preventDefault();
868
+ }
869
+ else if (this._testKey(e, ['Escape', 'Tab', 9, 27])) {
870
+ this._focus(false);
871
+ this._onTouched();
872
+ }
873
+ }
874
+ trackBy(_index, item) {
875
+ return item.value;
876
+ }
877
+ searchUpdate(e) {
878
+ this.searchText = e.target.value;
879
+ this.updateFilteredData();
880
+ }
881
+ isSelected(option) {
882
+ return Select2Utils.isSelected(this.option, option, this.multiple);
883
+ }
884
+ isDisabled(option) {
885
+ return option.disabled ? 'true' : 'false';
886
+ }
887
+ removeSelection(e, option) {
888
+ Select2Utils.removeSelection(this.option, option);
889
+ if (this.multiple && this.hideSelectedItems) {
890
+ this.updateFilteredData();
891
+ }
892
+ const value = this.option.map(op => op.value);
893
+ if (this._control) {
894
+ this._onChange(value);
895
+ }
896
+ else {
897
+ this._value = value;
898
+ }
899
+ this.update.emit({
900
+ component: this,
901
+ value: value,
902
+ options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
903
+ });
904
+ this.removeOption.emit({
905
+ component: this,
906
+ value: value,
907
+ removedOption: option,
908
+ });
909
+ e.preventDefault();
910
+ e.stopPropagation();
911
+ if (this.isOpen) {
912
+ this._focusSearchboxOrResultsElement();
913
+ }
914
+ }
915
+ /**
916
+ * Sets the model value. Implemented as part of ControlValueAccessor.
917
+ * @param value
918
+ */
919
+ writeValue(value) {
920
+ this._setSelectionByValue(value);
921
+ }
922
+ /**
923
+ * Saves a callback function to be invoked when the select's value
924
+ * changes from user input. Part of the ControlValueAccessor interface
925
+ * required to integrate with Angular's core forms API.
926
+ *
927
+ * @param fn Callback to be triggered when the value changes.
928
+ */
929
+ registerOnChange(fn) {
930
+ this._onChange = fn;
931
+ }
932
+ /**
933
+ * Saves a callback function to be invoked when the select is blurred
934
+ * by the user. Part of the ControlValueAccessor interface required
935
+ * to integrate with Angular's core forms API.
936
+ *
937
+ * @param fn Callback to be triggered when the component has been touched.
938
+ */
939
+ registerOnTouched(fn) {
940
+ this._onTouched = fn;
941
+ }
942
+ /**
943
+ * Sets whether the component should be disabled.
944
+ * Implemented as part of ControlValueAccessor.
945
+ * @param isDisabled
946
+ */
947
+ setDisabledState(isDisabled) {
948
+ this.disabled = isDisabled;
949
+ }
950
+ onScroll(way) {
951
+ this.scroll.emit({
952
+ component: this,
953
+ way,
954
+ search: this.innerSearchText,
955
+ });
956
+ }
957
+ _isErrorState() {
958
+ const isInvalid = this._control && this._control.invalid;
959
+ const isTouched = this._control && this._control.touched;
960
+ const isSubmitted = (this._parentFormGroup && this._parentFormGroup.submitted) ||
961
+ (this._parentForm && this._parentForm.submitted);
962
+ return !!(isInvalid && (isTouched || isSubmitted));
963
+ }
964
+ moveUp() {
965
+ this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
966
+ }
967
+ moveDown() {
968
+ this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
969
+ }
970
+ updateScrollFromOption(option) {
971
+ if (option) {
972
+ this.hoveringValue = option.value;
973
+ const domElement = this.results.find(r => r.nativeElement.innerText.trim() === option.label);
974
+ if (domElement && this.resultsElement) {
975
+ this.resultsElement.scrollTop = 0;
976
+ const listClientRect = this.resultsElement.getBoundingClientRect();
977
+ const optionClientRect = domElement.nativeElement.getBoundingClientRect();
978
+ this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
979
+ }
980
+ }
981
+ }
982
+ selectByEnter() {
983
+ if (this.hoveringValue) {
984
+ const option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
985
+ this.select(option);
986
+ }
987
+ }
988
+ _testKey(event, refs = []) {
989
+ return this._isKey(this._getKey(event), refs);
990
+ }
991
+ _getKey(event) {
992
+ let code;
993
+ if (event.key !== undefined) {
994
+ code = event.key;
995
+ }
996
+ else if (event['keyIdentifier'] !== undefined) {
997
+ code = event['keyIdentifier'];
998
+ }
999
+ else if (event['keyCode'] !== undefined) {
1000
+ code = event['keyCode'];
1001
+ }
1002
+ else {
1003
+ event.preventDefault();
1004
+ }
1005
+ return code;
1006
+ }
1007
+ _isKey(code, refs = []) {
1008
+ return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
1009
+ }
1010
+ /**
1011
+ * Sets the selected option based on a value. If no option can be
1012
+ * found with the designated value, the select trigger is cleared.
1013
+ */
1014
+ _setSelectionByValue(value) {
1015
+ if (this.option || (value !== undefined && value !== null)) {
1016
+ const isArray = Array.isArray(value);
1017
+ if (this.multiple && value && !isArray) {
1018
+ throw new Error('Non array value.');
1019
+ }
1020
+ else if (this._data) {
1021
+ if (this.multiple) {
1022
+ this.option = []; // if value is null, then empty option and return
1023
+ if (isArray) {
1024
+ // value is not null. Preselect value
1025
+ const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1026
+ selectedValues.map(item => this.select(item));
1027
+ }
1028
+ }
1029
+ else {
1030
+ this.select(Select2Utils.getOptionByValue(this._data, value));
1031
+ }
1032
+ }
1033
+ else if (this._control) {
1034
+ this._control.viewToModelUpdate(value);
1035
+ }
1036
+ this._changeDetectorRef.markForCheck();
1037
+ }
1038
+ }
1039
+ /** Does some manual dirty checking on the native input `value` property. */
1040
+ _dirtyCheckNativeValue() {
1041
+ const newValue = this.value;
1042
+ if (this._previousNativeValue !== newValue) {
1043
+ this._previousNativeValue = newValue;
1044
+ this._stateChanges.next();
1045
+ }
1046
+ }
1047
+ _coerceBooleanProperty(value) {
1048
+ return value != null && `${value}` !== 'false';
1049
+ }
1050
+ _focusSearchboxOrResultsElement() {
1051
+ if (!this.isSearchboxHidden) {
1052
+ setTimeout(() => {
1053
+ if (this.searchInput && this.searchInput.nativeElement) {
1054
+ this.searchInput.nativeElement.focus();
1055
+ }
1056
+ });
1057
+ }
1058
+ else if (this.resultsElement) {
1059
+ this.resultsElement.focus();
1060
+ }
1061
+ }
1062
+ _focus(state) {
1063
+ if (!state && this.focused) {
1064
+ this.focused = state;
1065
+ this.blur.emit(this);
1066
+ }
1067
+ else if (state && !this.focused) {
1068
+ this.focused = state;
1069
+ this.focus.emit(this);
1070
+ }
1071
+ }
1072
+ _isAbobeOverlay() {
1073
+ return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1074
+ ? this._overlayPosition === 'top'
1075
+ : this.listPosition === 'above';
1076
+ }
1077
+ }
1078
+ /** @nocollapse */ Select2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1079
+ /** @nocollapse */ Select2.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: Select2, selector: "select2", inputs: { data: "data", minCharForSearch: "minCharForSearch", displaySearchStatus: "displaySearchStatus", placeholder: "placeholder", customSearchEnabled: "customSearchEnabled", limitSelection: "limitSelection", listPosition: "listPosition", multiple: "multiple", overlay: "overlay", styleMode: "styleMode", noResultMessage: "noResultMessage", maxResults: "maxResults", maxResultsMessage: "maxResultsMessage", infiniteScrollDistance: "infiniteScrollDistance", infiniteScrollThrottle: "infiniteScrollThrottle", infiniteScroll: "infiniteScroll", editPattern: "editPattern", templates: "templates", resultMaxHeight: "resultMaxHeight", minCountForSearch: "minCountForSearch", id: "id", required: "required", disabled: "disabled", hideSelectedItems: "hideSelectedItems", readonly: "readonly", value: "value", tabIndex: "tabIndex", resettable: "resettable" }, outputs: { update: "update", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { properties: { "id": "this.id", "attr.aria-invalid": "this.ariaInvalid", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default select2-container--focus\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <span *ngIf=\"select2Option\" [innerHTML]=\"select2Option.label\"></span>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\">\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:#000;color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:0 0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:white;background:var(--select2-dropdown-background, white);border:1px solid #aaa;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-webkit-user-select:none;user-select:none;color:#000;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background:#fff;filter:alpha(opacity=0)}.select2-required:before{content:\"*\";color:red;color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:#fff;background:var(--select2-selection-background, #fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;color:var(--select2-selection-text-color, #444);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:#888 transparent;border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:#999;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:#eee;background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent #888;border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:#fff;background:var(--select2-selection-background, #fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:#999;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:#000;color:var(--select2-selection-choice-text-color, #000);background:#e4e4e4;background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid #aaa;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid #000 1px;border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid #000 1px;border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:#eee;background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa;border:1px solid var(--select2-search-border-color, #aaa);background:#fff;background:1px solid var(--select2-search-background, #fff);border-radius:0;border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999;color:var(--select2-option-disabled-text-color, #999);background:transparent;background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:#000;color:var(--select2-option-selected-text-color, #000);background:#ddd;background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:#5897fb;background:var(--select2-option-highlighted-background, #5897fb);color:#fff;color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:gray;color:var(--select2-option-group-text-color, gray);background:transparent;background:var(--select2-option-group-background, transparent)}.select2-no-result{color:#888;color:var(--select2-no-result-color, #888);font-style:italic;font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:#888;color:var(--select2-too-much-result-color, #888);font-style:italic;font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:#ddd;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:#5a419e;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:#00000061;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:rgba(0,0,0,.04);background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:#000;color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:#ff5722;color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:linear-gradient(to right,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0);background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:red;background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:#888;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:rgba(0,0,0,.32);background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}@supports (-ms-scroll-limit: 0){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:25px}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] });
1080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2, decorators: [{
1081
+ type: Component,
1082
+ args: [{ selector: 'select2', template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default select2-container--focus\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <span *ngIf=\"select2Option\" [innerHTML]=\"select2Option.label\"></span>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\">\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:#000;color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:0 0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:white;background:var(--select2-dropdown-background, white);border:1px solid #aaa;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-webkit-user-select:none;user-select:none;color:#000;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background:#fff;filter:alpha(opacity=0)}.select2-required:before{content:\"*\";color:red;color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:#fff;background:var(--select2-selection-background, #fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;color:var(--select2-selection-text-color, #444);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:#888 transparent;border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:#999;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:#eee;background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent #888;border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:#fff;background:var(--select2-selection-background, #fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:#999;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:#000;color:var(--select2-selection-choice-text-color, #000);background:#e4e4e4;background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid #aaa;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius, 4px);cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid #000 1px;border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid #000 1px;border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:#eee;background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa;border:1px solid var(--select2-search-border-color, #aaa);background:#fff;background:1px solid var(--select2-search-background, #fff);border-radius:0;border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999;color:var(--select2-option-disabled-text-color, #999);background:transparent;background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:#000;color:var(--select2-option-selected-text-color, #000);background:#ddd;background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:#5897fb;background:var(--select2-option-highlighted-background, #5897fb);color:#fff;color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:gray;color:var(--select2-option-group-text-color, gray);background:transparent;background:var(--select2-option-group-background, transparent)}.select2-no-result{color:#888;color:var(--select2-no-result-color, #888);font-style:italic;font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:#888;color:var(--select2-too-much-result-color, #888);font-style:italic;font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:#ddd;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:#5a419e;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:#00000061;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:rgba(0,0,0,.04);background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:#000;color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:#ff5722;color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:linear-gradient(to right,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0);background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:red;background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:#888;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:rgba(0,0,0,.32);background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}@supports (-ms-scroll-limit: 0){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:25px}}\n"] }]
1083
+ }], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: i0.ChangeDetectorRef }, { type: i2.NgForm, decorators: [{
1084
+ type: Optional
1085
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1086
+ type: Optional
1087
+ }] }, { type: i2.NgControl, decorators: [{
1088
+ type: Self
1089
+ }, {
1090
+ type: Optional
1091
+ }] }, { type: undefined, decorators: [{
1092
+ type: Attribute,
1093
+ args: ['tabindex']
1094
+ }] }]; }, propDecorators: { data: [{
1095
+ type: Input
1096
+ }], minCharForSearch: [{
1097
+ type: Input
1098
+ }], displaySearchStatus: [{
1099
+ type: Input
1100
+ }], placeholder: [{
1101
+ type: Input
1102
+ }], customSearchEnabled: [{
1103
+ type: Input
1104
+ }], limitSelection: [{
1105
+ type: Input
1106
+ }], listPosition: [{
1107
+ type: Input
1108
+ }], multiple: [{
1109
+ type: Input
1110
+ }], overlay: [{
1111
+ type: Input
1112
+ }], styleMode: [{
1113
+ type: Input
1114
+ }], noResultMessage: [{
1115
+ type: Input
1116
+ }], maxResults: [{
1117
+ type: Input
1118
+ }], maxResultsMessage: [{
1119
+ type: Input
1120
+ }], infiniteScrollDistance: [{
1121
+ type: Input
1122
+ }], infiniteScrollThrottle: [{
1123
+ type: Input
1124
+ }], infiniteScroll: [{
1125
+ type: Input
1126
+ }], editPattern: [{
1127
+ type: Input
1128
+ }], templates: [{
1129
+ type: Input
1130
+ }], resultMaxHeight: [{
1131
+ type: Input
1132
+ }], update: [{
1133
+ type: Output
1134
+ }], open: [{
1135
+ type: Output
1136
+ }], close: [{
1137
+ type: Output
1138
+ }], focus: [{
1139
+ type: Output
1140
+ }], blur: [{
1141
+ type: Output
1142
+ }], search: [{
1143
+ type: Output
1144
+ }], scroll: [{
1145
+ type: Output
1146
+ }], removeOption: [{
1147
+ type: Output
1148
+ }], minCountForSearch: [{
1149
+ type: Input
1150
+ }], id: [{
1151
+ type: Input
1152
+ }, {
1153
+ type: HostBinding,
1154
+ args: ['id']
1155
+ }], required: [{
1156
+ type: Input
1157
+ }], disabled: [{
1158
+ type: Input
1159
+ }], hideSelectedItems: [{
1160
+ type: Input
1161
+ }], readonly: [{
1162
+ type: Input
1163
+ }], value: [{
1164
+ type: Input
1165
+ }], tabIndex: [{
1166
+ type: Input
1167
+ }], resettable: [{
1168
+ type: Input
1169
+ }], ariaInvalid: [{
1170
+ type: HostBinding,
1171
+ args: ['attr.aria-invalid']
1172
+ }], classMaterial: [{
1173
+ type: HostBinding,
1174
+ args: ['class.material']
1175
+ }], classNostyle: [{
1176
+ type: HostBinding,
1177
+ args: ['class.nostyle']
1178
+ }], select2above: [{
1179
+ type: HostBinding,
1180
+ args: ['class.select2-above']
1181
+ }], cdkConnectedOverlay: [{
1182
+ type: ViewChild,
1183
+ args: [CdkConnectedOverlay]
1184
+ }], selection: [{
1185
+ type: ViewChild,
1186
+ args: ['selection', { static: true }]
1187
+ }], resultContainer: [{
1188
+ type: ViewChild,
1189
+ args: ['results']
1190
+ }], results: [{
1191
+ type: ViewChildren,
1192
+ args: ['result']
1193
+ }], searchInput: [{
1194
+ type: ViewChild,
1195
+ args: ['searchInput']
1196
+ }], dropdown: [{
1197
+ type: ViewChild,
1198
+ args: ['dropdown']
1199
+ }] } });
1200
+
1201
+ class Select2Hint {
1202
+ }
1203
+ /** @nocollapse */ Select2Hint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1204
+ /** @nocollapse */ Select2Hint.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: Select2Hint, selector: "select2-hint", ngImport: i0 });
1205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Hint, decorators: [{
1206
+ type: Directive,
1207
+ args: [{ selector: 'select2-hint' }]
1208
+ }] });
1209
+
1210
+ class Select2Label {
1211
+ }
1212
+ /** @nocollapse */ Select2Label.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1213
+ /** @nocollapse */ Select2Label.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: Select2Label, selector: "select2-label", ngImport: i0 });
1214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Label, decorators: [{
1215
+ type: Directive,
1216
+ args: [{ selector: 'select2-label' }]
1217
+ }] });
1218
+
1219
+ class Select2Module {
1220
+ }
1221
+ /** @nocollapse */ Select2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1222
+ /** @nocollapse */ Select2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: Select2Module, declarations: [Select2Hint, Select2Label, Select2], imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule], exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2] });
1223
+ /** @nocollapse */ Select2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Module, imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule, FormsModule, ReactiveFormsModule] });
1224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Select2Module, decorators: [{
1225
+ type: NgModule,
1226
+ args: [{
1227
+ imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
1228
+ declarations: [Select2Hint, Select2Label, Select2],
1229
+ exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
1230
+ }]
1231
+ }] });
1232
+
1233
+ /*
1234
+ * Public API Surface of ng-select2-component
1235
+ */
1236
+
1237
+ /**
1238
+ * Generated bundle index. Do not edit.
1239
+ */
1240
+
1241
+ export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1242
+ //# sourceMappingURL=ng-select2-component.mjs.map