@andersbakken/fisk-scheduler-ui 0.0.57 → 0.0.58
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.
- package/dist/ui/browser/favicon.png +0 -0
- package/dist/ui/browser/htaccess +7 -0
- package/dist/ui/browser/index.html +1 -1
- package/dist/ui/browser/{main-6SIZHY3G.js → main-KS4CY54V.js} +1 -1
- package/dist/ui/browser/package.json +50 -0
- package/dist/ui/package.json +50 -0
- package/package.json +1 -1
- package/scripts/mklinks.sh +18 -9
- package/scripts/rmlinks.sh +12 -7
- package/.angular/cache/18.2.21/ui/.tsbuildinfo +0 -1
- package/.angular/cache/18.2.21/ui/angular-compiler.db +0 -0
- package/.angular/cache/18.2.21/ui/angular-compiler.db-lock +0 -0
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common.js +0 -201
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common_http.js +0 -85
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common_http.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_core.js +0 -932
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_core.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_forms.js +0 -134
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_forms.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_button.js +0 -33
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_button.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_card.js +0 -567
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_card.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_checkbox.js +0 -782
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_checkbox.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_core.js +0 -98
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_core.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_dialog.js +0 -1829
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_dialog.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_form-field.js +0 -45
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_form-field.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_input.js +0 -1014
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_input.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_list.js +0 -2169
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_list.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_select.js +0 -1529
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_select.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_snack-bar.js +0 -940
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_snack-bar.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_tabs.js +0 -2962
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_tabs.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser.js +0 -84
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser_animations.js +0 -4136
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser_animations.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_router.js +0 -5700
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_router.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/_metadata.json +0 -172
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-2ZKE2YDD.js +0 -1222
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-2ZKE2YDD.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-3OV72XIM.js +0 -64
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-3OV72XIM.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-57TVY4HY.js +0 -2218
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-57TVY4HY.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-A5IWFVHJ.js +0 -2374
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-A5IWFVHJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-DJ6HHZ3S.js +0 -1940
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-DJ6HHZ3S.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-FE6XYTIJ.js +0 -126
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-FE6XYTIJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-ITHJLHIY.js +0 -5795
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-ITHJLHIY.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-MFI342ZJ.js +0 -512
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-MFI342ZJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NPVZU53R.js +0 -6511
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NPVZU53R.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NSRJEU3V.js +0 -27918
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NSRJEU3V.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-R2N6IWJV.js +0 -5116
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-R2N6IWJV.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-TO3SXVFJ.js +0 -2840
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-TO3SXVFJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WFLMTRZP.js +0 -379
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WFLMTRZP.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WQ5YUVUS.js +0 -1534
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WQ5YUVUS.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/ngx-color-picker.js +0 -2925
- package/.angular/cache/18.2.21/ui/vite/deps/ngx-color-picker.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/seedrandom.js +0 -703
- package/.angular/cache/18.2.21/ui/vite/deps/seedrandom.js.map +0 -7
- package/scripts/mock-scheduler.js +0 -350
- package/scripts/test-live-model.js +0 -286
|
@@ -1,1940 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
withHttpTransferCache
|
|
3
|
-
} from "./chunk-A5IWFVHJ.js";
|
|
4
|
-
import {
|
|
5
|
-
CommonModule,
|
|
6
|
-
DOCUMENT,
|
|
7
|
-
DomAdapter,
|
|
8
|
-
PLATFORM_BROWSER_ID,
|
|
9
|
-
XhrFactory,
|
|
10
|
-
getDOM,
|
|
11
|
-
isPlatformServer,
|
|
12
|
-
parseCookieValue,
|
|
13
|
-
setRootDomAdapter
|
|
14
|
-
} from "./chunk-R2N6IWJV.js";
|
|
15
|
-
import {
|
|
16
|
-
APP_ID,
|
|
17
|
-
ApplicationModule,
|
|
18
|
-
ApplicationRef,
|
|
19
|
-
CSP_NONCE,
|
|
20
|
-
Console,
|
|
21
|
-
ENVIRONMENT_INITIALIZER,
|
|
22
|
-
ErrorHandler,
|
|
23
|
-
INJECTOR_SCOPE,
|
|
24
|
-
Inject,
|
|
25
|
-
Injectable,
|
|
26
|
-
InjectionToken,
|
|
27
|
-
NgModule,
|
|
28
|
-
NgZone,
|
|
29
|
-
Optional,
|
|
30
|
-
PLATFORM_ID,
|
|
31
|
-
PLATFORM_INITIALIZER,
|
|
32
|
-
RendererFactory2,
|
|
33
|
-
RendererStyleFlags2,
|
|
34
|
-
RuntimeError,
|
|
35
|
-
SecurityContext,
|
|
36
|
-
SkipSelf,
|
|
37
|
-
TESTABILITY,
|
|
38
|
-
TESTABILITY_GETTER,
|
|
39
|
-
Testability,
|
|
40
|
-
TestabilityRegistry,
|
|
41
|
-
Version,
|
|
42
|
-
ViewEncapsulation$1,
|
|
43
|
-
XSS_SECURITY_URL,
|
|
44
|
-
ZONELESS_ENABLED,
|
|
45
|
-
_global,
|
|
46
|
-
_sanitizeHtml,
|
|
47
|
-
_sanitizeUrl,
|
|
48
|
-
allowSanitizationBypassAndThrow,
|
|
49
|
-
bypassSanitizationTrustHtml,
|
|
50
|
-
bypassSanitizationTrustResourceUrl,
|
|
51
|
-
bypassSanitizationTrustScript,
|
|
52
|
-
bypassSanitizationTrustStyle,
|
|
53
|
-
bypassSanitizationTrustUrl,
|
|
54
|
-
createPlatformFactory,
|
|
55
|
-
formatRuntimeError,
|
|
56
|
-
forwardRef,
|
|
57
|
-
inject,
|
|
58
|
-
internalCreateApplication,
|
|
59
|
-
makeEnvironmentProviders,
|
|
60
|
-
platformCore,
|
|
61
|
-
setClassMetadata,
|
|
62
|
-
setDocument,
|
|
63
|
-
unwrapSafeValue,
|
|
64
|
-
withDomHydration,
|
|
65
|
-
withEventReplay,
|
|
66
|
-
withI18nSupport,
|
|
67
|
-
ɵɵdefineInjectable,
|
|
68
|
-
ɵɵdefineInjector,
|
|
69
|
-
ɵɵdefineNgModule,
|
|
70
|
-
ɵɵinject
|
|
71
|
-
} from "./chunk-NSRJEU3V.js";
|
|
72
|
-
import {
|
|
73
|
-
__spreadProps,
|
|
74
|
-
__spreadValues
|
|
75
|
-
} from "./chunk-3OV72XIM.js";
|
|
76
|
-
|
|
77
|
-
// node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs
|
|
78
|
-
var GenericBrowserDomAdapter = class extends DomAdapter {
|
|
79
|
-
constructor() {
|
|
80
|
-
super(...arguments);
|
|
81
|
-
this.supportsDOMEvents = true;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
var BrowserDomAdapter = class _BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
85
|
-
static makeCurrent() {
|
|
86
|
-
setRootDomAdapter(new _BrowserDomAdapter());
|
|
87
|
-
}
|
|
88
|
-
onAndCancel(el, evt, listener) {
|
|
89
|
-
el.addEventListener(evt, listener);
|
|
90
|
-
return () => {
|
|
91
|
-
el.removeEventListener(evt, listener);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
dispatchEvent(el, evt) {
|
|
95
|
-
el.dispatchEvent(evt);
|
|
96
|
-
}
|
|
97
|
-
remove(node) {
|
|
98
|
-
node.remove();
|
|
99
|
-
}
|
|
100
|
-
createElement(tagName, doc) {
|
|
101
|
-
doc = doc || this.getDefaultDocument();
|
|
102
|
-
return doc.createElement(tagName);
|
|
103
|
-
}
|
|
104
|
-
createHtmlDocument() {
|
|
105
|
-
return document.implementation.createHTMLDocument("fakeTitle");
|
|
106
|
-
}
|
|
107
|
-
getDefaultDocument() {
|
|
108
|
-
return document;
|
|
109
|
-
}
|
|
110
|
-
isElementNode(node) {
|
|
111
|
-
return node.nodeType === Node.ELEMENT_NODE;
|
|
112
|
-
}
|
|
113
|
-
isShadowRoot(node) {
|
|
114
|
-
return node instanceof DocumentFragment;
|
|
115
|
-
}
|
|
116
|
-
/** @deprecated No longer being used in Ivy code. To be removed in version 14. */
|
|
117
|
-
getGlobalEventTarget(doc, target) {
|
|
118
|
-
if (target === "window") {
|
|
119
|
-
return window;
|
|
120
|
-
}
|
|
121
|
-
if (target === "document") {
|
|
122
|
-
return doc;
|
|
123
|
-
}
|
|
124
|
-
if (target === "body") {
|
|
125
|
-
return doc.body;
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
getBaseHref(doc) {
|
|
130
|
-
const href = getBaseElementHref();
|
|
131
|
-
return href == null ? null : relativePath(href);
|
|
132
|
-
}
|
|
133
|
-
resetBaseElement() {
|
|
134
|
-
baseElement = null;
|
|
135
|
-
}
|
|
136
|
-
getUserAgent() {
|
|
137
|
-
return window.navigator.userAgent;
|
|
138
|
-
}
|
|
139
|
-
getCookie(name) {
|
|
140
|
-
return parseCookieValue(document.cookie, name);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
var baseElement = null;
|
|
144
|
-
function getBaseElementHref() {
|
|
145
|
-
baseElement = baseElement || document.querySelector("base");
|
|
146
|
-
return baseElement ? baseElement.getAttribute("href") : null;
|
|
147
|
-
}
|
|
148
|
-
function relativePath(url) {
|
|
149
|
-
return new URL(url, document.baseURI).pathname;
|
|
150
|
-
}
|
|
151
|
-
var BrowserGetTestability = class {
|
|
152
|
-
addToWindow(registry) {
|
|
153
|
-
_global["getAngularTestability"] = (elem, findInAncestors = true) => {
|
|
154
|
-
const testability = registry.findTestabilityInTree(elem, findInAncestors);
|
|
155
|
-
if (testability == null) {
|
|
156
|
-
throw new RuntimeError(5103, (typeof ngDevMode === "undefined" || ngDevMode) && "Could not find testability for element.");
|
|
157
|
-
}
|
|
158
|
-
return testability;
|
|
159
|
-
};
|
|
160
|
-
_global["getAllAngularTestabilities"] = () => registry.getAllTestabilities();
|
|
161
|
-
_global["getAllAngularRootElements"] = () => registry.getAllRootElements();
|
|
162
|
-
const whenAllStable = (callback) => {
|
|
163
|
-
const testabilities = _global["getAllAngularTestabilities"]();
|
|
164
|
-
let count = testabilities.length;
|
|
165
|
-
const decrement = function() {
|
|
166
|
-
count--;
|
|
167
|
-
if (count == 0) {
|
|
168
|
-
callback();
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
testabilities.forEach((testability) => {
|
|
172
|
-
testability.whenStable(decrement);
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
if (!_global["frameworkStabilizers"]) {
|
|
176
|
-
_global["frameworkStabilizers"] = [];
|
|
177
|
-
}
|
|
178
|
-
_global["frameworkStabilizers"].push(whenAllStable);
|
|
179
|
-
}
|
|
180
|
-
findTestabilityInTree(registry, elem, findInAncestors) {
|
|
181
|
-
if (elem == null) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
const t = registry.getTestability(elem);
|
|
185
|
-
if (t != null) {
|
|
186
|
-
return t;
|
|
187
|
-
} else if (!findInAncestors) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
if (getDOM().isShadowRoot(elem)) {
|
|
191
|
-
return this.findTestabilityInTree(registry, elem.host, true);
|
|
192
|
-
}
|
|
193
|
-
return this.findTestabilityInTree(registry, elem.parentElement, true);
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
var BrowserXhr = class _BrowserXhr {
|
|
197
|
-
build() {
|
|
198
|
-
return new XMLHttpRequest();
|
|
199
|
-
}
|
|
200
|
-
static {
|
|
201
|
-
this.ɵfac = function BrowserXhr_Factory(__ngFactoryType__) {
|
|
202
|
-
return new (__ngFactoryType__ || _BrowserXhr)();
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
static {
|
|
206
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
207
|
-
token: _BrowserXhr,
|
|
208
|
-
factory: _BrowserXhr.ɵfac
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
(() => {
|
|
213
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BrowserXhr, [{
|
|
214
|
-
type: Injectable
|
|
215
|
-
}], null, null);
|
|
216
|
-
})();
|
|
217
|
-
var EVENT_MANAGER_PLUGINS = new InjectionToken(ngDevMode ? "EventManagerPlugins" : "");
|
|
218
|
-
var EventManager = class _EventManager {
|
|
219
|
-
/**
|
|
220
|
-
* Initializes an instance of the event-manager service.
|
|
221
|
-
*/
|
|
222
|
-
constructor(plugins, _zone) {
|
|
223
|
-
this._zone = _zone;
|
|
224
|
-
this._eventNameToPlugin = /* @__PURE__ */ new Map();
|
|
225
|
-
plugins.forEach((plugin) => {
|
|
226
|
-
plugin.manager = this;
|
|
227
|
-
});
|
|
228
|
-
this._plugins = plugins.slice().reverse();
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Registers a handler for a specific element and event.
|
|
232
|
-
*
|
|
233
|
-
* @param element The HTML element to receive event notifications.
|
|
234
|
-
* @param eventName The name of the event to listen for.
|
|
235
|
-
* @param handler A function to call when the notification occurs. Receives the
|
|
236
|
-
* event object as an argument.
|
|
237
|
-
* @returns A callback function that can be used to remove the handler.
|
|
238
|
-
*/
|
|
239
|
-
addEventListener(element, eventName, handler) {
|
|
240
|
-
const plugin = this._findPluginFor(eventName);
|
|
241
|
-
return plugin.addEventListener(element, eventName, handler);
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Retrieves the compilation zone in which event listeners are registered.
|
|
245
|
-
*/
|
|
246
|
-
getZone() {
|
|
247
|
-
return this._zone;
|
|
248
|
-
}
|
|
249
|
-
/** @internal */
|
|
250
|
-
_findPluginFor(eventName) {
|
|
251
|
-
let plugin = this._eventNameToPlugin.get(eventName);
|
|
252
|
-
if (plugin) {
|
|
253
|
-
return plugin;
|
|
254
|
-
}
|
|
255
|
-
const plugins = this._plugins;
|
|
256
|
-
plugin = plugins.find((plugin2) => plugin2.supports(eventName));
|
|
257
|
-
if (!plugin) {
|
|
258
|
-
throw new RuntimeError(5101, (typeof ngDevMode === "undefined" || ngDevMode) && `No event manager plugin found for event ${eventName}`);
|
|
259
|
-
}
|
|
260
|
-
this._eventNameToPlugin.set(eventName, plugin);
|
|
261
|
-
return plugin;
|
|
262
|
-
}
|
|
263
|
-
static {
|
|
264
|
-
this.ɵfac = function EventManager_Factory(__ngFactoryType__) {
|
|
265
|
-
return new (__ngFactoryType__ || _EventManager)(ɵɵinject(EVENT_MANAGER_PLUGINS), ɵɵinject(NgZone));
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
static {
|
|
269
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
270
|
-
token: _EventManager,
|
|
271
|
-
factory: _EventManager.ɵfac
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
(() => {
|
|
276
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(EventManager, [{
|
|
277
|
-
type: Injectable
|
|
278
|
-
}], () => [{
|
|
279
|
-
type: void 0,
|
|
280
|
-
decorators: [{
|
|
281
|
-
type: Inject,
|
|
282
|
-
args: [EVENT_MANAGER_PLUGINS]
|
|
283
|
-
}]
|
|
284
|
-
}, {
|
|
285
|
-
type: NgZone
|
|
286
|
-
}], null);
|
|
287
|
-
})();
|
|
288
|
-
var EventManagerPlugin = class {
|
|
289
|
-
// TODO: remove (has some usage in G3)
|
|
290
|
-
constructor(_doc) {
|
|
291
|
-
this._doc = _doc;
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
var APP_ID_ATTRIBUTE_NAME = "ng-app-id";
|
|
295
|
-
var SharedStylesHost = class _SharedStylesHost {
|
|
296
|
-
constructor(doc, appId, nonce, platformId = {}) {
|
|
297
|
-
this.doc = doc;
|
|
298
|
-
this.appId = appId;
|
|
299
|
-
this.nonce = nonce;
|
|
300
|
-
this.platformId = platformId;
|
|
301
|
-
this.styleRef = /* @__PURE__ */ new Map();
|
|
302
|
-
this.hostNodes = /* @__PURE__ */ new Set();
|
|
303
|
-
this.styleNodesInDOM = this.collectServerRenderedStyles();
|
|
304
|
-
this.platformIsServer = isPlatformServer(platformId);
|
|
305
|
-
this.resetHostNodes();
|
|
306
|
-
}
|
|
307
|
-
addStyles(styles) {
|
|
308
|
-
for (const style of styles) {
|
|
309
|
-
const usageCount = this.changeUsageCount(style, 1);
|
|
310
|
-
if (usageCount === 1) {
|
|
311
|
-
this.onStyleAdded(style);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
removeStyles(styles) {
|
|
316
|
-
for (const style of styles) {
|
|
317
|
-
const usageCount = this.changeUsageCount(style, -1);
|
|
318
|
-
if (usageCount <= 0) {
|
|
319
|
-
this.onStyleRemoved(style);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
ngOnDestroy() {
|
|
324
|
-
const styleNodesInDOM = this.styleNodesInDOM;
|
|
325
|
-
if (styleNodesInDOM) {
|
|
326
|
-
styleNodesInDOM.forEach((node) => node.remove());
|
|
327
|
-
styleNodesInDOM.clear();
|
|
328
|
-
}
|
|
329
|
-
for (const style of this.getAllStyles()) {
|
|
330
|
-
this.onStyleRemoved(style);
|
|
331
|
-
}
|
|
332
|
-
this.resetHostNodes();
|
|
333
|
-
}
|
|
334
|
-
addHost(hostNode) {
|
|
335
|
-
this.hostNodes.add(hostNode);
|
|
336
|
-
for (const style of this.getAllStyles()) {
|
|
337
|
-
this.addStyleToHost(hostNode, style);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
removeHost(hostNode) {
|
|
341
|
-
this.hostNodes.delete(hostNode);
|
|
342
|
-
}
|
|
343
|
-
getAllStyles() {
|
|
344
|
-
return this.styleRef.keys();
|
|
345
|
-
}
|
|
346
|
-
onStyleAdded(style) {
|
|
347
|
-
for (const host of this.hostNodes) {
|
|
348
|
-
this.addStyleToHost(host, style);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
onStyleRemoved(style) {
|
|
352
|
-
const styleRef = this.styleRef;
|
|
353
|
-
styleRef.get(style)?.elements?.forEach((node) => node.remove());
|
|
354
|
-
styleRef.delete(style);
|
|
355
|
-
}
|
|
356
|
-
collectServerRenderedStyles() {
|
|
357
|
-
const styles = this.doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${this.appId}"]`);
|
|
358
|
-
if (styles?.length) {
|
|
359
|
-
const styleMap = /* @__PURE__ */ new Map();
|
|
360
|
-
styles.forEach((style) => {
|
|
361
|
-
if (style.textContent != null) {
|
|
362
|
-
styleMap.set(style.textContent, style);
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
return styleMap;
|
|
366
|
-
}
|
|
367
|
-
return null;
|
|
368
|
-
}
|
|
369
|
-
changeUsageCount(style, delta) {
|
|
370
|
-
const map = this.styleRef;
|
|
371
|
-
if (map.has(style)) {
|
|
372
|
-
const styleRefValue = map.get(style);
|
|
373
|
-
styleRefValue.usage += delta;
|
|
374
|
-
return styleRefValue.usage;
|
|
375
|
-
}
|
|
376
|
-
map.set(style, {
|
|
377
|
-
usage: delta,
|
|
378
|
-
elements: []
|
|
379
|
-
});
|
|
380
|
-
return delta;
|
|
381
|
-
}
|
|
382
|
-
getStyleElement(host, style) {
|
|
383
|
-
const styleNodesInDOM = this.styleNodesInDOM;
|
|
384
|
-
const styleEl = styleNodesInDOM?.get(style);
|
|
385
|
-
if (styleEl?.parentNode === host) {
|
|
386
|
-
styleNodesInDOM.delete(style);
|
|
387
|
-
styleEl.removeAttribute(APP_ID_ATTRIBUTE_NAME);
|
|
388
|
-
if (typeof ngDevMode === "undefined" || ngDevMode) {
|
|
389
|
-
styleEl.setAttribute("ng-style-reused", "");
|
|
390
|
-
}
|
|
391
|
-
return styleEl;
|
|
392
|
-
} else {
|
|
393
|
-
const styleEl2 = this.doc.createElement("style");
|
|
394
|
-
if (this.nonce) {
|
|
395
|
-
styleEl2.setAttribute("nonce", this.nonce);
|
|
396
|
-
}
|
|
397
|
-
styleEl2.textContent = style;
|
|
398
|
-
if (this.platformIsServer) {
|
|
399
|
-
styleEl2.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
|
|
400
|
-
}
|
|
401
|
-
host.appendChild(styleEl2);
|
|
402
|
-
return styleEl2;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
addStyleToHost(host, style) {
|
|
406
|
-
const styleEl = this.getStyleElement(host, style);
|
|
407
|
-
const styleRef = this.styleRef;
|
|
408
|
-
const styleElRef = styleRef.get(style)?.elements;
|
|
409
|
-
if (styleElRef) {
|
|
410
|
-
styleElRef.push(styleEl);
|
|
411
|
-
} else {
|
|
412
|
-
styleRef.set(style, {
|
|
413
|
-
elements: [styleEl],
|
|
414
|
-
usage: 1
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
resetHostNodes() {
|
|
419
|
-
const hostNodes = this.hostNodes;
|
|
420
|
-
hostNodes.clear();
|
|
421
|
-
hostNodes.add(this.doc.head);
|
|
422
|
-
}
|
|
423
|
-
static {
|
|
424
|
-
this.ɵfac = function SharedStylesHost_Factory(__ngFactoryType__) {
|
|
425
|
-
return new (__ngFactoryType__ || _SharedStylesHost)(ɵɵinject(DOCUMENT), ɵɵinject(APP_ID), ɵɵinject(CSP_NONCE, 8), ɵɵinject(PLATFORM_ID));
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
static {
|
|
429
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
430
|
-
token: _SharedStylesHost,
|
|
431
|
-
factory: _SharedStylesHost.ɵfac
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
(() => {
|
|
436
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SharedStylesHost, [{
|
|
437
|
-
type: Injectable
|
|
438
|
-
}], () => [{
|
|
439
|
-
type: Document,
|
|
440
|
-
decorators: [{
|
|
441
|
-
type: Inject,
|
|
442
|
-
args: [DOCUMENT]
|
|
443
|
-
}]
|
|
444
|
-
}, {
|
|
445
|
-
type: void 0,
|
|
446
|
-
decorators: [{
|
|
447
|
-
type: Inject,
|
|
448
|
-
args: [APP_ID]
|
|
449
|
-
}]
|
|
450
|
-
}, {
|
|
451
|
-
type: void 0,
|
|
452
|
-
decorators: [{
|
|
453
|
-
type: Inject,
|
|
454
|
-
args: [CSP_NONCE]
|
|
455
|
-
}, {
|
|
456
|
-
type: Optional
|
|
457
|
-
}]
|
|
458
|
-
}, {
|
|
459
|
-
type: void 0,
|
|
460
|
-
decorators: [{
|
|
461
|
-
type: Inject,
|
|
462
|
-
args: [PLATFORM_ID]
|
|
463
|
-
}]
|
|
464
|
-
}], null);
|
|
465
|
-
})();
|
|
466
|
-
var NAMESPACE_URIS = {
|
|
467
|
-
"svg": "http://www.w3.org/2000/svg",
|
|
468
|
-
"xhtml": "http://www.w3.org/1999/xhtml",
|
|
469
|
-
"xlink": "http://www.w3.org/1999/xlink",
|
|
470
|
-
"xml": "http://www.w3.org/XML/1998/namespace",
|
|
471
|
-
"xmlns": "http://www.w3.org/2000/xmlns/",
|
|
472
|
-
"math": "http://www.w3.org/1998/Math/MathML"
|
|
473
|
-
};
|
|
474
|
-
var COMPONENT_REGEX = /%COMP%/g;
|
|
475
|
-
var COMPONENT_VARIABLE = "%COMP%";
|
|
476
|
-
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
477
|
-
var CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
|
|
478
|
-
var REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;
|
|
479
|
-
var REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(ngDevMode ? "RemoveStylesOnCompDestroy" : "", {
|
|
480
|
-
providedIn: "root",
|
|
481
|
-
factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT
|
|
482
|
-
});
|
|
483
|
-
function shimContentAttribute(componentShortId) {
|
|
484
|
-
return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
|
|
485
|
-
}
|
|
486
|
-
function shimHostAttribute(componentShortId) {
|
|
487
|
-
return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
|
|
488
|
-
}
|
|
489
|
-
function shimStylesContent(compId, styles) {
|
|
490
|
-
return styles.map((s) => s.replace(COMPONENT_REGEX, compId));
|
|
491
|
-
}
|
|
492
|
-
var DomRendererFactory2 = class _DomRendererFactory2 {
|
|
493
|
-
constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, platformId, ngZone, nonce = null) {
|
|
494
|
-
this.eventManager = eventManager;
|
|
495
|
-
this.sharedStylesHost = sharedStylesHost;
|
|
496
|
-
this.appId = appId;
|
|
497
|
-
this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
|
|
498
|
-
this.doc = doc;
|
|
499
|
-
this.platformId = platformId;
|
|
500
|
-
this.ngZone = ngZone;
|
|
501
|
-
this.nonce = nonce;
|
|
502
|
-
this.rendererByCompId = /* @__PURE__ */ new Map();
|
|
503
|
-
this.platformIsServer = isPlatformServer(platformId);
|
|
504
|
-
this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.platformIsServer);
|
|
505
|
-
}
|
|
506
|
-
createRenderer(element, type) {
|
|
507
|
-
if (!element || !type) {
|
|
508
|
-
return this.defaultRenderer;
|
|
509
|
-
}
|
|
510
|
-
if (this.platformIsServer && type.encapsulation === ViewEncapsulation$1.ShadowDom) {
|
|
511
|
-
type = __spreadProps(__spreadValues({}, type), {
|
|
512
|
-
encapsulation: ViewEncapsulation$1.Emulated
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
const renderer = this.getOrCreateRenderer(element, type);
|
|
516
|
-
if (renderer instanceof EmulatedEncapsulationDomRenderer2) {
|
|
517
|
-
renderer.applyToHost(element);
|
|
518
|
-
} else if (renderer instanceof NoneEncapsulationDomRenderer) {
|
|
519
|
-
renderer.applyStyles();
|
|
520
|
-
}
|
|
521
|
-
return renderer;
|
|
522
|
-
}
|
|
523
|
-
getOrCreateRenderer(element, type) {
|
|
524
|
-
const rendererByCompId = this.rendererByCompId;
|
|
525
|
-
let renderer = rendererByCompId.get(type.id);
|
|
526
|
-
if (!renderer) {
|
|
527
|
-
const doc = this.doc;
|
|
528
|
-
const ngZone = this.ngZone;
|
|
529
|
-
const eventManager = this.eventManager;
|
|
530
|
-
const sharedStylesHost = this.sharedStylesHost;
|
|
531
|
-
const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;
|
|
532
|
-
const platformIsServer = this.platformIsServer;
|
|
533
|
-
switch (type.encapsulation) {
|
|
534
|
-
case ViewEncapsulation$1.Emulated:
|
|
535
|
-
renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);
|
|
536
|
-
break;
|
|
537
|
-
case ViewEncapsulation$1.ShadowDom:
|
|
538
|
-
return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type, doc, ngZone, this.nonce, platformIsServer);
|
|
539
|
-
default:
|
|
540
|
-
renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);
|
|
541
|
-
break;
|
|
542
|
-
}
|
|
543
|
-
rendererByCompId.set(type.id, renderer);
|
|
544
|
-
}
|
|
545
|
-
return renderer;
|
|
546
|
-
}
|
|
547
|
-
ngOnDestroy() {
|
|
548
|
-
this.rendererByCompId.clear();
|
|
549
|
-
}
|
|
550
|
-
static {
|
|
551
|
-
this.ɵfac = function DomRendererFactory2_Factory(__ngFactoryType__) {
|
|
552
|
-
return new (__ngFactoryType__ || _DomRendererFactory2)(ɵɵinject(EventManager), ɵɵinject(SharedStylesHost), ɵɵinject(APP_ID), ɵɵinject(REMOVE_STYLES_ON_COMPONENT_DESTROY), ɵɵinject(DOCUMENT), ɵɵinject(PLATFORM_ID), ɵɵinject(NgZone), ɵɵinject(CSP_NONCE));
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
static {
|
|
556
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
557
|
-
token: _DomRendererFactory2,
|
|
558
|
-
factory: _DomRendererFactory2.ɵfac
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
(() => {
|
|
563
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomRendererFactory2, [{
|
|
564
|
-
type: Injectable
|
|
565
|
-
}], () => [{
|
|
566
|
-
type: EventManager
|
|
567
|
-
}, {
|
|
568
|
-
type: SharedStylesHost
|
|
569
|
-
}, {
|
|
570
|
-
type: void 0,
|
|
571
|
-
decorators: [{
|
|
572
|
-
type: Inject,
|
|
573
|
-
args: [APP_ID]
|
|
574
|
-
}]
|
|
575
|
-
}, {
|
|
576
|
-
type: void 0,
|
|
577
|
-
decorators: [{
|
|
578
|
-
type: Inject,
|
|
579
|
-
args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]
|
|
580
|
-
}]
|
|
581
|
-
}, {
|
|
582
|
-
type: Document,
|
|
583
|
-
decorators: [{
|
|
584
|
-
type: Inject,
|
|
585
|
-
args: [DOCUMENT]
|
|
586
|
-
}]
|
|
587
|
-
}, {
|
|
588
|
-
type: Object,
|
|
589
|
-
decorators: [{
|
|
590
|
-
type: Inject,
|
|
591
|
-
args: [PLATFORM_ID]
|
|
592
|
-
}]
|
|
593
|
-
}, {
|
|
594
|
-
type: NgZone
|
|
595
|
-
}, {
|
|
596
|
-
type: void 0,
|
|
597
|
-
decorators: [{
|
|
598
|
-
type: Inject,
|
|
599
|
-
args: [CSP_NONCE]
|
|
600
|
-
}]
|
|
601
|
-
}], null);
|
|
602
|
-
})();
|
|
603
|
-
var DefaultDomRenderer2 = class {
|
|
604
|
-
constructor(eventManager, doc, ngZone, platformIsServer) {
|
|
605
|
-
this.eventManager = eventManager;
|
|
606
|
-
this.doc = doc;
|
|
607
|
-
this.ngZone = ngZone;
|
|
608
|
-
this.platformIsServer = platformIsServer;
|
|
609
|
-
this.data = /* @__PURE__ */ Object.create(null);
|
|
610
|
-
this.throwOnSyntheticProps = true;
|
|
611
|
-
this.destroyNode = null;
|
|
612
|
-
}
|
|
613
|
-
destroy() {
|
|
614
|
-
}
|
|
615
|
-
createElement(name, namespace) {
|
|
616
|
-
if (namespace) {
|
|
617
|
-
return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
|
|
618
|
-
}
|
|
619
|
-
return this.doc.createElement(name);
|
|
620
|
-
}
|
|
621
|
-
createComment(value) {
|
|
622
|
-
return this.doc.createComment(value);
|
|
623
|
-
}
|
|
624
|
-
createText(value) {
|
|
625
|
-
return this.doc.createTextNode(value);
|
|
626
|
-
}
|
|
627
|
-
appendChild(parent, newChild) {
|
|
628
|
-
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
629
|
-
targetParent.appendChild(newChild);
|
|
630
|
-
}
|
|
631
|
-
insertBefore(parent, newChild, refChild) {
|
|
632
|
-
if (parent) {
|
|
633
|
-
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
634
|
-
targetParent.insertBefore(newChild, refChild);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
removeChild(_parent, oldChild) {
|
|
638
|
-
oldChild.remove();
|
|
639
|
-
}
|
|
640
|
-
selectRootElement(selectorOrNode, preserveContent) {
|
|
641
|
-
let el = typeof selectorOrNode === "string" ? this.doc.querySelector(selectorOrNode) : selectorOrNode;
|
|
642
|
-
if (!el) {
|
|
643
|
-
throw new RuntimeError(-5104, (typeof ngDevMode === "undefined" || ngDevMode) && `The selector "${selectorOrNode}" did not match any elements`);
|
|
644
|
-
}
|
|
645
|
-
if (!preserveContent) {
|
|
646
|
-
el.textContent = "";
|
|
647
|
-
}
|
|
648
|
-
return el;
|
|
649
|
-
}
|
|
650
|
-
parentNode(node) {
|
|
651
|
-
return node.parentNode;
|
|
652
|
-
}
|
|
653
|
-
nextSibling(node) {
|
|
654
|
-
return node.nextSibling;
|
|
655
|
-
}
|
|
656
|
-
setAttribute(el, name, value, namespace) {
|
|
657
|
-
if (namespace) {
|
|
658
|
-
name = namespace + ":" + name;
|
|
659
|
-
const namespaceUri = NAMESPACE_URIS[namespace];
|
|
660
|
-
if (namespaceUri) {
|
|
661
|
-
el.setAttributeNS(namespaceUri, name, value);
|
|
662
|
-
} else {
|
|
663
|
-
el.setAttribute(name, value);
|
|
664
|
-
}
|
|
665
|
-
} else {
|
|
666
|
-
el.setAttribute(name, value);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
removeAttribute(el, name, namespace) {
|
|
670
|
-
if (namespace) {
|
|
671
|
-
const namespaceUri = NAMESPACE_URIS[namespace];
|
|
672
|
-
if (namespaceUri) {
|
|
673
|
-
el.removeAttributeNS(namespaceUri, name);
|
|
674
|
-
} else {
|
|
675
|
-
el.removeAttribute(`${namespace}:${name}`);
|
|
676
|
-
}
|
|
677
|
-
} else {
|
|
678
|
-
el.removeAttribute(name);
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
addClass(el, name) {
|
|
682
|
-
el.classList.add(name);
|
|
683
|
-
}
|
|
684
|
-
removeClass(el, name) {
|
|
685
|
-
el.classList.remove(name);
|
|
686
|
-
}
|
|
687
|
-
setStyle(el, style, value, flags) {
|
|
688
|
-
if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {
|
|
689
|
-
el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? "important" : "");
|
|
690
|
-
} else {
|
|
691
|
-
el.style[style] = value;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
removeStyle(el, style, flags) {
|
|
695
|
-
if (flags & RendererStyleFlags2.DashCase) {
|
|
696
|
-
el.style.removeProperty(style);
|
|
697
|
-
} else {
|
|
698
|
-
el.style[style] = "";
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
setProperty(el, name, value) {
|
|
702
|
-
if (el == null) {
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(name, "property");
|
|
706
|
-
el[name] = value;
|
|
707
|
-
}
|
|
708
|
-
setValue(node, value) {
|
|
709
|
-
node.nodeValue = value;
|
|
710
|
-
}
|
|
711
|
-
listen(target, event, callback) {
|
|
712
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(event, "listener");
|
|
713
|
-
if (typeof target === "string") {
|
|
714
|
-
target = getDOM().getGlobalEventTarget(this.doc, target);
|
|
715
|
-
if (!target) {
|
|
716
|
-
throw new Error(`Unsupported event target ${target} for event ${event}`);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
return this.eventManager.addEventListener(target, event, this.decoratePreventDefault(callback));
|
|
720
|
-
}
|
|
721
|
-
decoratePreventDefault(eventHandler) {
|
|
722
|
-
return (event) => {
|
|
723
|
-
if (event === "__ngUnwrap__") {
|
|
724
|
-
return eventHandler;
|
|
725
|
-
}
|
|
726
|
-
const allowDefaultBehavior = this.platformIsServer ? this.ngZone.runGuarded(() => eventHandler(event)) : eventHandler(event);
|
|
727
|
-
if (allowDefaultBehavior === false) {
|
|
728
|
-
event.preventDefault();
|
|
729
|
-
}
|
|
730
|
-
return void 0;
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
};
|
|
734
|
-
var AT_CHARCODE = (() => "@".charCodeAt(0))();
|
|
735
|
-
function checkNoSyntheticProp(name, nameKind) {
|
|
736
|
-
if (name.charCodeAt(0) === AT_CHARCODE) {
|
|
737
|
-
throw new RuntimeError(5105, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:
|
|
738
|
-
- Either \`BrowserAnimationsModule\` or \`NoopAnimationsModule\` are imported in your application.
|
|
739
|
-
- There is corresponding configuration for the animation named \`${name}\` defined in the \`animations\` field of the \`@Component\` decorator (see https://angular.io/api/core/Component#animations).`);
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
function isTemplateNode(node) {
|
|
743
|
-
return node.tagName === "TEMPLATE" && node.content !== void 0;
|
|
744
|
-
}
|
|
745
|
-
var ShadowDomRenderer = class extends DefaultDomRenderer2 {
|
|
746
|
-
constructor(eventManager, sharedStylesHost, hostEl, component, doc, ngZone, nonce, platformIsServer) {
|
|
747
|
-
super(eventManager, doc, ngZone, platformIsServer);
|
|
748
|
-
this.sharedStylesHost = sharedStylesHost;
|
|
749
|
-
this.hostEl = hostEl;
|
|
750
|
-
this.shadowRoot = hostEl.attachShadow({
|
|
751
|
-
mode: "open"
|
|
752
|
-
});
|
|
753
|
-
this.sharedStylesHost.addHost(this.shadowRoot);
|
|
754
|
-
const styles = shimStylesContent(component.id, component.styles);
|
|
755
|
-
for (const style of styles) {
|
|
756
|
-
const styleEl = document.createElement("style");
|
|
757
|
-
if (nonce) {
|
|
758
|
-
styleEl.setAttribute("nonce", nonce);
|
|
759
|
-
}
|
|
760
|
-
styleEl.textContent = style;
|
|
761
|
-
this.shadowRoot.appendChild(styleEl);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
nodeOrShadowRoot(node) {
|
|
765
|
-
return node === this.hostEl ? this.shadowRoot : node;
|
|
766
|
-
}
|
|
767
|
-
appendChild(parent, newChild) {
|
|
768
|
-
return super.appendChild(this.nodeOrShadowRoot(parent), newChild);
|
|
769
|
-
}
|
|
770
|
-
insertBefore(parent, newChild, refChild) {
|
|
771
|
-
return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);
|
|
772
|
-
}
|
|
773
|
-
removeChild(_parent, oldChild) {
|
|
774
|
-
return super.removeChild(null, oldChild);
|
|
775
|
-
}
|
|
776
|
-
parentNode(node) {
|
|
777
|
-
return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));
|
|
778
|
-
}
|
|
779
|
-
destroy() {
|
|
780
|
-
this.sharedStylesHost.removeHost(this.shadowRoot);
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
var NoneEncapsulationDomRenderer = class extends DefaultDomRenderer2 {
|
|
784
|
-
constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId) {
|
|
785
|
-
super(eventManager, doc, ngZone, platformIsServer);
|
|
786
|
-
this.sharedStylesHost = sharedStylesHost;
|
|
787
|
-
this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
|
|
788
|
-
this.styles = compId ? shimStylesContent(compId, component.styles) : component.styles;
|
|
789
|
-
}
|
|
790
|
-
applyStyles() {
|
|
791
|
-
this.sharedStylesHost.addStyles(this.styles);
|
|
792
|
-
}
|
|
793
|
-
destroy() {
|
|
794
|
-
if (!this.removeStylesOnCompDestroy) {
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
this.sharedStylesHost.removeStyles(this.styles);
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
|
-
var EmulatedEncapsulationDomRenderer2 = class extends NoneEncapsulationDomRenderer {
|
|
801
|
-
constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer) {
|
|
802
|
-
const compId = appId + "-" + component.id;
|
|
803
|
-
super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId);
|
|
804
|
-
this.contentAttr = shimContentAttribute(compId);
|
|
805
|
-
this.hostAttr = shimHostAttribute(compId);
|
|
806
|
-
}
|
|
807
|
-
applyToHost(element) {
|
|
808
|
-
this.applyStyles();
|
|
809
|
-
this.setAttribute(element, this.hostAttr, "");
|
|
810
|
-
}
|
|
811
|
-
createElement(parent, name) {
|
|
812
|
-
const el = super.createElement(parent, name);
|
|
813
|
-
super.setAttribute(el, this.contentAttr, "");
|
|
814
|
-
return el;
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
var DomEventsPlugin = class _DomEventsPlugin extends EventManagerPlugin {
|
|
818
|
-
constructor(doc) {
|
|
819
|
-
super(doc);
|
|
820
|
-
}
|
|
821
|
-
// This plugin should come last in the list of plugins, because it accepts all
|
|
822
|
-
// events.
|
|
823
|
-
supports(eventName) {
|
|
824
|
-
return true;
|
|
825
|
-
}
|
|
826
|
-
addEventListener(element, eventName, handler) {
|
|
827
|
-
element.addEventListener(eventName, handler, false);
|
|
828
|
-
return () => this.removeEventListener(element, eventName, handler);
|
|
829
|
-
}
|
|
830
|
-
removeEventListener(target, eventName, callback) {
|
|
831
|
-
return target.removeEventListener(eventName, callback);
|
|
832
|
-
}
|
|
833
|
-
static {
|
|
834
|
-
this.ɵfac = function DomEventsPlugin_Factory(__ngFactoryType__) {
|
|
835
|
-
return new (__ngFactoryType__ || _DomEventsPlugin)(ɵɵinject(DOCUMENT));
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
static {
|
|
839
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
840
|
-
token: _DomEventsPlugin,
|
|
841
|
-
factory: _DomEventsPlugin.ɵfac
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
(() => {
|
|
846
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomEventsPlugin, [{
|
|
847
|
-
type: Injectable
|
|
848
|
-
}], () => [{
|
|
849
|
-
type: void 0,
|
|
850
|
-
decorators: [{
|
|
851
|
-
type: Inject,
|
|
852
|
-
args: [DOCUMENT]
|
|
853
|
-
}]
|
|
854
|
-
}], null);
|
|
855
|
-
})();
|
|
856
|
-
var MODIFIER_KEYS = ["alt", "control", "meta", "shift"];
|
|
857
|
-
var _keyMap = {
|
|
858
|
-
"\b": "Backspace",
|
|
859
|
-
" ": "Tab",
|
|
860
|
-
"": "Delete",
|
|
861
|
-
"\x1B": "Escape",
|
|
862
|
-
"Del": "Delete",
|
|
863
|
-
"Esc": "Escape",
|
|
864
|
-
"Left": "ArrowLeft",
|
|
865
|
-
"Right": "ArrowRight",
|
|
866
|
-
"Up": "ArrowUp",
|
|
867
|
-
"Down": "ArrowDown",
|
|
868
|
-
"Menu": "ContextMenu",
|
|
869
|
-
"Scroll": "ScrollLock",
|
|
870
|
-
"Win": "OS"
|
|
871
|
-
};
|
|
872
|
-
var MODIFIER_KEY_GETTERS = {
|
|
873
|
-
"alt": (event) => event.altKey,
|
|
874
|
-
"control": (event) => event.ctrlKey,
|
|
875
|
-
"meta": (event) => event.metaKey,
|
|
876
|
-
"shift": (event) => event.shiftKey
|
|
877
|
-
};
|
|
878
|
-
var KeyEventsPlugin = class _KeyEventsPlugin extends EventManagerPlugin {
|
|
879
|
-
/**
|
|
880
|
-
* Initializes an instance of the browser plug-in.
|
|
881
|
-
* @param doc The document in which key events will be detected.
|
|
882
|
-
*/
|
|
883
|
-
constructor(doc) {
|
|
884
|
-
super(doc);
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Reports whether a named key event is supported.
|
|
888
|
-
* @param eventName The event name to query.
|
|
889
|
-
* @return True if the named key event is supported.
|
|
890
|
-
*/
|
|
891
|
-
supports(eventName) {
|
|
892
|
-
return _KeyEventsPlugin.parseEventName(eventName) != null;
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* Registers a handler for a specific element and key event.
|
|
896
|
-
* @param element The HTML element to receive event notifications.
|
|
897
|
-
* @param eventName The name of the key event to listen for.
|
|
898
|
-
* @param handler A function to call when the notification occurs. Receives the
|
|
899
|
-
* event object as an argument.
|
|
900
|
-
* @returns The key event that was registered.
|
|
901
|
-
*/
|
|
902
|
-
addEventListener(element, eventName, handler) {
|
|
903
|
-
const parsedEvent = _KeyEventsPlugin.parseEventName(eventName);
|
|
904
|
-
const outsideHandler = _KeyEventsPlugin.eventCallback(parsedEvent["fullKey"], handler, this.manager.getZone());
|
|
905
|
-
return this.manager.getZone().runOutsideAngular(() => {
|
|
906
|
-
return getDOM().onAndCancel(element, parsedEvent["domEventName"], outsideHandler);
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* Parses the user provided full keyboard event definition and normalizes it for
|
|
911
|
-
* later internal use. It ensures the string is all lowercase, converts special
|
|
912
|
-
* characters to a standard spelling, and orders all the values consistently.
|
|
913
|
-
*
|
|
914
|
-
* @param eventName The name of the key event to listen for.
|
|
915
|
-
* @returns an object with the full, normalized string, and the dom event name
|
|
916
|
-
* or null in the case when the event doesn't match a keyboard event.
|
|
917
|
-
*/
|
|
918
|
-
static parseEventName(eventName) {
|
|
919
|
-
const parts = eventName.toLowerCase().split(".");
|
|
920
|
-
const domEventName = parts.shift();
|
|
921
|
-
if (parts.length === 0 || !(domEventName === "keydown" || domEventName === "keyup")) {
|
|
922
|
-
return null;
|
|
923
|
-
}
|
|
924
|
-
const key = _KeyEventsPlugin._normalizeKey(parts.pop());
|
|
925
|
-
let fullKey = "";
|
|
926
|
-
let codeIX = parts.indexOf("code");
|
|
927
|
-
if (codeIX > -1) {
|
|
928
|
-
parts.splice(codeIX, 1);
|
|
929
|
-
fullKey = "code.";
|
|
930
|
-
}
|
|
931
|
-
MODIFIER_KEYS.forEach((modifierName) => {
|
|
932
|
-
const index = parts.indexOf(modifierName);
|
|
933
|
-
if (index > -1) {
|
|
934
|
-
parts.splice(index, 1);
|
|
935
|
-
fullKey += modifierName + ".";
|
|
936
|
-
}
|
|
937
|
-
});
|
|
938
|
-
fullKey += key;
|
|
939
|
-
if (parts.length != 0 || key.length === 0) {
|
|
940
|
-
return null;
|
|
941
|
-
}
|
|
942
|
-
const result = {};
|
|
943
|
-
result["domEventName"] = domEventName;
|
|
944
|
-
result["fullKey"] = fullKey;
|
|
945
|
-
return result;
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* Determines whether the actual keys pressed match the configured key code string.
|
|
949
|
-
* The `fullKeyCode` event is normalized in the `parseEventName` method when the
|
|
950
|
-
* event is attached to the DOM during the `addEventListener` call. This is unseen
|
|
951
|
-
* by the end user and is normalized for internal consistency and parsing.
|
|
952
|
-
*
|
|
953
|
-
* @param event The keyboard event.
|
|
954
|
-
* @param fullKeyCode The normalized user defined expected key event string
|
|
955
|
-
* @returns boolean.
|
|
956
|
-
*/
|
|
957
|
-
static matchEventFullKeyCode(event, fullKeyCode) {
|
|
958
|
-
let keycode = _keyMap[event.key] || event.key;
|
|
959
|
-
let key = "";
|
|
960
|
-
if (fullKeyCode.indexOf("code.") > -1) {
|
|
961
|
-
keycode = event.code;
|
|
962
|
-
key = "code.";
|
|
963
|
-
}
|
|
964
|
-
if (keycode == null || !keycode) return false;
|
|
965
|
-
keycode = keycode.toLowerCase();
|
|
966
|
-
if (keycode === " ") {
|
|
967
|
-
keycode = "space";
|
|
968
|
-
} else if (keycode === ".") {
|
|
969
|
-
keycode = "dot";
|
|
970
|
-
}
|
|
971
|
-
MODIFIER_KEYS.forEach((modifierName) => {
|
|
972
|
-
if (modifierName !== keycode) {
|
|
973
|
-
const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
|
|
974
|
-
if (modifierGetter(event)) {
|
|
975
|
-
key += modifierName + ".";
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
key += keycode;
|
|
980
|
-
return key === fullKeyCode;
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* Configures a handler callback for a key event.
|
|
984
|
-
* @param fullKey The event name that combines all simultaneous keystrokes.
|
|
985
|
-
* @param handler The function that responds to the key event.
|
|
986
|
-
* @param zone The zone in which the event occurred.
|
|
987
|
-
* @returns A callback function.
|
|
988
|
-
*/
|
|
989
|
-
static eventCallback(fullKey, handler, zone) {
|
|
990
|
-
return (event) => {
|
|
991
|
-
if (_KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {
|
|
992
|
-
zone.runGuarded(() => handler(event));
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
}
|
|
996
|
-
/** @internal */
|
|
997
|
-
static _normalizeKey(keyName) {
|
|
998
|
-
return keyName === "esc" ? "escape" : keyName;
|
|
999
|
-
}
|
|
1000
|
-
static {
|
|
1001
|
-
this.ɵfac = function KeyEventsPlugin_Factory(__ngFactoryType__) {
|
|
1002
|
-
return new (__ngFactoryType__ || _KeyEventsPlugin)(ɵɵinject(DOCUMENT));
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
static {
|
|
1006
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1007
|
-
token: _KeyEventsPlugin,
|
|
1008
|
-
factory: _KeyEventsPlugin.ɵfac
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1011
|
-
};
|
|
1012
|
-
(() => {
|
|
1013
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KeyEventsPlugin, [{
|
|
1014
|
-
type: Injectable
|
|
1015
|
-
}], () => [{
|
|
1016
|
-
type: void 0,
|
|
1017
|
-
decorators: [{
|
|
1018
|
-
type: Inject,
|
|
1019
|
-
args: [DOCUMENT]
|
|
1020
|
-
}]
|
|
1021
|
-
}], null);
|
|
1022
|
-
})();
|
|
1023
|
-
function bootstrapApplication(rootComponent, options, context) {
|
|
1024
|
-
return internalCreateApplication(__spreadValues({
|
|
1025
|
-
rootComponent,
|
|
1026
|
-
platformRef: context?.platformRef
|
|
1027
|
-
}, createProvidersConfig(options)));
|
|
1028
|
-
}
|
|
1029
|
-
function createApplication(options) {
|
|
1030
|
-
return internalCreateApplication(createProvidersConfig(options));
|
|
1031
|
-
}
|
|
1032
|
-
function createProvidersConfig(options) {
|
|
1033
|
-
return {
|
|
1034
|
-
appProviders: [...BROWSER_MODULE_PROVIDERS, ...options?.providers ?? []],
|
|
1035
|
-
platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
function provideProtractorTestingSupport() {
|
|
1039
|
-
return [...TESTABILITY_PROVIDERS];
|
|
1040
|
-
}
|
|
1041
|
-
function initDomAdapter() {
|
|
1042
|
-
BrowserDomAdapter.makeCurrent();
|
|
1043
|
-
}
|
|
1044
|
-
function errorHandler() {
|
|
1045
|
-
return new ErrorHandler();
|
|
1046
|
-
}
|
|
1047
|
-
function _document() {
|
|
1048
|
-
setDocument(document);
|
|
1049
|
-
return document;
|
|
1050
|
-
}
|
|
1051
|
-
var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{
|
|
1052
|
-
provide: PLATFORM_ID,
|
|
1053
|
-
useValue: PLATFORM_BROWSER_ID
|
|
1054
|
-
}, {
|
|
1055
|
-
provide: PLATFORM_INITIALIZER,
|
|
1056
|
-
useValue: initDomAdapter,
|
|
1057
|
-
multi: true
|
|
1058
|
-
}, {
|
|
1059
|
-
provide: DOCUMENT,
|
|
1060
|
-
useFactory: _document,
|
|
1061
|
-
deps: []
|
|
1062
|
-
}];
|
|
1063
|
-
var platformBrowser = createPlatformFactory(platformCore, "browser", INTERNAL_BROWSER_PLATFORM_PROVIDERS);
|
|
1064
|
-
var BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "BrowserModule Providers Marker" : "");
|
|
1065
|
-
var TESTABILITY_PROVIDERS = [{
|
|
1066
|
-
provide: TESTABILITY_GETTER,
|
|
1067
|
-
useClass: BrowserGetTestability,
|
|
1068
|
-
deps: []
|
|
1069
|
-
}, {
|
|
1070
|
-
provide: TESTABILITY,
|
|
1071
|
-
useClass: Testability,
|
|
1072
|
-
deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER]
|
|
1073
|
-
}, {
|
|
1074
|
-
provide: Testability,
|
|
1075
|
-
// Also provide as `Testability` for backwards-compatibility.
|
|
1076
|
-
useClass: Testability,
|
|
1077
|
-
deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER]
|
|
1078
|
-
}];
|
|
1079
|
-
var BROWSER_MODULE_PROVIDERS = [{
|
|
1080
|
-
provide: INJECTOR_SCOPE,
|
|
1081
|
-
useValue: "root"
|
|
1082
|
-
}, {
|
|
1083
|
-
provide: ErrorHandler,
|
|
1084
|
-
useFactory: errorHandler,
|
|
1085
|
-
deps: []
|
|
1086
|
-
}, {
|
|
1087
|
-
provide: EVENT_MANAGER_PLUGINS,
|
|
1088
|
-
useClass: DomEventsPlugin,
|
|
1089
|
-
multi: true,
|
|
1090
|
-
deps: [DOCUMENT, NgZone, PLATFORM_ID]
|
|
1091
|
-
}, {
|
|
1092
|
-
provide: EVENT_MANAGER_PLUGINS,
|
|
1093
|
-
useClass: KeyEventsPlugin,
|
|
1094
|
-
multi: true,
|
|
1095
|
-
deps: [DOCUMENT]
|
|
1096
|
-
}, DomRendererFactory2, SharedStylesHost, EventManager, {
|
|
1097
|
-
provide: RendererFactory2,
|
|
1098
|
-
useExisting: DomRendererFactory2
|
|
1099
|
-
}, {
|
|
1100
|
-
provide: XhrFactory,
|
|
1101
|
-
useClass: BrowserXhr,
|
|
1102
|
-
deps: []
|
|
1103
|
-
}, typeof ngDevMode === "undefined" || ngDevMode ? {
|
|
1104
|
-
provide: BROWSER_MODULE_PROVIDERS_MARKER,
|
|
1105
|
-
useValue: true
|
|
1106
|
-
} : []];
|
|
1107
|
-
var BrowserModule = class _BrowserModule {
|
|
1108
|
-
constructor(providersAlreadyPresent) {
|
|
1109
|
-
if ((typeof ngDevMode === "undefined" || ngDevMode) && providersAlreadyPresent) {
|
|
1110
|
-
throw new RuntimeError(5100, `Providers from the \`BrowserModule\` have already been loaded. If you need access to common directives such as NgIf and NgFor, import the \`CommonModule\` instead.`);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Configures a browser-based app to transition from a server-rendered app, if
|
|
1115
|
-
* one is present on the page.
|
|
1116
|
-
*
|
|
1117
|
-
* @param params An object containing an identifier for the app to transition.
|
|
1118
|
-
* The ID must match between the client and server versions of the app.
|
|
1119
|
-
* @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
|
|
1120
|
-
*
|
|
1121
|
-
* @deprecated Use {@link APP_ID} instead to set the application ID.
|
|
1122
|
-
*/
|
|
1123
|
-
static withServerTransition(params) {
|
|
1124
|
-
return {
|
|
1125
|
-
ngModule: _BrowserModule,
|
|
1126
|
-
providers: [{
|
|
1127
|
-
provide: APP_ID,
|
|
1128
|
-
useValue: params.appId
|
|
1129
|
-
}]
|
|
1130
|
-
};
|
|
1131
|
-
}
|
|
1132
|
-
static {
|
|
1133
|
-
this.ɵfac = function BrowserModule_Factory(__ngFactoryType__) {
|
|
1134
|
-
return new (__ngFactoryType__ || _BrowserModule)(ɵɵinject(BROWSER_MODULE_PROVIDERS_MARKER, 12));
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
static {
|
|
1138
|
-
this.ɵmod = ɵɵdefineNgModule({
|
|
1139
|
-
type: _BrowserModule,
|
|
1140
|
-
exports: [CommonModule, ApplicationModule]
|
|
1141
|
-
});
|
|
1142
|
-
}
|
|
1143
|
-
static {
|
|
1144
|
-
this.ɵinj = ɵɵdefineInjector({
|
|
1145
|
-
providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
|
|
1146
|
-
imports: [CommonModule, ApplicationModule]
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
};
|
|
1150
|
-
(() => {
|
|
1151
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BrowserModule, [{
|
|
1152
|
-
type: NgModule,
|
|
1153
|
-
args: [{
|
|
1154
|
-
providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
|
|
1155
|
-
exports: [CommonModule, ApplicationModule]
|
|
1156
|
-
}]
|
|
1157
|
-
}], () => [{
|
|
1158
|
-
type: void 0,
|
|
1159
|
-
decorators: [{
|
|
1160
|
-
type: Optional
|
|
1161
|
-
}, {
|
|
1162
|
-
type: SkipSelf
|
|
1163
|
-
}, {
|
|
1164
|
-
type: Inject,
|
|
1165
|
-
args: [BROWSER_MODULE_PROVIDERS_MARKER]
|
|
1166
|
-
}]
|
|
1167
|
-
}], null);
|
|
1168
|
-
})();
|
|
1169
|
-
var Meta = class _Meta {
|
|
1170
|
-
constructor(_doc) {
|
|
1171
|
-
this._doc = _doc;
|
|
1172
|
-
this._dom = getDOM();
|
|
1173
|
-
}
|
|
1174
|
-
/**
|
|
1175
|
-
* Retrieves or creates a specific `<meta>` tag element in the current HTML document.
|
|
1176
|
-
* In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
|
|
1177
|
-
* values in the provided tag definition, and verifies that all other attribute values are equal.
|
|
1178
|
-
* If an existing element is found, it is returned and is not modified in any way.
|
|
1179
|
-
* @param tag The definition of a `<meta>` element to match or create.
|
|
1180
|
-
* @param forceCreation True to create a new element without checking whether one already exists.
|
|
1181
|
-
* @returns The existing element with the same attributes and values if found,
|
|
1182
|
-
* the new element if no match is found, or `null` if the tag parameter is not defined.
|
|
1183
|
-
*/
|
|
1184
|
-
addTag(tag, forceCreation = false) {
|
|
1185
|
-
if (!tag) return null;
|
|
1186
|
-
return this._getOrCreateElement(tag, forceCreation);
|
|
1187
|
-
}
|
|
1188
|
-
/**
|
|
1189
|
-
* Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
|
|
1190
|
-
* In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
|
|
1191
|
-
* values in the provided tag definition, and verifies that all other attribute values are equal.
|
|
1192
|
-
* @param tags An array of tag definitions to match or create.
|
|
1193
|
-
* @param forceCreation True to create new elements without checking whether they already exist.
|
|
1194
|
-
* @returns The matching elements if found, or the new elements.
|
|
1195
|
-
*/
|
|
1196
|
-
addTags(tags, forceCreation = false) {
|
|
1197
|
-
if (!tags) return [];
|
|
1198
|
-
return tags.reduce((result, tag) => {
|
|
1199
|
-
if (tag) {
|
|
1200
|
-
result.push(this._getOrCreateElement(tag, forceCreation));
|
|
1201
|
-
}
|
|
1202
|
-
return result;
|
|
1203
|
-
}, []);
|
|
1204
|
-
}
|
|
1205
|
-
/**
|
|
1206
|
-
* Retrieves a `<meta>` tag element in the current HTML document.
|
|
1207
|
-
* @param attrSelector The tag attribute and value to match against, in the format
|
|
1208
|
-
* `"tag_attribute='value string'"`.
|
|
1209
|
-
* @returns The matching element, if any.
|
|
1210
|
-
*/
|
|
1211
|
-
getTag(attrSelector) {
|
|
1212
|
-
if (!attrSelector) return null;
|
|
1213
|
-
return this._doc.querySelector(`meta[${attrSelector}]`) || null;
|
|
1214
|
-
}
|
|
1215
|
-
/**
|
|
1216
|
-
* Retrieves a set of `<meta>` tag elements in the current HTML document.
|
|
1217
|
-
* @param attrSelector The tag attribute and value to match against, in the format
|
|
1218
|
-
* `"tag_attribute='value string'"`.
|
|
1219
|
-
* @returns The matching elements, if any.
|
|
1220
|
-
*/
|
|
1221
|
-
getTags(attrSelector) {
|
|
1222
|
-
if (!attrSelector) return [];
|
|
1223
|
-
const list = this._doc.querySelectorAll(`meta[${attrSelector}]`);
|
|
1224
|
-
return list ? [].slice.call(list) : [];
|
|
1225
|
-
}
|
|
1226
|
-
/**
|
|
1227
|
-
* Modifies an existing `<meta>` tag element in the current HTML document.
|
|
1228
|
-
* @param tag The tag description with which to replace the existing tag content.
|
|
1229
|
-
* @param selector A tag attribute and value to match against, to identify
|
|
1230
|
-
* an existing tag. A string in the format `"tag_attribute=`value string`"`.
|
|
1231
|
-
* If not supplied, matches a tag with the same `name` or `property` attribute value as the
|
|
1232
|
-
* replacement tag.
|
|
1233
|
-
* @return The modified element.
|
|
1234
|
-
*/
|
|
1235
|
-
updateTag(tag, selector) {
|
|
1236
|
-
if (!tag) return null;
|
|
1237
|
-
selector = selector || this._parseSelector(tag);
|
|
1238
|
-
const meta = this.getTag(selector);
|
|
1239
|
-
if (meta) {
|
|
1240
|
-
return this._setMetaElementAttributes(tag, meta);
|
|
1241
|
-
}
|
|
1242
|
-
return this._getOrCreateElement(tag, true);
|
|
1243
|
-
}
|
|
1244
|
-
/**
|
|
1245
|
-
* Removes an existing `<meta>` tag element from the current HTML document.
|
|
1246
|
-
* @param attrSelector A tag attribute and value to match against, to identify
|
|
1247
|
-
* an existing tag. A string in the format `"tag_attribute=`value string`"`.
|
|
1248
|
-
*/
|
|
1249
|
-
removeTag(attrSelector) {
|
|
1250
|
-
this.removeTagElement(this.getTag(attrSelector));
|
|
1251
|
-
}
|
|
1252
|
-
/**
|
|
1253
|
-
* Removes an existing `<meta>` tag element from the current HTML document.
|
|
1254
|
-
* @param meta The tag definition to match against to identify an existing tag.
|
|
1255
|
-
*/
|
|
1256
|
-
removeTagElement(meta) {
|
|
1257
|
-
if (meta) {
|
|
1258
|
-
this._dom.remove(meta);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
_getOrCreateElement(meta, forceCreation = false) {
|
|
1262
|
-
if (!forceCreation) {
|
|
1263
|
-
const selector = this._parseSelector(meta);
|
|
1264
|
-
const elem = this.getTags(selector).filter((elem2) => this._containsAttributes(meta, elem2))[0];
|
|
1265
|
-
if (elem !== void 0) return elem;
|
|
1266
|
-
}
|
|
1267
|
-
const element = this._dom.createElement("meta");
|
|
1268
|
-
this._setMetaElementAttributes(meta, element);
|
|
1269
|
-
const head = this._doc.getElementsByTagName("head")[0];
|
|
1270
|
-
head.appendChild(element);
|
|
1271
|
-
return element;
|
|
1272
|
-
}
|
|
1273
|
-
_setMetaElementAttributes(tag, el) {
|
|
1274
|
-
Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));
|
|
1275
|
-
return el;
|
|
1276
|
-
}
|
|
1277
|
-
_parseSelector(tag) {
|
|
1278
|
-
const attr = tag.name ? "name" : "property";
|
|
1279
|
-
return `${attr}="${tag[attr]}"`;
|
|
1280
|
-
}
|
|
1281
|
-
_containsAttributes(tag, elem) {
|
|
1282
|
-
return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);
|
|
1283
|
-
}
|
|
1284
|
-
_getMetaKeyMap(prop) {
|
|
1285
|
-
return META_KEYS_MAP[prop] || prop;
|
|
1286
|
-
}
|
|
1287
|
-
static {
|
|
1288
|
-
this.ɵfac = function Meta_Factory(__ngFactoryType__) {
|
|
1289
|
-
return new (__ngFactoryType__ || _Meta)(ɵɵinject(DOCUMENT));
|
|
1290
|
-
};
|
|
1291
|
-
}
|
|
1292
|
-
static {
|
|
1293
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1294
|
-
token: _Meta,
|
|
1295
|
-
factory: _Meta.ɵfac,
|
|
1296
|
-
providedIn: "root"
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
};
|
|
1300
|
-
(() => {
|
|
1301
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Meta, [{
|
|
1302
|
-
type: Injectable,
|
|
1303
|
-
args: [{
|
|
1304
|
-
providedIn: "root"
|
|
1305
|
-
}]
|
|
1306
|
-
}], () => [{
|
|
1307
|
-
type: void 0,
|
|
1308
|
-
decorators: [{
|
|
1309
|
-
type: Inject,
|
|
1310
|
-
args: [DOCUMENT]
|
|
1311
|
-
}]
|
|
1312
|
-
}], null);
|
|
1313
|
-
})();
|
|
1314
|
-
var META_KEYS_MAP = {
|
|
1315
|
-
httpEquiv: "http-equiv"
|
|
1316
|
-
};
|
|
1317
|
-
var Title = class _Title {
|
|
1318
|
-
constructor(_doc) {
|
|
1319
|
-
this._doc = _doc;
|
|
1320
|
-
}
|
|
1321
|
-
/**
|
|
1322
|
-
* Get the title of the current HTML document.
|
|
1323
|
-
*/
|
|
1324
|
-
getTitle() {
|
|
1325
|
-
return this._doc.title;
|
|
1326
|
-
}
|
|
1327
|
-
/**
|
|
1328
|
-
* Set the title of the current HTML document.
|
|
1329
|
-
* @param newTitle
|
|
1330
|
-
*/
|
|
1331
|
-
setTitle(newTitle) {
|
|
1332
|
-
this._doc.title = newTitle || "";
|
|
1333
|
-
}
|
|
1334
|
-
static {
|
|
1335
|
-
this.ɵfac = function Title_Factory(__ngFactoryType__) {
|
|
1336
|
-
return new (__ngFactoryType__ || _Title)(ɵɵinject(DOCUMENT));
|
|
1337
|
-
};
|
|
1338
|
-
}
|
|
1339
|
-
static {
|
|
1340
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1341
|
-
token: _Title,
|
|
1342
|
-
factory: _Title.ɵfac,
|
|
1343
|
-
providedIn: "root"
|
|
1344
|
-
});
|
|
1345
|
-
}
|
|
1346
|
-
};
|
|
1347
|
-
(() => {
|
|
1348
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Title, [{
|
|
1349
|
-
type: Injectable,
|
|
1350
|
-
args: [{
|
|
1351
|
-
providedIn: "root"
|
|
1352
|
-
}]
|
|
1353
|
-
}], () => [{
|
|
1354
|
-
type: void 0,
|
|
1355
|
-
decorators: [{
|
|
1356
|
-
type: Inject,
|
|
1357
|
-
args: [DOCUMENT]
|
|
1358
|
-
}]
|
|
1359
|
-
}], null);
|
|
1360
|
-
})();
|
|
1361
|
-
function exportNgVar(name, value) {
|
|
1362
|
-
if (typeof COMPILED === "undefined" || !COMPILED) {
|
|
1363
|
-
const ng = _global["ng"] = _global["ng"] || {};
|
|
1364
|
-
ng[name] = value;
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
var ChangeDetectionPerfRecord = class {
|
|
1368
|
-
constructor(msPerTick, numTicks) {
|
|
1369
|
-
this.msPerTick = msPerTick;
|
|
1370
|
-
this.numTicks = numTicks;
|
|
1371
|
-
}
|
|
1372
|
-
};
|
|
1373
|
-
var AngularProfiler = class {
|
|
1374
|
-
constructor(ref) {
|
|
1375
|
-
this.appRef = ref.injector.get(ApplicationRef);
|
|
1376
|
-
}
|
|
1377
|
-
// tslint:disable:no-console
|
|
1378
|
-
/**
|
|
1379
|
-
* Exercises change detection in a loop and then prints the average amount of
|
|
1380
|
-
* time in milliseconds how long a single round of change detection takes for
|
|
1381
|
-
* the current state of the UI. It runs a minimum of 5 rounds for a minimum
|
|
1382
|
-
* of 500 milliseconds.
|
|
1383
|
-
*
|
|
1384
|
-
* Optionally, a user may pass a `config` parameter containing a map of
|
|
1385
|
-
* options. Supported options are:
|
|
1386
|
-
*
|
|
1387
|
-
* `record` (boolean) - causes the profiler to record a CPU profile while
|
|
1388
|
-
* it exercises the change detector. Example:
|
|
1389
|
-
*
|
|
1390
|
-
* ```
|
|
1391
|
-
* ng.profiler.timeChangeDetection({record: true})
|
|
1392
|
-
* ```
|
|
1393
|
-
*/
|
|
1394
|
-
timeChangeDetection(config) {
|
|
1395
|
-
const record = config && config["record"];
|
|
1396
|
-
const profileName = "Change Detection";
|
|
1397
|
-
if (record && "profile" in console && typeof console.profile === "function") {
|
|
1398
|
-
console.profile(profileName);
|
|
1399
|
-
}
|
|
1400
|
-
const start = performance.now();
|
|
1401
|
-
let numTicks = 0;
|
|
1402
|
-
while (numTicks < 5 || performance.now() - start < 500) {
|
|
1403
|
-
this.appRef.tick();
|
|
1404
|
-
numTicks++;
|
|
1405
|
-
}
|
|
1406
|
-
const end = performance.now();
|
|
1407
|
-
if (record && "profileEnd" in console && typeof console.profileEnd === "function") {
|
|
1408
|
-
console.profileEnd(profileName);
|
|
1409
|
-
}
|
|
1410
|
-
const msPerTick = (end - start) / numTicks;
|
|
1411
|
-
console.log(`ran ${numTicks} change detection cycles`);
|
|
1412
|
-
console.log(`${msPerTick.toFixed(2)} ms per check`);
|
|
1413
|
-
return new ChangeDetectionPerfRecord(msPerTick, numTicks);
|
|
1414
|
-
}
|
|
1415
|
-
};
|
|
1416
|
-
var PROFILER_GLOBAL_NAME = "profiler";
|
|
1417
|
-
function enableDebugTools(ref) {
|
|
1418
|
-
exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
|
|
1419
|
-
return ref;
|
|
1420
|
-
}
|
|
1421
|
-
function disableDebugTools() {
|
|
1422
|
-
exportNgVar(PROFILER_GLOBAL_NAME, null);
|
|
1423
|
-
}
|
|
1424
|
-
var By = class {
|
|
1425
|
-
/**
|
|
1426
|
-
* Match all nodes.
|
|
1427
|
-
*
|
|
1428
|
-
* @usageNotes
|
|
1429
|
-
* ### Example
|
|
1430
|
-
*
|
|
1431
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
|
1432
|
-
*/
|
|
1433
|
-
static all() {
|
|
1434
|
-
return () => true;
|
|
1435
|
-
}
|
|
1436
|
-
/**
|
|
1437
|
-
* Match elements by the given CSS selector.
|
|
1438
|
-
*
|
|
1439
|
-
* @usageNotes
|
|
1440
|
-
* ### Example
|
|
1441
|
-
*
|
|
1442
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
|
|
1443
|
-
*/
|
|
1444
|
-
static css(selector) {
|
|
1445
|
-
return (debugElement) => {
|
|
1446
|
-
return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false;
|
|
1447
|
-
};
|
|
1448
|
-
}
|
|
1449
|
-
/**
|
|
1450
|
-
* Match nodes that have the given directive present.
|
|
1451
|
-
*
|
|
1452
|
-
* @usageNotes
|
|
1453
|
-
* ### Example
|
|
1454
|
-
*
|
|
1455
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
|
1456
|
-
*/
|
|
1457
|
-
static directive(type) {
|
|
1458
|
-
return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1;
|
|
1459
|
-
}
|
|
1460
|
-
};
|
|
1461
|
-
function elementMatches(n, selector) {
|
|
1462
|
-
if (getDOM().isElementNode(n)) {
|
|
1463
|
-
return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
|
|
1464
|
-
}
|
|
1465
|
-
return false;
|
|
1466
|
-
}
|
|
1467
|
-
var EVENT_NAMES = {
|
|
1468
|
-
// pan
|
|
1469
|
-
"pan": true,
|
|
1470
|
-
"panstart": true,
|
|
1471
|
-
"panmove": true,
|
|
1472
|
-
"panend": true,
|
|
1473
|
-
"pancancel": true,
|
|
1474
|
-
"panleft": true,
|
|
1475
|
-
"panright": true,
|
|
1476
|
-
"panup": true,
|
|
1477
|
-
"pandown": true,
|
|
1478
|
-
// pinch
|
|
1479
|
-
"pinch": true,
|
|
1480
|
-
"pinchstart": true,
|
|
1481
|
-
"pinchmove": true,
|
|
1482
|
-
"pinchend": true,
|
|
1483
|
-
"pinchcancel": true,
|
|
1484
|
-
"pinchin": true,
|
|
1485
|
-
"pinchout": true,
|
|
1486
|
-
// press
|
|
1487
|
-
"press": true,
|
|
1488
|
-
"pressup": true,
|
|
1489
|
-
// rotate
|
|
1490
|
-
"rotate": true,
|
|
1491
|
-
"rotatestart": true,
|
|
1492
|
-
"rotatemove": true,
|
|
1493
|
-
"rotateend": true,
|
|
1494
|
-
"rotatecancel": true,
|
|
1495
|
-
// swipe
|
|
1496
|
-
"swipe": true,
|
|
1497
|
-
"swipeleft": true,
|
|
1498
|
-
"swiperight": true,
|
|
1499
|
-
"swipeup": true,
|
|
1500
|
-
"swipedown": true,
|
|
1501
|
-
// tap
|
|
1502
|
-
"tap": true,
|
|
1503
|
-
"doubletap": true
|
|
1504
|
-
};
|
|
1505
|
-
var HAMMER_GESTURE_CONFIG = new InjectionToken("HammerGestureConfig");
|
|
1506
|
-
var HAMMER_LOADER = new InjectionToken("HammerLoader");
|
|
1507
|
-
var HammerGestureConfig = class _HammerGestureConfig {
|
|
1508
|
-
constructor() {
|
|
1509
|
-
this.events = [];
|
|
1510
|
-
this.overrides = {};
|
|
1511
|
-
}
|
|
1512
|
-
/**
|
|
1513
|
-
* Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
|
|
1514
|
-
* and attaches it to a given HTML element.
|
|
1515
|
-
* @param element The element that will recognize gestures.
|
|
1516
|
-
* @returns A HammerJS event-manager object.
|
|
1517
|
-
*/
|
|
1518
|
-
buildHammer(element) {
|
|
1519
|
-
const mc = new Hammer(element, this.options);
|
|
1520
|
-
mc.get("pinch").set({
|
|
1521
|
-
enable: true
|
|
1522
|
-
});
|
|
1523
|
-
mc.get("rotate").set({
|
|
1524
|
-
enable: true
|
|
1525
|
-
});
|
|
1526
|
-
for (const eventName in this.overrides) {
|
|
1527
|
-
mc.get(eventName).set(this.overrides[eventName]);
|
|
1528
|
-
}
|
|
1529
|
-
return mc;
|
|
1530
|
-
}
|
|
1531
|
-
static {
|
|
1532
|
-
this.ɵfac = function HammerGestureConfig_Factory(__ngFactoryType__) {
|
|
1533
|
-
return new (__ngFactoryType__ || _HammerGestureConfig)();
|
|
1534
|
-
};
|
|
1535
|
-
}
|
|
1536
|
-
static {
|
|
1537
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1538
|
-
token: _HammerGestureConfig,
|
|
1539
|
-
factory: _HammerGestureConfig.ɵfac
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
};
|
|
1543
|
-
(() => {
|
|
1544
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerGestureConfig, [{
|
|
1545
|
-
type: Injectable
|
|
1546
|
-
}], null, null);
|
|
1547
|
-
})();
|
|
1548
|
-
var HammerGesturesPlugin = class _HammerGesturesPlugin extends EventManagerPlugin {
|
|
1549
|
-
constructor(doc, _config, console2, loader) {
|
|
1550
|
-
super(doc);
|
|
1551
|
-
this._config = _config;
|
|
1552
|
-
this.console = console2;
|
|
1553
|
-
this.loader = loader;
|
|
1554
|
-
this._loaderPromise = null;
|
|
1555
|
-
}
|
|
1556
|
-
supports(eventName) {
|
|
1557
|
-
if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
|
|
1558
|
-
return false;
|
|
1559
|
-
}
|
|
1560
|
-
if (!window.Hammer && !this.loader) {
|
|
1561
|
-
if (typeof ngDevMode === "undefined" || ngDevMode) {
|
|
1562
|
-
this.console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified.`);
|
|
1563
|
-
}
|
|
1564
|
-
return false;
|
|
1565
|
-
}
|
|
1566
|
-
return true;
|
|
1567
|
-
}
|
|
1568
|
-
addEventListener(element, eventName, handler) {
|
|
1569
|
-
const zone = this.manager.getZone();
|
|
1570
|
-
eventName = eventName.toLowerCase();
|
|
1571
|
-
if (!window.Hammer && this.loader) {
|
|
1572
|
-
this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader());
|
|
1573
|
-
let cancelRegistration = false;
|
|
1574
|
-
let deregister = () => {
|
|
1575
|
-
cancelRegistration = true;
|
|
1576
|
-
};
|
|
1577
|
-
zone.runOutsideAngular(() => this._loaderPromise.then(() => {
|
|
1578
|
-
if (!window.Hammer) {
|
|
1579
|
-
if (typeof ngDevMode === "undefined" || ngDevMode) {
|
|
1580
|
-
this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);
|
|
1581
|
-
}
|
|
1582
|
-
deregister = () => {
|
|
1583
|
-
};
|
|
1584
|
-
return;
|
|
1585
|
-
}
|
|
1586
|
-
if (!cancelRegistration) {
|
|
1587
|
-
deregister = this.addEventListener(element, eventName, handler);
|
|
1588
|
-
}
|
|
1589
|
-
}).catch(() => {
|
|
1590
|
-
if (typeof ngDevMode === "undefined" || ngDevMode) {
|
|
1591
|
-
this.console.warn(`The "${eventName}" event cannot be bound because the custom Hammer.JS loader failed.`);
|
|
1592
|
-
}
|
|
1593
|
-
deregister = () => {
|
|
1594
|
-
};
|
|
1595
|
-
}));
|
|
1596
|
-
return () => {
|
|
1597
|
-
deregister();
|
|
1598
|
-
};
|
|
1599
|
-
}
|
|
1600
|
-
return zone.runOutsideAngular(() => {
|
|
1601
|
-
const mc = this._config.buildHammer(element);
|
|
1602
|
-
const callback = function(eventObj) {
|
|
1603
|
-
zone.runGuarded(function() {
|
|
1604
|
-
handler(eventObj);
|
|
1605
|
-
});
|
|
1606
|
-
};
|
|
1607
|
-
mc.on(eventName, callback);
|
|
1608
|
-
return () => {
|
|
1609
|
-
mc.off(eventName, callback);
|
|
1610
|
-
if (typeof mc.destroy === "function") {
|
|
1611
|
-
mc.destroy();
|
|
1612
|
-
}
|
|
1613
|
-
};
|
|
1614
|
-
});
|
|
1615
|
-
}
|
|
1616
|
-
isCustomEvent(eventName) {
|
|
1617
|
-
return this._config.events.indexOf(eventName) > -1;
|
|
1618
|
-
}
|
|
1619
|
-
static {
|
|
1620
|
-
this.ɵfac = function HammerGesturesPlugin_Factory(__ngFactoryType__) {
|
|
1621
|
-
return new (__ngFactoryType__ || _HammerGesturesPlugin)(ɵɵinject(DOCUMENT), ɵɵinject(HAMMER_GESTURE_CONFIG), ɵɵinject(Console), ɵɵinject(HAMMER_LOADER, 8));
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
static {
|
|
1625
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1626
|
-
token: _HammerGesturesPlugin,
|
|
1627
|
-
factory: _HammerGesturesPlugin.ɵfac
|
|
1628
|
-
});
|
|
1629
|
-
}
|
|
1630
|
-
};
|
|
1631
|
-
(() => {
|
|
1632
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerGesturesPlugin, [{
|
|
1633
|
-
type: Injectable
|
|
1634
|
-
}], () => [{
|
|
1635
|
-
type: void 0,
|
|
1636
|
-
decorators: [{
|
|
1637
|
-
type: Inject,
|
|
1638
|
-
args: [DOCUMENT]
|
|
1639
|
-
}]
|
|
1640
|
-
}, {
|
|
1641
|
-
type: HammerGestureConfig,
|
|
1642
|
-
decorators: [{
|
|
1643
|
-
type: Inject,
|
|
1644
|
-
args: [HAMMER_GESTURE_CONFIG]
|
|
1645
|
-
}]
|
|
1646
|
-
}, {
|
|
1647
|
-
type: Console
|
|
1648
|
-
}, {
|
|
1649
|
-
type: void 0,
|
|
1650
|
-
decorators: [{
|
|
1651
|
-
type: Optional
|
|
1652
|
-
}, {
|
|
1653
|
-
type: Inject,
|
|
1654
|
-
args: [HAMMER_LOADER]
|
|
1655
|
-
}]
|
|
1656
|
-
}], null);
|
|
1657
|
-
})();
|
|
1658
|
-
var HammerModule = class _HammerModule {
|
|
1659
|
-
static {
|
|
1660
|
-
this.ɵfac = function HammerModule_Factory(__ngFactoryType__) {
|
|
1661
|
-
return new (__ngFactoryType__ || _HammerModule)();
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
static {
|
|
1665
|
-
this.ɵmod = ɵɵdefineNgModule({
|
|
1666
|
-
type: _HammerModule
|
|
1667
|
-
});
|
|
1668
|
-
}
|
|
1669
|
-
static {
|
|
1670
|
-
this.ɵinj = ɵɵdefineInjector({
|
|
1671
|
-
providers: [{
|
|
1672
|
-
provide: EVENT_MANAGER_PLUGINS,
|
|
1673
|
-
useClass: HammerGesturesPlugin,
|
|
1674
|
-
multi: true,
|
|
1675
|
-
deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]
|
|
1676
|
-
}, {
|
|
1677
|
-
provide: HAMMER_GESTURE_CONFIG,
|
|
1678
|
-
useClass: HammerGestureConfig,
|
|
1679
|
-
deps: []
|
|
1680
|
-
}]
|
|
1681
|
-
});
|
|
1682
|
-
}
|
|
1683
|
-
};
|
|
1684
|
-
(() => {
|
|
1685
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerModule, [{
|
|
1686
|
-
type: NgModule,
|
|
1687
|
-
args: [{
|
|
1688
|
-
providers: [{
|
|
1689
|
-
provide: EVENT_MANAGER_PLUGINS,
|
|
1690
|
-
useClass: HammerGesturesPlugin,
|
|
1691
|
-
multi: true,
|
|
1692
|
-
deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]
|
|
1693
|
-
}, {
|
|
1694
|
-
provide: HAMMER_GESTURE_CONFIG,
|
|
1695
|
-
useClass: HammerGestureConfig,
|
|
1696
|
-
deps: []
|
|
1697
|
-
}]
|
|
1698
|
-
}]
|
|
1699
|
-
}], null, null);
|
|
1700
|
-
})();
|
|
1701
|
-
var DomSanitizer = class _DomSanitizer {
|
|
1702
|
-
static {
|
|
1703
|
-
this.ɵfac = function DomSanitizer_Factory(__ngFactoryType__) {
|
|
1704
|
-
return new (__ngFactoryType__ || _DomSanitizer)();
|
|
1705
|
-
};
|
|
1706
|
-
}
|
|
1707
|
-
static {
|
|
1708
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1709
|
-
token: _DomSanitizer,
|
|
1710
|
-
factory: function DomSanitizer_Factory(__ngFactoryType__) {
|
|
1711
|
-
let __ngConditionalFactory__ = null;
|
|
1712
|
-
if (__ngFactoryType__) {
|
|
1713
|
-
__ngConditionalFactory__ = new (__ngFactoryType__ || _DomSanitizer)();
|
|
1714
|
-
} else {
|
|
1715
|
-
__ngConditionalFactory__ = ɵɵinject(DomSanitizerImpl);
|
|
1716
|
-
}
|
|
1717
|
-
return __ngConditionalFactory__;
|
|
1718
|
-
},
|
|
1719
|
-
providedIn: "root"
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
};
|
|
1723
|
-
(() => {
|
|
1724
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomSanitizer, [{
|
|
1725
|
-
type: Injectable,
|
|
1726
|
-
args: [{
|
|
1727
|
-
providedIn: "root",
|
|
1728
|
-
useExisting: forwardRef(() => DomSanitizerImpl)
|
|
1729
|
-
}]
|
|
1730
|
-
}], null, null);
|
|
1731
|
-
})();
|
|
1732
|
-
var DomSanitizerImpl = class _DomSanitizerImpl extends DomSanitizer {
|
|
1733
|
-
constructor(_doc) {
|
|
1734
|
-
super();
|
|
1735
|
-
this._doc = _doc;
|
|
1736
|
-
}
|
|
1737
|
-
sanitize(ctx, value) {
|
|
1738
|
-
if (value == null) return null;
|
|
1739
|
-
switch (ctx) {
|
|
1740
|
-
case SecurityContext.NONE:
|
|
1741
|
-
return value;
|
|
1742
|
-
case SecurityContext.HTML:
|
|
1743
|
-
if (allowSanitizationBypassAndThrow(
|
|
1744
|
-
value,
|
|
1745
|
-
"HTML"
|
|
1746
|
-
/* BypassType.Html */
|
|
1747
|
-
)) {
|
|
1748
|
-
return unwrapSafeValue(value);
|
|
1749
|
-
}
|
|
1750
|
-
return _sanitizeHtml(this._doc, String(value)).toString();
|
|
1751
|
-
case SecurityContext.STYLE:
|
|
1752
|
-
if (allowSanitizationBypassAndThrow(
|
|
1753
|
-
value,
|
|
1754
|
-
"Style"
|
|
1755
|
-
/* BypassType.Style */
|
|
1756
|
-
)) {
|
|
1757
|
-
return unwrapSafeValue(value);
|
|
1758
|
-
}
|
|
1759
|
-
return value;
|
|
1760
|
-
case SecurityContext.SCRIPT:
|
|
1761
|
-
if (allowSanitizationBypassAndThrow(
|
|
1762
|
-
value,
|
|
1763
|
-
"Script"
|
|
1764
|
-
/* BypassType.Script */
|
|
1765
|
-
)) {
|
|
1766
|
-
return unwrapSafeValue(value);
|
|
1767
|
-
}
|
|
1768
|
-
throw new RuntimeError(5200, (typeof ngDevMode === "undefined" || ngDevMode) && "unsafe value used in a script context");
|
|
1769
|
-
case SecurityContext.URL:
|
|
1770
|
-
if (allowSanitizationBypassAndThrow(
|
|
1771
|
-
value,
|
|
1772
|
-
"URL"
|
|
1773
|
-
/* BypassType.Url */
|
|
1774
|
-
)) {
|
|
1775
|
-
return unwrapSafeValue(value);
|
|
1776
|
-
}
|
|
1777
|
-
return _sanitizeUrl(String(value));
|
|
1778
|
-
case SecurityContext.RESOURCE_URL:
|
|
1779
|
-
if (allowSanitizationBypassAndThrow(
|
|
1780
|
-
value,
|
|
1781
|
-
"ResourceURL"
|
|
1782
|
-
/* BypassType.ResourceUrl */
|
|
1783
|
-
)) {
|
|
1784
|
-
return unwrapSafeValue(value);
|
|
1785
|
-
}
|
|
1786
|
-
throw new RuntimeError(5201, (typeof ngDevMode === "undefined" || ngDevMode) && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);
|
|
1787
|
-
default:
|
|
1788
|
-
throw new RuntimeError(5202, (typeof ngDevMode === "undefined" || ngDevMode) && `Unexpected SecurityContext ${ctx} (see ${XSS_SECURITY_URL})`);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
bypassSecurityTrustHtml(value) {
|
|
1792
|
-
return bypassSanitizationTrustHtml(value);
|
|
1793
|
-
}
|
|
1794
|
-
bypassSecurityTrustStyle(value) {
|
|
1795
|
-
return bypassSanitizationTrustStyle(value);
|
|
1796
|
-
}
|
|
1797
|
-
bypassSecurityTrustScript(value) {
|
|
1798
|
-
return bypassSanitizationTrustScript(value);
|
|
1799
|
-
}
|
|
1800
|
-
bypassSecurityTrustUrl(value) {
|
|
1801
|
-
return bypassSanitizationTrustUrl(value);
|
|
1802
|
-
}
|
|
1803
|
-
bypassSecurityTrustResourceUrl(value) {
|
|
1804
|
-
return bypassSanitizationTrustResourceUrl(value);
|
|
1805
|
-
}
|
|
1806
|
-
static {
|
|
1807
|
-
this.ɵfac = function DomSanitizerImpl_Factory(__ngFactoryType__) {
|
|
1808
|
-
return new (__ngFactoryType__ || _DomSanitizerImpl)(ɵɵinject(DOCUMENT));
|
|
1809
|
-
};
|
|
1810
|
-
}
|
|
1811
|
-
static {
|
|
1812
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
1813
|
-
token: _DomSanitizerImpl,
|
|
1814
|
-
factory: _DomSanitizerImpl.ɵfac,
|
|
1815
|
-
providedIn: "root"
|
|
1816
|
-
});
|
|
1817
|
-
}
|
|
1818
|
-
};
|
|
1819
|
-
(() => {
|
|
1820
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomSanitizerImpl, [{
|
|
1821
|
-
type: Injectable,
|
|
1822
|
-
args: [{
|
|
1823
|
-
providedIn: "root"
|
|
1824
|
-
}]
|
|
1825
|
-
}], () => [{
|
|
1826
|
-
type: void 0,
|
|
1827
|
-
decorators: [{
|
|
1828
|
-
type: Inject,
|
|
1829
|
-
args: [DOCUMENT]
|
|
1830
|
-
}]
|
|
1831
|
-
}], null);
|
|
1832
|
-
})();
|
|
1833
|
-
var HydrationFeatureKind;
|
|
1834
|
-
(function(HydrationFeatureKind2) {
|
|
1835
|
-
HydrationFeatureKind2[HydrationFeatureKind2["NoHttpTransferCache"] = 0] = "NoHttpTransferCache";
|
|
1836
|
-
HydrationFeatureKind2[HydrationFeatureKind2["HttpTransferCacheOptions"] = 1] = "HttpTransferCacheOptions";
|
|
1837
|
-
HydrationFeatureKind2[HydrationFeatureKind2["I18nSupport"] = 2] = "I18nSupport";
|
|
1838
|
-
HydrationFeatureKind2[HydrationFeatureKind2["EventReplay"] = 3] = "EventReplay";
|
|
1839
|
-
})(HydrationFeatureKind || (HydrationFeatureKind = {}));
|
|
1840
|
-
function hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) {
|
|
1841
|
-
return {
|
|
1842
|
-
ɵkind,
|
|
1843
|
-
ɵproviders
|
|
1844
|
-
};
|
|
1845
|
-
}
|
|
1846
|
-
function withNoHttpTransferCache() {
|
|
1847
|
-
return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache);
|
|
1848
|
-
}
|
|
1849
|
-
function withHttpTransferCacheOptions(options) {
|
|
1850
|
-
return hydrationFeature(HydrationFeatureKind.HttpTransferCacheOptions, withHttpTransferCache(options));
|
|
1851
|
-
}
|
|
1852
|
-
function withI18nSupport2() {
|
|
1853
|
-
return hydrationFeature(HydrationFeatureKind.I18nSupport, withI18nSupport());
|
|
1854
|
-
}
|
|
1855
|
-
function withEventReplay2() {
|
|
1856
|
-
return hydrationFeature(HydrationFeatureKind.EventReplay, withEventReplay());
|
|
1857
|
-
}
|
|
1858
|
-
function provideZoneJsCompatibilityDetector() {
|
|
1859
|
-
return [{
|
|
1860
|
-
provide: ENVIRONMENT_INITIALIZER,
|
|
1861
|
-
useValue: () => {
|
|
1862
|
-
const ngZone = inject(NgZone);
|
|
1863
|
-
const isZoneless = inject(ZONELESS_ENABLED);
|
|
1864
|
-
if (!isZoneless && ngZone.constructor !== NgZone) {
|
|
1865
|
-
const console2 = inject(Console);
|
|
1866
|
-
const message = formatRuntimeError(-5e3, "Angular detected that hydration was enabled for an application that uses a custom or a noop Zone.js implementation. This is not yet a fully supported configuration.");
|
|
1867
|
-
console2.warn(message);
|
|
1868
|
-
}
|
|
1869
|
-
},
|
|
1870
|
-
multi: true
|
|
1871
|
-
}];
|
|
1872
|
-
}
|
|
1873
|
-
function provideClientHydration(...features) {
|
|
1874
|
-
const providers = [];
|
|
1875
|
-
const featuresKind = /* @__PURE__ */ new Set();
|
|
1876
|
-
const hasHttpTransferCacheOptions = featuresKind.has(HydrationFeatureKind.HttpTransferCacheOptions);
|
|
1877
|
-
for (const {
|
|
1878
|
-
ɵproviders,
|
|
1879
|
-
ɵkind
|
|
1880
|
-
} of features) {
|
|
1881
|
-
featuresKind.add(ɵkind);
|
|
1882
|
-
if (ɵproviders.length) {
|
|
1883
|
-
providers.push(ɵproviders);
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
if (typeof ngDevMode !== "undefined" && ngDevMode && featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) && hasHttpTransferCacheOptions) {
|
|
1887
|
-
throw new Error("Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.");
|
|
1888
|
-
}
|
|
1889
|
-
return makeEnvironmentProviders([typeof ngDevMode !== "undefined" && ngDevMode ? provideZoneJsCompatibilityDetector() : [], withDomHydration(), featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions ? [] : withHttpTransferCache({}), providers]);
|
|
1890
|
-
}
|
|
1891
|
-
var VERSION = new Version("18.2.14");
|
|
1892
|
-
|
|
1893
|
-
export {
|
|
1894
|
-
BrowserDomAdapter,
|
|
1895
|
-
BrowserGetTestability,
|
|
1896
|
-
EVENT_MANAGER_PLUGINS,
|
|
1897
|
-
EventManager,
|
|
1898
|
-
EventManagerPlugin,
|
|
1899
|
-
SharedStylesHost,
|
|
1900
|
-
REMOVE_STYLES_ON_COMPONENT_DESTROY,
|
|
1901
|
-
DomRendererFactory2,
|
|
1902
|
-
DomEventsPlugin,
|
|
1903
|
-
KeyEventsPlugin,
|
|
1904
|
-
bootstrapApplication,
|
|
1905
|
-
createApplication,
|
|
1906
|
-
provideProtractorTestingSupport,
|
|
1907
|
-
initDomAdapter,
|
|
1908
|
-
INTERNAL_BROWSER_PLATFORM_PROVIDERS,
|
|
1909
|
-
platformBrowser,
|
|
1910
|
-
BrowserModule,
|
|
1911
|
-
Meta,
|
|
1912
|
-
Title,
|
|
1913
|
-
enableDebugTools,
|
|
1914
|
-
disableDebugTools,
|
|
1915
|
-
By,
|
|
1916
|
-
HAMMER_GESTURE_CONFIG,
|
|
1917
|
-
HAMMER_LOADER,
|
|
1918
|
-
HammerGestureConfig,
|
|
1919
|
-
HammerGesturesPlugin,
|
|
1920
|
-
HammerModule,
|
|
1921
|
-
DomSanitizer,
|
|
1922
|
-
DomSanitizerImpl,
|
|
1923
|
-
HydrationFeatureKind,
|
|
1924
|
-
withNoHttpTransferCache,
|
|
1925
|
-
withHttpTransferCacheOptions,
|
|
1926
|
-
withI18nSupport2 as withI18nSupport,
|
|
1927
|
-
withEventReplay2 as withEventReplay,
|
|
1928
|
-
provideClientHydration,
|
|
1929
|
-
VERSION
|
|
1930
|
-
};
|
|
1931
|
-
/*! Bundled license information:
|
|
1932
|
-
|
|
1933
|
-
@angular/platform-browser/fesm2022/platform-browser.mjs:
|
|
1934
|
-
(**
|
|
1935
|
-
* @license Angular v18.2.14
|
|
1936
|
-
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
1937
|
-
* License: MIT
|
|
1938
|
-
*)
|
|
1939
|
-
*/
|
|
1940
|
-
//# sourceMappingURL=chunk-DJ6HHZ3S.js.map
|