@absolutejs/absolute 0.19.0-beta.212 → 0.19.0-beta.214

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.absolutejs/cache/angular-linker/03f269392dcdbe53b0482927caa1ff17.js +33 -0
  2. package/.absolutejs/cache/angular-linker/341d75bd709b8e3da5e0191e3ae7ff34.js +2029 -0
  3. package/.absolutejs/cache/angular-linker/54161bce55bb149350556317e341619b.js +2872 -0
  4. package/.absolutejs/cache/angular-linker/58ef0a50d4370cda2b180a0e28ccc9a0.js +381 -0
  5. package/.absolutejs/cache/angular-linker/6d5602e0777a6bf3dc286d1418e37eeb.js +593 -0
  6. package/.absolutejs/cache/angular-linker/73f3352125fe12196d76075dab653b06.js +2836 -0
  7. package/.absolutejs/cache/angular-linker/8d0343b38de78de9075d2b7aaef4a0d6.js +693 -0
  8. package/.absolutejs/cache/angular-linker/cd4015dfcb0e8b06d279f929ba472d70.js +122 -0
  9. package/.absolutejs/cache/angular-linker/d7949b8b530e790ee1d7c5f4d9f4e561.js +314 -0
  10. package/.absolutejs/cache/angular-linker/e1bf85e34581dfb0ed6555e030c158e2.js +1351 -0
  11. package/.absolutejs/prettier.cache.json +236 -0
  12. package/.absolutejs/tsc.tsbuildinfo +1 -0
  13. package/.absolutejs/tsconfig.tsbuildinfo +1 -1
  14. package/.absolutejs/tsconfig.vue-check.json +6 -0
  15. package/.absolutejs/vue-tsc.tsbuildinfo +1 -1
  16. package/build/.cache/images/47f6059ee156360b7a041933b4978cbcb2011a1c9a67d833558d233472be079b.data +0 -0
  17. package/build/.cache/images/47f6059ee156360b7a041933b4978cbcb2011a1c9a67d833558d233472be079b.meta +1 -0
  18. package/build/.cache/images/5099ad2f32e4636aa812b97dd0dff1d1b439e24b5e97b2d55fe4f77367f461a4.data +0 -0
  19. package/build/.cache/images/5099ad2f32e4636aa812b97dd0dff1d1b439e24b5e97b2d55fe4f77367f461a4.meta +1 -0
  20. package/build/.cache/images/6ee00034d791ddd8b7f3ec800a222632adaf1e8c9fcedc480c773466fc10d1d5.data +0 -0
  21. package/build/.cache/images/6ee00034d791ddd8b7f3ec800a222632adaf1e8c9fcedc480c773466fc10d1d5.meta +1 -0
  22. package/build/.cache/images/70714161d457f1df2ede250334bd6060a38a652f10f043791c77d853f3005930.data +0 -0
  23. package/build/.cache/images/70714161d457f1df2ede250334bd6060a38a652f10f043791c77d853f3005930.meta +1 -0
  24. package/build/.cache/images/7eda684ed9d49b20bd3f8a52c1d2567c7c01a8b73fd7f880a103c0ec3c14f475.data +0 -0
  25. package/build/.cache/images/7eda684ed9d49b20bd3f8a52c1d2567c7c01a8b73fd7f880a103c0ec3c14f475.meta +1 -0
  26. package/build/.cache/images/926071f8d8f974eb91ccf882b478526c5926bc6693d663cdd304c57e7b3e0746.data +0 -0
  27. package/build/.cache/images/926071f8d8f974eb91ccf882b478526c5926bc6693d663cdd304c57e7b3e0746.meta +1 -0
  28. package/build/.cache/images/99fa4c4518e49ec0b205f2c67f9d535672053b80c8637540f9ce759ae5f6bbce.data +0 -0
  29. package/build/.cache/images/99fa4c4518e49ec0b205f2c67f9d535672053b80c8637540f9ce759ae5f6bbce.meta +1 -0
  30. package/build/.cache/images/d6ecd32c804dc52e56da07bd7d05876ff7f02e2e193baa94e15d1cf9022404d7.data +0 -0
  31. package/build/.cache/images/d6ecd32c804dc52e56da07bd7d05876ff7f02e2e193baa94e15d1cf9022404d7.meta +1 -0
  32. package/build/.cache/images/e68219762a1b21ec08ddaf67023cbd689c7f23ab406efa076007b36e4d5844d4.data +0 -0
  33. package/build/.cache/images/e68219762a1b21ec08ddaf67023cbd689c7f23ab406efa076007b36e4d5844d4.meta +1 -0
  34. package/build/.cache/images/e6c1d2e1ea4f97ba38de446e595eb7e0a54f50e282f4d3e02d94d9fd17057066.data +0 -0
  35. package/build/.cache/images/e6c1d2e1ea4f97ba38de446e595eb7e0a54f50e282f4d3e02d94d9fd17057066.meta +1 -0
  36. package/build/.cache/images/f422de3006871f116d1e262ada57671fd9a77d6922b565de81cdc7c574fdccb2.data +0 -0
  37. package/build/.cache/images/f422de3006871f116d1e262ada57671fd9a77d6922b565de81cdc7c574fdccb2.meta +1 -0
  38. package/build/assets/jpg/test.jpg +0 -0
  39. package/build/sitemap.xml +3 -0
  40. package/dist/{Image-599vc5xz.vue → Image-k52pzpdh.vue} +71 -37
  41. package/dist/angular/components/image.component.js +27 -19
  42. package/dist/angular/index.js.map +2 -2
  43. package/dist/build.js +6 -12
  44. package/dist/build.js.map +5 -5
  45. package/dist/cli/index.js +53 -11
  46. package/dist/image-client/imageClient.js +1 -10
  47. package/dist/index.js +6 -12
  48. package/dist/index.js.map +6 -6
  49. package/dist/react/components/browser/index.js +1 -10
  50. package/dist/react/components/index.js +6 -12
  51. package/dist/react/components/index.js.map +4 -4
  52. package/dist/svelte/components/Image.svelte +8 -5
  53. package/dist/vue/components/Image.vue +71 -37
  54. package/dist/vue/components/index.js +1 -1
  55. package/package.json +1 -1
  56. package/scripts/build.ts +308 -295
  57. package/types/metadata.ts +7 -1
@@ -0,0 +1,693 @@
1
+ /**
2
+ * @license Angular v21.2.6
3
+ * (c) 2010-2026 Google LLC. https://angular.dev/
4
+ * License: MIT
5
+ */
6
+
7
+ import { DOCUMENT, ɵgetDOM as _getDOM } from '@angular/common';
8
+ import * as i0 from '@angular/core';
9
+ import { Inject, Injectable, InjectionToken, ɵRuntimeError as _RuntimeError, APP_ID, CSP_NONCE, PLATFORM_ID, Optional, ViewEncapsulation, ɵTracingService as _TracingService, RendererStyleFlags2, ɵallLeavingAnimations as _allLeavingAnimations } from '@angular/core';
10
+ class EventManagerPlugin {
11
+ _doc;
12
+ constructor(_doc) {
13
+ this._doc = _doc;
14
+ }
15
+ manager;
16
+ }
17
+ class DomEventsPlugin extends EventManagerPlugin {
18
+ constructor(doc) {
19
+ super(doc);
20
+ }
21
+ supports(eventName) {
22
+ return true;
23
+ }
24
+ addEventListener(element, eventName, handler, options) {
25
+ element.addEventListener(eventName, handler, options);
26
+ return () => this.removeEventListener(element, eventName, handler, options);
27
+ }
28
+ removeEventListener(target, eventName, callback, options) {
29
+ return target.removeEventListener(eventName, callback, options);
30
+ }
31
+ static ɵfac = function DomEventsPlugin_Factory(__ngFactoryType__) {
32
+ return new (__ngFactoryType__ || DomEventsPlugin)(i0.ɵɵinject(DOCUMENT));
33
+ };
34
+ static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({
35
+ token: DomEventsPlugin,
36
+ factory: DomEventsPlugin.ɵfac
37
+ });
38
+ }
39
+ (() => {
40
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DomEventsPlugin, [{
41
+ type: Injectable
42
+ }], () => [{
43
+ type: undefined,
44
+ decorators: [{
45
+ type: Inject,
46
+ args: [DOCUMENT]
47
+ }]
48
+ }], null);
49
+ })();
50
+ const EVENT_MANAGER_PLUGINS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'EventManagerPlugins' : '');
51
+ class EventManager {
52
+ _zone;
53
+ _plugins;
54
+ _eventNameToPlugin = new Map();
55
+ constructor(plugins, _zone) {
56
+ this._zone = _zone;
57
+ plugins.forEach(plugin => {
58
+ plugin.manager = this;
59
+ });
60
+ const otherPlugins = plugins.filter(p => !(p instanceof DomEventsPlugin));
61
+ this._plugins = otherPlugins.slice().reverse();
62
+ const domEventPlugin = plugins.find(p => p instanceof DomEventsPlugin);
63
+ if (domEventPlugin) {
64
+ this._plugins.push(domEventPlugin);
65
+ }
66
+ }
67
+ addEventListener(element, eventName, handler, options) {
68
+ const plugin = this._findPluginFor(eventName);
69
+ return plugin.addEventListener(element, eventName, handler, options);
70
+ }
71
+ getZone() {
72
+ return this._zone;
73
+ }
74
+ _findPluginFor(eventName) {
75
+ let plugin = this._eventNameToPlugin.get(eventName);
76
+ if (plugin) {
77
+ return plugin;
78
+ }
79
+ const plugins = this._plugins;
80
+ plugin = plugins.find(plugin => plugin.supports(eventName));
81
+ if (!plugin) {
82
+ throw new _RuntimeError(5101, (typeof ngDevMode === 'undefined' || ngDevMode) && `No event manager plugin found for event ${eventName}`);
83
+ }
84
+ this._eventNameToPlugin.set(eventName, plugin);
85
+ return plugin;
86
+ }
87
+ static ɵfac = function EventManager_Factory(__ngFactoryType__) {
88
+ return new (__ngFactoryType__ || EventManager)(i0.ɵɵinject(EVENT_MANAGER_PLUGINS), i0.ɵɵinject(i0.NgZone));
89
+ };
90
+ static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({
91
+ token: EventManager,
92
+ factory: EventManager.ɵfac
93
+ });
94
+ }
95
+ (() => {
96
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventManager, [{
97
+ type: Injectable
98
+ }], () => [{
99
+ type: undefined,
100
+ decorators: [{
101
+ type: Inject,
102
+ args: [EVENT_MANAGER_PLUGINS]
103
+ }]
104
+ }, {
105
+ type: i0.NgZone
106
+ }], null);
107
+ })();
108
+ const APP_ID_ATTRIBUTE_NAME = 'ng-app-id';
109
+ function removeElements(elements) {
110
+ for (const element of elements) {
111
+ element.remove();
112
+ }
113
+ }
114
+ function createStyleElement(style, doc) {
115
+ const styleElement = doc.createElement('style');
116
+ styleElement.textContent = style;
117
+ return styleElement;
118
+ }
119
+ function addServerStyles(doc, appId, inline, external) {
120
+ const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"],link[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`);
121
+ if (elements) {
122
+ for (const styleElement of elements) {
123
+ styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME);
124
+ if (styleElement instanceof HTMLLinkElement) {
125
+ external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), {
126
+ usage: 0,
127
+ elements: [styleElement]
128
+ });
129
+ } else if (styleElement.textContent) {
130
+ inline.set(styleElement.textContent, {
131
+ usage: 0,
132
+ elements: [styleElement]
133
+ });
134
+ }
135
+ }
136
+ }
137
+ }
138
+ function createLinkElement(url, doc) {
139
+ const linkElement = doc.createElement('link');
140
+ linkElement.setAttribute('rel', 'stylesheet');
141
+ linkElement.setAttribute('href', url);
142
+ return linkElement;
143
+ }
144
+ class SharedStylesHost {
145
+ doc;
146
+ appId;
147
+ nonce;
148
+ inline = new Map();
149
+ external = new Map();
150
+ hosts = new Set();
151
+ constructor(doc, appId, nonce, platformId = {}) {
152
+ this.doc = doc;
153
+ this.appId = appId;
154
+ this.nonce = nonce;
155
+ addServerStyles(doc, appId, this.inline, this.external);
156
+ this.hosts.add(doc.head);
157
+ }
158
+ addStyles(styles, urls) {
159
+ for (const value of styles) {
160
+ this.addUsage(value, this.inline, createStyleElement);
161
+ }
162
+ urls?.forEach(value => this.addUsage(value, this.external, createLinkElement));
163
+ }
164
+ removeStyles(styles, urls) {
165
+ for (const value of styles) {
166
+ this.removeUsage(value, this.inline);
167
+ }
168
+ urls?.forEach(value => this.removeUsage(value, this.external));
169
+ }
170
+ addUsage(value, usages, creator) {
171
+ const record = usages.get(value);
172
+ if (record) {
173
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) {
174
+ record.elements.forEach(element => element.setAttribute('ng-style-reused', ''));
175
+ }
176
+ record.usage++;
177
+ } else {
178
+ usages.set(value, {
179
+ usage: 1,
180
+ elements: [...this.hosts].map(host => this.addElement(host, creator(value, this.doc)))
181
+ });
182
+ }
183
+ }
184
+ removeUsage(value, usages) {
185
+ const record = usages.get(value);
186
+ if (record) {
187
+ record.usage--;
188
+ if (record.usage <= 0) {
189
+ removeElements(record.elements);
190
+ usages.delete(value);
191
+ }
192
+ }
193
+ }
194
+ ngOnDestroy() {
195
+ for (const [, {
196
+ elements
197
+ }] of [...this.inline, ...this.external]) {
198
+ removeElements(elements);
199
+ }
200
+ this.hosts.clear();
201
+ }
202
+ addHost(hostNode) {
203
+ this.hosts.add(hostNode);
204
+ for (const [style, {
205
+ elements
206
+ }] of this.inline) {
207
+ elements.push(this.addElement(hostNode, createStyleElement(style, this.doc)));
208
+ }
209
+ for (const [url, {
210
+ elements
211
+ }] of this.external) {
212
+ elements.push(this.addElement(hostNode, createLinkElement(url, this.doc)));
213
+ }
214
+ }
215
+ removeHost(hostNode) {
216
+ this.hosts.delete(hostNode);
217
+ }
218
+ addElement(host, element) {
219
+ if (this.nonce) {
220
+ element.setAttribute('nonce', this.nonce);
221
+ }
222
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
223
+ element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
224
+ }
225
+ return host.appendChild(element);
226
+ }
227
+ static ɵfac = function SharedStylesHost_Factory(__ngFactoryType__) {
228
+ return new (__ngFactoryType__ || SharedStylesHost)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(APP_ID), i0.ɵɵinject(CSP_NONCE, 8), i0.ɵɵinject(PLATFORM_ID));
229
+ };
230
+ static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({
231
+ token: SharedStylesHost,
232
+ factory: SharedStylesHost.ɵfac
233
+ });
234
+ }
235
+ (() => {
236
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SharedStylesHost, [{
237
+ type: Injectable
238
+ }], () => [{
239
+ type: Document,
240
+ decorators: [{
241
+ type: Inject,
242
+ args: [DOCUMENT]
243
+ }]
244
+ }, {
245
+ type: undefined,
246
+ decorators: [{
247
+ type: Inject,
248
+ args: [APP_ID]
249
+ }]
250
+ }, {
251
+ type: undefined,
252
+ decorators: [{
253
+ type: Inject,
254
+ args: [CSP_NONCE]
255
+ }, {
256
+ type: Optional
257
+ }]
258
+ }, {
259
+ type: undefined,
260
+ decorators: [{
261
+ type: Inject,
262
+ args: [PLATFORM_ID]
263
+ }]
264
+ }], null);
265
+ })();
266
+ const NAMESPACE_URIS = {
267
+ 'svg': 'http://www.w3.org/2000/svg',
268
+ 'xhtml': 'http://www.w3.org/1999/xhtml',
269
+ 'xlink': 'http://www.w3.org/1999/xlink',
270
+ 'xml': 'http://www.w3.org/XML/1998/namespace',
271
+ 'xmlns': 'http://www.w3.org/2000/xmlns/',
272
+ 'math': 'http://www.w3.org/1998/Math/MathML'
273
+ };
274
+ const COMPONENT_REGEX = /%COMP%/g;
275
+ const SOURCEMAP_URL_REGEXP = /\/\*#\s*sourceMappingURL=(.+?)\s*\*\//;
276
+ const PROTOCOL_REGEXP = /^https?:/;
277
+ const COMPONENT_VARIABLE = '%COMP%';
278
+ const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
279
+ const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
280
+ const REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;
281
+ const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'RemoveStylesOnCompDestroy' : '', {
282
+ factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT
283
+ });
284
+ function shimContentAttribute(componentShortId) {
285
+ return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
286
+ }
287
+ function shimHostAttribute(componentShortId) {
288
+ return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
289
+ }
290
+ function shimStylesContent(compId, styles) {
291
+ return styles.map(s => s.replace(COMPONENT_REGEX, compId));
292
+ }
293
+ function addBaseHrefToCssSourceMap(baseHref, styles) {
294
+ if (!baseHref) {
295
+ return styles;
296
+ }
297
+ const absoluteBaseHrefUrl = new URL(baseHref, 'http://localhost');
298
+ return styles.map(cssContent => {
299
+ if (!cssContent.includes('sourceMappingURL=')) {
300
+ return cssContent;
301
+ }
302
+ return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => {
303
+ if (sourceMapUrl[0] === '/' || sourceMapUrl.startsWith('data:') || PROTOCOL_REGEXP.test(sourceMapUrl)) {
304
+ return `/*# sourceMappingURL=${sourceMapUrl} */`;
305
+ }
306
+ const {
307
+ pathname: resolvedSourceMapUrl
308
+ } = new URL(sourceMapUrl, absoluteBaseHrefUrl);
309
+ return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`;
310
+ });
311
+ });
312
+ }
313
+ class DomRendererFactory2 {
314
+ eventManager;
315
+ sharedStylesHost;
316
+ appId;
317
+ removeStylesOnCompDestroy;
318
+ doc;
319
+ ngZone;
320
+ nonce;
321
+ tracingService;
322
+ rendererByCompId = new Map();
323
+ defaultRenderer;
324
+ constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, ngZone, nonce = null, tracingService = null) {
325
+ this.eventManager = eventManager;
326
+ this.sharedStylesHost = sharedStylesHost;
327
+ this.appId = appId;
328
+ this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
329
+ this.doc = doc;
330
+ this.ngZone = ngZone;
331
+ this.nonce = nonce;
332
+ this.tracingService = tracingService;
333
+ this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.tracingService);
334
+ }
335
+ createRenderer(element, type) {
336
+ if (!element || !type) {
337
+ return this.defaultRenderer;
338
+ }
339
+ if (typeof ngServerMode !== 'undefined' && ngServerMode && (type.encapsulation === ViewEncapsulation.ShadowDom || type.encapsulation === ViewEncapsulation.ExperimentalIsolatedShadowDom)) {
340
+ type = {
341
+ ...type,
342
+ encapsulation: ViewEncapsulation.Emulated
343
+ };
344
+ }
345
+ const renderer = this.getOrCreateRenderer(element, type);
346
+ if (renderer instanceof EmulatedEncapsulationDomRenderer2) {
347
+ renderer.applyToHost(element);
348
+ } else if (renderer instanceof NoneEncapsulationDomRenderer) {
349
+ renderer.applyStyles();
350
+ }
351
+ return renderer;
352
+ }
353
+ getOrCreateRenderer(element, type) {
354
+ const rendererByCompId = this.rendererByCompId;
355
+ let renderer = rendererByCompId.get(type.id);
356
+ if (!renderer) {
357
+ const doc = this.doc;
358
+ const ngZone = this.ngZone;
359
+ const eventManager = this.eventManager;
360
+ const sharedStylesHost = this.sharedStylesHost;
361
+ const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;
362
+ const tracingService = this.tracingService;
363
+ switch (type.encapsulation) {
364
+ case ViewEncapsulation.Emulated:
365
+ renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, tracingService);
366
+ break;
367
+ case ViewEncapsulation.ShadowDom:
368
+ return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, tracingService, sharedStylesHost);
369
+ case ViewEncapsulation.ExperimentalIsolatedShadowDom:
370
+ return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, tracingService);
371
+ default:
372
+ renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, tracingService);
373
+ break;
374
+ }
375
+ rendererByCompId.set(type.id, renderer);
376
+ }
377
+ return renderer;
378
+ }
379
+ ngOnDestroy() {
380
+ this.rendererByCompId.clear();
381
+ }
382
+ componentReplaced(componentId) {
383
+ this.rendererByCompId.delete(componentId);
384
+ }
385
+ static ɵfac = function DomRendererFactory2_Factory(__ngFactoryType__) {
386
+ return new (__ngFactoryType__ || DomRendererFactory2)(i0.ɵɵinject(EventManager), i0.ɵɵinject(SharedStylesHost), i0.ɵɵinject(APP_ID), i0.ɵɵinject(REMOVE_STYLES_ON_COMPONENT_DESTROY), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(CSP_NONCE), i0.ɵɵinject(_TracingService, 8));
387
+ };
388
+ static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({
389
+ token: DomRendererFactory2,
390
+ factory: DomRendererFactory2.ɵfac
391
+ });
392
+ }
393
+ (() => {
394
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DomRendererFactory2, [{
395
+ type: Injectable
396
+ }], () => [{
397
+ type: EventManager
398
+ }, {
399
+ type: SharedStylesHost
400
+ }, {
401
+ type: undefined,
402
+ decorators: [{
403
+ type: Inject,
404
+ args: [APP_ID]
405
+ }]
406
+ }, {
407
+ type: undefined,
408
+ decorators: [{
409
+ type: Inject,
410
+ args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]
411
+ }]
412
+ }, {
413
+ type: Document,
414
+ decorators: [{
415
+ type: Inject,
416
+ args: [DOCUMENT]
417
+ }]
418
+ }, {
419
+ type: i0.NgZone
420
+ }, {
421
+ type: undefined,
422
+ decorators: [{
423
+ type: Inject,
424
+ args: [CSP_NONCE]
425
+ }]
426
+ }, {
427
+ type: i0.ɵTracingService,
428
+ decorators: [{
429
+ type: Inject,
430
+ args: [_TracingService]
431
+ }, {
432
+ type: Optional
433
+ }]
434
+ }], null);
435
+ })();
436
+ class DefaultDomRenderer2 {
437
+ eventManager;
438
+ doc;
439
+ ngZone;
440
+ tracingService;
441
+ data = Object.create(null);
442
+ throwOnSyntheticProps = true;
443
+ constructor(eventManager, doc, ngZone, tracingService) {
444
+ this.eventManager = eventManager;
445
+ this.doc = doc;
446
+ this.ngZone = ngZone;
447
+ this.tracingService = tracingService;
448
+ }
449
+ destroy() {}
450
+ destroyNode = null;
451
+ createElement(name, namespace) {
452
+ if (namespace) {
453
+ return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
454
+ }
455
+ return this.doc.createElement(name);
456
+ }
457
+ createComment(value) {
458
+ return this.doc.createComment(value);
459
+ }
460
+ createText(value) {
461
+ return this.doc.createTextNode(value);
462
+ }
463
+ appendChild(parent, newChild) {
464
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
465
+ targetParent.appendChild(newChild);
466
+ }
467
+ insertBefore(parent, newChild, refChild) {
468
+ if (parent) {
469
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
470
+ targetParent.insertBefore(newChild, refChild);
471
+ }
472
+ }
473
+ removeChild(_parent, oldChild) {
474
+ oldChild.remove();
475
+ }
476
+ selectRootElement(selectorOrNode, preserveContent) {
477
+ let el = typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode;
478
+ if (!el) {
479
+ throw new _RuntimeError(-5104, (typeof ngDevMode === 'undefined' || ngDevMode) && `The selector "${selectorOrNode}" did not match any elements`);
480
+ }
481
+ if (!preserveContent) {
482
+ el.textContent = '';
483
+ }
484
+ return el;
485
+ }
486
+ parentNode(node) {
487
+ return node.parentNode;
488
+ }
489
+ nextSibling(node) {
490
+ return node.nextSibling;
491
+ }
492
+ setAttribute(el, name, value, namespace) {
493
+ if (namespace) {
494
+ name = namespace + ':' + name;
495
+ const namespaceUri = NAMESPACE_URIS[namespace];
496
+ if (namespaceUri) {
497
+ el.setAttributeNS(namespaceUri, name, value);
498
+ } else {
499
+ el.setAttribute(name, value);
500
+ }
501
+ } else {
502
+ el.setAttribute(name, value);
503
+ }
504
+ }
505
+ removeAttribute(el, name, namespace) {
506
+ if (namespace) {
507
+ const namespaceUri = NAMESPACE_URIS[namespace];
508
+ if (namespaceUri) {
509
+ el.removeAttributeNS(namespaceUri, name);
510
+ } else {
511
+ el.removeAttribute(`${namespace}:${name}`);
512
+ }
513
+ } else {
514
+ el.removeAttribute(name);
515
+ }
516
+ }
517
+ addClass(el, name) {
518
+ el.classList.add(name);
519
+ }
520
+ removeClass(el, name) {
521
+ el.classList.remove(name);
522
+ }
523
+ setStyle(el, style, value, flags) {
524
+ if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {
525
+ el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');
526
+ } else {
527
+ el.style[style] = value;
528
+ }
529
+ }
530
+ removeStyle(el, style, flags) {
531
+ if (flags & RendererStyleFlags2.DashCase) {
532
+ el.style.removeProperty(style);
533
+ } else {
534
+ el.style[style] = '';
535
+ }
536
+ }
537
+ setProperty(el, name, value) {
538
+ if (el == null) {
539
+ return;
540
+ }
541
+ (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(name, 'property');
542
+ el[name] = value;
543
+ }
544
+ setValue(node, value) {
545
+ node.nodeValue = value;
546
+ }
547
+ listen(target, event, callback, options) {
548
+ (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(event, 'listener');
549
+ if (typeof target === 'string') {
550
+ target = _getDOM().getGlobalEventTarget(this.doc, target);
551
+ if (!target) {
552
+ throw new _RuntimeError(5102, (typeof ngDevMode === 'undefined' || ngDevMode) && `Unsupported event target ${target} for event ${event}`);
553
+ }
554
+ }
555
+ let wrappedCallback = this.decoratePreventDefault(callback);
556
+ if (this.tracingService?.wrapEventListener) {
557
+ wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback);
558
+ }
559
+ return this.eventManager.addEventListener(target, event, wrappedCallback, options);
560
+ }
561
+ decoratePreventDefault(eventHandler) {
562
+ return event => {
563
+ if (event === '__ngUnwrap__') {
564
+ return eventHandler;
565
+ }
566
+ const allowDefaultBehavior = typeof ngServerMode !== 'undefined' && ngServerMode ? this.ngZone.runGuarded(() => eventHandler(event)) : eventHandler(event);
567
+ if (allowDefaultBehavior === false) {
568
+ event.preventDefault();
569
+ }
570
+ return undefined;
571
+ };
572
+ }
573
+ }
574
+ const AT_CHARCODE = (() => '@'.charCodeAt(0))();
575
+ function checkNoSyntheticProp(name, nameKind) {
576
+ if (name.charCodeAt(0) === AT_CHARCODE) {
577
+ throw new _RuntimeError(5105, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:
578
+ - Make sure \`provideAnimationsAsync()\`, \`provideAnimations()\` or \`provideNoopAnimations()\` call was added to a list of providers used to bootstrap an application.
579
+ - There is a corresponding animation configuration named \`${name}\` defined in the \`animations\` field of the \`@Component\` decorator (see https://angular.dev/api/core/Component#animations).`);
580
+ }
581
+ }
582
+ function isTemplateNode(node) {
583
+ return node.tagName === 'TEMPLATE' && node.content !== undefined;
584
+ }
585
+ class ShadowDomRenderer extends DefaultDomRenderer2 {
586
+ hostEl;
587
+ sharedStylesHost;
588
+ shadowRoot;
589
+ constructor(eventManager, hostEl, component, doc, ngZone, nonce, tracingService, sharedStylesHost) {
590
+ super(eventManager, doc, ngZone, tracingService);
591
+ this.hostEl = hostEl;
592
+ this.sharedStylesHost = sharedStylesHost;
593
+ this.shadowRoot = hostEl.attachShadow({
594
+ mode: 'open'
595
+ });
596
+ if (this.sharedStylesHost) {
597
+ this.sharedStylesHost.addHost(this.shadowRoot);
598
+ }
599
+ let styles = component.styles;
600
+ if (ngDevMode) {
601
+ const baseHref = _getDOM().getBaseHref(doc) ?? '';
602
+ styles = addBaseHrefToCssSourceMap(baseHref, styles);
603
+ }
604
+ styles = shimStylesContent(component.id, styles);
605
+ for (const style of styles) {
606
+ const styleEl = document.createElement('style');
607
+ if (nonce) {
608
+ styleEl.setAttribute('nonce', nonce);
609
+ }
610
+ styleEl.textContent = style;
611
+ this.shadowRoot.appendChild(styleEl);
612
+ }
613
+ const styleUrls = component.getExternalStyles?.();
614
+ if (styleUrls) {
615
+ for (const styleUrl of styleUrls) {
616
+ const linkEl = createLinkElement(styleUrl, doc);
617
+ if (nonce) {
618
+ linkEl.setAttribute('nonce', nonce);
619
+ }
620
+ this.shadowRoot.appendChild(linkEl);
621
+ }
622
+ }
623
+ }
624
+ nodeOrShadowRoot(node) {
625
+ return node === this.hostEl ? this.shadowRoot : node;
626
+ }
627
+ appendChild(parent, newChild) {
628
+ return super.appendChild(this.nodeOrShadowRoot(parent), newChild);
629
+ }
630
+ insertBefore(parent, newChild, refChild) {
631
+ return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);
632
+ }
633
+ removeChild(_parent, oldChild) {
634
+ return super.removeChild(null, oldChild);
635
+ }
636
+ parentNode(node) {
637
+ return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));
638
+ }
639
+ destroy() {
640
+ if (this.sharedStylesHost) {
641
+ this.sharedStylesHost.removeHost(this.shadowRoot);
642
+ }
643
+ }
644
+ }
645
+ class NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {
646
+ sharedStylesHost;
647
+ removeStylesOnCompDestroy;
648
+ styles;
649
+ styleUrls;
650
+ constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, tracingService, compId) {
651
+ super(eventManager, doc, ngZone, tracingService);
652
+ this.sharedStylesHost = sharedStylesHost;
653
+ this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
654
+ let styles = component.styles;
655
+ if (ngDevMode) {
656
+ const baseHref = _getDOM().getBaseHref(doc) ?? '';
657
+ styles = addBaseHrefToCssSourceMap(baseHref, styles);
658
+ }
659
+ this.styles = compId ? shimStylesContent(compId, styles) : styles;
660
+ this.styleUrls = component.getExternalStyles?.(compId);
661
+ }
662
+ applyStyles() {
663
+ this.sharedStylesHost.addStyles(this.styles, this.styleUrls);
664
+ }
665
+ destroy() {
666
+ if (!this.removeStylesOnCompDestroy) {
667
+ return;
668
+ }
669
+ if (_allLeavingAnimations.size === 0) {
670
+ this.sharedStylesHost.removeStyles(this.styles, this.styleUrls);
671
+ }
672
+ }
673
+ }
674
+ class EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {
675
+ contentAttr;
676
+ hostAttr;
677
+ constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, tracingService) {
678
+ const compId = appId + '-' + component.id;
679
+ super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, tracingService, compId);
680
+ this.contentAttr = shimContentAttribute(compId);
681
+ this.hostAttr = shimHostAttribute(compId);
682
+ }
683
+ applyToHost(element) {
684
+ this.applyStyles();
685
+ this.setAttribute(element, this.hostAttr, '');
686
+ }
687
+ createElement(parent, name) {
688
+ const el = super.createElement(parent, name);
689
+ super.setAttribute(el, this.contentAttr, '');
690
+ return el;
691
+ }
692
+ }
693
+ export { DomEventsPlugin, DomRendererFactory2, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, REMOVE_STYLES_ON_COMPONENT_DESTROY, SharedStylesHost };