93 | this.wrapperEl = document.createElement('div');
94 | this.wrapperEl.className = 'ngui-auto-complete-wrapper';
95 | this.wrapperEl.style.position = 'relative';
96 | this.el.parentElement.insertBefore(this.wrapperEl, this.el.nextSibling);
97 | this.wrapperEl.appendChild(this.el);
98 |
99 | // Check if we were supplied with a [formControlName] and it is inside a [form]
100 | // else check if we are supplied with a [FormControl] regardless if it is inside a [form] tag
101 | if (this.parentForm && this.formControlName) {
102 | if (this.parentForm['form']) {
103 | this.formControl = (this.parentForm['form'] as UntypedFormGroup).get(this.formControlName);
104 | } else if (this.parentForm instanceof FormGroupName) {
105 | this.formControl = (this.parentForm as FormGroupName).control.controls[this.formControlName];
106 | }
107 | } else if (this.extFormControl) {
108 | this.formControl = this.extFormControl;
109 | }
110 |
111 | // apply toString() method for the object
112 | if (!!this.ngModel) {
113 | this.selectNewValue(this.ngModel);
114 | } else if (!!this.formControl && this.formControl.value) {
115 | this.selectNewValue(this.formControl.value);
116 | }
117 |
118 | }
119 |
120 | ngAfterViewInit() {
121 | // if this element is not an input tag, move dropdown after input tag
122 | // so that it displays correctly
123 | this.inputEl = this.el.tagName === 'INPUT' ? this.el as HTMLInputElement : this.el.querySelector('input');
124 |
125 | if (this.openOnFocus) {
126 | this.inputEl.addEventListener('focus', (e) => this.showAutoCompleteDropdown(e));
127 | }
128 |
129 | if (this.closeOnFocusOut) {
130 | this.inputEl.addEventListener('focusout', (e) => this.hideAutoCompleteDropdown(e));
131 | }
132 |
133 | if (!this.autocomplete) {
134 | this.inputEl.setAttribute('autocomplete', 'off');
135 | }
136 | this.inputEl.addEventListener('blur', (e) => {
137 | this.scheduledBlurHandler = () => {
138 | return this.blurHandler(e);
139 | };
140 | });
141 | this.inputEl.addEventListener('keydown', (e) => this.keydownEventHandler(e));
142 | this.inputEl.addEventListener('input', (e) => this.inputEventHandler(e));
143 | }
144 |
145 | ngOnDestroy(): void {
146 | if (this.componentRef) {
147 | this.componentRef.instance.valueSelected.unsubscribe();
148 | this.componentRef.instance.textEntered.unsubscribe();
149 | }
150 | if (this.documentClickListener) {
151 | document.removeEventListener('click', this.documentClickListener);
152 | }
153 | }
154 |
155 | ngOnChanges(changes: SimpleChanges): void {
156 | if (changes['ngModel']) {
157 | this.ngModel = this.setToStringFunction(changes['ngModel'].currentValue);
158 | this.renderValue(this.ngModel);
159 | }
160 | }
161 |
162 | // show auto-complete list below the current element
163 | public showAutoCompleteDropdown = (event?: any): void => {
164 | if (this.dropdownJustHidden) {
165 | return;
166 | }
167 | this.hideAutoCompleteDropdown();
168 | this.scheduledBlurHandler = null;
169 |
170 | this.componentRef = this.viewContainerRef.createComponent(NguiAutoCompleteComponent);
171 |
172 | const component = this.componentRef.instance;
173 | component.keyword = this.inputEl.value;
174 | component.showInputTag = false; // Do NOT display autocomplete input tag separately
175 |
176 | component.pathToData = this.pathToData;
177 | component.minChars = this.minChars;
178 | component.source = this.source;
179 | component.placeholder = this.autoCompletePlaceholder;
180 | component.acceptUserInput = this.acceptUserInput;
181 | component.maxNumList = parseInt(this.maxNumList, 10);
182 |
183 | component.loadingText = this.loadingText;
184 | component.loadingTemplate = this.loadingTemplate;
185 | component.listFormatter = this.listFormatter;
186 | component.blankOptionText = this.blankOptionText;
187 | component.noMatchFoundText = this.noMatchFoundText;
188 | component.tabToSelect = this.tabToSelect;
189 | component.selectOnBlur = this.selectOnBlur;
190 | component.matchFormatted = this.matchFormatted;
191 | component.autoSelectFirstItem = this.autoSelectFirstItem;
192 | component.headerItemTemplate = this.headerItemTemplate;
193 | component.ignoreAccents = this.ignoreAccents;
194 |
195 | component.valueSelected.subscribe(this.selectNewValue);
196 | component.textEntered.subscribe(this.enterNewText);
197 | component.customSelected.subscribe(this.selectCustomValue);
198 |
199 | this.acDropdownEl = this.componentRef.location.nativeElement;
200 | this.acDropdownEl.style.display = 'none';
201 |
202 | // if this element is not an input tag, move dropdown after input tag
203 | // so that it displays correctly
204 |
205 | // TODO: confirm with owners
206 | // with some reason, viewContainerRef.createComponent is creating element
207 | // to parent div which is created by us on ngOnInit, please try this with demo
208 |
209 | // if (this.el.tagName !== 'INPUT' && this.acDropdownEl) {
210 | this.inputEl.parentElement.insertBefore(this.acDropdownEl, this.inputEl.nextSibling);
211 | // }
212 | this.revertValue = typeof this.revertValue !== 'undefined' ? this.revertValue : '';
213 |
214 | setTimeout(() => {
215 | component.reloadList(this.inputEl.value);
216 | this.styleAutoCompleteDropdown();
217 | component.dropdownVisible = true;
218 | });
219 | };
220 |
221 | public blurHandler(event: any) {
222 | if (this.componentRef) {
223 | const component = this.componentRef.instance;
224 |
225 | if (this.selectOnBlur) {
226 | component.selectOne(component.filteredList[component.itemIndex]);
227 | }
228 |
229 | if (this.closeOnFocusOut) {
230 | this.hideAutoCompleteDropdown(event);
231 | }
232 | }
233 | }
234 |
235 | public hideAutoCompleteDropdown = (event?: any): void => {
236 | if (this.componentRef) {
237 | let currentItem: any;
238 | const hasRevertValue = (typeof this.revertValue !== 'undefined');
239 | if (this.inputEl && hasRevertValue && this.acceptUserInput === false) {
240 | currentItem = this.componentRef.instance.findItemFromSelectValue(this.inputEl.value);
241 | }
242 | this.componentRef.destroy();
243 | this.componentRef = undefined;
244 |
245 | if (this.inputEl && hasRevertValue && this.acceptUserInput === false && currentItem === null && this.inputEl.value !== '') {
246 | this.selectNewValue(this.revertValue);
247 | currentItem = this.revertValue;
248 | } else if (this.inputEl && this.acceptUserInput === true && typeof currentItem === 'undefined' && event && event.target.value) {
249 | this.enterNewText(event.target.value);
250 | }
251 | this.revertValue = currentItem;
252 | }
253 | this.dropdownJustHidden = true;
254 | setTimeout(() => this.dropdownJustHidden = false, 100);
255 | };
256 |
257 | public styleAutoCompleteDropdown = () => {
258 | if (this.componentRef) {
259 | const component = this.componentRef.instance;
260 |
261 | /* setting width/height auto complete */
262 | const thisElBCR = this.el.getBoundingClientRect();
263 | const thisInputElBCR = this.inputEl.getBoundingClientRect();
264 | const closeToBottom = thisInputElBCR.bottom + 100 > window.innerHeight;
265 | const directionOfStyle = this.isRtl ? 'right' : 'left';
266 |
267 | this.acDropdownEl.style.width = thisInputElBCR.width + 'px';
268 | this.acDropdownEl.style.position = 'absolute';
269 | this.acDropdownEl.style.zIndex = this.zIndex;
270 | this.acDropdownEl.style[directionOfStyle] = '0';
271 | this.acDropdownEl.style.display = 'inline-block';
272 |
273 | if (closeToBottom) {
274 | this.acDropdownEl.style.bottom = `${thisInputElBCR.height}px`;
275 | } else {
276 | this.acDropdownEl.style.top = `${thisInputElBCR.height}px`;
277 | }
278 | }
279 | };
280 |
281 | public setToStringFunction(item: any): any {
282 | if (item && typeof item === 'object') {
283 | let displayVal;
284 |
285 | if (typeof this.valueFormatter === 'string') {
286 | const matches = this.valueFormatter.match(/[a-zA-Z0-9_\$]+/g);
287 | let formatted = this.valueFormatter;
288 | if (matches && typeof item !== 'string') {
289 | matches.forEach((key) => {
290 | formatted = formatted.replace(key, item[key]);
291 | });
292 | }
293 | displayVal = formatted;
294 | } else if (typeof this.valueFormatter === 'function') {
295 | displayVal = this.valueFormatter(item);
296 | } else if (this.displayPropertyName) {
297 | displayVal = item[this.displayPropertyName];
298 | } else if (typeof this.listFormatter === 'string' && this.listFormatter.match(/^\w+$/)) {
299 | displayVal = item[this.listFormatter];
300 | } else {
301 | displayVal = item.value;
302 | }
303 | item.toString = () => displayVal;
304 | }
305 | return item;
306 | }
307 |
308 | public selectNewValue = (item: any) => {
309 | // make displayable value
310 | if (item && typeof item === 'object') {
311 | item = this.setToStringFunction(item);
312 | }
313 |
314 | this.renderValue(item);
315 |
316 | // make return value
317 | let val = item;
318 | if (this.selectValueOf && item[this.selectValueOf]) {
319 | val = item[this.selectValueOf];
320 | }
321 | if ((this.parentForm && this.formControlName) || this.extFormControl) {
322 | if (!!val) {
323 | this.formControl.patchValue(val);
324 | }
325 | }
326 | if (val !== this.ngModel) {
327 | this.ngModelChange.emit(val);
328 | }
329 | this.valueChanged.emit(val);
330 | this.hideAutoCompleteDropdown();
331 | setTimeout(() => {
332 | if (this.reFocusAfterSelect) {
333 | this.inputEl.focus();
334 | }
335 |
336 | return this.inputEl;
337 | });
338 | };
339 |
340 | public selectCustomValue = (text: string) => {
341 | this.customSelected.emit(text);
342 | this.hideAutoCompleteDropdown();
343 | setTimeout(() => {
344 | if (this.reFocusAfterSelect) {
345 | this.inputEl.focus();
346 | }
347 |
348 | return this.inputEl;
349 | });
350 | };
351 |
352 | public enterNewText = (value: any) => {
353 | this.renderValue(value);
354 | this.ngModelChange.emit(value);
355 | this.valueChanged.emit(value);
356 | this.hideAutoCompleteDropdown();
357 | };
358 |
359 | private keydownEventHandler = (evt: any) => {
360 | if (this.componentRef) {
361 | const component = this.componentRef.instance;
362 | component.inputElKeyHandler(evt);
363 | }
364 | };
365 |
366 | private inputEventHandler = (evt: any) => {
367 | if (this.componentRef) {
368 | const component = this.componentRef.instance;
369 | component.dropdownVisible = true;
370 | component.keyword = evt.target.value;
371 | component.reloadListInDelay(evt);
372 | } else {
373 | this.showAutoCompleteDropdown();
374 | }
375 | };
376 |
377 | private renderValue(item: any) {
378 | if (!!this.inputEl) {
379 | this.inputEl.value = '' + item;
380 | }
381 | }
382 | }
383 |
--------------------------------------------------------------------------------
/docs/3rdpartylicenses.txt:
--------------------------------------------------------------------------------
1 |
2 | --------------------------------------------------------------------------------
3 | Package: @angular/core
4 | License: "MIT"
5 |
6 |
7 | --------------------------------------------------------------------------------
8 | Package: rxjs
9 | License: "Apache-2.0"
10 |
11 | Apache License
12 | Version 2.0, January 2004
13 | http://www.apache.org/licenses/
14 |
15 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
16 |
17 | 1. Definitions.
18 |
19 | "License" shall mean the terms and conditions for use, reproduction,
20 | and distribution as defined by Sections 1 through 9 of this document.
21 |
22 | "Licensor" shall mean the copyright owner or entity authorized by
23 | the copyright owner that is granting the License.
24 |
25 | "Legal Entity" shall mean the union of the acting entity and all
26 | other entities that control, are controlled by, or are under common
27 | control with that entity. For the purposes of this definition,
28 | "control" means (i) the power, direct or indirect, to cause the
29 | direction or management of such entity, whether by contract or
30 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
31 | outstanding shares, or (iii) beneficial ownership of such entity.
32 |
33 | "You" (or "Your") shall mean an individual or Legal Entity
34 | exercising permissions granted by this License.
35 |
36 | "Source" form shall mean the preferred form for making modifications,
37 | including but not limited to software source code, documentation
38 | source, and configuration files.
39 |
40 | "Object" form shall mean any form resulting from mechanical
41 | transformation or translation of a Source form, including but
42 | not limited to compiled object code, generated documentation,
43 | and conversions to other media types.
44 |
45 | "Work" shall mean the work of authorship, whether in Source or
46 | Object form, made available under the License, as indicated by a
47 | copyright notice that is included in or attached to the work
48 | (an example is provided in the Appendix below).
49 |
50 | "Derivative Works" shall mean any work, whether in Source or Object
51 | form, that is based on (or derived from) the Work and for which the
52 | editorial revisions, annotations, elaborations, or other modifications
53 | represent, as a whole, an original work of authorship. For the purposes
54 | of this License, Derivative Works shall not include works that remain
55 | separable from, or merely link (or bind by name) to the interfaces of,
56 | the Work and Derivative Works thereof.
57 |
58 | "Contribution" shall mean any work of authorship, including
59 | the original version of the Work and any modifications or additions
60 | to that Work or Derivative Works thereof, that is intentionally
61 | submitted to Licensor for inclusion in the Work by the copyright owner
62 | or by an individual or Legal Entity authorized to submit on behalf of
63 | the copyright owner. For the purposes of this definition, "submitted"
64 | means any form of electronic, verbal, or written communication sent
65 | to the Licensor or its representatives, including but not limited to
66 | communication on electronic mailing lists, source code control systems,
67 | and issue tracking systems that are managed by, or on behalf of, the
68 | Licensor for the purpose of discussing and improving the Work, but
69 | excluding communication that is conspicuously marked or otherwise
70 | designated in writing by the copyright owner as "Not a Contribution."
71 |
72 | "Contributor" shall mean Licensor and any individual or Legal Entity
73 | on behalf of whom a Contribution has been received by Licensor and
74 | subsequently incorporated within the Work.
75 |
76 | 2. Grant of Copyright License. Subject to the terms and conditions of
77 | this License, each Contributor hereby grants to You a perpetual,
78 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79 | copyright license to reproduce, prepare Derivative Works of,
80 | publicly display, publicly perform, sublicense, and distribute the
81 | Work and such Derivative Works in Source or Object form.
82 |
83 | 3. Grant of Patent License. Subject to the terms and conditions of
84 | this License, each Contributor hereby grants to You a perpetual,
85 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
86 | (except as stated in this section) patent license to make, have made,
87 | use, offer to sell, sell, import, and otherwise transfer the Work,
88 | where such license applies only to those patent claims licensable
89 | by such Contributor that are necessarily infringed by their
90 | Contribution(s) alone or by combination of their Contribution(s)
91 | with the Work to which such Contribution(s) was submitted. If You
92 | institute patent litigation against any entity (including a
93 | cross-claim or counterclaim in a lawsuit) alleging that the Work
94 | or a Contribution incorporated within the Work constitutes direct
95 | or contributory patent infringement, then any patent licenses
96 | granted to You under this License for that Work shall terminate
97 | as of the date such litigation is filed.
98 |
99 | 4. Redistribution. You may reproduce and distribute copies of the
100 | Work or Derivative Works thereof in any medium, with or without
101 | modifications, and in Source or Object form, provided that You
102 | meet the following conditions:
103 |
104 | (a) You must give any other recipients of the Work or
105 | Derivative Works a copy of this License; and
106 |
107 | (b) You must cause any modified files to carry prominent notices
108 | stating that You changed the files; and
109 |
110 | (c) You must retain, in the Source form of any Derivative Works
111 | that You distribute, all copyright, patent, trademark, and
112 | attribution notices from the Source form of the Work,
113 | excluding those notices that do not pertain to any part of
114 | the Derivative Works; and
115 |
116 | (d) If the Work includes a "NOTICE" text file as part of its
117 | distribution, then any Derivative Works that You distribute must
118 | include a readable copy of the attribution notices contained
119 | within such NOTICE file, excluding those notices that do not
120 | pertain to any part of the Derivative Works, in at least one
121 | of the following places: within a NOTICE text file distributed
122 | as part of the Derivative Works; within the Source form or
123 | documentation, if provided along with the Derivative Works; or,
124 | within a display generated by the Derivative Works, if and
125 | wherever such third-party notices normally appear. The contents
126 | of the NOTICE file are for informational purposes only and
127 | do not modify the License. You may add Your own attribution
128 | notices within Derivative Works that You distribute, alongside
129 | or as an addendum to the NOTICE text from the Work, provided
130 | that such additional attribution notices cannot be construed
131 | as modifying the License.
132 |
133 | You may add Your own copyright statement to Your modifications and
134 | may provide additional or different license terms and conditions
135 | for use, reproduction, or distribution of Your modifications, or
136 | for any such Derivative Works as a whole, provided Your use,
137 | reproduction, and distribution of the Work otherwise complies with
138 | the conditions stated in this License.
139 |
140 | 5. Submission of Contributions. Unless You explicitly state otherwise,
141 | any Contribution intentionally submitted for inclusion in the Work
142 | by You to the Licensor shall be under the terms and conditions of
143 | this License, without any additional terms or conditions.
144 | Notwithstanding the above, nothing herein shall supersede or modify
145 | the terms of any separate license agreement you may have executed
146 | with Licensor regarding such Contributions.
147 |
148 | 6. Trademarks. This License does not grant permission to use the trade
149 | names, trademarks, service marks, or product names of the Licensor,
150 | except as required for reasonable and customary use in describing the
151 | origin of the Work and reproducing the content of the NOTICE file.
152 |
153 | 7. Disclaimer of Warranty. Unless required by applicable law or
154 | agreed to in writing, Licensor provides the Work (and each
155 | Contributor provides its Contributions) on an "AS IS" BASIS,
156 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
157 | implied, including, without limitation, any warranties or conditions
158 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
159 | PARTICULAR PURPOSE. You are solely responsible for determining the
160 | appropriateness of using or redistributing the Work and assume any
161 | risks associated with Your exercise of permissions under this License.
162 |
163 | 8. Limitation of Liability. In no event and under no legal theory,
164 | whether in tort (including negligence), contract, or otherwise,
165 | unless required by applicable law (such as deliberate and grossly
166 | negligent acts) or agreed to in writing, shall any Contributor be
167 | liable to You for damages, including any direct, indirect, special,
168 | incidental, or consequential damages of any character arising as a
169 | result of this License or out of the use or inability to use the
170 | Work (including but not limited to damages for loss of goodwill,
171 | work stoppage, computer failure or malfunction, or any and all
172 | other commercial damages or losses), even if such Contributor
173 | has been advised of the possibility of such damages.
174 |
175 | 9. Accepting Warranty or Additional Liability. While redistributing
176 | the Work or Derivative Works thereof, You may choose to offer,
177 | and charge a fee for, acceptance of support, warranty, indemnity,
178 | or other liability obligations and/or rights consistent with this
179 | License. However, in accepting such obligations, You may act only
180 | on Your own behalf and on Your sole responsibility, not on behalf
181 | of any other Contributor, and only if You agree to indemnify,
182 | defend, and hold each Contributor harmless for any liability
183 | incurred by, or claims asserted against, such Contributor by reason
184 | of your accepting any such warranty or additional liability.
185 |
186 | END OF TERMS AND CONDITIONS
187 |
188 | APPENDIX: How to apply the Apache License to your work.
189 |
190 | To apply the Apache License to your work, attach the following
191 | boilerplate notice, with the fields enclosed by brackets "[]"
192 | replaced with your own identifying information. (Don't include
193 | the brackets!) The text should be enclosed in the appropriate
194 | comment syntax for the file format. We also recommend that a
195 | file or class name and description of purpose be included on the
196 | same "printed page" as the copyright notice for easier
197 | identification within third-party archives.
198 |
199 | Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
200 |
201 | Licensed under the Apache License, Version 2.0 (the "License");
202 | you may not use this file except in compliance with the License.
203 | You may obtain a copy of the License at
204 |
205 | http://www.apache.org/licenses/LICENSE-2.0
206 |
207 | Unless required by applicable law or agreed to in writing, software
208 | distributed under the License is distributed on an "AS IS" BASIS,
209 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
210 | See the License for the specific language governing permissions and
211 | limitations under the License.
212 |
213 |
214 | --------------------------------------------------------------------------------
215 | Package: tslib
216 | License: "0BSD"
217 |
218 | Copyright (c) Microsoft Corporation.
219 |
220 | Permission to use, copy, modify, and/or distribute this software for any
221 | purpose with or without fee is hereby granted.
222 |
223 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
224 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
225 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
226 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
227 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
228 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
229 | PERFORMANCE OF THIS SOFTWARE.
230 | --------------------------------------------------------------------------------
231 | Package: @angular/common
232 | License: "MIT"
233 |
234 |
235 | --------------------------------------------------------------------------------
236 | Package: @angular/platform-browser
237 | License: "MIT"
238 |
239 |
240 | --------------------------------------------------------------------------------
241 | Package: @angular/animations
242 | License: "MIT"
243 |
244 |
245 | --------------------------------------------------------------------------------
246 | Package: @angular/forms
247 | License: "MIT"
248 |
249 |
250 | --------------------------------------------------------------------------------
251 | Package: @angular/router
252 | License: "MIT"
253 |
254 |
255 | --------------------------------------------------------------------------------
256 | Package: @angular/cdk
257 | License: "MIT"
258 |
259 | The MIT License
260 |
261 | Copyright (c) 2024 Google LLC.
262 |
263 | Permission is hereby granted, free of charge, to any person obtaining a copy
264 | of this software and associated documentation files (the "Software"), to deal
265 | in the Software without restriction, including without limitation the rights
266 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
267 | copies of the Software, and to permit persons to whom the Software is
268 | furnished to do so, subject to the following conditions:
269 |
270 | The above copyright notice and this permission notice shall be included in
271 | all copies or substantial portions of the Software.
272 |
273 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
274 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
275 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
276 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
277 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
278 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
279 | THE SOFTWARE.
280 |
281 | --------------------------------------------------------------------------------
282 | Package: @angular/material
283 | License: "MIT"
284 |
285 | The MIT License
286 |
287 | Copyright (c) 2024 Google LLC.
288 |
289 | Permission is hereby granted, free of charge, to any person obtaining a copy
290 | of this software and associated documentation files (the "Software"), to deal
291 | in the Software without restriction, including without limitation the rights
292 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
293 | copies of the Software, and to permit persons to whom the Software is
294 | furnished to do so, subject to the following conditions:
295 |
296 | The above copyright notice and this permission notice shall be included in
297 | all copies or substantial portions of the Software.
298 |
299 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
300 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
301 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
302 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
303 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
304 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
305 | THE SOFTWARE.
306 |
307 | --------------------------------------------------------------------------------
308 | Package: zone.js
309 | License: "MIT"
310 |
311 | The MIT License
312 |
313 | Copyright (c) 2010-2024 Google LLC. https://angular.io/license
314 |
315 | Permission is hereby granted, free of charge, to any person obtaining a copy
316 | of this software and associated documentation files (the "Software"), to deal
317 | in the Software without restriction, including without limitation the rights
318 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
319 | copies of the Software, and to permit persons to whom the Software is
320 | furnished to do so, subject to the following conditions:
321 |
322 | The above copyright notice and this permission notice shall be included in
323 | all copies or substantial portions of the Software.
324 |
325 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
326 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
327 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
328 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
329 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
330 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
331 | THE SOFTWARE.
332 |
333 | --------------------------------------------------------------------------------
334 |
--------------------------------------------------------------------------------
/docs/polyfills-MH5IBZ74.js:
--------------------------------------------------------------------------------
1 | var ce=globalThis;function ee(t){return(ce.__Zone_symbol_prefix||"__zone_symbol__")+t}function dt(){let t=ce.performance;function r(M){t&&t.mark&&t.mark(M)}function i(M,_){t&&t.measure&&t.measure(M,_)}r("Zone");let n=(()=>{let _=class _{static assertZonePatched(){if(ce.Promise!==L.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=_.current;for(;e.parent;)e=e.parent;return e}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(e,d,O=!1){if(L.hasOwnProperty(e)){let N=ce[ee("forceDuplicateZoneCheck")]===!0;if(!O&&N)throw Error("Already loaded patch: "+e)}else if(!ce["__Zone_disable_"+e]){let N="Zone:"+e;r(N),L[e]=d(ce,_,w),i(N,N)}}get parent(){return this._parent}get name(){return this._name}constructor(e,d){this._parent=e,this._name=d?d.name||"unnamed":"
",this._properties=d&&d.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,d)}get(e){let d=this.getZoneWith(e);if(d)return d._properties[e]}getZoneWith(e){let d=this;for(;d;){if(d._properties.hasOwnProperty(e))return d;d=d._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,d){if(typeof e!="function")throw new Error("Expecting function got: "+e);let O=this._zoneDelegate.intercept(this,e,d),N=this;return function(){return N.runGuarded(O,this,arguments,d)}}run(e,d,O,N){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,e,d,O,N)}finally{b=b.parent}}runGuarded(e,d=null,O,N){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,e,d,O,N)}catch(D){if(this._zoneDelegate.handleError(this,D))throw D}}finally{b=b.parent}}runTask(e,d,O){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||K).name+"; Execution: "+this.name+")");let N=e,{type:D,data:{isPeriodic:_e=!1,isRefreshable:ae=!1}={}}=e;if(e.state===X&&(D===W||D===y))return;let ne=e.state!=H;ne&&N._transitionTo(H,h);let Ee=S;S=N,b={parent:b,zone:this};try{D==y&&e.data&&!_e&&!ae&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,N,d,O)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{let l=e.state;if(l!==X&&l!==Y)if(D==W||_e||ae&&l===k)ne&&N._transitionTo(h,H,k);else{let a=N._zoneDelegates;this._updateTaskCount(N,-1),ne&&N._transitionTo(X,H,X),ae&&(N._zoneDelegates=a)}b=b.parent,S=Ee}}scheduleTask(e){if(e.zone&&e.zone!==this){let O=this;for(;O;){if(O===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);O=O.parent}}e._transitionTo(k,X);let d=[];e._zoneDelegates=d,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(O){throw e._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,O),O}return e._zoneDelegates===d&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(h,k),e}scheduleMicroTask(e,d,O,N){return this.scheduleTask(new T(F,e,d,O,N,void 0))}scheduleMacroTask(e,d,O,N,D){return this.scheduleTask(new T(y,e,d,O,N,D))}scheduleEventTask(e,d,O,N,D){return this.scheduleTask(new T(W,e,d,O,N,D))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||K).name+"; Execution: "+this.name+")");if(!(e.state!==h&&e.state!==H)){e._transitionTo(G,h,H);try{this._zoneDelegate.cancelTask(this,e)}catch(d){throw e._transitionTo(Y,G),this._zoneDelegate.handleError(this,d),d}return this._updateTaskCount(e,-1),e._transitionTo(X,G),e.runCount=-1,e}}_updateTaskCount(e,d){let O=e._zoneDelegates;d==-1&&(e._zoneDelegates=null);for(let N=0;NM.hasTask(c,e),onScheduleTask:(M,_,c,e)=>M.scheduleTask(c,e),onInvokeTask:(M,_,c,e,d,O)=>M.invokeTask(c,e,d,O),onCancelTask:(M,_,c,e)=>M.cancelTask(c,e)};class f{get zone(){return this._zone}constructor(_,c,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=c,this._forkZS=e&&(e&&e.onFork?e:c._forkZS),this._forkDlgt=e&&(e.onFork?c:c._forkDlgt),this._forkCurrZone=e&&(e.onFork?this._zone:c._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:c._interceptZS),this._interceptDlgt=e&&(e.onIntercept?c:c._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this._zone:c._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:c._invokeZS),this._invokeDlgt=e&&(e.onInvoke?c:c._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this._zone:c._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:c._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?c:c._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this._zone:c._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:c._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?c:c._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this._zone:c._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:c._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?c:c._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this._zone:c._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:c._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?c:c._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this._zone:c._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let d=e&&e.onHasTask,O=c&&c._hasTaskZS;(d||O)&&(this._hasTaskZS=d?e:s,this._hasTaskDlgt=c,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,e.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=c,this._scheduleTaskCurrZone=this._zone),e.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=c,this._invokeTaskCurrZone=this._zone),e.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=c,this._cancelTaskCurrZone=this._zone))}fork(_,c){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,c):new n(_,c)}intercept(_,c,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,c,e):c}invoke(_,c,e,d,O){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,c,e,d,O):c.apply(e,d)}handleError(_,c){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,c):!0}scheduleTask(_,c){let e=c;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,c),e||(e=c);else if(c.scheduleFn)c.scheduleFn(c);else if(c.type==F)z(c);else throw new Error("Task is missing scheduleFn.");return e}invokeTask(_,c,e,d){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,c,e,d):c.callback.apply(e,d)}cancelTask(_,c){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,c);else{if(!c.cancelFn)throw Error("Task is not cancelable");e=c.cancelFn(c)}return e}hasTask(_,c){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,c)}catch(e){this.handleError(_,e)}}_updateTaskCount(_,c){let e=this._taskCounts,d=e[_],O=e[_]=d+c;if(O<0)throw new Error("More tasks executed then were scheduled.");if(d==0||O==0){let N={microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:_};this.hasTask(this._zone,N)}}}class T{constructor(_,c,e,d,O,N){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=c,this.data=d,this.scheduleFn=O,this.cancelFn=N,!e)throw new Error("callback is not defined");this.callback=e;let D=this;_===W&&d&&d.useG?this.invoke=T.invokeTask:this.invoke=function(){return T.invokeTask.call(ce,D,this,arguments)}}static invokeTask(_,c,e){_||(_=this),Q++;try{return _.runCount++,_.zone.runTask(_,c,e)}finally{Q==1&&J(),Q--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,c,e){if(this._state===c||this._state===e)this._state=_,_==X&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${c}'${e?" or '"+e+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let g=ee("setTimeout"),p=ee("Promise"),C=ee("then"),E=[],P=!1,j;function V(M){if(j||ce[p]&&(j=ce[p].resolve(0)),j){let _=j[C];_||(_=j.then),_.call(j,M)}else ce[g](M,0)}function z(M){Q===0&&E.length===0&&V(J),M&&E.push(M)}function J(){if(!P){for(P=!0;E.length;){let M=E;E=[];for(let _=0;_b,onUnhandledError:q,microtaskDrainDone:q,scheduleMicroTask:z,showUncaughtError:()=>!n[ee("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:q,patchMethod:()=>q,bindArguments:()=>[],patchThen:()=>q,patchMacroTask:()=>q,patchEventPrototype:()=>q,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>q,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>q,wrapWithCurrentZone:()=>q,filterProperties:()=>[],attachOriginToPatched:()=>q,_redefineProperty:()=>q,patchCallbacks:()=>q,nativeScheduleMicroTask:V},b={parent:null,zone:new n(null,null)},S=null,Q=0;function q(){}return i("Zone","Zone"),n}function _t(){let t=globalThis,r=t[ee("forceDuplicateZoneCheck")]===!0;if(t.Zone&&(r||typeof t.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return t.Zone??=dt(),t.Zone}var be=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,Et=Object.create,Tt=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Le=ee(He),Ie=ee(xe),le="true",ue="false",Pe=ee("");function Ve(t,r){return Zone.current.wrap(t,r)}function Ge(t,r,i,n,s){return Zone.current.scheduleMacroTask(t,r,i,n,s)}var x=ee,De=typeof window<"u",pe=De?window:void 0,$=De&&pe||globalThis,gt="removeAttribute";function Fe(t,r){for(let i=t.length-1;i>=0;i--)typeof t[i]=="function"&&(t[i]=Ve(t[i],r+"_"+i));return t}function yt(t,r){let i=t.constructor.name;for(let n=0;n{let p=function(){return g.apply(this,Fe(arguments,i+"."+s))};return he(p,g),p})(f)}}}function tt(t){return t?t.writable===!1?!1:!(typeof t.get=="function"&&typeof t.set>"u"):!0}var nt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Se=!("nw"in $)&&typeof $.process<"u"&&$.process.toString()==="[object process]",Be=!Se&&!nt&&!!(De&&pe.HTMLElement),rt=typeof $.process<"u"&&$.process.toString()==="[object process]"&&!nt&&!!(De&&pe.HTMLElement),Ce={},mt=x("enable_beforeunload"),Ye=function(t){if(t=t||$.event,!t)return;let r=Ce[t.type];r||(r=Ce[t.type]=x("ON_PROPERTY"+t.type));let i=this||t.target||$,n=i[r],s;if(Be&&i===pe&&t.type==="error"){let f=t;s=n&&n.call(this,f.message,f.filename,f.lineno,f.colno,f.error),s===!0&&t.preventDefault()}else s=n&&n.apply(this,arguments),t.type==="beforeunload"&&$[mt]&&typeof s=="string"?t.returnValue=s:s!=null&&!s&&t.preventDefault();return s};function $e(t,r,i){let n=be(t,r);if(!n&&i&&be(i,r)&&(n={enumerable:!0,configurable:!0}),!n||!n.configurable)return;let s=x("on"+r+"patched");if(t.hasOwnProperty(s)&&t[s])return;delete n.writable,delete n.value;let f=n.get,T=n.set,g=r.slice(2),p=Ce[g];p||(p=Ce[g]=x("ON_PROPERTY"+g)),n.set=function(C){let E=this;if(!E&&t===$&&(E=$),!E)return;typeof E[p]=="function"&&E.removeEventListener(g,Ye),T&&T.call(E,null),E[p]=C,typeof C=="function"&&E.addEventListener(g,Ye,!1)},n.get=function(){let C=this;if(!C&&t===$&&(C=$),!C)return null;let E=C[p];if(E)return E;if(f){let P=f.call(this);if(P)return n.set.call(this,P),typeof C[gt]=="function"&&C.removeAttribute(r),P}return null},Ae(t,r,n),t[s]=!0}function ot(t,r,i){if(r)for(let n=0;nfunction(T,g){let p=i(T,g);return p.cbIdx>=0&&typeof g[p.cbIdx]=="function"?Ge(p.name,g[p.cbIdx],p,s):f.apply(T,g)})}function he(t,r){t[x("OriginalDelegate")]=r}var Je=!1,Me=!1;function kt(){try{let t=pe.navigator.userAgent;if(t.indexOf("MSIE ")!==-1||t.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vt(){if(Je)return Me;Je=!0;try{let t=pe.navigator.userAgent;(t.indexOf("MSIE ")!==-1||t.indexOf("Trident/")!==-1||t.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}function Ke(t){return typeof t=="function"}function Qe(t){return typeof t=="number"}var me=!1;if(typeof window<"u")try{let t=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{me=!1}var bt={useG:!0},te={},st={},it=new RegExp("^"+Pe+"(\\w+)(true|false)$"),ct=x("propagationStopped");function at(t,r){let i=(r?r(t):t)+ue,n=(r?r(t):t)+le,s=Pe+i,f=Pe+n;te[t]={},te[t][ue]=s,te[t][le]=f}function Pt(t,r,i,n){let s=n&&n.add||He,f=n&&n.rm||xe,T=n&&n.listeners||"eventListeners",g=n&&n.rmAll||"removeAllListeners",p=x(s),C="."+s+":",E="prependListener",P="."+E+":",j=function(k,h,H){if(k.isRemoved)return;let G=k.callback;typeof G=="object"&&G.handleEvent&&(k.callback=y=>G.handleEvent(y),k.originalDelegate=G);let Y;try{k.invoke(k,h,[H])}catch(y){Y=y}let F=k.options;if(F&&typeof F=="object"&&F.once){let y=k.originalDelegate?k.originalDelegate:k.callback;h[f].call(h,H.type,y,F)}return Y};function V(k,h,H){if(h=h||t.event,!h)return;let G=k||h.target||t,Y=G[te[h.type][H?le:ue]];if(Y){let F=[];if(Y.length===1){let y=j(Y[0],G,h);y&&F.push(y)}else{let y=Y.slice();for(let W=0;W{throw W})}}}let z=function(k){return V(this,k,!1)},J=function(k){return V(this,k,!0)};function K(k,h){if(!k)return!1;let H=!0;h&&h.useG!==void 0&&(H=h.useG);let G=h&&h.vh,Y=!0;h&&h.chkDup!==void 0&&(Y=h.chkDup);let F=!1;h&&h.rt!==void 0&&(F=h.rt);let y=k;for(;y&&!y.hasOwnProperty(s);)y=je(y);if(!y&&k[s]&&(y=k),!y||y[p])return!1;let W=h&&h.eventNameToString,L={},w=y[p]=y[s],b=y[x(f)]=y[f],S=y[x(T)]=y[T],Q=y[x(g)]=y[g],q;h&&h.prepend&&(q=y[x(h.prepend)]=y[h.prepend]);function M(o,u){return!me&&typeof o=="object"&&o?!!o.capture:!me||!u?o:typeof o=="boolean"?{capture:o,passive:!0}:o?typeof o=="object"&&o.passive!==!1?{...o,passive:!0}:o:{passive:!0}}let _=function(o){if(!L.isExisting)return w.call(L.target,L.eventName,L.capture?J:z,L.options)},c=function(o){if(!o.isRemoved){let u=te[o.eventName],v;u&&(v=u[o.capture?le:ue]);let R=v&&o.target[v];if(R){for(let m=0;mre.zone.cancelTask(re);o.call(Te,"abort",ie,{once:!0}),re.removeAbortListener=()=>Te.removeEventListener("abort",ie)}if(L.target=null,ke&&(ke.taskData=null),Ue&&(L.options.once=!0),!me&&typeof re.options=="boolean"||(re.options=se),re.target=Z,re.capture=Oe,re.eventName=A,U&&(re.originalDelegate=B),I?ge.unshift(re):ge.push(re),m)return Z}};return y[s]=a(w,C,N,D,F),q&&(y[E]=a(q,P,d,D,F,!0)),y[f]=function(){let o=this||t,u=arguments[0];h&&h.transferEventName&&(u=h.transferEventName(u));let v=arguments[2],R=v?typeof v=="boolean"?!0:v.capture:!1,m=arguments[1];if(!m)return b.apply(this,arguments);if(G&&!G(b,m,o,arguments))return;let I=te[u],Z;I&&(Z=I[R?le:ue]);let A=Z&&o[Z];if(A)for(let B=0;Bfunction(s,f){s[ct]=!0,n&&n.apply(s,f)})}function Rt(t,r){r.patchMethod(t,"queueMicrotask",i=>function(n,s){Zone.current.scheduleMicroTask("queueMicrotask",s[0])})}var Re=x("zoneTask");function ye(t,r,i,n){let s=null,f=null;r+=n,i+=n;let T={};function g(C){let E=C.data;E.args[0]=function(){return C.invoke.apply(this,arguments)};let P=s.apply(t,E.args);return Qe(P)?E.handleId=P:(E.handle=P,E.isRefreshable=Ke(P.refresh)),C}function p(C){let{handle:E,handleId:P}=C.data;return f.call(t,E??P)}s=fe(t,r,C=>function(E,P){if(Ke(P[0])){let j={isRefreshable:!1,isPeriodic:n==="Interval",delay:n==="Timeout"||n==="Interval"?P[1]||0:void 0,args:P},V=P[0];P[0]=function(){try{return V.apply(this,arguments)}finally{let{handle:H,handleId:G,isPeriodic:Y,isRefreshable:F}=j;!Y&&!F&&(G?delete T[G]:H&&(H[Re]=null))}};let z=Ge(r,P[0],j,g,p);if(!z)return z;let{handleId:J,handle:K,isRefreshable:X,isPeriodic:k}=z.data;if(J)T[J]=z;else if(K&&(K[Re]=z,X&&!k)){let h=K.refresh;K.refresh=function(){let{zone:H,state:G}=z;return G==="notScheduled"?(z._state="scheduled",H._updateTaskCount(z,1)):G==="running"&&(z._state="scheduling"),h.call(this)}}return K??J??z}else return C.apply(t,P)}),f=fe(t,i,C=>function(E,P){let j=P[0],V;Qe(j)?(V=T[j],delete T[j]):(V=j?.[Re],V?j[Re]=null:V=j),V?.type?V.cancelFn&&V.zone.cancelTask(V):C.apply(t,P)})}function Ct(t,r){let{isBrowser:i,isMix:n}=r.getGlobalObjects();if(!i&&!n||!t.customElements||!("customElements"in t))return;let s=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];r.patchCallbacks(r,t.customElements,"customElements","define",s)}function Dt(t,r){if(Zone[r.symbol("patchEventTarget")])return;let{eventNames:i,zoneSymbolEventNames:n,TRUE_STR:s,FALSE_STR:f,ZONE_SYMBOL_PREFIX:T}=r.getGlobalObjects();for(let p=0;pf.target===t);if(!n||n.length===0)return r;let s=n[0].ignoreProperties;return r.filter(f=>s.indexOf(f)===-1)}function et(t,r,i,n){if(!t)return;let s=ut(t,r,i);ot(t,s,n)}function Ze(t){return Object.getOwnPropertyNames(t).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function Ot(t,r){if(Se&&!rt||Zone[t.symbol("patchEvents")])return;let i=r.__Zone_ignore_on_properties,n=[];if(Be){let s=window;n=n.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let f=kt()?[{target:s,ignoreProperties:["error"]}]:[];et(s,Ze(s),i&&i.concat(f),je(s))}n=n.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let s=0;s{let i=r[t.__symbol__("legacyPatch")];i&&i()}),t.__load_patch("timers",r=>{let i="set",n="clear";ye(r,i,n,"Timeout"),ye(r,i,n,"Interval"),ye(r,i,n,"Immediate")}),t.__load_patch("requestAnimationFrame",r=>{ye(r,"request","cancel","AnimationFrame"),ye(r,"mozRequest","mozCancel","AnimationFrame"),ye(r,"webkitRequest","webkitCancel","AnimationFrame")}),t.__load_patch("blocking",(r,i)=>{let n=["alert","prompt","confirm"];for(let s=0;sfunction(C,E){return i.current.run(T,r,E,p)})}}),t.__load_patch("EventTarget",(r,i,n)=>{St(r,n),Dt(r,n);let s=r.XMLHttpRequestEventTarget;s&&s.prototype&&n.patchEventTarget(r,n,[s.prototype])}),t.__load_patch("MutationObserver",(r,i,n)=>{ve("MutationObserver"),ve("WebKitMutationObserver")}),t.__load_patch("IntersectionObserver",(r,i,n)=>{ve("IntersectionObserver")}),t.__load_patch("FileReader",(r,i,n)=>{ve("FileReader")}),t.__load_patch("on_property",(r,i,n)=>{Ot(n,r)}),t.__load_patch("customElements",(r,i,n)=>{Ct(r,n)}),t.__load_patch("XHR",(r,i)=>{C(r);let n=x("xhrTask"),s=x("xhrSync"),f=x("xhrListener"),T=x("xhrScheduled"),g=x("xhrURL"),p=x("xhrErrorBeforeScheduled");function C(E){let P=E.XMLHttpRequest;if(!P)return;let j=P.prototype;function V(w){return w[n]}let z=j[Le],J=j[Ie];if(!z){let w=E.XMLHttpRequestEventTarget;if(w){let b=w.prototype;z=b[Le],J=b[Ie]}}let K="readystatechange",X="scheduled";function k(w){let b=w.data,S=b.target;S[T]=!1,S[p]=!1;let Q=S[f];z||(z=S[Le],J=S[Ie]),Q&&J.call(S,K,Q);let q=S[f]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[T]&&w.state===X){let _=S[i.__symbol__("loadfalse")];if(S.status!==0&&_&&_.length>0){let c=w.invoke;w.invoke=function(){let e=S[i.__symbol__("loadfalse")];for(let d=0;dfunction(w,b){return w[s]=b[2]==!1,w[g]=b[1],G.apply(w,b)}),Y="XMLHttpRequest.send",F=x("fetchTaskAborting"),y=x("fetchTaskScheduling"),W=fe(j,"send",()=>function(w,b){if(i.current[y]===!0||w[s])return W.apply(w,b);{let S={target:w,url:w[g],isPeriodic:!1,args:b,aborted:!1},Q=Ge(Y,h,S,k,H);w&&w[p]===!0&&!S.aborted&&Q.state===X&&Q.invoke()}}),L=fe(j,"abort",()=>function(w,b){let S=V(w);if(S&&typeof S.type=="string"){if(S.cancelFn==null||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(i.current[F]===!0)return L.apply(w,b)})}}),t.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&yt(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),t.__load_patch("PromiseRejectionEvent",(r,i)=>{function n(s){return function(f){lt(r,s).forEach(g=>{let p=r.PromiseRejectionEvent;if(p){let C=new p(s,{promise:f.promise,reason:f.rejection});g.invoke(C)}})}}r.PromiseRejectionEvent&&(i[x("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),i[x("rejectionHandledHandler")]=n("rejectionhandled"))}),t.__load_patch("queueMicrotask",(r,i,n)=>{Rt(r,n)})}function Lt(t){t.__load_patch("ZoneAwarePromise",(r,i,n)=>{let s=Object.getOwnPropertyDescriptor,f=Object.defineProperty;function T(l){if(l&&l.toString===Object.prototype.toString){let a=l.constructor&&l.constructor.name;return(a||"")+": "+JSON.stringify(l)}return l?l.toString():Object.prototype.toString.call(l)}let g=n.symbol,p=[],C=r[g("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,E=g("Promise"),P=g("then"),j="__creationTrace__";n.onUnhandledError=l=>{if(n.showUncaughtError()){let a=l&&l.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(l)}},n.microtaskDrainDone=()=>{for(;p.length;){let l=p.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(a){z(a)}}};let V=g("unhandledPromiseRejectionHandler");function z(l){n.onUnhandledError(l);try{let a=i[V];typeof a=="function"&&a.call(this,l)}catch{}}function J(l){return l&&l.then}function K(l){return l}function X(l){return D.reject(l)}let k=g("state"),h=g("value"),H=g("finally"),G=g("parentPromiseValue"),Y=g("parentPromiseState"),F="Promise.then",y=null,W=!0,L=!1,w=0;function b(l,a){return o=>{try{M(l,a,o)}catch(u){M(l,!1,u)}}}let S=function(){let l=!1;return function(o){return function(){l||(l=!0,o.apply(null,arguments))}}},Q="Promise resolved with itself",q=g("currentTaskTrace");function M(l,a,o){let u=S();if(l===o)throw new TypeError(Q);if(l[k]===y){let v=null;try{(typeof o=="object"||typeof o=="function")&&(v=o&&o.then)}catch(R){return u(()=>{M(l,!1,R)})(),l}if(a!==L&&o instanceof D&&o.hasOwnProperty(k)&&o.hasOwnProperty(h)&&o[k]!==y)c(o),M(l,o[k],o[h]);else if(a!==L&&typeof v=="function")try{v.call(o,u(b(l,a)),u(b(l,!1)))}catch(R){u(()=>{M(l,!1,R)})()}else{l[k]=a;let R=l[h];if(l[h]=o,l[H]===H&&a===W&&(l[k]=l[Y],l[h]=l[G]),a===L&&o instanceof Error){let m=i.currentTask&&i.currentTask.data&&i.currentTask.data[j];m&&f(o,q,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{let I=l[h],Z=!!o&&H===o[H];Z&&(o[G]=I,o[Y]=R);let A=a.run(m,void 0,Z&&m!==X&&m!==K?[]:[I]);M(o,!0,A)}catch(I){M(o,!1,I)}},o)}let d="function ZoneAwarePromise() { [native code] }",O=function(){},N=r.AggregateError;class D{static toString(){return d}static resolve(a){return a instanceof D?a:M(new this(null),W,a)}static reject(a){return M(new this(null),L,a)}static withResolvers(){let a={};return a.promise=new D((o,u)=>{a.resolve=o,a.reject=u}),a}static any(a){if(!a||typeof a[Symbol.iterator]!="function")return Promise.reject(new N([],"All promises were rejected"));let o=[],u=0;try{for(let m of a)u++,o.push(D.resolve(m))}catch{return Promise.reject(new N([],"All promises were rejected"))}if(u===0)return Promise.reject(new N([],"All promises were rejected"));let v=!1,R=[];return new D((m,I)=>{for(let Z=0;Z{v||(v=!0,m(A))},A=>{R.push(A),u--,u===0&&(v=!0,I(new N(R,"All promises were rejected")))})})}static race(a){let o,u,v=new this((I,Z)=>{o=I,u=Z});function R(I){o(I)}function m(I){u(I)}for(let I of a)J(I)||(I=this.resolve(I)),I.then(R,m);return v}static all(a){return D.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof D?this:D).allWithCallback(a,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(a,o){let u,v,R=new this((A,B)=>{u=A,v=B}),m=2,I=0,Z=[];for(let A of a){J(A)||(A=this.resolve(A));let B=I;try{A.then(U=>{Z[B]=o?o.thenCallback(U):U,m--,m===0&&u(Z)},U=>{o?(Z[B]=o.errorCallback(U),m--,m===0&&u(Z)):v(U)})}catch(U){v(U)}m++,I++}return m-=2,m===0&&u(Z),R}constructor(a){let o=this;if(!(o instanceof D))throw new Error("Must be an instanceof Promise.");o[k]=y,o[h]=[];try{let u=S();a&&a(u(b(o,W)),u(b(o,L)))}catch(u){M(o,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return D}then(a,o){let u=this.constructor?.[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||D);let v=new u(O),R=i.current;return this[k]==y?this[h].push(R,v,a,o):e(this,R,v,a,o),v}catch(a){return this.then(null,a)}finally(a){let o=this.constructor?.[Symbol.species];(!o||typeof o!="function")&&(o=D);let u=new o(O);u[H]=H;let v=i.current;return this[k]==y?this[h].push(v,u,a,a):e(this,v,u,a,a),u}}D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;let _e=r[E]=r.Promise;r.Promise=D;let ae=g("thenPatched");function ne(l){let a=l.prototype,o=s(a,"then");if(o&&(o.writable===!1||!o.configurable))return;let u=a.then;a[P]=u,l.prototype.then=function(v,R){return new D((I,Z)=>{u.call(this,I,Z)}).then(v,R)},l[ae]=!0}n.patchThen=ne;function Ee(l){return function(a,o){let u=l.apply(a,o);if(u instanceof D)return u;let v=u.constructor;return v[ae]||ne(v),u}}return _e&&(ne(_e),fe(r,"fetch",l=>Ee(l))),Promise[i.__symbol__("uncaughtPromiseErrors")]=p,D})}function It(t){t.__load_patch("toString",r=>{let i=Function.prototype.toString,n=x("OriginalDelegate"),s=x("Promise"),f=x("Error"),T=function(){if(typeof this=="function"){let E=this[n];if(E)return typeof E=="function"?i.call(E):Object.prototype.toString.call(E);if(this===Promise){let P=r[s];if(P)return i.call(P)}if(this===Error){let P=r[f];if(P)return i.call(P)}}return i.call(this)};T[n]=i,Function.prototype.toString=T;let g=Object.prototype.toString,p="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?p:g.call(this)}})}function Mt(t,r,i,n,s){let f=Zone.__symbol__(n);if(r[f])return;let T=r[f]=r[n];r[n]=function(g,p,C){return p&&p.prototype&&s.forEach(function(E){let P=`${i}.${n}::`+E,j=p.prototype;try{if(j.hasOwnProperty(E)){let V=t.ObjectGetOwnPropertyDescriptor(j,E);V&&V.value?(V.value=t.wrapWithCurrentZone(V.value,P),t._redefineProperty(p.prototype,E,V)):j[E]&&(j[E]=t.wrapWithCurrentZone(j[E],P))}else j[E]&&(j[E]=t.wrapWithCurrentZone(j[E],P))}catch{}}),T.call(r,g,p,C)},t.attachOriginToPatched(r[n],T)}function Zt(t){t.__load_patch("util",(r,i,n)=>{let s=Ze(r);n.patchOnProperties=ot,n.patchMethod=fe,n.bindArguments=Fe,n.patchMacroTask=pt;let f=i.__symbol__("BLACK_LISTED_EVENTS"),T=i.__symbol__("UNPATCHED_EVENTS");r[T]&&(r[f]=r[T]),r[f]&&(i[f]=i[T]=r[f]),n.patchEventPrototype=wt,n.patchEventTarget=Pt,n.isIEOrEdge=vt,n.ObjectDefineProperty=Ae,n.ObjectGetOwnPropertyDescriptor=be,n.ObjectCreate=Et,n.ArraySlice=Tt,n.patchClass=ve,n.wrapWithCurrentZone=Ve,n.filterProperties=ut,n.attachOriginToPatched=he,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Mt,n.getGlobalObjects=()=>({globalSources:st,zoneSymbolEventNames:te,eventNames:s,isBrowser:Be,isMix:rt,isNode:Se,TRUE_STR:le,FALSE_STR:ue,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function At(t){Lt(t),It(t),Zt(t)}var ft=_t();At(ft);Nt(ft);
3 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Angular auto-complete Showcase
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------