jails-js 5.0.0-beta.9 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,311 @@
1
+ export default function Element(module: any, dependencies: any, templates: any, components: any): {
2
+ new (): {
3
+ base: any;
4
+ options: any;
5
+ __events: any;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ attributeChangedCallback(): void;
9
+ accessKey: string;
10
+ readonly accessKeyLabel: string;
11
+ autocapitalize: string;
12
+ dir: string;
13
+ draggable: boolean;
14
+ hidden: boolean;
15
+ innerText: string;
16
+ lang: string;
17
+ readonly offsetHeight: number;
18
+ readonly offsetLeft: number;
19
+ readonly offsetParent: Element;
20
+ readonly offsetTop: number;
21
+ readonly offsetWidth: number;
22
+ outerText: string;
23
+ spellcheck: boolean;
24
+ title: string;
25
+ translate: boolean;
26
+ attachInternals(): ElementInternals;
27
+ click(): void;
28
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
29
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
30
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
31
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
32
+ readonly attributes: NamedNodeMap;
33
+ readonly classList: DOMTokenList;
34
+ className: string;
35
+ readonly clientHeight: number;
36
+ readonly clientLeft: number;
37
+ readonly clientTop: number;
38
+ readonly clientWidth: number;
39
+ id: string;
40
+ readonly localName: string;
41
+ readonly namespaceURI: string;
42
+ onfullscreenchange: (this: Element, ev: Event) => any;
43
+ onfullscreenerror: (this: Element, ev: Event) => any;
44
+ outerHTML: string;
45
+ readonly ownerDocument: Document;
46
+ readonly part: DOMTokenList;
47
+ readonly prefix: string;
48
+ readonly scrollHeight: number;
49
+ scrollLeft: number;
50
+ scrollTop: number;
51
+ readonly scrollWidth: number;
52
+ readonly shadowRoot: ShadowRoot;
53
+ slot: string;
54
+ readonly tagName: string;
55
+ attachShadow(init: ShadowRootInit): ShadowRoot;
56
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
57
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
58
+ closest<E extends Element = Element>(selectors: string): E;
59
+ getAttribute(qualifiedName: string): string;
60
+ getAttributeNS(namespace: string, localName: string): string;
61
+ getAttributeNames(): string[];
62
+ getAttributeNode(qualifiedName: string): Attr;
63
+ getAttributeNodeNS(namespace: string, localName: string): Attr;
64
+ getBoundingClientRect(): DOMRect;
65
+ getClientRects(): DOMRectList;
66
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
67
+ getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
68
+ getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
69
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
70
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
71
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
72
+ getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
73
+ hasAttribute(qualifiedName: string): boolean;
74
+ hasAttributeNS(namespace: string, localName: string): boolean;
75
+ hasAttributes(): boolean;
76
+ hasPointerCapture(pointerId: number): boolean;
77
+ insertAdjacentElement(where: InsertPosition, element: Element): Element;
78
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
79
+ insertAdjacentText(where: InsertPosition, data: string): void;
80
+ matches(selectors: string): boolean;
81
+ releasePointerCapture(pointerId: number): void;
82
+ removeAttribute(qualifiedName: string): void;
83
+ removeAttributeNS(namespace: string, localName: string): void;
84
+ removeAttributeNode(attr: Attr): Attr;
85
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
86
+ requestPointerLock(): void;
87
+ scroll(options?: ScrollToOptions): void;
88
+ scroll(x: number, y: number): void;
89
+ scrollBy(options?: ScrollToOptions): void;
90
+ scrollBy(x: number, y: number): void;
91
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
92
+ scrollTo(options?: ScrollToOptions): void;
93
+ scrollTo(x: number, y: number): void;
94
+ setAttribute(qualifiedName: string, value: string): void;
95
+ setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
96
+ setAttributeNode(attr: Attr): Attr;
97
+ setAttributeNodeNS(attr: Attr): Attr;
98
+ setPointerCapture(pointerId: number): void;
99
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
100
+ webkitMatchesSelector(selectors: string): boolean;
101
+ readonly baseURI: string;
102
+ readonly childNodes: NodeListOf<ChildNode>;
103
+ readonly firstChild: ChildNode;
104
+ readonly isConnected: boolean;
105
+ readonly lastChild: ChildNode;
106
+ readonly nextSibling: ChildNode;
107
+ readonly nodeName: string;
108
+ readonly nodeType: number;
109
+ nodeValue: string;
110
+ readonly parentElement: HTMLElement;
111
+ readonly parentNode: ParentNode;
112
+ readonly previousSibling: ChildNode;
113
+ textContent: string;
114
+ appendChild<T extends Node>(node: T): T;
115
+ cloneNode(deep?: boolean): Node;
116
+ compareDocumentPosition(other: Node): number;
117
+ contains(other: Node): boolean;
118
+ getRootNode(options?: GetRootNodeOptions): Node;
119
+ hasChildNodes(): boolean;
120
+ insertBefore<T_1 extends Node>(node: T_1, child: Node): T_1;
121
+ isDefaultNamespace(namespace: string): boolean;
122
+ isEqualNode(otherNode: Node): boolean;
123
+ isSameNode(otherNode: Node): boolean;
124
+ lookupNamespaceURI(prefix: string): string;
125
+ lookupPrefix(namespace: string): string;
126
+ normalize(): void;
127
+ removeChild<T_2 extends Node>(child: T_2): T_2;
128
+ replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
129
+ readonly ATTRIBUTE_NODE: number;
130
+ readonly CDATA_SECTION_NODE: number;
131
+ readonly COMMENT_NODE: number;
132
+ readonly DOCUMENT_FRAGMENT_NODE: number;
133
+ readonly DOCUMENT_NODE: number;
134
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
135
+ readonly DOCUMENT_POSITION_CONTAINS: number;
136
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
137
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
138
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
139
+ readonly DOCUMENT_POSITION_PRECEDING: number;
140
+ readonly DOCUMENT_TYPE_NODE: number;
141
+ readonly ELEMENT_NODE: number;
142
+ readonly ENTITY_NODE: number;
143
+ readonly ENTITY_REFERENCE_NODE: number;
144
+ readonly NOTATION_NODE: number;
145
+ readonly PROCESSING_INSTRUCTION_NODE: number;
146
+ readonly TEXT_NODE: number;
147
+ dispatchEvent(event: Event): boolean;
148
+ ariaAtomic: string;
149
+ ariaAutoComplete: string;
150
+ ariaBusy: string;
151
+ ariaChecked: string;
152
+ ariaColCount: string;
153
+ ariaColIndex: string;
154
+ ariaColSpan: string;
155
+ ariaCurrent: string;
156
+ ariaDisabled: string;
157
+ ariaExpanded: string;
158
+ ariaHasPopup: string;
159
+ ariaHidden: string;
160
+ ariaKeyShortcuts: string;
161
+ ariaLabel: string;
162
+ ariaLevel: string;
163
+ ariaLive: string;
164
+ ariaModal: string;
165
+ ariaMultiLine: string;
166
+ ariaMultiSelectable: string;
167
+ ariaOrientation: string;
168
+ ariaPlaceholder: string;
169
+ ariaPosInSet: string;
170
+ ariaPressed: string;
171
+ ariaReadOnly: string;
172
+ ariaRequired: string;
173
+ ariaRoleDescription: string;
174
+ ariaRowCount: string;
175
+ ariaRowIndex: string;
176
+ ariaRowSpan: string;
177
+ ariaSelected: string;
178
+ ariaSetSize: string;
179
+ ariaSort: string;
180
+ ariaValueMax: string;
181
+ ariaValueMin: string;
182
+ ariaValueNow: string;
183
+ ariaValueText: string;
184
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions): Animation;
185
+ getAnimations(options?: GetAnimationsOptions): Animation[];
186
+ after(...nodes: (string | Node)[]): void;
187
+ before(...nodes: (string | Node)[]): void;
188
+ remove(): void;
189
+ replaceWith(...nodes: (string | Node)[]): void;
190
+ innerHTML: string;
191
+ readonly nextElementSibling: Element;
192
+ readonly previousElementSibling: Element;
193
+ readonly childElementCount: number;
194
+ readonly children: HTMLCollection;
195
+ readonly firstElementChild: Element;
196
+ readonly lastElementChild: Element;
197
+ append(...nodes: (string | Node)[]): void;
198
+ prepend(...nodes: (string | Node)[]): void;
199
+ querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
200
+ querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
201
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1;
202
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
203
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
204
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
205
+ replaceChildren(...nodes: (string | Node)[]): void;
206
+ readonly assignedSlot: HTMLSlotElement;
207
+ oncopy: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
208
+ oncut: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
209
+ onpaste: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
210
+ readonly style: CSSStyleDeclaration;
211
+ contentEditable: string;
212
+ enterKeyHint: string;
213
+ inputMode: string;
214
+ readonly isContentEditable: boolean;
215
+ onabort: (this: GlobalEventHandlers, ev: UIEvent) => any;
216
+ onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
217
+ onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
218
+ onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
219
+ onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
220
+ onauxclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
221
+ onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any;
222
+ oncanplay: (this: GlobalEventHandlers, ev: Event) => any;
223
+ oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any;
224
+ onchange: (this: GlobalEventHandlers, ev: Event) => any;
225
+ onclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
226
+ onclose: (this: GlobalEventHandlers, ev: Event) => any;
227
+ oncontextmenu: (this: GlobalEventHandlers, ev: MouseEvent) => any;
228
+ oncuechange: (this: GlobalEventHandlers, ev: Event) => any;
229
+ ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
230
+ ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any;
231
+ ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any;
232
+ ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any;
233
+ ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any;
234
+ ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any;
235
+ ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any;
236
+ ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any;
237
+ ondurationchange: (this: GlobalEventHandlers, ev: Event) => any;
238
+ onemptied: (this: GlobalEventHandlers, ev: Event) => any;
239
+ onended: (this: GlobalEventHandlers, ev: Event) => any;
240
+ onerror: OnErrorEventHandlerNonNull;
241
+ onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any;
242
+ onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any;
243
+ ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
244
+ oninput: (this: GlobalEventHandlers, ev: Event) => any;
245
+ oninvalid: (this: GlobalEventHandlers, ev: Event) => any;
246
+ onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
247
+ onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
248
+ onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
249
+ onload: (this: GlobalEventHandlers, ev: Event) => any;
250
+ onloadeddata: (this: GlobalEventHandlers, ev: Event) => any;
251
+ onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any;
252
+ onloadstart: (this: GlobalEventHandlers, ev: Event) => any;
253
+ onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
254
+ onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any;
255
+ onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any;
256
+ onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any;
257
+ onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any;
258
+ onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
259
+ onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any;
260
+ onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any;
261
+ onpause: (this: GlobalEventHandlers, ev: Event) => any;
262
+ onplay: (this: GlobalEventHandlers, ev: Event) => any;
263
+ onplaying: (this: GlobalEventHandlers, ev: Event) => any;
264
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
265
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
266
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
267
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
268
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
269
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
270
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
271
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
272
+ onprogress: (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any;
273
+ onratechange: (this: GlobalEventHandlers, ev: Event) => any;
274
+ onreset: (this: GlobalEventHandlers, ev: Event) => any;
275
+ onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
276
+ onscroll: (this: GlobalEventHandlers, ev: Event) => any;
277
+ onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
278
+ onseeked: (this: GlobalEventHandlers, ev: Event) => any;
279
+ onseeking: (this: GlobalEventHandlers, ev: Event) => any;
280
+ onselect: (this: GlobalEventHandlers, ev: Event) => any;
281
+ onselectionchange: (this: GlobalEventHandlers, ev: Event) => any;
282
+ onselectstart: (this: GlobalEventHandlers, ev: Event) => any;
283
+ onslotchange: (this: GlobalEventHandlers, ev: Event) => any;
284
+ onstalled: (this: GlobalEventHandlers, ev: Event) => any;
285
+ onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any;
286
+ onsuspend: (this: GlobalEventHandlers, ev: Event) => any;
287
+ ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any;
288
+ ontoggle: (this: GlobalEventHandlers, ev: Event) => any;
289
+ ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
290
+ ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
291
+ ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
292
+ ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
293
+ ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
294
+ ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
295
+ ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
296
+ ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
297
+ onvolumechange: (this: GlobalEventHandlers, ev: Event) => any;
298
+ onwaiting: (this: GlobalEventHandlers, ev: Event) => any;
299
+ onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any;
300
+ onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any;
301
+ onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any;
302
+ onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any;
303
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
304
+ autofocus: boolean;
305
+ readonly dataset: DOMStringMap;
306
+ nonce?: string;
307
+ tabIndex: number;
308
+ blur(): void;
309
+ focus(options?: FocusOptions): void;
310
+ };
311
+ };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ register(name: string, module: any, dependencies: object): void;
3
+ start(): void;
4
+ };
5
+ export default _default;
package/types/index.ts ADDED
@@ -0,0 +1,41 @@
1
+ export type Component = {
2
+
3
+ elm: HTMLElement
4
+ dependencies: object
5
+
6
+ state : {
7
+ set( data: object ) : void
8
+ set( callback: ( state: object ) => any ) : void
9
+ get() : object
10
+ }
11
+
12
+ main( mainArgs: ( t: any ) => Array<Function> ): void
13
+
14
+ publish( name: string, value: any ) : void
15
+
16
+ subscribe( name: string, value: Function ) : Function
17
+
18
+ template( data: object ) : void
19
+
20
+ unmount( callback: () => void ) : void
21
+
22
+ onupdate( callback: () => void ) : void
23
+
24
+ on( eventName: string, selector: string, callback: () => void ): void
25
+
26
+ on( eventName: string, callback: () => void ): void
27
+
28
+ emit( eventName: string, data: any ) : void
29
+
30
+ off( eventName: string, callback: () => void ): void
31
+
32
+ trigger( eventName: string, selector :string, data: any ): void
33
+
34
+ render( data: object ) : void
35
+ }
36
+
37
+ export type Model = {
38
+ [key: string] : object
39
+ }
40
+
41
+ export type View = ( state: object ) => object
@@ -0,0 +1 @@
1
+ export default function templateSystem(element: any): (data: any) => string;
@@ -0,0 +1,3 @@
1
+ export declare const on: (node: any, ev: any, selectorOrCallback: any, callback: any) => void;
2
+ export declare const off: (node: any, ev: any, fn: any) => void;
3
+ export declare const trigger: (node: any, name: any, args: any) => void;
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ export declare const rAF: (fn: any) => number | NodeJS.Timeout;
3
+ export declare const uuid: () => string;
4
+ export declare const stripTemplateTag: (element: any) => void;
5
+ export declare const dup: (o: any) => any;
6
+ export declare const createTemplateId: (element: any, templates: any) => void;
7
+ export declare const buildtemplates: (target: any, components: any, templates: any) => unknown[];
8
+ export declare const decodeHtmlEntities: (str: any) => string;
@@ -0,0 +1,2 @@
1
+ export declare const publish: (name: any, params: any) => void;
2
+ export declare const subscribe: (name: any, method: any) => () => void;
package/webpack.config.js CHANGED
@@ -9,27 +9,27 @@ module.exports = {
9
9
  },
10
10
 
11
11
  entry: {
12
- jails: './src/index.ts'
12
+ index: './src/index.ts'
13
13
  },
14
14
 
15
15
  module: {
16
- rules: [
17
- {
18
- test: /\.ts$/,
19
- exclude: [/node_modules/],
20
- loader: 'ts-loader',
16
+ rules: [
17
+ {
18
+ test: /\.ts$/,
19
+ exclude: [/node_modules/],
20
+ loader: 'ts-loader',
21
21
  options: {
22
22
  transpileOnly: true
23
23
  }
24
- }
25
- ]
26
- },
24
+ }
25
+ ]
26
+ },
27
27
 
28
28
  output: {
29
- path : path.resolve(__dirname, './dist'),
30
- filename : '[name].js',
31
- libraryTarget : 'umd',
32
- library : 'jails',
29
+ path: path.resolve(__dirname, './dist'),
30
+ filename: '[name].js',
31
+ libraryTarget: 'umd',
32
+ library: 'jails',
33
33
  umdNamedDefine: true
34
34
  }
35
35
  }
package/dist/jails.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("jails",[],t):"object"==typeof exports?exports.jails=t():e.jails=t()}(self,(()=>(()=>{var e={641:function(e,t){!function(e){"use strict";function t(e){var n,r,a=new Error(e);return n=a,r=t.prototype,Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,a}function n(e,n,r){var a=n.slice(0,r).split(/\n/),o=a.length,i=a[o-1].length+1;throw t(e+=" at line "+o+" col "+i+":\n\n "+n.split(/\n/)[o-1]+"\n "+Array(i).join(" ")+"^")}t.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,a=!1;try{a=new Function("return (async function(){}).constructor")()}catch(e){if(!(e instanceof SyntaxError))throw e}var o=function(e,t){return"(function(){ try{ return "+e+"} catch(err){ return "+t+" } })()"};function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e,t,n){for(var r in t)i(t,r)&&(null==t[r]||"object"!=typeof t[r]||"storage"!==r&&"prefixes"!==r||n?e[r]=t[r]:e[r]=s({},t[r]));return e}var c=/^async +/,l=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,u=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,d=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,f=/[.*+\-?^${}()|[\]\\]/g;function p(e){return f.test(e)?e.replace(f,"\\$&"):e}function m(e,r){r.rmWhitespace&&(e=e.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),l.lastIndex=0,u.lastIndex=0,d.lastIndex=0;var a=r.prefixes,o=[a.h,a.b,a.i,a.r,a.c,a.e].reduce((function(e,t){return e&&t?e+"|"+p(t):t?p(t):e}),""),i=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+p(r.tags[1])+")","g"),s=new RegExp("([^]*?)"+p(r.tags[0])+"(-|_)?\\s*("+o+")?\\s*","g"),f=0,m=!1;function h(t,a){var o,p={f:[]},h=0,v="c";function g(t){var a=e.slice(f,t),o=a.trim();if("f"===v)"safe"===o?p.raw=!0:r.async&&c.test(o)?(o=o.replace(c,""),p.f.push([o,"",!0])):p.f.push([o,""]);else if("fp"===v)p.f[p.f.length-1][1]+=o;else if("err"===v){if(o){var i=a.search(/\S/);n("invalid syntax",e,f+i)}}else p[v]=o;f=t+1}for("h"===a||"b"===a||"c"===a?v="n":"r"===a&&(p.raw=!0,a="i"),i.lastIndex=f;null!==(o=i.exec(e));){var b=o[1],y=o[2],x=o[3],A=o[4],N=o[5],S=o.index;if(b)"("===b?(0===h&&("n"===v?(g(S),v="p"):"f"===v&&(g(S),v="fp")),h++):")"===b?0==--h&&"c"!==v&&(g(S),v="err"):0===h&&"|"===b?(g(S),v="f"):"=>"===b&&(g(S),f+=1,v="res");else if(y)if("/*"===y){var w=e.indexOf("*/",i.lastIndex);-1===w&&n("unclosed comment",e,o.index),i.lastIndex=w+2}else"'"===y?(u.lastIndex=o.index,u.exec(e)?i.lastIndex=u.lastIndex:n("unclosed string",e,o.index)):'"'===y?(d.lastIndex=o.index,d.exec(e)?i.lastIndex=d.lastIndex:n("unclosed string",e,o.index)):"`"===y&&(l.lastIndex=o.index,l.exec(e)?i.lastIndex=l.lastIndex:n("unclosed string",e,o.index));else if(x)return g(S),f=S+o[0].length,s.lastIndex=f,m=N,A&&"h"===a&&(a="s"),p.t=a,p}return n("unclosed tag",e,t),p}var v=function o(i,l){i.b=[],i.d=[];var u,d=!1,p=[];function v(e,t){e&&(e=function(e,t,n,r){var a,o;return"string"==typeof t.autoTrim?a=o=t.autoTrim:Array.isArray(t.autoTrim)&&(a=t.autoTrim[1],o=t.autoTrim[0]),(n||!1===n)&&(a=n),(r||!1===r)&&(o=r),"slurp"===a&&"slurp"===o?e.trim():("_"===a||"slurp"===a?e=String.prototype.trimLeft?e.trimLeft():e.replace(/^[\s\uFEFF\xA0]+/,""):"-"!==a&&"nl"!==a||(e=e.replace(/^(?:\n|\r|\r\n)/,"")),"_"===o||"slurp"===o?e=String.prototype.trimRight?e.trimRight():e.replace(/[\s\uFEFF\xA0]+$/,""):"-"!==o&&"nl"!==o||(e=e.replace(/(?:\n|\r|\r\n)$/,"")),e)}(e,r,m,t))&&(e=e.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),p.push(e))}for(;null!==(u=s.exec(e));){var g,b=u[1],y=u[2],x=u[3]||"";for(var A in a)if(a[A]===x){g=A;break}v(b,y),f=u.index+u[0].length,g||n("unrecognized tag type: "+x,e,f);var N=h(u.index,g),S=N.t;if("h"===S){var w=N.n||"";r.async&&c.test(w)&&(N.a=!0,N.n=w.replace(c,"")),N=o(N),p.push(N)}else if("c"===S){if(i.n===N.n)return d?(d.d=p,i.b.push(d)):i.d=p,i;n("Helper start and end don't match",e,u.index+u[0].length)}else if("b"===S){d?(d.d=p,i.b.push(d)):i.d=p;var _=N.n||"";r.async&&c.test(_)&&(N.a=!0,N.n=_.replace(c,"")),d=N,p=[]}else if("s"===S){var E=N.n||"";r.async&&c.test(E)&&(N.a=!0,N.n=E.replace(c,"")),p.push(N)}else p.push(N)}if(!l)throw t('unclosed helper "'+i.n+'"');return v(e.slice(f,e.length),!1),i.d=p,i}({f:[]},!0);if(r.plugins)for(var g=0;g<r.plugins.length;g++){var b=r.plugins[g];b.processAST&&(v.d=b.processAST(v.d,r))}return v.d}function h(e,t){var n=m(e,t),r="var tR='';"+(t.useWith?"with("+t.varName+"||{}){":"")+x(n,t)+"if(cb){cb(null,tR)} return tR"+(t.useWith?"}":"");if(t.plugins)for(var a=0;a<t.plugins.length;a++){var o=t.plugins[a];o.processFnString&&(r=o.processFnString(r,t))}return r}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],a=t[n][1];e=(t[n][2]?"await ":"")+"c.l('F','"+r+"')("+e,a&&(e+=","+a),e+=")"}return e}function g(e,t,n,r,a,o){var i="{exec:"+(a?"async ":"")+y(n,t,e)+",params:["+r+"]";return o&&(i+=",name:'"+o+"'"),a&&(i+=",async:true"),i+"}"}function b(e,t){for(var n="[",r=0;r<e.length;r++){var a=e[r];n+=g(t,a.res||"",a.d,a.p||"",a.a,a.n),r<e.length&&(n+=",")}return n+"]"}function y(e,t,n){return"function("+t+"){var tR='';"+x(e,n)+"return tR}"}function x(e,t){for(var n=0,r=e.length,a="";n<r;n++){var i=e[n];if("string"==typeof i)a+="tR+='"+i+"';";else{var s=i.t,c=i.c||"",l=i.f,u=i.n||"",d=i.p||"",f=i.res||"",p=i.b,m=!!i.a;if("i"===s){t.defaultFilter&&(c="c.l('F','"+t.defaultFilter+"')("+c+")");var h=v(c,l);!i.raw&&t.autoEscape&&(h="c.l('F','e')("+o(h,null)+")"),a+="tR+="+o(h,null)+";"}else if("h"===s)if(t.storage.nativeHelpers.get(u))a+=t.storage.nativeHelpers.get(u)(i,t);else{var y=(m?"await ":"")+"c.l('H','"+u+"')("+g(t,f,i.d,d,m);y+=p?","+b(p,t):",[]",a+="tR+="+v(y+=",c)",l)+";"}else"s"===s?a+="tR+="+v((m?"await ":"")+"c.l('H','"+u+"')({params:["+d+"]},[],c)",l)+";":"e"===s&&(a+=c+"\n")}}return a}var A=function(){function e(e){this.cache=e}return e.prototype.define=function(e,t){this.cache[e]=t},e.prototype.get=function(e){return this.cache[e]},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.reset=function(){this.cache={}},e.prototype.load=function(e){s(this.cache,e,!0)},e}();function N(e,n,r,a){if(n&&n.length>0)throw t((a?"Native":"")+"Helper '"+e+"' doesn't accept blocks");if(r&&r.length>0)throw t((a?"Native":"")+"Helper '"+e+"' doesn't accept filters")}var S={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function w(e){return S[e]}var _=new A({}),E=new A({each:function(e,t){var n="",r=e.params[0];if(N("each",t,!1),e.async)return new Promise((function(t){!function e(t,n,r,a,o){r(t[n],n).then((function(i){a+=i,n===t.length-1?o(a):e(t,n+1,r,a,o)}))}(r,0,e.exec,n,t)}));for(var a=0;a<r.length;a++)n+=e.exec(r[a],a);return n},foreach:function(e,t){var n=e.params[0];if(N("foreach",t,!1),e.async)return new Promise((function(t){!function e(t,n,r,a,o,i){a(n[r],t[n[r]]).then((function(s){o+=s,r===n.length-1?i(o):e(t,n,r+1,a,o,i)}))}(n,Object.keys(n),0,e.exec,"",t)}));var r="";for(var a in n)i(n,a)&&(r+=e.exec(a,n[a]));return r},include:function(e,n,r){N("include",n,!1);var a=r.storage.templates.get(e.params[0]);if(!a)throw t('Could not fetch template "'+e.params[0]+'"');return a(e.params[1],r)},extends:function(e,n,r){var a=e.params[1]||{};a.content=e.exec();for(var o=0;o<n.length;o++){var i=n[o];a[i.name]=i.exec()}var s=r.storage.templates.get(e.params[0]);if(!s)throw t('Could not fetch template "'+e.params[0]+'"');return s(a,r)},useScope:function(e,t){return N("useScope",t,!1),e.exec(e.params[0])}}),T=new A({if:function(e,t){N("if",!1,e.f,!0);var n="if("+o(e.p,!1)+"){"+x(e.d,t)+"}";if(e.b)for(var r=0;r<e.b.length;r++){var a=e.b[r];"else"===a.n?n+="else{"+x(a.d,t)+"}":"elif"===a.n&&(n+="else if("+a.p+"){"+x(a.d,t)+"}")}return n},try:function(e,n){if(N("try",!1,e.f,!0),!e.b||1!==e.b.length||"catch"!==e.b[0].n)throw t("native helper 'try' only accepts 1 block, 'catch'");var r="try{"+x(e.d,n)+"}",a=e.b[0];return r+"catch"+(a.res?"("+a.res+")":"")+"{"+x(a.d,n)+"}"},block:function(e,t){return N("block",e.b,e.f,!0),"if(!"+t.varName+"["+e.p+"]){tR+=("+y(e.d,"",t)+")()}else{tR+="+t.varName+"["+e.p+"]}"}}),C=new A({e:function(e){var t=String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,w):t}}),O={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(e,n){if("H"===e){var r=this.storage.helpers.get(n);if(r)return r;throw t("Can't find helper '"+n+"'")}if("F"===e){var a=this.storage.filters.get(n);if(a)return a;throw t("Can't find filter '"+n+"'")}},async:!1,storage:{helpers:E,nativeHelpers:T,filters:C,templates:_},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function j(e,t){var n={};return s(n,O),t&&s(n,t),e&&s(n,e),n.l.bind(n),n}function R(e,n){var r=j(n||{}),o=Function;if(r.async){if(!a)throw t("This environment doesn't support async/await");o=a}try{return new o(r.varName,"c","cb",h(e,r))}catch(n){throw n instanceof SyntaxError?t("Bad template syntax\n\n"+n.message+"\n"+Array(n.message.length+1).join("=")+"\n"+h(e,r)):n}}function $(e,t){var n;return t.cache&&t.name&&t.storage.templates.get(t.name)?t.storage.templates.get(t.name):(n="function"==typeof e?e:R(e,t),t.cache&&t.name&&t.storage.templates.define(t.name,n),n)}O.l.bind(O),e.compile=R,e.compileScope=x,e.compileScopeIntoFunction=y,e.compileToString=h,e.defaultConfig=O,e.filters=C,e.getConfig=j,e.helpers=E,e.nativeHelpers=T,e.parse=m,e.render=function(e,n,a,o){var i=j(a||{});if(!i.async)return $(e,i)(n,i);if(!o){if("function"==typeof r)return new r((function(t,r){try{t($(e,i)(n,i))}catch(e){r(e)}}));throw t("Please provide a callback function, this env doesn't support Promises")}try{$(e,i)(n,i,o)}catch(e){return o(e)}},e.templates=_,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{components:()=>H,default:()=>U,templates:()=>k});var e=n(641);const t=Object.assign(Object.assign({},e.defaultConfig),{tags:["{","}"],useWith:!0});e.filters.define("JSON",((e,t,n)=>{const r=t.constructor==String?"$key":"$index",a={$index:t};return a[n]=e,a[r]=t,JSON.stringify(a)}));const a=(e,t,n)=>{t.parentNode.insertBefore(e,t),t.parentNode.insertBefore(n,t.nextSibling)},o=document.createElement("textarea"),i=e=>{(requestAnimationFrame||setTimeout)(e,1e3/60)},s=e=>{Array.from(e.querySelectorAll("template")).forEach((e=>{e.parentNode.replaceChild(e.content,e),s(e.content)}))},c=e=>JSON.parse(JSON.stringify(e)),l=(n,r)=>{const o=n.getAttribute("tplid");if(!o){const o="xxxxxxxx".replace(/[xy]/g,(e=>{const t=8*Math.random()|0;return("x"==e?t:3&t|8).toString(8)}));return n.setAttribute("tplid",o),r[o]=function(n){const r=n.cloneNode(!0);s(r);const o=(e=>{const t=Array.from(e.querySelectorAll("[html-for],[html-if],[html-foreach]")).reverse();return t.length&&t.forEach((e=>{if(e.getAttribute("html-foreach")){const t=e.getAttribute("html-foreach").match(/(.*)\sin\s(.*)/),n=t[1],r=t[2];e.removeAttribute("html-foreach"),e.setAttribute("scope",`{${n} | JSON($key, '${n}')}`);const o=document.createTextNode(`{@foreach(${r}) => $key, ${n}}`),i=document.createTextNode("{/foreach}");a(o,e,i)}else if(e.getAttribute("html-for")){const t=e.getAttribute("html-for").match(/(.*)\sin\s(.*)/),n=t[1],r=t[2];e.removeAttribute("html-for"),e.setAttribute("scope",`{${n} | JSON($index, '${n}')}`);const o=document.createTextNode(`{@each(${r}) => ${n}, $index}`),i=document.createTextNode("{/each}");a(o,e,i)}else if(e.getAttribute("html-if")){const t=e.getAttribute("html-if");e.removeAttribute("html-if");const n=document.createTextNode(`{@if (${t}) }`),r=document.createTextNode("{/if}");a(n,e,r)}})),e})(r),i=d(o.outerHTML.replace(/html-(selected|checked|readonly|disabled|autoplay)=\"(.*)\"/g,"{@if ($2) }$1{/if}").replace(/html-/g,"")),c=(0,e.compile)(i,t);return e=>c(e,t)}(n),r[o]}return r[o]},u=(e,t,n)=>Array.from(e.querySelectorAll("*")).filter((e=>e.tagName.toLocaleLowerCase()in t)).reverse().map((e=>(l(e,n),e))),d=e=>(o.innerHTML=e,o.value);var f,p="undefined"==typeof document?void 0:document,m=!!p&&"content"in p.createElement("template"),h=!!p&&p.createRange&&"createContextualFragment"in p.createRange();function v(e,t){var n,r,a=e.nodeName,o=t.nodeName;return a===o||(n=a.charCodeAt(0),r=o.charCodeAt(0),n<=90&&r>=97?a===o.toUpperCase():r<=90&&n>=97&&o===a.toUpperCase())}function g(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var b={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();"OPTGROUP"===r&&(r=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==r||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}g(e,t,"selected")},INPUT:function(e,t){g(e,t,"checked"),g(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var a=r.nodeValue;if(a==n||!n&&a==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,r,a=-1,o=0,i=e.firstChild;i;)if("OPTGROUP"===(r=i.nodeName&&i.nodeName.toUpperCase()))i=(n=i).firstChild;else{if("OPTION"===r){if(i.hasAttribute("selected")){a=o;break}o++}!(i=i.nextSibling)&&n&&(i=n.nextSibling,n=null)}e.selectedIndex=a}}};function y(){}function x(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}const A=function(e,t,n){if(n||(n={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName||"BODY"===e.nodeName){var r=t;(t=p.createElement("html")).innerHTML=r}else a=(a=t).trim(),t=m?function(e){var t=p.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(a):h?function(e){return f||(f=p.createRange()).selectNode(p.body),f.createContextualFragment(e).childNodes[0]}(a):function(e){var t=p.createElement("body");return t.innerHTML=e,t.childNodes[0]}(a);var a,o=n.getNodeKey||x,i=n.onBeforeNodeAdded||y,s=n.onNodeAdded||y,c=n.onBeforeElUpdated||y,l=n.onElUpdated||y,u=n.onBeforeNodeDiscarded||y,d=n.onNodeDiscarded||y,g=n.onBeforeElChildrenUpdated||y,A=!0===n.childrenOnly,N=Object.create(null),S=[];function w(e){S.push(e)}function _(e,t){if(1===e.nodeType)for(var n=e.firstChild;n;){var r=void 0;t&&(r=o(n))?w(r):(d(n),n.firstChild&&_(n,t)),n=n.nextSibling}}function E(e,t,n){!1!==u(e)&&(t&&t.removeChild(e),d(e),_(e,n))}function T(e){s(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=o(t);if(r){var a=N[r];a&&v(t,a)?(t.parentNode.replaceChild(a,t),C(a,t)):T(t)}else T(t);t=n}}function C(e,t,n){var r=o(t);if(r&&delete N[r],!n){if(!1===c(e,t))return;if(function(e,t){var n,r,a,o,i=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var s=i.length-1;s>=0;s--)r=(n=i[s]).name,a=n.namespaceURI,o=n.value,a?(r=n.localName||r,e.getAttributeNS(a,r)!==o&&("xmlns"===n.prefix&&(r=n.name),e.setAttributeNS(a,r,o))):e.getAttribute(r)!==o&&e.setAttribute(r,o);for(var c=e.attributes,l=c.length-1;l>=0;l--)r=(n=c[l]).name,(a=n.namespaceURI)?(r=n.localName||r,t.hasAttributeNS(a,r)||e.removeAttributeNS(a,r)):t.hasAttribute(r)||e.removeAttribute(r)}}(e,t),l(e),!1===g(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var n,r,a,s,c,l=t.firstChild,u=e.firstChild;e:for(;l;){for(s=l.nextSibling,n=o(l);u;){if(a=u.nextSibling,l.isSameNode&&l.isSameNode(u)){l=s,u=a;continue e}r=o(u);var d=u.nodeType,f=void 0;if(d===l.nodeType&&(1===d?(n?n!==r&&((c=N[n])?a===c?f=!1:(e.insertBefore(c,u),r?w(r):E(u,e,!0),u=c):f=!1):r&&(f=!1),(f=!1!==f&&v(u,l))&&C(u,l)):3!==d&&8!=d||(f=!0,u.nodeValue!==l.nodeValue&&(u.nodeValue=l.nodeValue))),f){l=s,u=a;continue e}r?w(r):E(u,e,!0),u=a}if(n&&(c=N[n])&&v(c,l))e.appendChild(c),C(c,l);else{var m=i(l);!1!==m&&(m&&(l=m),l.actualize&&(l=l.actualize(e.ownerDocument||p)),e.appendChild(l),T(l))}l=s,u=a}!function(e,t,n){for(;t;){var r=t.nextSibling;(n=o(t))?w(n):E(t,e,!0),t=r}}(e,u,r);var h=b[e.nodeName];h&&h(e,t)}(e,t):b.TEXTAREA(e,t)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var n=t.firstChild;n;){var r=o(n);r&&(N[r]=n),e(n),n=n.nextSibling}}(e);var O,j,R=e,$=R.nodeType,I=t.nodeType;if(!A)if(1===$)1===I?v(e,t)||(d(e),R=function(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}(e,(O=t.nodeName,(j=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==j?p.createElementNS(j,O):p.createElement(O)))):R=t;else if(3===$||8===$){if(I===$)return R.nodeValue!==t.nodeValue&&(R.nodeValue=t.nodeValue),R;R=t}if(R===t)d(e);else{if(t.isSameNode&&t.isSameNode(R))return;if(C(R,t,A),S)for(var F=0,P=S.length;F<P;F++){var k=N[S[F]];k&&E(k,k.parentNode,!1)}}return!A&&R!==e&&e.parentNode&&(R.actualize&&(R=R.actualize(e.ownerDocument||p)),e.parentNode.replaceChild(R,e)),R},N="CustomEvent"in window&&"function"==typeof window.CustomEvent?(e,t)=>new CustomEvent(e,t):(e,t)=>{const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!0,!0,t),n},S=(e,t)=>function(n){const r=this,a=n.detail||{};e.__events[t].forEach((e=>{e.handler.apply(r,[n].concat(a.args))}))},w=(e,t)=>{e.__events[t]&&e.__events[t].listener&&(e.removeEventListener(t,e.__events[t].listener,"focus"==t||"blur"==t||"mouseenter"==t||"mouseleave"==t),delete e.__events[t])},_=(e,t,n)=>function(r){const a=this,o=r.detail||{};let i=r.target;for(;i&&(i.matches(t)&&(r.delegateTarget=i,n.apply(a,[r].concat(o.args))),i!==e);)i=i.parentNode},E=(e,t,n)=>{e.dispatchEvent(N(t,{bubbles:!0,detail:n}))},T={},C={},O=(e,t)=>{C[e]=Object.assign({},C[e],t),T[e]&&T[e].forEach((e=>e(t)))},j=(e,t)=>{T[e]=T[e]||[],T[e].push(t),e in C&&t(C[e])},R=e=>{T[e.name]=(T[e.name]||[]).filter((t=>t!=e.method)),T[e.name].length||(delete T[e.name],delete C[e.name])};const $=e=>({main:e=>e,unmount:e=>e,onupdate:e=>e,view:e.view?e.view:e=>e}),I=(e,t)=>({onNodeAdded:P(e,t),onElUpdated:P(e,t),onBeforeElChildrenUpdated:F,onBeforeElUpdated:F,getNodeKey:e=>!(1!==e.nodeType||!e.getAttribute("tplid"))&&(e.dataset.key||e.getAttribute("tplid"))}),F=e=>{if("static"in e.dataset)return!1},P=(e,t)=>n=>{if(1===n.nodeType&&n.getAttribute&&n.getAttribute("scope")){const r=JSON.parse(n.getAttribute("scope").replace(/\'/g,'"'));Array.from(n.querySelectorAll("[tplid]")).map((n=>{const a=Object.assign({},e.base.state.get(),r);t.onupdate(a),n.base.render(a)})),n.removeAttribute("scope")}},k={},H={},U={register(e,t,n={}){H[e]={name:e,module:t,dependencies:n}},start(){const e=document.body;s(e),u(e,H,k),L()}},L=()=>{Object.values(H).forEach((({name:e,module:t,dependencies:n})=>{const r=function(e,t,n,r){return class extends HTMLElement{constructor(){super();const{base:a,options:o}=function(e,{module:t,dependencies:n,templates:r,components:a}){const o=$(t);u(e,a,r);const s=r[e.getAttribute("tplid")],l={data:t.model?c(t.model):{}};let d=[];const f={template:s,elm:e,dependencies:n,publish:O,subscribe:j,unsubscribe:R,main(e){o.main=e},unmount(e){o.unmount=e},onupdate(e){o.onupdate=e},on(t,n,r){((e,t,n,r)=>{if(e.__events=e.__events||{},e.__events[t]=e.__events[t]||[],!e.__events[t].length){const n=S(e,t);e.addEventListener(t,n,"focus"==t||"blur"==t||"mouseenter"==t||"mouseleave"==t),e.__events[t].listener=n}n.call?e.__events[t].push({handler:n,callback:n}):e.__events[t].push({handler:_(e,n,r),callback:r})})(e,t,n,r)},off(t,n){((e,t,n)=>{if(n&&e.__events[t]&&e.__events[t].length){var r=e.__events[t];e.__events[t]=e.__events[t].filter((function(e){return e.callback!=n})),e.__events[t].listener=r.listener,e.__events[t].length||w(e,t)}else w(e,t)})(e,t,n)},trigger(t,n,r){n.constructor===String?E(e.querySelector(n),t,{args:r}):E(e,t,{args:n})},emit:(...t)=>{E(e,t.shift(),{args:t})},state:{set(e){if(e.constructor===Function){const t=c(l.data);e(t),f.render(t)}else f.render(e);return new Promise((e=>i((t=>i(e)))))},get:()=>c(l.data)},render(t=l.data){document.body.contains(e)&&(d.push(t),i((()=>{i((()=>{if(d.length){const t={};d.forEach((e=>Object.assign(t,e))),d=[],l.data=Object.assign(l.data,t);const n=c(l.data),r=f.template(o.view(n));A(e,r,I(e,o)),Array.from(e.querySelectorAll("[tplid]")).map((e=>(e.options.onupdate(n),e.base.render(n),e)))}}))})))}};return{base:f,options:o}}(this,{module:e,dependencies:t,templates:n,components:r});this.base=a,this.options=o,e.default(a)}connectedCallback(){this.base.render(),this.options.main().forEach((e=>e(this.base)))}disconnectedCallback(){this.options.unmount(this.base),delete this.options,delete this.base,delete this.__events}attributeChangedCallback(){}}}(t,n,k,H);customElements.define(e,r)}))}})(),r})()));
2
- //# sourceMappingURL=jails.js.map