web-component-wrapper 0.0.486 → 0.0.487
Sign up to get free protection for your applications and to get access to all the features.
- package/ReactWeb.d.ts +11 -37
- package/ReactWeb.js +1 -1
- package/ReactWebNext.js +1 -1
- package/Web.d.ts +36 -106
- package/Web.js +1 -1
- package/WebNext.js +1 -1
- package/decorator.d.ts +0 -1
- package/decorator.js +1 -1
- package/decoratorNext.js +1 -1
- package/index.d.ts +2 -3
- package/index.js +1 -1
- package/indexNext.js +1 -1
- package/package.json +24 -20
- package/type.d.ts +2 -2
package/Web.d.ts
CHANGED
@@ -1,53 +1,43 @@
|
|
1
|
-
import { Mapping } from 'clientnode
|
1
|
+
import { Mapping } from 'clientnode';
|
2
2
|
import { AttributesReflectionConfiguration, CompiledDomNodeTemplate, ComponentAdapter, EventCallbackMapping, EventToPropertyMapping, NormalizedAttributesReflectionConfiguration, PropertiesConfiguration, ScopeDeclaration, WebComponentAPI } from './type';
|
3
3
|
export declare const GenericHTMLElement: typeof HTMLElement;
|
4
4
|
/**
|
5
5
|
* Generic web component to render a content against instance specific values.
|
6
|
-
* @property
|
7
|
-
*
|
8
|
-
* @property
|
9
|
-
* @property
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
* @property
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
* @property
|
24
|
-
*
|
25
|
-
* @property static:propertyTypes - Configuration defining how to convert
|
26
|
-
* attributes into properties and reflect property changes back to attributes.
|
27
|
-
* @property static:propertiesToReflectAsAttributes - An item, list or mapping
|
28
|
-
* of properties to reflect as attributes.
|
29
|
-
* @property static:renderProperties - List of known render properties.
|
30
|
-
*
|
31
|
-
* @property static:cloneSlots - Indicates whether to clone slot nots before
|
6
|
+
* @property applyRootBinding - If determined itself as root declarative event
|
7
|
+
* and property bindings will be applied to itself.
|
8
|
+
* @property content - Content to render when changes happened.
|
9
|
+
* @property determineRootBinding - If checked this component determines if it
|
10
|
+
* is a root component (not wrapped by another web-component).
|
11
|
+
* @property shadowDOM - Configures if a shadow dom should be used during
|
12
|
+
* web-component instantiation. Can hold initialize configuration.
|
13
|
+
* @property observedAttributes - Attribute names to observe for changes.
|
14
|
+
* @property controllableProperties - A list of controllable property names.
|
15
|
+
* @property eventToPropertyMapping - Explicitly defined output events (a
|
16
|
+
* mapping of event names to a potential parameter to properties transformer).
|
17
|
+
* @property propertyAliases - A mapping of property names to be treated as
|
18
|
+
* equal.
|
19
|
+
* @property propertyTypes - Configuration defining how to convert attributes
|
20
|
+
* into properties and reflect property changes back to attributes.
|
21
|
+
* @property propertiesToReflectAsAttributes - An item, list or mapping of
|
22
|
+
* properties to reflect as attributes.
|
23
|
+
* @property renderProperties - List of known render properties.
|
24
|
+
* @property cloneSlots - Indicates whether to clone slot nots before
|
32
25
|
* transcluding them. If a slot should be used multiple times (for example when
|
33
26
|
* it works as a template node) they should be copied to avoid unexpected
|
34
27
|
* mutations.
|
35
|
-
* @property
|
36
|
-
*
|
37
|
-
* @property
|
28
|
+
* @property evaluateSlots - Indicates whether to evaluate slot content when
|
29
|
+
* before rendering them.
|
30
|
+
* @property renderSlots - Indicates whether determined slots should be
|
38
31
|
* rendered into root node.
|
39
|
-
* @property
|
40
|
-
*
|
41
|
-
* @property
|
42
|
-
*
|
43
|
-
* @property
|
44
|
-
* to derive default component name. Also useful for logging.
|
45
|
-
* @property static:_propertyAliasIndex - Internal alias index to quickly match
|
32
|
+
* @property trimSlots - Ignore empty text nodes while applying slots.
|
33
|
+
* @property renderUnsafe - Defines default render behavior.
|
34
|
+
* @property _name - Name to access instance evaluated content or used
|
35
|
+
* to derive default component name. This is also useful for logging.
|
36
|
+
* @property _propertyAliasIndex - Internal alias index to quickly match
|
46
37
|
* properties in both directions.
|
47
|
-
* @property
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
38
|
+
* @property _propertiesToReflectAsAttributes - A mapping of property names to
|
39
|
+
* set as attributes when they are set/updated. Uses a map to hold order and
|
40
|
+
* determine if a property exists in constant runtime.
|
51
41
|
* @property batchAttributeUpdates - Indicates whether to directly update dom
|
52
42
|
* after each attribute mutation or to wait and batch mutations after current
|
53
43
|
* queue has been finished.
|
@@ -56,44 +46,34 @@ export declare const GenericHTMLElement: typeof HTMLElement;
|
|
56
46
|
* queue has been finished.
|
57
47
|
* @property batchUpdates - Indicates whether to directly perform a
|
58
48
|
* re-rendering after changes on properties have been made.
|
59
|
-
*
|
60
49
|
* @property batchedAttributeUpdateRunning - A boolean indicator to identify if
|
61
50
|
* an attribute update is currently batched.
|
62
51
|
* @property batchedPropertyUpdateRunning - A boolean indicator to identify if
|
63
|
-
*
|
52
|
+
* a property update is currently batched.
|
64
53
|
* @property batchedUpdateRunning - Indicates whether a batched render update
|
65
54
|
* is currently running.
|
66
|
-
*
|
67
55
|
* @property parent - Parent component instance.
|
68
56
|
* @property rootInstance - Root component instance.
|
69
57
|
* @property scope - Render scope.
|
70
|
-
*
|
71
58
|
* @property domNodeEventBindings - Holds a mapping from nodes with registered
|
72
59
|
* event handlers mapped to their de-registration function.
|
73
60
|
* @property domNodeTemplateCache - Caches template compilation results.
|
74
|
-
*
|
75
61
|
* @property externalProperties - Holds currently evaluated or seen properties.
|
76
62
|
* @property ignoreAttributeUpdateObservations - Indicates whether attribute
|
77
63
|
* updates should be considered (usually only needed internally).
|
78
64
|
* @property internalProperties - Holds currently evaluated properties which
|
79
65
|
* are owned by this instance and should always be delegated.
|
80
|
-
*
|
81
66
|
* @property outputEventNames - Set of determined output event names.
|
82
|
-
*
|
83
67
|
* @property instance - Wrapped component instance.
|
84
|
-
* @property isRoot - Indicates whether their
|
68
|
+
* @property isRoot - Indicates whether their exists another web derived
|
85
69
|
* component up the tree or not.
|
86
|
-
*
|
87
70
|
* @property root - Hosting dom node.
|
88
|
-
*
|
89
71
|
* @property runDomConnectionAndRenderingInSameEventQueue - Indicates whether
|
90
72
|
* we should render initial dom immediately after the component is connected to
|
91
73
|
* dom. Deactivating this allows wrapped components to detect their parents
|
92
74
|
* since their parent connected callback will be called before the children's
|
93
75
|
* render method.
|
94
|
-
*
|
95
76
|
* @property self - Back-reference to this class.
|
96
|
-
*
|
97
77
|
* @property slots - Grabbed slots which where present in the connecting phase.
|
98
78
|
*/
|
99
79
|
export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapping<unknown> = Mapping<unknown>, InternalProperties extends Mapping<unknown> = Mapping<unknown>> extends GenericHTMLElement {
|
@@ -155,23 +135,18 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
155
135
|
* @param name - Attribute name which was updates.
|
156
136
|
* @param oldValue - Old attribute value.
|
157
137
|
* @param newValue - New updated value.
|
158
|
-
*
|
159
|
-
* @returns Nothing.
|
160
138
|
*/
|
161
139
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
162
140
|
/**
|
163
141
|
* Updates given attribute representation.
|
164
142
|
* @param name - Attribute name which was updates.
|
165
143
|
* @param newValue - New updated value.
|
166
|
-
*
|
167
|
-
* @returns Nothing.
|
168
144
|
*/
|
169
145
|
onUpdateAttribute(name: string, newValue: string): void;
|
170
146
|
/**
|
171
147
|
* Triggered when this component is mounted into the document.
|
172
148
|
* Attaches event handler, grabs given slots, reflects external properties
|
173
149
|
* and enqueues first rendering.
|
174
|
-
* @returns Nothing.
|
175
150
|
*/
|
176
151
|
connectedCallback(): void;
|
177
152
|
/**
|
@@ -181,14 +156,12 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
181
156
|
/**
|
182
157
|
* Registers needed getter and setter to get notified about changes and
|
183
158
|
* reflect them.
|
184
|
-
* @returns Nothing.
|
185
159
|
*/
|
186
160
|
defineGetterAndSetterInterface(): void;
|
187
161
|
/**
|
188
162
|
* Creates an index to match alias source and target against each other on
|
189
163
|
* constant runtime.
|
190
164
|
* @param name - Name to search an alternate name for.
|
191
|
-
*
|
192
165
|
* @returns Found alias or "null".
|
193
166
|
*/
|
194
167
|
getPropertyAlias(name: string): null | string;
|
@@ -196,7 +169,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
196
169
|
* Generic property getter. Forwards properties from the "properties"
|
197
170
|
* field.
|
198
171
|
* @param name - Property name to retrieve.
|
199
|
-
*
|
200
172
|
* @returns Retrieved property value.
|
201
173
|
*/
|
202
174
|
getPropertyValue(name: string): unknown;
|
@@ -204,16 +176,12 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
204
176
|
* External property setter. Respects configured aliases.
|
205
177
|
* @param name - Property name to write.
|
206
178
|
* @param value - New value to write.
|
207
|
-
*
|
208
|
-
* @returns Nothing.
|
209
179
|
*/
|
210
180
|
setExternalPropertyValue(name: string, value: unknown): void;
|
211
181
|
/**
|
212
182
|
* Internal property setter. Respects configured aliases.
|
213
183
|
* @param name - Property name to write.
|
214
184
|
* @param value - New value to write.
|
215
|
-
*
|
216
|
-
* @returns Nothing.
|
217
185
|
*/
|
218
186
|
setInternalPropertyValue(name: string, value: unknown): void;
|
219
187
|
/**
|
@@ -221,8 +189,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
221
189
|
* external property representations.
|
222
190
|
* @param name - Property name to write.
|
223
191
|
* @param value - New value to write.
|
224
|
-
*
|
225
|
-
* @returns Nothing.
|
226
192
|
*/
|
227
193
|
setPropertyValue(name: string, value: unknown): void;
|
228
194
|
/**
|
@@ -230,16 +196,12 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
230
196
|
* connection.
|
231
197
|
* @param name - Property name to write.
|
232
198
|
* @param value - New value to write.
|
233
|
-
*
|
234
|
-
* @returns Nothing.
|
235
199
|
*/
|
236
200
|
triggerPropertySpecificRendering(name: string, value: unknown): void;
|
237
201
|
/**
|
238
202
|
* Binds properties and event handler to given dom node.
|
239
203
|
* @param domNode - Node to start traversing from.
|
240
204
|
* @param scope - Scope to render property value again.
|
241
|
-
*
|
242
|
-
* @returns Nothing.
|
243
205
|
*/
|
244
206
|
applyBinding(domNode: Node, scope: Mapping<unknown>): void;
|
245
207
|
/**
|
@@ -248,8 +210,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
248
210
|
* @param scope - Scope to render property value again.
|
249
211
|
* @param renderSlots - Indicates whether to render nested elements of
|
250
212
|
* slots (determined by an existing corresponding attribute).
|
251
|
-
*
|
252
|
-
* @returns Nothing.
|
253
213
|
*/
|
254
214
|
applyBindings(domNode: Node | null, scope: Mapping<unknown>, renderSlots?: boolean): void;
|
255
215
|
/**
|
@@ -269,7 +229,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
269
229
|
* recompiling.
|
270
230
|
* @param options.unsafe - Indicates if full html generation should be
|
271
231
|
* allowed.
|
272
|
-
*
|
273
232
|
* @returns Map of compiled templates.
|
274
233
|
*/
|
275
234
|
compileDomNodeTemplate<NodeType extends Node = Node>(domNode: NodeType, scope?: ScopeDeclaration, options?: {
|
@@ -297,7 +256,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
297
256
|
* recompiling.
|
298
257
|
* @param options.unsafe - Indicates if full html generation should be
|
299
258
|
* allowed.
|
300
|
-
*
|
301
259
|
* @returns Map of compiled templates.
|
302
260
|
*/
|
303
261
|
evaluateDomNodeTemplate<NodeType extends Node = Node>(domNode: NodeType, scope?: Mapping<unknown>, options?: {
|
@@ -312,40 +270,33 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
312
270
|
* Replaces given dom node with given nodes.
|
313
271
|
* @param domNode - Node to replace its children.
|
314
272
|
* @param children - Element or array of elements to set as children.
|
315
|
-
*
|
316
|
-
* @returns Nothing.
|
317
273
|
*/
|
318
274
|
static replaceDomNodes(domNode: HTMLElement, children: Array<Node> | Node): void;
|
319
275
|
/**
|
320
276
|
* Moves content of given dom node one level up and removes given node.
|
321
277
|
* @param domNode - Node to unwrap.
|
322
|
-
*
|
323
278
|
* @returns List of unwrapped nodes.
|
324
279
|
*/
|
325
280
|
static unwrapDomNode(domNode: HTMLElement): Array<ChildNode>;
|
326
281
|
/**
|
327
282
|
* Determines initial root which initializes rendering digest.
|
328
|
-
* @returns Nothing.
|
329
283
|
*/
|
330
284
|
determineRootBinding(): void;
|
331
285
|
/**
|
332
286
|
* Checks if given content hast code (to compile and render).
|
333
287
|
* @param content - Potential string with code inside.
|
334
|
-
*
|
335
288
|
* @returns A boolean indicating whether given content has code.
|
336
289
|
*/
|
337
290
|
static hasCode(content: unknown): boolean;
|
338
291
|
/**
|
339
292
|
* Converts given list, item or map to a map (with ordering).
|
340
293
|
* @param value - Attribute reflection configuration.
|
341
|
-
*
|
342
294
|
* @returns Generated map.
|
343
295
|
*/
|
344
296
|
static normalizePropertyTypeList(value: AttributesReflectionConfiguration): NormalizedAttributesReflectionConfiguration;
|
345
297
|
/**
|
346
298
|
* Attaches event handler to keep in sync with nested components properties
|
347
299
|
* states.
|
348
|
-
* @returns Nothing.
|
349
300
|
*/
|
350
301
|
attachEventHandler(): void;
|
351
302
|
/**
|
@@ -359,22 +310,20 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
359
310
|
* external property states.
|
360
311
|
* @param reflectProperties - Indicates whether implicitly determined
|
361
312
|
* properties should be reflected.
|
362
|
-
*
|
363
|
-
* @returns Nothing.
|
364
313
|
*/
|
365
314
|
attachImplicitDefinedOutputEventHandler(reflectProperties?: boolean): void;
|
366
315
|
/**
|
367
316
|
* Triggers all identified events to communicate internal property / state
|
368
317
|
* changes.
|
369
|
-
* @returns Nothing.
|
370
318
|
*/
|
371
319
|
triggerOutputEvents(): void;
|
372
320
|
/**
|
373
321
|
* Forwards given event as native web event.
|
374
322
|
* @param name - Event name.
|
375
323
|
* @param parameters - Event parameters.
|
376
|
-
*
|
377
|
-
*
|
324
|
+
* @returns False if event is cancelable, and at least one of the event
|
325
|
+
* handlers which received event called "Event.preventDefault()",
|
326
|
+
* otherwise true will be returned.
|
378
327
|
*/
|
379
328
|
forwardEvent(name: string, parameters: Array<unknown>): boolean;
|
380
329
|
/**
|
@@ -383,26 +332,21 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
383
332
|
* internal slot mapping.
|
384
333
|
* @param targetDomNode - Target dom node to render slots into.
|
385
334
|
* @param scope - Environment to render slots again if specified.
|
386
|
-
*
|
387
|
-
* @returns Nothing.
|
388
335
|
*/
|
389
336
|
applySlots(targetDomNode: HTMLElement, scope: Mapping<unknown>): void;
|
390
337
|
/**
|
391
338
|
* Determines slot content from given node.
|
392
339
|
* @param slot - Node to grab slot content from.
|
393
|
-
*
|
394
340
|
* @returns Determined slot.
|
395
341
|
*/
|
396
342
|
grabSlotContent(slot: Node): Node;
|
397
343
|
/**
|
398
344
|
* Saves given slots.
|
399
|
-
* @returns Nothing.
|
400
345
|
*/
|
401
346
|
grabGivenSlots(): void;
|
402
347
|
/**
|
403
348
|
* Determines if given property name exists in wrapped component state.
|
404
349
|
* @param name - Property name to check if exists in state.
|
405
|
-
*
|
406
350
|
* @returns Boolean result.
|
407
351
|
*/
|
408
352
|
isStateProperty(name: string): boolean;
|
@@ -414,16 +358,12 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
414
358
|
/**
|
415
359
|
* Reflects wrapped component state back to web-component's attributes.
|
416
360
|
* @param properties - Properties to update in reflected attribute state.
|
417
|
-
*
|
418
|
-
* @returns Nothing.
|
419
361
|
*/
|
420
362
|
reflectExternalProperties(properties: Partial<ExternalProperties>): void;
|
421
363
|
/**
|
422
364
|
* Reflects wrapped component state back to web-component's attributes and
|
423
365
|
* properties.
|
424
366
|
* @param properties - Properties to update in reflected property state.
|
425
|
-
*
|
426
|
-
* @returns Nothing.
|
427
367
|
*/
|
428
368
|
reflectProperties(properties: Partial<ExternalProperties>): void;
|
429
369
|
/**
|
@@ -431,7 +371,6 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
431
371
|
* properties state.
|
432
372
|
* @param name - Event name.
|
433
373
|
* @param parameters - List of parameter to given event handler call.
|
434
|
-
*
|
435
374
|
* @returns Mapped properties or null if nothing could be mapped.
|
436
375
|
*/
|
437
376
|
reflectEventToProperties(name: string, parameters: Array<unknown>): Promise<Partial<ExternalProperties> | null>;
|
@@ -440,37 +379,28 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
|
|
440
379
|
* registers in properties mapping object.
|
441
380
|
* @param attributeName - Name of given value.
|
442
381
|
* @param value - Value to evaluate.
|
443
|
-
*
|
444
|
-
* @returns Nothing.
|
445
382
|
*/
|
446
383
|
evaluateStringOrNullAndSetAsProperty(attributeName: string, value: null | string): void;
|
447
384
|
/**
|
448
385
|
* Triggers a new rendering cycle by respecting batch configuration.
|
449
386
|
* @param reason - A description why rendering should be triggered.
|
450
|
-
*
|
451
|
-
* @returns Nothing.
|
452
387
|
*/
|
453
388
|
triggerRender(reason: string): void;
|
454
389
|
/**
|
455
390
|
* Creates shadow root if not created yet and assigns to current root
|
456
391
|
* property.
|
457
|
-
* @returns Nothing.
|
458
392
|
*/
|
459
393
|
applyShadowRootIfNotExisting(): void;
|
460
394
|
/**
|
461
395
|
* Determines new scope object with useful default set of environment
|
462
396
|
* values.
|
463
397
|
* @param scope - To apply to generated scope.
|
464
|
-
*
|
465
|
-
* @returns Generated scope.
|
466
398
|
*/
|
467
399
|
determineRenderScope(scope?: Mapping<unknown>): void;
|
468
400
|
/**
|
469
401
|
* Method which does the rendering job. Should be called when ever state
|
470
402
|
* changes should be projected to the hosts dom content.
|
471
403
|
* @param reason - Description why rendering is necessary.
|
472
|
-
*
|
473
|
-
* @returns Nothing.
|
474
404
|
*/
|
475
405
|
render(reason?: string): void;
|
476
406
|
}
|
package/Web.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/extends","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator","clientnode","clientnode/property-types"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"],e.clientnode,e["clientnode/property-types"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,s,o,a,l,p){return function(){var u=[function(e){e.exports=t},function(e){e.exports=l},function(e){e.exports=p},function(e){e.exports=i},function(e,t,r){var n=r(0),i=r.n(n),s=r(1),o=r.n(s),a=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:a.string},e),function(t,r){if("string"==typeof r){var n,s=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(s,"observedAttributes")||(s.observedAttributes=s.observedAttributes?[].concat(s.observedAttributes):[]);var a=o().stringCamelCaseToDelimited(r);s.observedAttributes.includes(a)||s.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(s,"propertyTypes")||(s.propertyTypes=s.propertyTypes?i()({},s.propertyTypes):{}),!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(s,"propertiesToReflectAsAttributes")||(s.propertiesToReflectAsAttributes=s.propertiesToReflectAsAttributes?o().copy(s.propertiesToReflectAsAttributes):[]),e.update||s.propertiesToReflectAsAttributes instanceof Map&&!s.propertiesToReflectAsAttributes.has(r)||Array.isArray(s.propertiesToReflectAsAttributes)&&!s.propertiesToReflectAsAttributes.includes(r)||null!==s.propertiesToReflectAsAttributes&&"object"==typeof s.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(s.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?!0===e.writeAttribute&&s.propertyTypes&&Object.prototype.hasOwnProperty.call(s.propertyTypes,r)&&(n=s.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(s.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?s.propertiesToReflectAsAttributes.push(r):s.propertiesToReflectAsAttributes=s.normalizePropertyTypeList(s.propertiesToReflectAsAttributes)),s.propertiesToReflectAsAttributes instanceof Map&&s.propertiesToReflectAsAttributes.set(r,n),null!==s.propertiesToReflectAsAttributes&&"object"==typeof s.propertiesToReflectAsAttributes&&(s.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(s,"propertyAliases")||(s.propertyAliases=s.propertyAliases?i()({},s.propertyAliases):{}),!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyAliases[r]=e.alias))}}}},,function(t){t.exports=e},function(e){e.exports=r},function(e){e.exports=n},function(e){e.exports=s},function(e){e.exports=o},function(e){e.exports=a}],c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return u[e](r,r.exports,d),r.exports}d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};return function(){d.r(h),d.d(h,{GenericHTMLElement:function(){return C},Web:function(){return E},api:function(){return R}});var e,t,r,n,i=d(6),s=d.n(i),o=d(0),a=d.n(o),l=d(7),p=d.n(l),u=d(8),c=d.n(u),f=d(3),b=d.n(f),y=d(9),v=d.n(y),m=(d(10),d(11)),g=d.n(m),A=d(1),P=d.n(A),w=d(2),T=d(4);function O(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C="undefined"==typeof HTMLElement?function(){}:HTMLElement,E=(e=(0,T.default)({type:w.boolean,writeAttribute:!0}),n=function(e){function t(){var n;return(n=e.call(this)||this).batchAttributeUpdates=!0,n.batchPropertyUpdates=!0,n.batchUpdates=!0,n.batchedAttributeUpdateRunning=!0,n.batchedPropertyUpdateRunning=!0,n.batchedUpdateRunning=!0,n.parent=null,n.rootInstance=null,n.scope={Tools:P()},n.domNodeEventBindings=new Map,n.domNodeTemplateCache=new Map,n.externalProperties={},n.ignoreAttributeUpdateObservations=!1,n.internalProperties={},n.outputEventNames=new Set,n.instance=null,p()(n,"isRoot",r,c()(n)),n.root=void 0,n.runDomConnectionAndRenderingInSameEventQueue=!1,n.self=t,n.slots={},n.self=n.constructor,n.self._propertiesToReflectAsAttributes||(n.self._propertiesToReflectAsAttributes=n.self.normalizePropertyTypeList(n.self.propertiesToReflectAsAttributes)),n.generateAliasIndex(),n.root=c()(n),n.defineGetterAndSetterInterface(),n}b()(t,e);var n=t.prototype;return n.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},n.onUpdateAttribute=function(e,t){var r=this;this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,P().timeout((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):this.render("attributeChanged")},n.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}this.parent=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&this.determineRootBinding(),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):P().timeout((function(){return e.render("connected")}))},n.disconnectedCallback=function(){try{this.isConnected=!1}catch(e){}for(var e,t=O(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=O(e.value.values());!(r=n()).done;){(0,r.value)()}this.slots={}},n.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=O(P().arrayUnique(Object.keys(this.self.propertyTypes).concat(Object.keys(this.self._propertyAliasIndex))));!(e=n()).done;)r()},n.getPropertyAlias=function(e){return Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},n.getPropertyValue=function(e){var r,n,i=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:this.externalProperties[e];return null!=(n=this.instance)&&null!=(n=n.current)&&n.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:i},n.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},n.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},n.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},n.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,P().timeout((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),P().timeout((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()})).then(P().noop,P().noop)):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},n.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i=n.value,s="";if(i.startsWith("data-bind-")?s=i.substring(10):i.startsWith("bind-")&&(s=i.substring(5)),s){var o=e.getAttribute(i);if(null===o)return 0;if(s.startsWith("attribute-")||s.startsWith("property-")){var l=P().stringEvaluate(o,t,!1,e);if(l.error)return console.warn('Error occurred during processing given attribute binding "'+i+'" on node:',e,l.error),0;s.startsWith("attribute-")?e.setAttribute(s.substring(10),l.result):e[P().stringDelimitedToCamelCase(s.substring(9))]=l.result}else if(s.startsWith("on-")){r.domNodeEventBindings.has(e)||r.domNodeEventBindings.set(e,new Map);var p=r.domNodeEventBindings.get(e);s=P().stringDelimitedToCamelCase(s.substring(3)),p.has(s)&&p.get(s)(),t=a()({event:void 0,parameters:void 0},t);var u=P().stringCompile(o,t,!0);if(u.error)console.warn('Error occurred during compiling given event binding "'+i+'" on node:',e,u.error);else{var c=u.templateFunction.bind(e),d=function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];t.event=n[0],t.parameters=n;try{c.apply(void 0,u.originalScopeNames.map((function(e){return t[e]})))}catch(t){console.warn('Error occurred during processing given event binding "'+i+'" on node:',e,'Given expression "'+o+'" could not be evaluated with given scope names "'+u.scopeNames.join('", "')+'": '+P().represent(t))}};e.addEventListener(s,d),p.set(s,(function(){e.removeEventListener(s,d),p.delete(s),0===p.size&&r.domNodeEventBindings.delete(e)}))}}}},s=O(e.getAttributeNames());!(n=s()).done;)i()},n.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},n.compileDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t=[]),void 0===r&&(r={}),(r=a()({ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-"))return r.map;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var s=P().stringCompile("`"+i+"`",t);r.map.set(e,{children:[],error:s.error,scopeNames:s.scopeNames,template:i,templateFunction:s.templateFunction})}}else{var o,l=e.nodeName.toLowerCase();if(["a","#text"].includes(l)){var p="a"===l?e.getAttribute("href"):e.textContent;this.self.hasCode(p)&&(o=p.replace(/ /g," ").trim())}var u=[];if(o){var c=P().stringCompile("`"+o+"`",t);r.map.set(e,{children:u,error:c.error,scopeNames:c.scopeNames,template:o,templateFunction:c.templateFunction})}for(var d=e.firstChild;d;)r.filter&&!r.filter(d)||u.push(this.compileDomNodeTemplate(d,t,a()({},r,{ignoreComponents:r.ignoreNestedComponents}))),d=d.nextSibling}return r.map},n.evaluateDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t={}),void 0===r&&(r={}),(r=a()({applyBindings:!0,ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).map.has(e)||this.compileDomNodeTemplate(e,t,r),r.map.has(e)){var i=r.map.get(e),s=i.error,o=i.scopeNames,l=i.templateFunction;if(s)console.warn("Error occurred during compiling node content: "+s);else{var p=null;try{p=l.apply(void 0,o.map((function(e){return t[e]})))}catch(s){console.warn('Error occurred when "'+this.self._name+'" is running "'+l+'": with bound names "'+o.join('", "')+'": "'+s+'". Rendering node:',e)}null!==p&&(r.unsafe?e.innerHTML=p:"a"===e.nodeName.toLowerCase()?e.setAttribute("href",p):e.textContent=p)}}if(!(r.unsafe||r.ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-")))for(var u=e.firstChild;u;)r.filter&&!r.filter(u)||this.evaluateDomNodeTemplate(u,t,a()({},r,{applyBindings:!1,ignoreComponents:r.ignoreNestedComponents})),u=u.nextSibling;return r.applyBindings&&this.applyBindings(e,t),r.map},t.replaceDomNodes=function(e,r){for(var n,i=O([].concat(r).reverse());!(n=i()).done;){var s,o=n.value;t.trimSlots&&o.nodeType===Node.TEXT_NODE&&""===(null==(s=o.nodeValue)?void 0:s.trim())||e.after(o)}e.remove()},t.unwrapDomNode=function(e){for(var t=e.parentNode,r=[];e.firstChild;)r.push(e.firstChild),t.insertBefore(e.firstChild,e);return t.removeChild(e),r},n.determineRootBinding=function(){for(var e=this.parentNode;e;){var r;(e instanceof t||(null==(r=e.nodeName)?void 0:r.includes("-"))||null===e.parentNode&&"[object ShadowRoot]"===e.toString())&&(this.rootInstance===this?(this.parent=e,this.rootInstance=e,this.setPropertyValue("isRoot",!1)):this.rootInstance=e),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,s=O(n);!(r=s()).done;){var o=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,o)&&i.set(o,t.propertyTypes[o])}return i}return P().convertPlainObjectToMap(e)},n.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},n.attachExplicitDefinedOutputEventHandler=function(){for(var e=this,t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,s()(g().mark((function t(){var n,i,s,o,a=arguments;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),s=0;s<n;s++)i[s]=a[s];return t.next=3,e.reflectEventToProperties(r,i);case 3:(o=t.sent)&&(i[0]=o),e.forwardEvent(r,i);case 6:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},n.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],s=r[0],o=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,s)||![w.func,"function"].includes(o)||t.self.renderProperties.includes(s)||(t.outputEventNames.add(s),t.setInternalPropertyValue(s,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(s,n),t.forwardEvent(s,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},n.triggerOutputEvents=function(){for(var e,t=O(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},n.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=P().stringLowerCase(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},n.applySlots=function(e,t){for(var r=this,n=0,i=Array.from(e.querySelectorAll("slot"));n<i.length;n++){var s=i[n],o=s.getAttribute("name");if(null===o||"default"===o)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var a,l=O(this.slots.default);!(a=l()).done;){var p=a.value;this.evaluateDomNodeTemplate(p,t)}this.self.replaceDomNodes(s,this.slots.default)}}else this.slots.default=this.self.unwrapDomNode(s).map((function(e){return r.grabSlotContent(e)}));else Object.prototype.hasOwnProperty.call(this.slots,o)?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[o],t),this.self.replaceDomNodes(s,this.slots[o])):this.slots[o]=this.grabSlotContent(this.self.unwrapDomNode(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},n.grabSlotContent=function(e){var t;if("textarea"===(null==(t=e.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!e.firstElementChild.hasAttribute("data-no-template")||"false"===e.firstElementChild.getAttribute("data-no-template"))){var r,n,i=e.firstElementChild.value;null==(r=e.classList)||r.remove("web-component-template");var s=e.cloneNode();return null==(n=e.classList)||n.add("web-component-template"),s.innerHTML="",s.template=i,s}return this.self.cloneSlots?e.cloneNode(!0):e},n.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n=r[t],i=n.parentNode,s=!0;i;){if(i.nodeName.includes("-")){i===this&&(s=!1);break}i=i.parentNode}s||(this.slots[n.getAttribute&&n.getAttribute("slot")&&n.getAttribute("slot").trim()?n.getAttribute("slot").trim():n.nodeName.toLowerCase()]=this.grabSlotContent(n))}this.slots.default?this.slots.default=[this.slots.default]:this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},n.isStateProperty=function(e){var t,r;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(null==(r=this.instance)||null==(r=r.current)?void 0:r.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},n.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=a()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},n.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=r[t],i=n[0],s=n[1];if(this.setExternalPropertyValue(i,s),this.isConnected){var o=P().stringCamelCaseToDelimited(i);if(this.self._propertiesToReflectAsAttributes.has(i))switch(this.self._propertiesToReflectAsAttributes.get(i)){case w.boolean:case"boolean":s?""!==this.getAttribute(o)&&this.setAttribute(o,""):this.hasAttribute(o)&&this.removeAttribute(o);break;case w.func:case"function":break;case"json":if(s){var a=JSON.stringify(s);if(a&&this.getAttribute(o)!==a){this.setAttribute(o,a);break}}this.hasAttribute(o)&&this.removeAttribute(o);break;case w.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(o)&&this.removeAttribute(o);else{var l=""+s;this.getAttribute(o)!==l&&this.setAttribute(o,l)}break;case w.string:case"string":s?this.getAttribute(o)!==s&&this.setAttribute(o,s):this.hasAttribute(o)&&this.removeAttribute(o);break;case w.any:case w.array:case w.arrayOf:case w.element:case w.elementType:case w.instanceOf:case w.node:case w.object:case"object":case w.objectOf:case w.shape:case w.exact:case w.symbol:default:if(s){var p=P().represent(s);if(p&&this.getAttribute(o)!==p){this.setAttribute(o,p);break}}this.hasAttribute(o)&&this.removeAttribute(o)}}}this.ignoreAttributeUpdateObservations=!1},n.reflectProperties=function(e){var t,r,n;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var i,s=O(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(i=s()).done;){var o=i.value;Object.prototype.hasOwnProperty.call(this.internalProperties,o)&&this.setInternalPropertyValue(o,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(null==(n=this.internalProperties.model)||delete n.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var a,l=O(this.self.controllableProperties);!(a=l()).done;){var p=a.value;Object.prototype.hasOwnProperty.call(e,p)&&this.setInternalPropertyValue(p,e[p])}},n.reflectEventToProperties=function(){var e=s()(g().mark((function e(t,r){var n,i,s,o,l,p,u,c,d,h,f,b,y,v,m,A;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,s=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&P().isFunction(this.self.eventToPropertyMapping[t]))){e.next=16;break}if(!((l=(o=this.self.eventToPropertyMapping)[t].apply(o,r.concat([this])))&&"then"in l&&P().isFunction(l.then))){e.next=12;break}return e.next=9,l;case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=l;case 13:p=e.t0,s=!0,Array.isArray(p)?(i=p[0],this.reflectProperties(i),P().extend(!0,this.internalProperties,p[1])):null===p?s=!1:"object"==typeof p&&(i=p,this.reflectProperties(p));case 16:if(!s&&r.length>0&&null!==r[0]&&"object"==typeof r[0]){if(c=r[0],"persist"in r[0]&&P().isFunction(r[0].persist))for(c={},d=0,h=Object.keys(this.self.propertyTypes);d<h.length;d++)for(f=h[d],b=O([f].concat(null!==(v=this.getPropertyAlias(f))&&void 0!==v?v:[]));!(y=b()).done;)m=y.value,(A=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,m)?r[0].currentTarget[m]:this.getPropertyValue(m))!==this.externalProperties[m]&&(c[m]=A);else[null,void 0].includes(null==(u=c.detail)?void 0:u.value)||(c=a()({},c.detail));i=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 20:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),n.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,s=P().stringDelimitedToCamelCase(i),o=this.getPropertyAlias(s);if(o&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)&&(s=o),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)){var a=this.self.propertyTypes[s];if(n){if(t){var l=P().stringEvaluate(t,{Tools:P()},!1,this);l.error?(console.warn('Failed to process pre-evaluation attribute "'+e+'": '+l.error+'. Will be set to "undefined".'),this.setInternalPropertyValue(s,void 0)):(this.setInternalPropertyValue(s,l.result),this.setExternalPropertyValue(s,l.result))}}else switch(a){case w.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(s,p),this.setExternalPropertyValue(s,p);break;case w.func:case"function":var u,c=null,d=["data","event","firstArgument","firstParameter","options","scope","parameters","Tools"];if(t){var h=P().stringCompile(t,d);c=h.error,u=h.templateFunction,c&&console.warn('Failed to compile given handler "'+e+'": '+c+".")}this.setInternalPropertyValue(s,(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.outputEventNames.has(s)&&r.reflectEventToProperties(s,i);var a=void 0;if(!c)try{a=u.call(r,i[0],i[0],i[0],i[0],i[0],i[0],i,P())}catch(r){console.warn('Failed to evaluate function "'+e+'" with expression "'+t+'" and scope variables "'+d.join('", "')+'" set to "'+P().represent(i)+'": '+r+'. Set property to "undedefined".')}return r.self.renderProperties.includes(s)||r.forwardEvent(s,i),a})),c||this.setExternalPropertyValue(s,u);break;case"json":if(t){var f;try{f=JSON.parse(t)}catch(c){console.warn('Error occurred during parsing given json attribute "'+e+'": '+P().represent(c));break}this.setInternalPropertyValue(s,f),this.setExternalPropertyValue(s,P().copy(f,1))}else this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null);break;case w.number:case"number":if(null===t){this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break}var b=parseFloat(t);isNaN(b)&&(b=void 0),this.setInternalPropertyValue(s,b),this.setExternalPropertyValue(s,b);break;case w.string:case"string":this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break;case w.any:case w.array:case w.arrayOf:case w.element:case w.elementType:case w.instanceOf:case w.node:case w.object:case"object":case w.objectOf:case w.oneOf:case w.oneOfType:case w.shape:case w.exact:case w.symbol:default:if(t){var y=P().stringEvaluate(t,{},!1,this);if(y.error){console.warn('Error occurred during processing given attribute configuration "'+e+'":',y.error);break}this.setInternalPropertyValue(s,y.result),this.setExternalPropertyValue(s,P().copy(y.result,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(s,!0),this.setExternalPropertyValue(s,!0)):(this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null))}}},n.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,P().timeout((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},n.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.root===this&&(this.root=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow(null!==this.self.shadowDOM&&"object"==typeof this.self.shadowDOM?this.self.shadowDOM:{mode:"open"}))},n.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=a()({},(null==(t=this.parent)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parent:this.parent,root:this.rootInstance,self:this})[P().stringLowerCase(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},n.render=function(e){if(void 0===e&&(e="unknown"),this.determineRenderScope(),this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}}))){var t=P().stringEvaluate("`"+this.self.content+"`",this.scope);if(t.error)console.warn("Failed to process template: "+t.error);else{this.applyShadowRootIfNotExisting();var r=document.createElement("div");r.innerHTML=t.result,this.applySlots(r,a()({},this.scope,{parent:this})),this.root.innerHTML=r.innerHTML,this.applyBindings(this.root.firstChild,this.scope,this.self.renderSlots)}}},t}(C),n.applyRootBinding=!0,n.content="<slot>Please provide a template to transclude.</slot>",n.determineRootBinding=!0,n.shadowDOM=null,n.observedAttributes=[],n.controllableProperties=[],n.eventToPropertyMapping={},n.propertyAliases={},n.propertyTypes={onClick:w.func},n.propertiesToReflectAsAttributes=[],n.renderProperties=["children"],n.cloneSlots=!1,n.evaluateSlots=!1,n.renderSlots=!0,n.trimSlots=!0,n.renderUnsafe=!1,n._name="BaseWeb",n._propertyAliasIndex=void 0,n._propertiesToReflectAsAttributes=void 0,t=n,r=v()(t.prototype,"isRoot",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),t),R={component:E,register:function(e){return void 0===e&&(e=P().stringCamelCaseToDelimited(E._name)),customElements.define(e,E)}};h.default=E}(),h}()}));
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/dist/property-types"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator","clientnode","clientnode/dist/property-types"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/dist/property-types")):t(e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"],e.clientnode,e["clientnode/dist/property-types"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,s,o,a,l){return function(){var p=[function(e){e.exports=r},function(e){e.exports=a},function(e){e.exports=l},function(e){e.exports=n},function(e,t,r){var n=r(0),i=r.n(n),s=r(1),o=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:o.string},e),function(t,r){if("string"==typeof r){var n,o=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(o,"observedAttributes")||(o.observedAttributes=o.observedAttributes?[].concat(o.observedAttributes):[]);var a=(0,s.camelCaseToDelimited)(r);o.observedAttributes.includes(a)||o.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(o,"propertyTypes")||(o.propertyTypes=o.propertyTypes?i()({},o.propertyTypes):{}),!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(o,"propertiesToReflectAsAttributes")||(o.propertiesToReflectAsAttributes=o.propertiesToReflectAsAttributes?(0,s.copy)(o.propertiesToReflectAsAttributes):[]),e.update||o.propertiesToReflectAsAttributes instanceof Map&&!o.propertiesToReflectAsAttributes.has(r)||Array.isArray(o.propertiesToReflectAsAttributes)&&!o.propertiesToReflectAsAttributes.includes(r)||null!==o.propertiesToReflectAsAttributes&&"object"==typeof o.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(o.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?!0===e.writeAttribute&&o.propertyTypes&&Object.prototype.hasOwnProperty.call(o.propertyTypes,r)&&(n=o.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(o.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?o.propertiesToReflectAsAttributes.push(r):o.propertiesToReflectAsAttributes=o.normalizePropertyTypeList(o.propertiesToReflectAsAttributes)),o.propertiesToReflectAsAttributes instanceof Map&&o.propertiesToReflectAsAttributes.set(r,n),null!==o.propertiesToReflectAsAttributes&&"object"==typeof o.propertiesToReflectAsAttributes&&(o.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(o,"propertyAliases")||(o.propertyAliases=o.propertyAliases?i()({},o.propertyAliases):{}),!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyAliases[r]=e.alias))}}}},,function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=i},function(e){e.exports=s},function(e){e.exports=o}],u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};c.r(d),c.d(d,{GenericHTMLElement:function(){return D},Web:function(){return V},api:function(){return M}});var h,f,b,y,v=c(6),m=c.n(v),g=c(7),A=c.n(g),P=c(0),O=c.n(P),w=c(3),T=c.n(w),E=c(8),x=c.n(E),C=(c(9),c(10)),S=c.n(C),N=c(1),R=c(2),j=c(4);function I(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return U(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var D="undefined"==typeof HTMLElement?function(){}:HTMLElement,V=(h=(0,j.default)({type:R.boolean,writeAttribute:!0}),y=function(e){function t(){var r;return(r=e.call(this)||this).batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.parent=null,r.rootInstance=null,r.scope=O()({},N.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,A()(r,"isRoot",b,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.root=r,r.defineGetterAndSetterInterface(),r}T()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this;this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,N.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):this.render("attributeChanged")},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}this.parent=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&this.determineRootBinding(),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,N.timeout)((function(){return e.render("connected")}))},r.disconnectedCallback=function(){try{this.isConnected=!1}catch(e){}for(var e,t=I(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=I(e.value.values());!(r=n()).done;){(0,r.value)()}this.slots={}},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=I((0,N.unique)(Object.keys(this.self.propertyTypes).concat(Object.keys(this.self._propertyAliasIndex))));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:this.externalProperties[e];return null!=(n=this.instance)&&null!=(n=n.current)&&n.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:i},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,N.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,N.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()})).then(N.NOOP,N.NOOP)):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i=n.value,s="";if(i.startsWith("data-bind-")?s=i.substring(10):i.startsWith("bind-")&&(s=i.substring(5)),s){var o=e.getAttribute(i);if(null===o)return 0;if(s.startsWith("attribute-")||s.startsWith("property-")){var a=(0,N.evaluate)(o,t,!1,!0,e);if(a.error)return console.warn('Error occurred during processing given attribute binding "'+i+'" on node:',e,a.error),0;s.startsWith("attribute-")?e.setAttribute(s.substring(10),a.result):e[(0,N.delimitedToCamelCase)(s.substring(9))]=a.result}else if(s.startsWith("on-")){r.domNodeEventBindings.has(e)||r.domNodeEventBindings.set(e,new Map);var l=r.domNodeEventBindings.get(e);s=(0,N.delimitedToCamelCase)(s.substring(3)),l.has(s)&&l.get(s)(),t=O()({console:console,event:void 0,parameters:void 0},t);var p=(0,N.compile)(o,t,!0,!0,e);if(p.error)console.warn('Error occurred during compiling given event binding "'+i+'" on node:',e,p.error);else{var u=function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];t.event=n[0],t.parameters=n;try{p.templateFunction.apply(p,p.originalScopeNames.map((function(e){return t[e]})))}catch(t){console.warn('Error occurred during processing given event binding "'+i+'" on node:',e,'Given expression "'+o+'" could not be evaluated with given scope names "'+p.scopeNames.join('", "')+'": '+(0,N.represent)(t))}};e.addEventListener(s,u),l.set(s,(function(){e.removeEventListener(s,u),l.delete(s),0===l.size&&r.domNodeEventBindings.delete(e)}))}}}},s=I(e.getAttributeNames());!(n=s()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t=[]),void 0===r&&(r={}),(r=O()({ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-"))return r.map;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var s=(0,N.compile)("`"+i+"`",t);r.map.set(e,{children:[],error:s.error,scopeNames:s.scopeNames,template:i,templateFunction:s.templateFunction})}}else{var o,a=e.nodeName.toLowerCase();if(["a","#text"].includes(a)){var l="a"===a?e.getAttribute("href"):e.textContent;this.self.hasCode(l)&&(o=l.replace(/ /g," ").trim())}var p=[];if(o){var u=(0,N.compile)("`"+o+"`",t);r.map.set(e,{children:p,error:u.error,scopeNames:u.scopeNames,template:o,templateFunction:u.templateFunction})}for(var c=e.firstChild;c;)r.filter&&!r.filter(c)||p.push(this.compileDomNodeTemplate(c,t,O()({},r,{ignoreComponents:r.ignoreNestedComponents}))),c=c.nextSibling}return r.map},r.evaluateDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t={}),void 0===r&&(r={}),(r=O()({applyBindings:!0,ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).map.has(e)||this.compileDomNodeTemplate(e,t,r),r.map.has(e)){var i=r.map.get(e),s=i.error,o=i.scopeNames,a=i.templateFunction;if(s)console.warn("Error occurred during compiling node content: "+s);else{var l=null;try{l=a.apply(void 0,o.map((function(e){return t[e]})))}catch(s){console.warn('Error occurred when "'+this.self._name+'" is running "'+a+'": with bound names "'+o.join('", "')+'": "'+s+'". Rendering node:',e)}null!==l&&(r.unsafe?e.innerHTML=l:"a"===e.nodeName.toLowerCase()?e.setAttribute("href",l):e.textContent=l)}}if(!(r.unsafe||r.ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-")))for(var p=e.firstChild;p;)r.filter&&!r.filter(p)||this.evaluateDomNodeTemplate(p,t,O()({},r,{applyBindings:!1,ignoreComponents:r.ignoreNestedComponents})),p=p.nextSibling;return r.applyBindings&&this.applyBindings(e,t),r.map},t.replaceDomNodes=function(e,r){for(var n,i=I([].concat(r).reverse());!(n=i()).done;){var s,o=n.value;t.trimSlots&&o.nodeType===Node.TEXT_NODE&&""===(null==(s=o.nodeValue)?void 0:s.trim())||e.after(o)}e.remove()},t.unwrapDomNode=function(e){for(var t=e.parentNode,r=[];e.firstChild;)r.push(e.firstChild),t.insertBefore(e.firstChild,e);return t.removeChild(e),r},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r;(e instanceof t||(null==(r=e.nodeName)?void 0:r.includes("-"))||null===e.parentNode&&"[object ShadowRoot]"===e.toString())&&(this.rootInstance===this?(this.parent=e,this.rootInstance=e,this.setPropertyValue("isRoot",!1)):this.rootInstance=e),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,s=I(n);!(r=s()).done;){var o=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,o)&&i.set(o,t.propertyTypes[o])}return i}return(0,N.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){for(var e=this,t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,m()(S().mark((function t(){var n,i,s,o,a=arguments;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),s=0;s<n;s++)i[s]=a[s];return t.next=3,e.reflectEventToProperties(r,i);case 3:(o=t.sent)&&(i[0]=o),e.forwardEvent(r,i);case 6:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],s=r[0],o=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,s)||![R.func,"function"].includes(o)||t.self.renderProperties.includes(s)||(t.outputEventNames.add(s),t.setInternalPropertyValue(s,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(s,n),t.forwardEvent(s,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=I(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,N.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,t){for(var r=this,n=0,i=Array.from(e.querySelectorAll("slot"));n<i.length;n++){var s=i[n],o=s.getAttribute("name");if(null===o||"default"===o)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var a,l=I(this.slots.default);!(a=l()).done;){var p=a.value;this.evaluateDomNodeTemplate(p,t)}this.self.replaceDomNodes(s,this.slots.default)}}else this.slots.default=this.self.unwrapDomNode(s).map((function(e){return r.grabSlotContent(e)}));else Object.prototype.hasOwnProperty.call(this.slots,o)?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[o],t),this.self.replaceDomNodes(s,this.slots[o])):this.slots[o]=this.grabSlotContent(this.self.unwrapDomNode(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t;if("textarea"===(null==(t=e.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!e.firstElementChild.hasAttribute("data-no-template")||"false"===e.firstElementChild.getAttribute("data-no-template"))){var r,n,i=e.firstElementChild.value;null==(r=e.classList)||r.remove("web-component-template");var s=e.cloneNode();return null==(n=e.classList)||n.add("web-component-template"),s.innerHTML="",s.template=i,s}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n=r[t],i=n.parentNode,s=!0;i;){if(i.nodeName.includes("-")){i===this&&(s=!1);break}i=i.parentNode}s||(this.slots[n.getAttribute&&n.getAttribute("slot")&&n.getAttribute("slot").trim()?n.getAttribute("slot").trim():n.nodeName.toLowerCase()]=this.grabSlotContent(n))}this.slots.default?this.slots.default=[this.slots.default]:this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t,r;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(null==(r=this.instance)||null==(r=r.current)?void 0:r.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=O()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=r[t],i=n[0],s=n[1];if(this.setExternalPropertyValue(i,s),this.isConnected){var o=(0,N.camelCaseToDelimited)(i);if(this.self._propertiesToReflectAsAttributes.has(i))switch(this.self._propertiesToReflectAsAttributes.get(i)){case R.boolean:case"boolean":s?""!==this.getAttribute(o)&&this.setAttribute(o,""):this.hasAttribute(o)&&this.removeAttribute(o);break;case R.func:case"function":break;case"json":if(s){var a=JSON.stringify(s);if(a&&this.getAttribute(o)!==a){this.setAttribute(o,a);break}}this.hasAttribute(o)&&this.removeAttribute(o);break;case R.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(o)&&this.removeAttribute(o);else{var l=""+s;this.getAttribute(o)!==l&&this.setAttribute(o,l)}break;case R.string:case"string":s?this.getAttribute(o)!==s&&this.setAttribute(o,s):this.hasAttribute(o)&&this.removeAttribute(o);break;case R.any:case R.array:case R.arrayOf:case R.element:case R.elementType:case R.instanceOf:case R.node:case R.object:case"object":case R.objectOf:case R.shape:case R.exact:case R.symbol:default:if(s){var p=(0,N.represent)(s);if(p&&this.getAttribute(o)!==p){this.setAttribute(o,p);break}}this.hasAttribute(o)&&this.removeAttribute(o)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r,n;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var i,s=I(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(i=s()).done;){var o=i.value;Object.prototype.hasOwnProperty.call(this.internalProperties,o)&&this.setInternalPropertyValue(o,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(null==(n=this.internalProperties.model)||delete n.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var a,l=I(this.self.controllableProperties);!(a=l()).done;){var p=a.value;Object.prototype.hasOwnProperty.call(e,p)&&this.setInternalPropertyValue(p,e[p])}},r.reflectEventToProperties=function(){var e=m()(S().mark((function e(t,r){var n,i,s,o,a,l,p,u,c,d,h,f,b,y,v,m;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,s=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,N.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=16;break}if(!((a=(o=this.self.eventToPropertyMapping)[t].apply(o,r.concat([this])))&&"then"in a&&(0,N.isFunction)(a.then))){e.next=12;break}return e.next=9,a;case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=a;case 13:l=e.t0,s=!0,Array.isArray(l)?(i=l[0],this.reflectProperties(i),(0,N.extend)(!0,this.internalProperties,l[1])):null===l?s=!1:"object"==typeof l&&(i=l,this.reflectProperties(l));case 16:if(!s&&r.length>0&&null!==r[0]&&"object"==typeof r[0]){if(u=r[0],"persist"in r[0]&&(0,N.isFunction)(r[0].persist))for(u={},c=0,d=Object.keys(this.self.propertyTypes);c<d.length;c++)for(h=d[c],f=I([h].concat(null!==(y=this.getPropertyAlias(h))&&void 0!==y?y:[]));!(b=f()).done;)v=b.value,(m=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,v)?r[0].currentTarget[v]:this.getPropertyValue(v))!==this.externalProperties[v]&&(u[v]=m);else[null,void 0].includes(null==(p=u.detail)?void 0:p.value)||(u=O()({},u.detail));i=u,this.reflectProperties(u)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 20:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,s=(0,N.delimitedToCamelCase)(i),o=this.getPropertyAlias(s);if(o&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)&&(s=o),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)){var a=this.self.propertyTypes[s];if(n){if(t){var l=(0,N.evaluate)(t,O()({},N.UTILITY_SCOPE),!1,!0,this);l.error?(console.warn('Failed to process pre-evaluation attribute "'+e+'": '+l.error+'. Will be set to "undefined".'),this.setInternalPropertyValue(s,void 0)):(this.setInternalPropertyValue(s,l.result),this.setExternalPropertyValue(s,l.result))}}else switch(a){case R.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(s,p),this.setExternalPropertyValue(s,p);break;case R.func:case"function":var u,c=null,d=Object.keys(N.UTILITY_SCOPE),h=["data","event","firstArgument","firstParameter","options","scope","parameters"].concat(d);if(t){var f=(0,N.compile)(t,h);c=f.error,u=f.templateFunction,c&&console.warn('Failed to compile given handler "'+e+'": '+c+".")}this.setInternalPropertyValue(s,(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.outputEventNames.has(s)&&r.reflectEventToProperties(s,i);var a=void 0;if(!c)try{var l;a=(l=u).call.apply(l,[r,i[0],i[0],i[0],i[0],i[0],i[0],i].concat(d.map((function(e){return N.UTILITY_SCOPE[e]}))))}catch(r){console.warn('Failed to evaluate function "'+e+'" with expression "'+t+'" and scope variables "'+h.join('", "')+'" set to "'+(0,N.represent)(i)+'": '+r+'. Set property to "undefined".')}return r.self.renderProperties.includes(s)||r.forwardEvent(s,i),a})),c||this.setExternalPropertyValue(s,u);break;case"json":if(t){var b;try{b=JSON.parse(t)}catch(c){console.warn('Error occurred during parsing given json attribute "'+e+'": '+(0,N.represent)(c));break}this.setInternalPropertyValue(s,b),this.setExternalPropertyValue(s,(0,N.copy)(b,1))}else this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null);break;case R.number:case"number":if(null===t){this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break}var y=parseFloat(t);isNaN(y)&&(y=void 0),this.setInternalPropertyValue(s,y),this.setExternalPropertyValue(s,y);break;case R.string:case"string":this.setInternalPropertyValue(s,t),this.setExternalPropertyValue(s,t);break;case R.any:case R.array:case R.arrayOf:case R.element:case R.elementType:case R.instanceOf:case R.node:case R.object:case"object":case R.objectOf:case R.oneOf:case R.oneOfType:case R.shape:case R.exact:case R.symbol:default:if(t){var v=(0,N.evaluate)(t,{},!1,!0,this);if(v.error){console.warn('Error occurred during processing given attribute configuration "'+e+'":',v.error);break}this.setInternalPropertyValue(s,v.result),this.setExternalPropertyValue(s,(0,N.copy)(v.result,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(s,!0),this.setExternalPropertyValue(s,!0)):(this.setInternalPropertyValue(s,null),this.setExternalPropertyValue(s,null))}}},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,N.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.root===this&&(this.root=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow(null!==this.self.shadowDOM&&"object"==typeof this.self.shadowDOM?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=O()({},(null==(t=this.parent)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parent:this.parent,root:this.rootInstance,self:this})[(0,N.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(e){if(void 0===e&&(e="unknown"),this.determineRenderScope(),this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}}))){var t=(0,N.evaluate)("`"+this.self.content+"`",this.scope);if(t.error)console.warn("Failed to process template: "+t.error);else{this.applyShadowRootIfNotExisting();var r=document.createElement("div");r.innerHTML=t.result,this.applySlots(r,O()({},this.scope,{parent:this})),this.root.innerHTML=r.innerHTML,this.applyBindings(this.root.firstChild,this.scope,this.self.renderSlots)}}},t}(D),y.applyRootBinding=!0,y.content="<slot>Please provide a template to transclude.</slot>",y.determineRootBinding=!0,y.shadowDOM=null,y.observedAttributes=[],y.controllableProperties=[],y.eventToPropertyMapping={},y.propertyAliases={},y.propertyTypes={onClick:R.func},y.propertiesToReflectAsAttributes=[],y.renderProperties=["children"],y.cloneSlots=!1,y.evaluateSlots=!1,y.renderSlots=!0,y.trimSlots=!0,y.renderUnsafe=!1,y._name="BaseWeb",f=y,b=x()(f.prototype,"isRoot",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f),M={component:V,register:function(e){return void 0===e&&(e=(0,N.camelCaseToDelimited)(V._name)),customElements.define(e,V)}};return d.default=V,d}()}));
|