@lushly-dev/fast-element 3.0.1-preview.1 → 3.0.1-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/command/command.api.json +40 -40
- package/dist/context/context.api.json +6 -6
- package/dist/declarative/declarative.api.json +33 -33
- package/dist/definition-schema/definition-schema.api.json +7 -7
- package/dist/di/di.api.json +31 -31
- package/dist/dts/declarative/debug.d.ts +2 -2
- package/dist/dts/declarative/utilities.d.ts +2 -2
- package/dist/dts/hydration/target-builder.d.ts +2 -2
- package/dist/dts/templating/hydration-view.d.ts +1 -1
- package/dist/dts/testing/fakes.d.ts +2 -1
- package/dist/dts/tsdoc-metadata.json +1 -1
- package/dist/esm/binding/two-way.js +1 -2
- package/dist/esm/command/behaviors/undo-behavior.js +2 -1
- package/dist/esm/command/registry.js +9 -6
- package/dist/esm/command/validation.js +5 -8
- package/dist/esm/components/element-controller.js +5 -4
- package/dist/esm/components/hydration-tracker.js +2 -1
- package/dist/esm/declarative/attribute-map.js +2 -1
- package/dist/esm/di/di.js +2 -1
- package/dist/esm/metadata.js +2 -8
- package/dist/esm/observation/notifier.js +2 -4
- package/dist/fast-element.api.json +97 -97
- package/dist/fast-element.debug.js +32 -46
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +32 -46
- package/dist/fast-element.min.js +2 -2
- package/dist/observation/arrays/arrays.api.json +6 -6
- package/dist/scoped/scoped.api.json +10 -10
- package/dist/trust/trust.api.json +4 -4
- package/package.json +10 -12
|
@@ -874,12 +874,10 @@ class PropertyChangeNotifier {
|
|
|
874
874
|
var _a, _b;
|
|
875
875
|
let subscribers;
|
|
876
876
|
if (propertyToWatch) {
|
|
877
|
-
subscribers =
|
|
878
|
-
(_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : (this.subscribers[propertyToWatch] = new SubscriberSet(this.subject));
|
|
877
|
+
subscribers = (_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : (this.subscribers[propertyToWatch] = new SubscriberSet(this.subject));
|
|
879
878
|
}
|
|
880
879
|
else {
|
|
881
|
-
subscribers =
|
|
882
|
-
(_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : (this.subjectSubscribers = new SubscriberSet(this.subject));
|
|
880
|
+
subscribers = (_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : (this.subjectSubscribers = new SubscriberSet(this.subject));
|
|
883
881
|
}
|
|
884
882
|
subscribers.subscribe(subscriber);
|
|
885
883
|
}
|
|
@@ -1449,8 +1447,7 @@ class TwoWayObserver {
|
|
|
1449
1447
|
bind(controller) {
|
|
1450
1448
|
var _a;
|
|
1451
1449
|
if (!this.changeEvent) {
|
|
1452
|
-
this.changeEvent =
|
|
1453
|
-
(_a = this.dataBinding.options.changeEvent) !== null && _a !== void 0 ? _a : twoWaySettings.determineChangeEvent(this.directive, this.target);
|
|
1450
|
+
this.changeEvent = (_a = this.dataBinding.options.changeEvent) !== null && _a !== void 0 ? _a : twoWaySettings.determineChangeEvent(this.directive, this.target);
|
|
1454
1451
|
}
|
|
1455
1452
|
if (this.isNotBound) {
|
|
1456
1453
|
this.target.addEventListener(this.changeEvent, this);
|
|
@@ -1739,40 +1736,6 @@ function attr(configOrTarget, prop) {
|
|
|
1739
1736
|
return decorator;
|
|
1740
1737
|
}
|
|
1741
1738
|
|
|
1742
|
-
/******************************************************************************
|
|
1743
|
-
Copyright (c) Microsoft Corporation.
|
|
1744
|
-
|
|
1745
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1746
|
-
purpose with or without fee is hereby granted.
|
|
1747
|
-
|
|
1748
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1749
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1750
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1751
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1752
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1753
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1754
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1755
|
-
***************************************************************************** */
|
|
1756
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
function __rest(s, e) {
|
|
1760
|
-
var t = {};
|
|
1761
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1762
|
-
t[p] = s[p];
|
|
1763
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1764
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1765
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1766
|
-
t[p[i]] = s[p[i]];
|
|
1767
|
-
}
|
|
1768
|
-
return t;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1772
|
-
var e = new Error(message);
|
|
1773
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
1739
|
let DefaultStyleStrategy;
|
|
1777
1740
|
function reduceStyles(styles) {
|
|
1778
1741
|
return styles.reduce((reduced, current) => {
|
|
@@ -1925,6 +1888,17 @@ function createStyleElementStrategy() {
|
|
|
1925
1888
|
*/
|
|
1926
1889
|
const TRUST_KEY = "__trust";
|
|
1927
1890
|
|
|
1891
|
+
var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
1892
|
+
var t = {};
|
|
1893
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1894
|
+
t[p] = s[p];
|
|
1895
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1896
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1897
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1898
|
+
t[p[i]] = s[p[i]];
|
|
1899
|
+
}
|
|
1900
|
+
return t;
|
|
1901
|
+
};
|
|
1928
1902
|
function isPlainObject(value) {
|
|
1929
1903
|
if (value === null || typeof value !== "object") {
|
|
1930
1904
|
return false;
|
|
@@ -1950,7 +1924,7 @@ function wrapDetailWithTrust(detail, signals) {
|
|
|
1950
1924
|
const warnings = Array.isArray(signals === null || signals === void 0 ? void 0 : signals.warnings) ? signals.warnings : undefined;
|
|
1951
1925
|
if (confidence === undefined && reasoning === undefined && warnings === undefined) {
|
|
1952
1926
|
if (isPlainObject(detail) && TRUST_KEY in detail) {
|
|
1953
|
-
const _a = detail, _b = TRUST_KEY; _a[_b]; const rest = __rest(_a, [_b + ""]);
|
|
1927
|
+
const _a = detail, _b = TRUST_KEY; _a[_b]; const rest = __rest$1(_a, [_b + ""]);
|
|
1954
1928
|
return rest;
|
|
1955
1929
|
}
|
|
1956
1930
|
return detail; // No-op when no trust signals
|
|
@@ -1967,7 +1941,7 @@ function wrapDetailWithTrust(detail, signals) {
|
|
|
1967
1941
|
if (warnings !== undefined)
|
|
1968
1942
|
trust.warnings = warnings.map(warning => (Object.assign({}, warning)));
|
|
1969
1943
|
if (isPlainObject(detail)) {
|
|
1970
|
-
const _c = detail, _d = TRUST_KEY; _c[_d]; const rest = __rest(_c, [_d + ""]);
|
|
1944
|
+
const _c = detail, _d = TRUST_KEY; _c[_d]; const rest = __rest$1(_c, [_d + ""]);
|
|
1971
1945
|
return Object.assign(Object.assign({}, rest), { [TRUST_KEY]: trust });
|
|
1972
1946
|
}
|
|
1973
1947
|
// Wrap everything that is not a plain object in an envelope
|
|
@@ -2288,6 +2262,17 @@ FASTElementDefinition.getByType = fastElementRegistry.getByType;
|
|
|
2288
2262
|
FASTElementDefinition.getForInstance = fastElementRegistry.getForInstance;
|
|
2289
2263
|
Observable.defineProperty(FASTElementDefinition.prototype, "template");
|
|
2290
2264
|
|
|
2265
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
2266
|
+
var t = {};
|
|
2267
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2268
|
+
t[p] = s[p];
|
|
2269
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2270
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2271
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2272
|
+
t[p[i]] = s[p[i]];
|
|
2273
|
+
}
|
|
2274
|
+
return t;
|
|
2275
|
+
};
|
|
2291
2276
|
const defaultEventOptions = {
|
|
2292
2277
|
bubbles: true,
|
|
2293
2278
|
composed: true,
|
|
@@ -2334,14 +2319,16 @@ class ElementController {
|
|
|
2334
2319
|
* The context the expression is evaluated against.
|
|
2335
2320
|
*/
|
|
2336
2321
|
get context() {
|
|
2337
|
-
var _a
|
|
2322
|
+
var _a;
|
|
2323
|
+
var _b;
|
|
2338
2324
|
return (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.context) !== null && _b !== void 0 ? _b : ExecutionContext.default;
|
|
2339
2325
|
}
|
|
2340
2326
|
/**
|
|
2341
2327
|
* Indicates whether the controller is bound.
|
|
2342
2328
|
*/
|
|
2343
2329
|
get isBound() {
|
|
2344
|
-
var _a
|
|
2330
|
+
var _a;
|
|
2331
|
+
var _b;
|
|
2345
2332
|
return (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.isBound) !== null && _b !== void 0 ? _b : false;
|
|
2346
2333
|
}
|
|
2347
2334
|
/**
|
|
@@ -2367,8 +2354,7 @@ class ElementController {
|
|
|
2367
2354
|
}
|
|
2368
2355
|
else if (definition.template) {
|
|
2369
2356
|
// 3. Default to the static definition.
|
|
2370
|
-
this._template =
|
|
2371
|
-
(_a = definition.template) !== null && _a !== void 0 ? _a : null;
|
|
2357
|
+
this._template = (_a = definition.template) !== null && _a !== void 0 ? _a : null;
|
|
2372
2358
|
}
|
|
2373
2359
|
}
|
|
2374
2360
|
return this._template;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var e;!function(e){e[e.needsArrayObservation=1101]="needsArrayObservation",e[e.onlySetDOMPolicyOnce=1201]="onlySetDOMPolicyOnce",e[e.bindingInnerHTMLRequiresTrustedTypes=1202]="bindingInnerHTMLRequiresTrustedTypes",e[e.twoWayBindingRequiresObservables=1203]="twoWayBindingRequiresObservables",e[e.hostBindingWithoutHost=1204]="hostBindingWithoutHost",e[e.unsupportedBindingBehavior=1205]="unsupportedBindingBehavior",e[e.directCallToHTMLTagNotAllowed=1206]="directCallToHTMLTagNotAllowed",e[e.onlySetTemplatePolicyOnce=1207]="onlySetTemplatePolicyOnce",e[e.cannotSetTemplatePolicyAfterCompilation=1208]="cannotSetTemplatePolicyAfterCompilation",e[e.blockedByDOMPolicy=1209]="blockedByDOMPolicy",e[e.invalidHydrationAttributeMarker=1210]="invalidHydrationAttributeMarker",e[e.duplicateRenderInstruction=1211]="duplicateRenderInstruction",e[e.missingElementDefinition=1401]="missingElementDefinition",e[e.noRegistrationForContext=1501]="noRegistrationForContext",e[e.noFactoryForResolver=1502]="noFactoryForResolver",e[e.invalidResolverStrategy=1503]="invalidResolverStrategy",e[e.cannotAutoregisterDependency=1504]="cannotAutoregisterDependency",e[e.cannotResolveKey=1505]="cannotResolveKey",e[e.cannotConstructNativeFunction=1506]="cannotConstructNativeFunction",e[e.cannotJITRegisterNonConstructor=1507]="cannotJITRegisterNonConstructor",e[e.cannotJITRegisterIntrinsic=1508]="cannotJITRegisterIntrinsic",e[e.cannotJITRegisterInterface=1509]="cannotJITRegisterInterface",e[e.invalidResolver=1510]="invalidResolver",e[e.invalidKey=1511]="invalidKey",e[e.noDefaultResolver=1512]="noDefaultResolver",e[e.cyclicDependency=1513]="cyclicDependency",e[e.connectUpdateRequiresController=1514]="connectUpdateRequiresController"}(e||(e={}));const t=e=>"function"==typeof e,n=e=>"string"==typeof e,i=()=>{},s=Object.create(null),r={warn(e,t){},error:(e,t)=>new Error(`Error ${e}`),addMessages(e){Object.assign(s,e)}};function o(){return s}const a=Object.freeze([]);function l(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function c(){const e=new WeakMap;return function(t){let n=e.get(t);if(void 0===n){let i=Reflect.getPrototypeOf(t);for(;void 0===n&&null!==i;)n=e.get(i),i=Reflect.getPrototypeOf(i);n=void 0===n?[]:n.slice(0),e.set(t,n)}return n}}function d(e){e.prototype.toJSON=i}const h={1101:"Must call ArrayObserver.enable() before observing arrays.",1201:"The DOM Policy can only be set once.",1202:"To bind innerHTML, you must use a TrustedTypesPolicy.",1203:"View=>Model update skipped. To use twoWay binding, the target property must be observable.",1204:"No host element is present. Cannot bind host with ${name}.",1205:"The requested binding behavior is not supported by the binding engine.",1206:"Calling html`` as a normal function invalidates the security guarantees provided by FAST.",1207:"The DOM Policy for an HTML template can only be set once.",1208:"The DOM Policy cannot be set after a template is compiled.",1209:"'${aspectName}' on '${tagName}' is blocked by the current DOMPolicy.",1210:"Invalid data-fe attribute value '${value}'. Expected a positive integer.",1211:"Replacing existing RenderInstruction for '${type}' with name '${name}'.",1401:"Missing FASTElement definition.",1501:"No registration for Context/Interface '${name}'.",1502:"Dependency injection resolver for '${key}' returned a null factory.",1503:"Invalid dependency injection resolver strategy specified '${strategy}'.",1504:"Unable to autoregister dependency.",1505:"Unable to resolve dependency injection key '${key}'.",1506:"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",1507:"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",1508:"Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",1509:"Attempted to jitRegister an interface '${value}'.",1510:"A valid resolver was not returned from the register method.",1511:"Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",1512:"'${key}' not registered. Did you forget to add @singleton()?",1513:"Cyclic dependency found '${name}'.",1514:"Injected properties that are updated on changes to DOM connectivity require the target object to be an instance of FASTElement.",1601:"Invalid attribute marker name: ${name}. Expected format is ${expectedFormat}.",1602:"Invalid compact attribute marker values in ${markerName}. Both index and count must be positive integers.",1604:"Invalid compact attribute marker name: ${name}. Expected format is ${expectedFormat}."},u=/(\$\{\w+?})/g,f=/\$\{(\w+?)}/g,p=Object.freeze({});function g(e,t){return e.split(u).map(e=>{var n;const i=e.replace(f,"$1");return String(null!==(n=t[i])&&void 0!==n?n:e)}).join("")}function b(){const e=o();Object.assign(e,h),Object.assign(r,{addMessages(t){Object.assign(e,t)},warn(t,n=p){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Warning";console.warn(g(s,n))},error(t,n=p){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Error";return new Error(g(s,n))}})}const v=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),m=e=>e,y=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:m}):{createHTML:m};let w=Object.freeze({createHTML:e=>y.createHTML(e),protect:(e,t,n,i)=>i});const C=w,S=Object.freeze({get policy(){return w},setPolicy(t){if(w!==C)throw r.error(e.onlySetDOMPolicyOnce);w=t},setAttribute(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)},setBooleanAttribute(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}}),O=/^[\u0000-\u0020\u007F]+|[\u0000-\u0020\u007F]+$/g,x=/[\u0000-\u0020\u007F]+/g,T=/^(?:javascript|vbscript|data):/;function B(e){return e.replace(O,"")}function N(e){try{return decodeURIComponent(e)}catch(t){return e}}function k(e){const t=B(e);return function(e){let t=B(e);for(let e=0;e<3;++e){const e=N(t);if(e===t)break;t=B(e)}return t=t.replace(x,"").toLowerCase(),T.test(t)}(t)?"":t}function A(e,t,i,s){return(e,t,i,...r)=>{n(i)&&(i=k(i)),s(e,t,i,...r)}}function M(t,n,i,s){throw r.error(e.blockedByDOMPolicy,{aspectName:i,tagName:null!=t?t:"text"})}const $={onabort:M,onauxclick:M,onbeforeinput:M,onbeforematch:M,onblur:M,oncancel:M,oncanplay:M,oncanplaythrough:M,onchange:M,onclick:M,onclose:M,oncontextlost:M,oncontextmenu:M,oncontextrestored:M,oncopy:M,oncuechange:M,oncut:M,ondblclick:M,ondrag:M,ondragend:M,ondragenter:M,ondragleave:M,ondragover:M,ondragstart:M,ondrop:M,ondurationchange:M,onemptied:M,onended:M,onerror:M,onfocus:M,onformdata:M,oninput:M,oninvalid:M,onkeydown:M,onkeypress:M,onkeyup:M,onload:M,onloadeddata:M,onloadedmetadata:M,onloadstart:M,onmousedown:M,onmouseenter:M,onmouseleave:M,onmousemove:M,onmouseout:M,onmouseover:M,onmouseup:M,onpaste:M,onpause:M,onplay:M,onplaying:M,onprogress:M,onratechange:M,onreset:M,onresize:M,onscroll:M,onsecuritypolicyviolation:M,onseeked:M,onseeking:M,onselect:M,onslotchange:M,onstalled:M,onsubmit:M,onsuspend:M,ontimeupdate:M,ontoggle:M,onvolumechange:M,onwaiting:M,onwebkitanimationend:M,onwebkitanimationiteration:M,onwebkitanimationstart:M,onwebkittransitionend:M,onwheel:M},j={elements:{a:{[v.attribute]:{href:A},[v.property]:{href:A}},area:{[v.attribute]:{href:A},[v.property]:{href:A}},button:{[v.attribute]:{formaction:A},[v.property]:{formAction:A}},embed:{[v.attribute]:{src:M},[v.property]:{src:M}},form:{[v.attribute]:{action:A},[v.property]:{action:A}},frame:{[v.attribute]:{src:A},[v.property]:{src:A}},iframe:{[v.attribute]:{src:A},[v.property]:{src:A,srcdoc:M}},input:{[v.attribute]:{formaction:A},[v.property]:{formAction:A}},link:{[v.attribute]:{href:M},[v.property]:{href:M}},object:{[v.attribute]:{codebase:M,data:M},[v.property]:{codeBase:M,data:M}},script:{[v.attribute]:{src:M,text:M},[v.property]:{src:M,text:M,innerText:M,textContent:M}},style:{[v.property]:{innerText:M,textContent:M}}},aspects:{[v.attribute]:Object.assign({},$),[v.property]:Object.assign({innerHTML:M},$),[v.event]:Object.assign({},$)}};function E(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=r;break;default:n[i]=s}}for(const t in e)t in n||(n[t]=e[t]);return Object.freeze(n)}function P(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=E(r,{});break;default:n[i]=E(s,r)}}for(const t in e)t in n||(n[t]=E(e[t],{}));return Object.freeze(n)}function R(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=P(r,{});break;default:n[i]=P(s,r)}}for(const t in e)t in n||(n[t]=P(e[t],{}));return Object.freeze(n)}function I(e,t,n,i,s){const r=e[n];if(r){const e=r[i];if(e)return e(t,n,i,s)}}const _=Object.freeze({create(e={}){var t,n;const i=null!==(t=e.trustedType)&&void 0!==t?t:function(){const e=e=>e;return globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:e}):{createHTML:e}}(),s=(r=null!==(n=e.guards)&&void 0!==n?n:{},o=j,Object.freeze({elements:r.elements?R(r.elements,o.elements):o.elements,aspects:r.aspects?P(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>i.createHTML(e),protect(e,t,n,i){var r;const o=(null!=e?e:"").toLowerCase(),a=s.elements[o];if(a){const s=I(a,e,t,n,i);if(s)return s}return null!==(r=I(s.aspects,e,t,n,i))&&void 0!==r?r:i}})}});class V{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}}class L extends V{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function D(e,t){return new L(e,t)}d(L);class H{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}notify(e){const t=this.spillover,n=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(n,e),void 0!==i&&i.handleChange(n,e)}else for(let i=0,s=t.length;i<s;++i)t[i].handleChange(n,e)}}class z{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,n;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(n=this.subjectSubscribers)||void 0===n||n.notify(e)}subscribe(e,t){var n,i;let s;s=t?null!==(n=this.subscribers[t])&&void 0!==n?n:this.subscribers[t]=new H(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new H(this.subject),s.subscribe(e)}unsubscribe(e,t){var n,i;t?null===(n=this.subscribers[t])||void 0===n||n.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const F=[],U=[],W=globalThis.requestAnimationFrame;let q=!0;function Q(){if(U.length)throw U.shift()}function J(e){try{e.call()}catch(e){if(!q)throw F.length=0,e;U.push(e),setTimeout(Q,0)}}function K(){let e=0;for(;e<F.length;)if(J(F[e]),e++,e>1024){for(let t=0,n=F.length-e;t<n;t++)F[t]=F[t+e];F.length-=e,e=0}F.length=0}function X(e){F.push(e),F.length<2&&(q?W(K):K())}const G=Object.freeze({enqueue:X,next:()=>new Promise(X),process:K,setMode:e=>q=e}),Y=Object.freeze({unknown:void 0,coupled:1}),Z=(()=>{const i=G.enqueue,s=/(:|&&|\|\||if|\?\.)/,o=new WeakMap;let a,l=t=>{throw r.error(e.needsArrayObservation)};function h(e){var t;let n=null!==(t=e.$fastController)&&void 0!==t?t:o.get(e);return void 0===n&&(Array.isArray(e)?n=l(e):o.set(e,n=new z(e))),n}const u=c();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==a&&a.watch(e,this.name),e[this.field]}setValue(e,n){const i=this.field,s=e[i];if(s!==n){e[i]=n;const r=e[this.callback];t(r)&&r.call(e,s,n),h(e).notify(this.name)}}}class p extends H{constructor(e,t,n=!1){super(e,t),this.expression=e,this.isVolatileBinding=n,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==Y.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const n=a;let i;a=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{a=n}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=!0,this.needsQueue=this.isAsync}}watch(e,t){const n=this.last,i=h(e),s=null===n?this.first:{};if(s.propertySource=e,s.propertyName=t,s.notifier=i,i.subscribe(this,t),null!==n){if(!this.needsRefresh){let t;a=void 0,t=n.propertySource[n.propertyName],a=this,e===t&&(this.needsRefresh=!0)}n.next=s}this.last=s}handleChange(){this.needsQueue?(this.needsQueue=!1,i(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return d(p),Object.freeze({setArrayObserverFactory(e){l=e},getNotifier:h,track(e,t){a&&a.watch(e,t)},trackVolatile(){a&&(a.needsRefresh=!0)},notify(e,t){h(e).notify(t)},defineProperty(e,t){n(t)&&(t=new f(t)),u(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:u,binding(e,t,n=this.isVolatileBinding(e)){return new p(e,t,n)},isVolatileBinding:e=>s.test(e.toString())})})();function ee(e,t){Z.defineProperty(e,t)}const te=(()=>{let e=null;return{get:()=>e,set(t){e=t}}})(),ne=Object.freeze({default:{index:0,length:0,get event(){return ne.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>te.get(),setEvent(e){te.set(e)}});class ie extends V{createObserver(e){return Z.binding(this.evaluate,e,this.isVolatile)}}function se(e,t,n=Z.isVolatileBinding(e)){return new ie(e,t,n)}function re(e,t){const n=new ie(e);return n.options=t,n}function oe(e){return t(e)?se(e):e instanceof V?e:D(()=>e)}const ae=Object.create(null),le=Object.freeze({subscribe(e,t){const n=ae[e];n?n instanceof Set?n.add(t):ae[e]=new Set([n,t]):ae[e]=t},unsubscribe(e,t){const n=ae[e];n&&n instanceof Set?n.delete(t):ae[e]=void 0},send(e){const t=ae[e];t&&(t instanceof Set?t.forEach(n=>n.handleChange(t,e)):t.handleChange(this,e))}});class ce{constructor(e,t){this.dataBinding=e,this.subscriber=t,this.isNotBound=!0}bind(e){return this.isNotBound&&(le.subscribe(this.getSignal(e),this),e.onUnbind(this),this.isNotBound=!1),this.dataBinding.evaluate(e.source,e.context)}unbind(e){this.isNotBound=!0,le.unsubscribe(this.getSignal(e),this)}handleChange(){this.subscriber.handleChange(this.dataBinding.evaluate,this)}getSignal(e){const t=this.dataBinding.options;return n(t)?t:t(e.source,e.context)}}d(ce);class de extends V{createObserver(e){return new ce(this,e)}}function he(e,t,n){const i=new de(e,n);return i.options=t,i}const ue={fromView:e=>e};let fe={determineChangeEvent:()=>"change"};const pe=Object.freeze({configure(e){fe=e}});class ge{constructor(e,t,n){this.directive=e,this.subscriber=t,this.dataBinding=n,this.isNotBound=!0,this.notifier=Z.binding(n.evaluate,this,n.isVolatile)}bind(e){var t;return this.changeEvent||(this.changeEvent=null!==(t=this.dataBinding.options.changeEvent)&&void 0!==t?t:fe.determineChangeEvent(this.directive,this.target)),this.isNotBound&&(this.target.addEventListener(this.changeEvent,this),e.onUnbind(this),this.isNotBound=!1),this.notifier.bind(e)}unbind(e){this.isNotBound=!0,this.target.removeEventListener(this.changeEvent,this)}handleChange(e,t){this.subscriber.handleChange(this.dataBinding.evaluate,this)}handleEvent(t){const n=this.directive,i=t.currentTarget,s=this.notifier.last;if(!s)return void r.warn(e.twoWayBindingRequiresObservables);let o;switch(n.aspectType){case 1:o=i.getAttribute(n.targetAspect);break;case 2:o=i.hasAttribute(n.targetAspect);break;case 4:o=i.innerText;break;default:o=i[n.targetAspect]}s.propertySource[s.propertyName]=this.dataBinding.options.fromView(o)}}d(ge);class be extends V{createObserver(e,t){return new ge(t,e,this)}}function ve(e,t,i,s=Z.isVolatileBinding(e)){n(t)&&(t={changeEvent:t}),t?t.fromView||(t.fromView=ue.fromView):t=ue;const r=new be(e,i,s);return r.options=t,r}const me="boolean",ye="reflect",we=Object.freeze({locate:c()}),Ce={toView:e=>e?"":null,fromView:e=>!!e},Se={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:Ce.fromView(e)};function Oe(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const xe={toView(e){const t=Oe(e);return t?t.toString():t},fromView:Oe};class Te{constructor(e,t,n=t.toLowerCase(),i=ye,s){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=n,this.mode=i,this.converter=s,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,i===me&&void 0===s&&(this.converter=Ce)}setValue(e,t){const n=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),n!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](n,t),e.$fastController.notify(this.name))}getValue(e){return Z.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.mode===me?this.setValue(e,null!==t):this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,n=this.guards;n.has(e)||"fromView"===t||G.enqueue(()=>{n.add(e);const i=e[this.fieldName];switch(t){case ye:{const t=this.converter;S.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break}case me:S.setBooleanAttribute(e,this.attribute,i)}n.delete(e)})}static collect(e,...t){const i=[];t.push(we.locate(e));for(let s=0,r=t.length;s<r;++s){const r=t[s];if(void 0!==r)for(let t=0,s=r.length;t<s;++t){const s=r[t];n(s)?i.push(new Te(e,s)):i.push(new Te(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function Be(e,t){let n;function i(e,t){arguments.length>1&&(n.property=t),we.locate(e.constructor).push(n)}return arguments.length>1?(n={},void i(e,t)):(n=void 0===e?{}:e,i)}function Ne(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}let ke;function Ae(e){return e.reduce((e,t)=>(t instanceof Me?e.push(...Ae(t.styles)):e.push(t),e),[])}"function"==typeof SuppressedError&&SuppressedError;class Me{get strategy(){return null===this._strategy&&(ke||Me.setDefaultStrategy(Me.supportsAdoptedStyleSheets?function(){const e=new Map;return class{constructor(t){this.sheets=t.map(t=>{if(t instanceof CSSStyleSheet)return t;let n=e.get(t);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(t),e.set(t,n)),n})}addStylesTo(e){const t=e;t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=e;t.adoptedStyleSheets=t.adoptedStyleSheets.filter(e=>-1===this.sheets.indexOf(e))}}}():class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++$e}addStylesTo(e){const t=e===document?document.body:e;for(let e=0;e<this.styles.length;e++){const n=document.createElement("style");n.innerHTML=this.styles[e],n.className=this.styleClass,t.append(n)}}removeStylesFrom(e){const t=e===document?document.body:e,n=t.querySelectorAll(`.${this.styleClass}`);for(let e=0,i=n.length;e<i;++e)t.removeChild(n[e])}}),this.withStrategy(ke)),this._strategy}constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withStrategy(e){return this._strategy=new e(Ae(this.styles)),this}static setDefaultStrategy(e){ke=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new Me(e):e instanceof Me?e:new Me([e])}}Me.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;let $e=0;const je="__trust";function Ee(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}const Pe={},Re=new WeakMap,Ie=l(),_e=Object.freeze({register(e){if(!Ie.register(e))return!1;const t=Ve(e.registry);return Object.prototype.hasOwnProperty.call(t,e.name)||Z.defineProperty(t,e.name),t[e.name]=e.type,!0},getByType:Ie.getByType,getForInstance:Ie.getForInstance,whenRegistered:function(e,t=customElements){const n=Ve(t);Object.prototype.hasOwnProperty.call(n,e)||Z.defineProperty(n,e);const i=Le(n[e]);if(void 0!==i)return Promise.resolve(i);return new Promise(t=>{const i=Z.getNotifier(n),s={handleChange:()=>{const r=Le(n[e]);void 0!==r&&(i.unsubscribe(s,e),t(r))}};i.subscribe(s,e)})}});function Ve(e=customElements){if(e===customElements)return Pe;let t=Re.get(e);return t||(t={},Re.set(e,t)),t}function Le(e){return void 0===e?void 0:_e.getByType(e)}const De={mode:"open"},He={},ze=new Set;const Fe=new WeakMap,Ue=new WeakMap,We=new WeakMap,qe=new WeakMap,Qe=new Set,Je=new WeakMap;function Ke(e,t){if(Ue.delete(e),void 0===e.template&&void 0!==t&&(e.template=t),void 0!==e.template)return We.delete(e),Fe.delete(e),e.template}function Xe(e,t=e.registry,n){if(0===Qe.size&&!(null==n?void 0:n.length))return;const i=e;let s=qe.get(i);if(!(null==s?void 0:s.has(t))){void 0===s&&(s=new WeakSet,qe.set(i,s)),s.add(t);for(const n of Qe)n(e,t);for(const i of null!=n?n:[])Qe.has(i)||i(e,t)}}function Ge(e){var t;return null!==(t=Je.get(e))&&void 0!==t?t:null}function Ye(e){if(void 0!==e.template)return We.delete(e),e.template;const t=Ue.get(e);if(t)return t;const n=Fe.get(e);if(!n)return;let i;We.delete(e);try{i=n(e)}catch(t){throw We.set(e,t),t}if("function"==typeof(null==(s=i)?void 0:s.then)){const t=Promise.resolve(i).then(t=>Ke(e,t)).catch(t=>{throw Ue.delete(e),We.set(e,t),t});return Ue.set(e,t),t}var s;return Ke(e,i)}class Ze{get isDefined(){return this.platformDefined}constructor(e,i=e.definition){var s,r;this.platformDefined=!1,n(i)&&(i={name:i}),this.type=e,this.name=i.name,this.registry=null!==(s=i.registry)&&void 0!==s?s:customElements,r=i.template,t(r)?Fe.set(this,i.template):this.template=i.template;const o=e.prototype,a=Te.collect(e,i.attributes),l=new Array(a.length),c={},d={};for(let e=0,t=a.length;e<t;++e){const t=a[e];l[e]=t.attribute,c[t.name]=t,d[t.attribute]=t,Z.defineProperty(o,t)}Reflect.defineProperty(e,"observedAttributes",{value:l,enumerable:!0}),this.attributes=a,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=function(e){if(null===e)return;const t=Object.assign(Object.assign({},De),e);return void 0===t.customElementRegistry&&void 0!==t.registry&&(t.customElementRegistry=t.registry),void 0===t.registry&&void 0!==t.customElementRegistry&&(t.registry=t.customElementRegistry),t}(i.shadowOptions),this.elementOptions=void 0===i.elementOptions?He:Object.assign(Object.assign({},He),i.elementOptions),this.styles=Me.normalize(i.styles),this.schema=i.schema,_e.register(this)}define(e=this.registry,t){const n=this.type;if(!e.get(this.name)){if(Xe(this,e,t),void 0===this.template&&Fe.has(this))return Promise.resolve().then(()=>Ye(this)).then(t=>{void 0===t||e.get(this.name)||(this.platformDefined=!0,e.define(this.name,n,this.elementOptions))}).catch(e=>{!function(e,t){const n=e;void 0!==t?We.set(n,t):We.delete(n)}(this,e),Z.notify(this,"template")}),this;this.platformDefined=!0,e.define(this.name,n,this.elementOptions)}return this}static compose(e,t){const n=ze.has(e)||_e.getByType(e)?new Ze(class extends e{},t):new Ze(e,t);return Promise.resolve(n)}static registerBaseType(e){ze.add(e)}}Ze.getByType=_e.getByType,Ze.getForInstance=_e.getForInstance,Z.defineProperty(Ze.prototype,"template");const et={bubbles:!0,composed:!0,cancelable:!0},tt="isConnected",nt=new WeakMap,it=Symbol("fast-late-attribute-observer"),st=new Set;function rt(e){var t,n;return null!==(n=null!==(t=e.shadowRoot)&&void 0!==t?t:nt.get(e))&&void 0!==n?n:null}let ot;var at;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(at||(at={}));class lt{get isConnected(){return Z.track(this,tt),this.stage===at.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:ne.default}get isBound(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.isBound)&&void 0!==t&&t}get sourceLifetime(){var e;return null===(e=this.view)||void 0===e?void 0:e.sourceLifetime}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(void 0===this._shadowRootOptions&&void 0!==e){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),"closed"===e.mode&&nt.set(this.source,t))}}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}constructor(e,t){this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this.isPrerendered=new Promise(e=>{this._resolvePrerendered=e}),this.isHydrated=new Promise(e=>{this._resolveHydrated=e}),this._template=null,this.stage=at.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this._notifier=new z(e),this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const n=Reflect.getPrototypeOf(e),i=null===n?[]:Z.getAccessors(n);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let n=0,s=i.length;n<s;++n){const s=i[n].name,r=e[s];void 0!==r&&(delete e[s],t[s]=r)}0===Object.keys(t).length&&(this.boundObservables=null)}this.captureBoundObservables();for(const t of st){const n=t(e);void 0!==n&&this.addBehavior(n)}}get subject(){return this._notifier.subject}notify(e){this._notifier.notify(e)}subscribe(e,t){this._notifier.subscribe(e,t)}unsubscribe(e,t){this._notifier.unsubscribe(e,t)}onUnbind(e){var t;null===(t=this.view)||void 0===t||t.onUnbind(e)}addBehavior(e){var t,n;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,s=null!==(n=i.get(e))&&void 0!==n?n:0;0===s?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||this.stage!==at.connected&&this.stage!==at.connecting||e.connectedCallback(this)):i.set(e,s+1)}removeBehavior(e,t=!1){const n=this.behaviors;if(null===n)return;const i=n.get(e);void 0!==i&&(1===i||t?(n.delete(e),e.disconnectedCallback&&this.stage!==at.disconnected&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):n.set(e,i-1))}addStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=rt(n))&&void 0!==t?t:this.source).append(e)}else e.isAttachedTo(n)||e.addStylesTo(n)}removeStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=rt(n))&&void 0!==t?t:n).removeChild(e)}else e.isAttachedTo(n)&&e.removeStylesFrom(n)}connect(){this.stage===at.disconnected&&(this.stage=at.connecting,this.captureBoundObservables(),this.syncLateAttributes(),this.observeLateAttributes(),this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=at.connected,Z.notify(this,tt))}bindObservables(){if(null!==this.boundObservables){const e=this.source,t=this.boundObservables,n=Object.keys(t);for(let i=0,s=n.length;i<s;++i){const s=n[i];e[s]=t[s]}this.boundObservables=null}}captureBoundObservables(){const e=this.source,t=Object.getOwnPropertyNames(e),n=t=>{let n=Reflect.getPrototypeOf(e);for(;null!==n;){const e=Reflect.getOwnPropertyDescriptor(n,t);if((null==e?void 0:e.get)||(null==e?void 0:e.set))return!0;n=Reflect.getPrototypeOf(n)}return!1};let i=this.boundObservables;for(let s=0,r=t.length;s<r;++s){const r=t[s];if(!n(r))continue;const o=e[r];void 0!==o?(delete e[r],(null!=i?i:i=this.boundObservables=Object.create(null))[r]=o):delete e[r]}}syncLateAttributes(){const e=Ge(this.definition);if(null!==e)for(const t of Object.keys(e))this.source.hasAttribute(t)&&this.onAttributeChangedCallback(t,null,this.source.getAttribute(t))}observeLateAttributes(){const e=Ge(this.definition);if(null===e)return;const t=this.source;void 0===t[it]&&(t[it]=new MutationObserver(e=>{const n=t.$fastController,i=Ge(n.definition);if(null!==i)for(let s=0,r=e.length;s<r;++s){const r=e[s].attributeName;null!==r&&void 0!==i[r]&&n.onAttributeChangedCallback(r,null,t.getAttribute(r))}}),t[it].observe(t,{attributes:!0,attributeFilter:Object.keys(e)}))}connectBehaviors(){if(!1===this.behaviorsConnected){const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(!0===this.behaviorsConnected){const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===at.connected&&(this.stage=at.disconnecting,Z.notify(this,tt),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=at.disconnected)}onAttributeChangedCallback(e,t,n){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,n)}emit(e,t,n){if(this.stage===at.connected){const i=null!=n?n:{},{confidence:s,reasoning:r,warnings:o}=i,a=Ne(i,["confidence","reasoning","warnings"]),l=function(e,t){const{confidence:n,reasoning:i}=null!=t?t:{},s=Array.isArray(null==t?void 0:t.warnings)?t.warnings:void 0;if(void 0===n&&void 0===i&&void 0===s){if(Ee(e)&&je in e){const t=e,n=je;return t[n],Ne(t,[n+""])}return e}if(void 0!==n&&(!Number.isFinite(n)||n<0||n>1))throw new RangeError("Trust confidence must be a finite number from 0 to 1.");const r={};if(void 0!==n&&(r.confidence=n),void 0!==i&&(r.reasoning=i),void 0!==s&&(r.warnings=s.map(e=>Object.assign({},e))),Ee(e)){const t=e,n=je;t[n];const i=Ne(t,[n+""]);return Object.assign(Object.assign({},i),{[je]:r})}return{value:e,[je]:r}}(t,{confidence:s,reasoning:r,warnings:o});return this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign(Object.assign({},et),a),{detail:l})))}return!1}renderTemplate(e){var t;const n=this.source,i=null!==(t=rt(n))&&void 0!==t?t:n;if(null!==this.view)this.view.dispose(),this.view=null;else if((!this.needsInitialization||this.hasExistingShadowRoot)&&(!this.hasExistingShadowRoot||!this.needsInitialization))for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e);if(e){const t=this.hasExistingShadowRoot&&this.needsInitialization;let s=!1;t&<.hydrationHook&&(s=lt.hydrationHook(this,e,n,i)),s||this.renderClientSide(e,n,i),this._resolvePrerendered(t),this._resolveHydrated(s)}else this.needsInitialization&&(this._resolvePrerendered(!1),this._resolveHydrated(!1))}renderClientSide(e,t,n){var i;if(this.hasExistingShadowRoot){for(let e=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e);this.hasExistingShadowRoot=!1}const s=void 0!==(null===(i=this._shadowRootOptions)||void 0===i?void 0:i.customElementRegistry)?n:void 0;this.view=e.render(t,n,t,s),this.view.sourceLifetime=Y.coupled}static forCustomElement(t,n=!1){const i=t.$fastController;if(void 0!==i&&!n)return i;const s=Ze.getForInstance(t);if(void 0===s)throw r.error(e.missingElementDefinition);return Z.getNotifier(s).subscribe({handleChange:()=>{lt.forCustomElement(t,!0),t.$fastController.connect()}},"template"),Z.getNotifier(s).subscribe({handleChange:()=>{lt.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new ot(t,s)}static setStrategy(e){ot=e}static installHydrationHook(e){lt.hydrationHook=e}}function ct(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=rt(e))&&void 0!==t?t:e.getRootNode()}lt.hydrationHook=null,d(lt),lt.setStrategy(lt);class dt{constructor(e){const t=dt.styleSheetCache;this.sheets=e.map(e=>{if(e instanceof CSSStyleSheet)return e;let n=t.get(e);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(e),t.set(e,n)),n})}addStylesTo(e){pt(ct(e),this.sheets)}removeStylesFrom(e){gt(ct(e),this.sheets)}}dt.styleSheetCache=new Map;let ht=0;function ut(e){return e===document?document.body:e}class ft{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ht}addStylesTo(e){e=ut(ct(e));const t=this.styles,n=this.styleClass;for(let i=0;i<t.length;i++){const s=document.createElement("style");s.innerHTML=t[i],s.className=n,e.append(s)}}removeStylesFrom(e){const t=(e=ut(ct(e))).querySelectorAll(`.${this.styleClass}`);for(let n=0,i=t.length;n<i;++n)e.removeChild(t[n])}}let pt=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},gt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(Me.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),pt=(e,t)=>{e.adoptedStyleSheets.push(...t)},gt=(e,t)=>{for(const n of t){const t=e.adoptedStyleSheets.indexOf(n);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}Me.setDefaultStrategy(dt)}else Me.setDefaultStrategy(ft);function bt(e){const t=class extends e{constructor(){super(),lt.forCustomElement(this)}$emit(e,t,n){return this.$fastController.emit(e,t,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,n){this.$fastController.onAttributeChangedCallback(e,t,n)}};return Ze.registerBaseType(t),t}function vt(e,n,i){Array.isArray(n)&&(i=n,n=void 0);return(t(e)?Ze.compose(e,n):Ze.compose(this,e)).then(e=>{Xe(e,e.registry,i);const t=Ye(e);return"function"==typeof(null==(n=t)?void 0:n.then)?t.then(()=>e.define().type):e.define().type;var n})}const mt=Object.assign(bt(HTMLElement),{from:function(e){return bt(e)},define:vt});function yt(e){return function(t){vt(t,e)}}class wt{constructor(e,t,n){this.index=e,this.removed=t,this.addedCount=n}adjustTo(e){let t=this.index;const n=e.length;return t>n?t=n-this.addedCount:t<0&&(t=n+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}class Ct{constructor(e){this.sorted=e}}const St=Object.freeze({reset:1,splice:2,optimized:3}),Ot=new wt(0,a,0);Ot.reset=!0;const xt=[Ot];var Tt;function Bt(e,t,n,i){return t<n||i<e?-1:t===n||i===e?0:e<n?t<i?t-n:i-n:i<t?i-e:t-e}function Nt(e,t,n,i,s,r){let o=0,l=0;const c=Math.min(n-t,r-s);if(0===t&&0===s&&(o=function(e,t,n){for(let i=0;i<n;++i)if(e[i]!==t[i])return i;return n}(e,i,c)),n===e.length&&r===i.length&&(l=function(e,t,n){let i=e.length,s=t.length,r=0;for(;r<n&&e[--i]===t[--s];)r++;return r}(e,i,c-o)),s+=o,r-=l,(n-=l)-(t+=o)===0&&r-s===0)return a;if(t===n){const e=new wt(t,[],0);for(;s<r;)e.removed.push(i[s++]);return[e]}if(s===r)return[new wt(t,[],n-t)];const d=function(e){let t=e.length-1,n=e[0].length-1,i=e[t][n];const s=[];for(;t>0||n>0;){if(0===t){s.push(Tt.add),n--;continue}if(0===n){s.push(Tt.delete),t--;continue}const r=e[t-1][n-1],o=e[t-1][n],a=e[t][n-1];let l;l=o<a?o<r?o:r:a<r?a:r,l===r?(r===i?s.push(Tt.leave):(s.push(Tt.update),i=r),t--,n--):l===o?(s.push(Tt.delete),t--,i=o):(s.push(Tt.add),n--,i=a)}return s.reverse()}(function(e,t,n,i,s,r){const o=r-s+1,a=n-t+1,l=new Array(o);let c,d;for(let e=0;e<o;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let n=1;n<o;++n)for(let r=1;r<a;++r)e[t+r-1]===i[s+n-1]?l[n][r]=l[n-1][r-1]:(c=l[n-1][r]+1,d=l[n][r-1]+1,l[n][r]=c<d?c:d);return l}(e,t,n,i,s,r)),h=[];let u,f=t,p=s;for(let e=0;e<d.length;++e)switch(d[e]){case Tt.leave:void 0!==u&&(h.push(u),u=void 0),f++,p++;break;case Tt.update:void 0===u&&(u=new wt(f,[],0)),u.addedCount++,f++,u.removed.push(i[p]),p++;break;case Tt.add:void 0===u&&(u=new wt(f,[],0)),u.addedCount++,f++;break;case Tt.delete:void 0===u&&(u=new wt(f,[],0)),u.removed.push(i[p]),p++}return void 0!==u&&h.push(u),h}function kt(e,t){let n=!1,i=0;for(let s=0;s<t.length;s++){const r=t[s];if(r.index+=i,n)continue;const o=Bt(e.index,e.index+e.removed.length,r.index,r.index+r.addedCount);if(o>=0){t.splice(s,1),s--,i-=r.addedCount-r.removed.length,e.addedCount+=r.addedCount-o;const a=e.removed.length+r.removed.length-o;if(e.addedCount||a){let t=r.removed;if(e.index<r.index){const n=e.removed.slice(0,r.index-e.index);n.push(...t),t=n}if(e.index+e.removed.length>r.index+r.addedCount){const n=e.removed.slice(r.index+r.addedCount-e.index);t.push(...n)}e.removed=t,r.index<e.index&&(e.index=r.index)}else n=!0}else if(e.index<r.index){n=!0,t.splice(s,0,e),s++;const o=e.addedCount-e.removed.length;r.index+=o,i+=o}}n||t.push(e)}!function(e){e[e.leave=0]="leave",e[e.update=1]="update",e[e.add=2]="add",e[e.delete=3]="delete"}(Tt||(Tt={}));let At=Object.freeze({support:St.optimized,normalize:(e,t,n)=>void 0===e?void 0===n?a:function(e,t){let n=[];const i=[];for(let e=0,n=t.length;e<n;e++)kt(t[e],i);for(let t=0,s=i.length;t<s;++t){const s=i[t];1!==s.addedCount||1!==s.removed.length?n=n.concat(Nt(e,s.index,s.index+s.addedCount,s.removed,0,s.removed.length)):s.removed[0]!==e[s.index]&&n.push(s)}return n}(t,n):xt,pop(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new wt(e.length,[r],0)),r},push(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new wt(e.length-i.length,[],i.length).adjustTo(e)),s},reverse(e,t,n,i){const s=n.apply(e,i);e.sorted++;const r=[];for(let t=e.length-1;t>=0;t--)r.push(t);return t.addSort(new Ct(r)),s},shift(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new wt(0,[r],0)),r},sort(e,t,n,i){const s=new Map;for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t])||[];s.set(e[t],[...n,t])}const r=n.apply(e,i);e.sorted++;const o=[];for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t]);o.push(n[0]),s.set(e[t],n.splice(1))}return t.addSort(new Ct(o)),r},splice(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new wt(+i[0],s,i.length>2?i.length-2:0).adjustTo(e)),s},unshift(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new wt(0,[],i.length).adjustTo(e)),s}});const Mt=Object.freeze({reset:xt,setDefaultStrategy(e){At=e}});function $t(e,t,n,i=!0){Reflect.defineProperty(e,t,{value:n,enumerable:!1,writable:i})}class jt extends H{get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,Z.notify(e,"length"))}},this.subscribe(e)}return e}get sortObserver(){let e=this._sortObserver;if(void 0===e){const t=this.subject;this._sortObserver=e={sorted:t.sorted,handleChange(){this.sorted!==t.sorted&&(this.sorted=t.sorted,Z.notify(e,"sorted"))}},this.subscribe(e)}return e}constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,$t(e,"$fastController",this)}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){void 0===this.sorts?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,n=this.sorts,i=this.oldCollection;void 0===t&&void 0===i&&void 0===n||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,void 0!==n?this.notify(n):this.notify((null!==(e=this._strategy)&&void 0!==e?e:At).normalize(i,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,G.enqueue(this))}}let Et=!1;const Pt=Object.freeze({sorted:0,enable(){if(Et)return;Et=!0,Z.setArrayObserverFactory(e=>new jt(e));const e=Array.prototype;e.$fastPatch||($t(e,"$fastPatch",1),$t(e,"sorted",0),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach(t=>{e[t.name]=function(...e){var n;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(n=i.strategy)&&void 0!==n?n:At)[t.name](this,i,t,e)}}))}});function Rt(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Pt.enable(),t=Z.getNotifier(e)),Z.track(t.lengthObserver,"length"),e.length}function It(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Pt.enable(),t=Z.getNotifier(e)),Z.track(t.sortObserver,"sorted"),e.sorted}function _t(e,t,n){return Object.assign({},n,{get(){return Z.trackVolatile(),n.get.apply(this)}})}const Vt="$fast_context",Lt="$fast_parent_contexts",Dt="$defs",Ht="$ref",zt=new Map;class Ft{constructor(e){this.customElementName=e,this.schemaMap=new Map,zt.set(e,this.schemaMap)}addPath(e){var t,n,i;const s=this.getSplitPath(e.pathConfig.path);let r=this.schemaMap.get(e.rootPropertyName),o=null;switch(r||(this.addNewSchema(e.rootPropertyName),r=this.schemaMap.get(e.rootPropertyName)),e.childrenMap&&(o=this.getSchemaId(e.childrenMap.customElementName,e.childrenMap.attributeName),1===s.length&&(r.anyOf?r.anyOf.push({[Ht]:o}):r.anyOf=[{[Ht]:o}])),e.pathConfig.type){case"default":case"access":s.length>1&&(null===e.pathConfig.currentContext?this.addPropertiesToAnObject(r,s.slice(1),e.pathConfig.currentContext,o):((null===(t=r[Dt])||void 0===t?void 0:t[s[0]])||(r[Dt]=Object.assign(Object.assign({},r[Dt]),{[s[0]]:{}})),this.addPropertiesToAContext(r[Dt][s[0]],s.slice(1),e.pathConfig.currentContext,o)));break;case"repeat":if(this.addContext(r,s[s.length-1],e.pathConfig.currentContext,e.pathConfig.parentContext),s.length>2){let t=r;const i=!!e.pathConfig.parentContext;i&&(t=this.addPropertiesToAnObject(null===(n=r[Dt])||void 0===n?void 0:n[e.pathConfig.parentContext],s.slice(1,-1),e.pathConfig.parentContext,o)),this.addPropertiesToAnObject(t,i?s.slice(2):s.slice(1),e.pathConfig.currentContext,o,"array")}else if(s.length>1){let t;e.pathConfig.parentContext&&(t=null===(i=null==r?void 0:r[Dt])||void 0===i?void 0:i[e.pathConfig.parentContext]),this.addPropertiesToAnObject(null!=t?t:r,s.slice(1),e.pathConfig.currentContext,o,"array")}else r.type="array",r[Ht]=this.getDefsPath(e.pathConfig.currentContext)}}getSchema(e){var t;return null!==(t=this.schemaMap.get(e))&&void 0!==t?t:null}getRootProperties(){return this.schemaMap.keys()}getSplitPath(e){return e.split(".")}getDefsPath(e){return`#/${Dt}/${e}`}getSchemaId(e,t){return`https://fast.design/schemas/${e}/${t}.json`}addNewSchema(e){this.schemaMap.set(e,{$schema:"https://json-schema.org/draft/2019-09/schema",$id:this.getSchemaId(this.customElementName,e),[Dt]:{}})}addPropertiesToAContext(e,t,n,i){e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i):i&&(e.properties[t[0]].anyOf?e.properties[t[0]].anyOf.push({[Ht]:i}):e.properties[t[0]].anyOf=[{[Ht]:i}])}addPropertiesToAnObject(e,t,n,i,s="object"){return e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),"object"===s&&t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):"array"===s?t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):this.addArrayToAnObject(e.properties[t[0]],n):(e.properties[t[0]].anyOf&&i?e.properties[t[0]].anyOf.push({[Ht]:i}):i&&(e.properties[t[0]].anyOf=[{[Ht]:i}]),e.properties[t[0]])}addArrayToAnObject(e,t){return e.type="array",e.items={[Ht]:this.getDefsPath(t)},e.items}addContext(e,t,n,i){e[Dt][n]||(e[Dt][n]={[Vt]:t,[Lt]:this.getParentContexts(e,i)})}getParentContexts(e,t,n=[]){var i;if(null===t)return[null,...n];const s=null===(i=null==e?void 0:e[Dt])||void 0===i?void 0:i[t][Lt];return this.getParentContexts(e,s[s.length-1],[t,...n])}}function Ut(e,t,n,i,s){if(function(e,t){return null!=e&&"object"==typeof e&&!t.has(e)}(e,s))if(s.add(e),Array.isArray(e)){n.visitArray(e,i);for(const r of e)Ut(r,t,n,i,s)}else{n.visitObject(e,i);for(const r in e){const o=e[r];n.visitProperty(e,r,o,i),t&&Ut(o,t,n,i,s)}}}const Wt=new WeakSet,qt={visitObject:i,visitArray:i,visitProperty(e,t,n){Reflect.defineProperty(e,t,{enumerable:!0,get:()=>(Z.track(e,t),n),set(i){n!==i&&(n=i,Z.notify(e,t))}})}};function Qt(e,t=!1){return Ut(e,t,qt,void 0,Wt),e}const Jt={deep:!1};function Kt(e,t=Jt){var i;n(t)&&(t={deep:!1,name:t});const s=Qt({value:e},t.deep),r=()=>s.value;return Object.defineProperty(r,"current",{get:()=>s.value,set:e=>s.value=e}),Object.defineProperty(r,"name",{value:null!==(i=t.name)&&void 0!==i?i:"SharedState"}),r.set=e=>s.value=e,r.asReadonly=()=>{const e=()=>s.value;return Object.defineProperty(e,"current",{get:()=>s.value}),Object.defineProperty(e,"name",{value:`${r.name} (Readonly)`}),Object.freeze(e)},r}function Xt(e,i=Jt){var s;if(n(i)&&(i={deep:!1,name:i}),!t(e)){const t=e;e=()=>t}const r=new WeakMap,o=t=>{let n=r.get(t);return void 0===n&&(n=Qt({value:e()},i.deep),r.set(t,n)),n},a=e=>o(e).value;return Object.defineProperty(a,"name",{value:null!==(s=i.name)&&void 0!==s?s:"OwnedState"}),a.set=(e,t)=>o(e).value=t,a.asReadonly=()=>{const e=e=>o(e).value;return Object.defineProperty(e,"name",{value:`${a.name} (Readonly)`}),Object.freeze(e)},a}function Gt(e,t="ComputedState"){let n=null;const i=e({on:{setup(e){n=e}}}),s=Qt({value:null},!1),r=()=>s.value;let o;Object.defineProperty(r,"current",{get:()=>s.value}),Object.defineProperty(r,"name",{value:t});const a={handleChange(){s.value=o.observe(null)}};let l,c;if(o=Z.binding(i,a),o.setMode(!1),n){const e={handleChange(){l&&l(),l=c.observe(null),s.value=i()}};c=Z.binding(n,e),c.setMode(!1),l=c.observe(null)}return s.value=o.observe(null),r.dispose=()=>{l&&l(),c&&c.dispose(),o.dispose()},r.subscribe=e=>{o.subscribe(e)},r.unsubscribe=e=>{o.unsubscribe(e)},r}function Yt(e,t){const n=Z.getNotifier(e);n.subscribe(t.subscriber),t.notifiers.push(n)}const Zt={visitProperty:i,visitObject:Yt,visitArray:Yt};function en(e,n){const i={notifiers:[],subscriber:t(n)?{handleChange:n}:n};return Pt.enable(),Ut(e,!0,Zt,i,new Set),{dispose(){for(const e of i.notifiers)e.unsubscribe(i.subscriber)}}}const tn=l(),nn=Object.freeze({getForInstance:tn.getForInstance,getByType:tn.getByType,define:e=>(tn.register({type:e}),e)});function sn(){return function(e){nn.define(e)}}function rn(e,t){const n=[];let i="";for(let s=0,r=e.length-1;s<r;++s){i+=e[s];let r=t[s];void 0!==nn.getForInstance(r)&&(r=r.createCSS()),r instanceof Me||r instanceof CSSStyleSheet?(""!==i.trim()&&(n.push(i),i=""),n.push(r)):i+=r}return i+=e[e.length-1],""!==i.trim()&&n.push(i),n}const on=(e,...t)=>new Me(rn(e,t));class an{constructor(e){this.value=0===e.length?"":1===e.length?e[0]:new Me(e)}createCSS(){return this.value}}nn.define(an),on.partial=(e,...t)=>new an(rn(e,t));const ln=`fast-${Math.random().toString(36).substring(2,8)}`,cn=`${ln}{`,dn=`}${ln}`,hn=dn.length;let un=0;const fn=()=>`${ln}-${++un}`,pn=Object.freeze({interpolation:e=>`${cn}${e}${dn}`,attribute:e=>`${fn()}="${cn}${e}${dn}"`,comment:e=>`\x3c!--${cn}${e}${dn}--\x3e`}),gn=Object.freeze({parse(e,t){const n=e.split(cn);if(1===n.length)return null;const i=[];for(let e=0,s=n.length;e<s;++e){const s=n[e],r=s.indexOf(dn);let o;if(-1===r)o=s;else{const e=s.substring(0,r);i.push(t[e]),o=s.substring(r+hn)}""!==o&&i.push(o)}return i}}),bn=l(),vn=Object.freeze({getForInstance:bn.getForInstance,getByType:bn.getByType,define:(e,t)=>((t=t||{}).type=e,bn.register(t),e),assignAspect(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?v.tokenList:v.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=v.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=v.event;break;default:e.targetAspect=t,e.aspectType=v.attribute}else e.aspectType=v.content}});function mn(e){return function(t){vn.define(t,e)}}class yn{constructor(e){this.options=e}createHTML(e){return pn.attribute(e(this))}createBehavior(){return this}}d(yn);const wn=e=>1===e.nodeType,Cn=e=>e?t=>1===t.nodeType&&t.matches(e):wn;class Sn extends yn{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,a),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class On extends Sn{constructor(e){super(e),this.observerProperty=Symbol(),e.childList=!0}observe(e){let t=e[this.observerProperty];if(!t){t=new MutationObserver((t,n)=>{this.updateTarget(this.getSource(e),this.computeNodes(e))}),t.toJSON=i,e[this.observerProperty]=t}t.observe(e,this.options)}disconnect(e){e[this.observerProperty].disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function xn(e){return n(e)&&(e={property:e}),new On(e)}vn.define(On);const Tn=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,Bn=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,Nn=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,kn=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,An=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,Mn=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function $n(e){return e&&e.nodeType===Node.COMMENT_NODE}const jn=Object.freeze({attributeMarkerName:"data-fe",legacyAttributeMarkerName:"data-fe-b",legacyCompactAttributeMarkerName:"data-fe-c",contentBindingStartMarker:()=>"fe:b",contentBindingEndMarker:()=>"fe:/b",repeatStartMarker:()=>"fe:r",repeatEndMarker:()=>"fe:/r",elementBoundaryStartMarker:()=>"fe:e",elementBoundaryEndMarker:()=>"fe:/e",isContentBindingStartMarker:e=>"fe:b"===e||Tn.test(e),isContentBindingEndMarker:e=>"fe:/b"===e||Bn.test(e),isRepeatViewStartMarker:e=>"fe:r"===e||Nn.test(e),isRepeatViewEndMarker:e=>"fe:/r"===e||kn.test(e),isElementBoundaryStartMarker:e=>$n(e)&&("fe:e"===e.data||An.test(e.data)),isElementBoundaryEndMarker:e=>$n(e)&&("fe:/e"===e.data||Mn.test(e.data)),parseAttributeBindingCount(t){const n=t.getAttribute(this.attributeMarkerName);if(null===n)return null;const i=n.trim();if(!/^\d+$/.test(i))throw r.error(e.invalidHydrationAttributeMarker,{value:n});const s=parseInt(i,10);if(s<1)throw r.error(e.invalidHydrationAttributeMarker,{value:n});return s},parseLegacyAttributeBindingIndices(t){const n=[],i=t.getAttribute(this.legacyAttributeMarkerName);if(null!==i)for(const t of i.trim().split(/\s+/)){if(""===t)continue;const s=Number(t);if(!Number.isInteger(s)||s<0)throw r.error(e.invalidHydrationAttributeMarker,{value:i});n.push(s)}const s=`${this.legacyAttributeMarkerName}-`,o=`${this.legacyCompactAttributeMarkerName}-`;for(const i of t.getAttributeNames())if(i.startsWith(s)){const t=Number(i.slice(s.length));if(!Number.isInteger(t)||t<0)throw r.error(e.invalidHydrationAttributeMarker,{value:i});n.push(t)}else if(i.startsWith(o)){const[t,s]=i.slice(o.length).split("-").map(e=>Number(e));if(!Number.isInteger(t)||!Number.isInteger(s)||t<0||s<1)throw r.error(e.invalidHydrationAttributeMarker,{value:i});for(let e=0;e<s;e++)n.push(t+e)}return 0===n.length?null:n},removeLegacyAttributeBindingMarkers(e){e.removeAttribute(this.legacyAttributeMarkerName);for(const t of e.getAttributeNames())(t.startsWith(`${this.legacyAttributeMarkerName}-`)||t.startsWith(`${this.legacyCompactAttributeMarkerName}-`))&&e.removeAttribute(t)},parseLegacyContentBindingStartIndex:e=>function(e,t){const n=e.exec(t);return null===n?null:Number(n[1])}(Tn,e)});const En=Symbol.for("fe-hydration");function Pn(e){return e[En]===En}function Rn(e){return`no more attribute bindings (template defines ${e})`}function In(e){return`no more content bindings (template defines ${e})`}function _n(e,t){return function(e,t){return`Hydration mismatch in <${e}>${t?`: ${t}`:""}. Install hydrationDebugger() from "@lushly-dev/fast-element/hydration.js" and pass it as enableHydration({ debugger: hydrationDebugger() }) for an "Expected / Received" report including the SSR HTML snippet.`}((null!=e?e:"unknown").toLowerCase(),t)}let Vn={formatBindingMismatch:(e,t,n,i)=>({message:_n(i,void 0)}),formatStructuralError:(e,t,n)=>({message:_n(t,n)})};function Ln(){return Vn}function Dn(e){var t;if(!e)return;return null===(t=e.getRootNode().host)||void 0===t?void 0:t.nodeName}class Hn extends Error{constructor(e,t,n,i,s){super(e),this.factories=t,this.node=n,this.expected=i,this.received=s}}function zn(e){return e.nodeType===Node.COMMENT_NODE}function Fn(e){return e.nodeType===Node.TEXT_NODE}function Un(e,t){const n=document.createRange();return n.setStart(e,0),n.setEnd(t,zn(t)||Fn(t)?t.data.length:t.childNodes.length),n}function Wn(e,t,n,i,s,r){const o=[];let a=t.nextSibling();if(e.data="",null===a){const t="content following `\x3c!--fe:b--\x3e` content binding marker",n=Ln().formatStructuralError(e,Dn(e),t);throw new Hn(n.message,i,e,n.expected,n.received)}const l=a;let c=0;for(;null!==a;){if(zn(a))if(jn.isContentBindingStartMarker(a.data))c++;else if(jn.isContentBindingEndMarker(a.data)){if(0===c)break;c--}o.push(a),a=t.nextSibling()}if(null===a){const t="matching `\x3c!--fe:/b--\x3e` content binding close marker",n=Ln().formatStructuralError(e,Dn(e),t);throw new Hn(n.message,i,e,n.expected,n.received)}if(a.data="",1===o.length&&Fn(o[0]))Qn(n,o[0],s);else{a!==l&&null!==a.previousSibling&&(r[n.targetNodeId]={first:l,last:a.previousSibling});Qn(n,a.parentNode.insertBefore(document.createTextNode(""),a),s)}}function qn(e,t,n){let i=0,s=e.nextSibling();for(;null!==s;){if(zn(s))if(jn.isElementBoundaryStartMarker(s))s.data="",i++;else if(jn.isElementBoundaryEndMarker(s)){if(0===i)return void(s.data="");s.data="",i--}s=e.nextSibling()}const r=Ln().formatStructuralError(n,Dn(n),"matching `\x3c!--fe:/e--\x3e` element boundary close marker");throw new Hn(r.message,t,n,r.expected,r.received)}function Qn(e,t,n){if(void 0===e.targetNodeId)throw new Error("Factory could not be target to the node");n[e.targetNodeId]=t}function Jn(e,t){const n=t._scope;return void 0===n?e.create():e.create(void 0,n)}function Kn(e,t){const n=e.parentNode;let i,s=e;for(;s!==t;){if(i=s.nextSibling,!i)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);n.removeChild(s),s=i}n.removeChild(t)}class Xn{constructor(){this.index=0,this.length=0}get event(){return ne.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class Gn extends Xn{constructor(e,t,n,i){super(),this.fragment=e,this.factories=t,this.targets=n,this._scope=i,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Y.unknown,this._skipAttrUpdates=!1,this.isPrerendered=Promise.resolve(!1),this.isHydrated=Promise.resolve(!1),this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,e.appendChild(i),i=n;e.appendChild(t)}dispose(){Kn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e&&this.context===t)return;let n=this.behaviors;if(null===n){this.source=e,this.context=t,this.behaviors=n=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),n[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){Kn(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,n=e.length;t<n;++t)e[t].unbind()}}}var Yn;d(Gn),Z.defineProperty(Gn.prototype,"index"),Z.defineProperty(Gn.prototype,"length");const Zn="unhydrated",ei="hydrating",ti="hydrated";class ni extends Error{constructor(e,t,n,i,s,r){super(e),this.factory=t,this.fragment=n,this.templateString=i,this.expected=s,this.received=r}}Yn=En,d(class extends Xn{get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}constructor(e,t,n,i){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=n,this.hostBindingTarget=i,this[Yn]=En,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Y.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=Zn,this._bindingViewBoundaries={},this._targets={},this.factories=n.compile().factories}insertBefore(e){if(null!==this.fragment)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}appendTo(e){null!==this.fragment&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let n,i=this.firstChild;for(;i!==t;){if(n=i.nextSibling,!n)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=n}e.appendChild(t)}bind(e,t=this){if(this.source===e&&this.context===t)return;this.hydrationStage!==ti&&(this._hydrationStage=ei);let n=this.behaviors;if(null===n){this.source=e,this.context=t;try{const{targets:e,boundaries:t}=function(e,t,n){const i=Un(e,t),s=i.commonAncestorContainer,r=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode:e=>0===i.comparePoint(e,0)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),o={},a={},l=function(e){let t=0;for(let n=0,i=e.length;n<i&&"h"===e[n].targetNodeId;++n)t++;return t}(n);let c=l,d=r.currentNode=e;for(;null!==d;){switch(d.nodeType){case Node.ELEMENT_NODE:{const e=d,t=jn.parseLegacyAttributeBindingIndices(e);if(null!==t){for(const i of t){const t=i+l,s=n[t];if(!s){const t=Rn(n.length),i=Ln().formatStructuralError(d,Dn(d),t);throw new Hn(i.message,n,e,i.expected,i.received)}Qn(s,d,o),c=Math.max(c,t+1)}jn.removeLegacyAttributeBindingMarkers(e);break}const i=jn.parseAttributeBindingCount(e);if(null!==i){for(let e=0;e<i;e++){const e=n[c++];if(!e){const e=Rn(n.length),t=Ln().formatStructuralError(d,Dn(d),e);throw new Hn(t.message,n,d,t.expected,t.received)}Qn(e,d,o)}e.removeAttribute(jn.attributeMarkerName)}break}case Node.COMMENT_NODE:{const e=d.data;if(jn.isElementBoundaryStartMarker(d))d.data="",qn(r,n,d);else if(jn.isContentBindingStartMarker(e)){const t=jn.parseLegacyContentBindingStartIndex(e),i=null===t?c++:t+l,s=n[i];if(c=Math.max(c,i+1),!s){const e=In(n.length),t=Ln().formatStructuralError(d,Dn(d),e);throw new Hn(t.message,n,d,t.expected,t.received)}Wn(d,r,s,n,o,a)}break}}d=r.nextNode()}return i.detach(),{targets:o,boundaries:a}}(this.firstChild,this.lastChild,this.factories);this._targets=e,this._bindingViewBoundaries=t}catch(e){if(e instanceof Hn){let t=this.sourceTemplate.html;"string"!=typeof t&&(t=t.innerHTML),e.templateString=t}throw e}this.behaviors=n=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e];if("h"===t.targetNodeId&&this.hostBindingTarget&&Qn(t,this.hostBindingTarget,this._targets),!(t.targetNodeId in this.targets)){let e=this.sourceTemplate.html;"string"!=typeof e&&(e=e.innerHTML);const n=Un(this.firstChild,this.lastChild).cloneContents(),i=Ln().formatBindingMismatch(t,this.firstChild,this.lastChild,Dn(this.firstChild));throw new ni(i.message,t,n,e,i.expected,i.received)}{const i=t.createBehavior();i.bind(this),n[e]=i}}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0,this._hydrationStage=ti}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){Kn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}});const ii={[v.attribute]:S.setAttribute,[v.booleanAttribute]:S.setBooleanAttribute,[v.property]:(e,t,n)=>e[t]=n,[v.content]:function(e,t,n,i){if(null==n&&(n=""),function(e){return void 0!==e.create}(n)){e.textContent="";let t=e.$fastView;if(void 0===t)if(Pn(i)&&Pn(n)&&void 0!==i.bindingViewBoundaries[this.targetNodeId]&&i.hydrationStage!==ti){const e=i.bindingViewBoundaries[this.targetNodeId];t=n.hydrate(e.first,e.last)}else t=Jn(n,i);else e.$fastTemplate!==n&&(t.isComposed&&(t.remove(),t.unbind()),t=Jn(n,i));t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=n)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=n}},[v.tokenList]:function(e,t,n){var i;const s=`${this.id}-t`,r=null!==(i=e[s])&&void 0!==i?i:e[s]={v:0,cv:Object.create(null)},o=r.cv;let a=r.v;const l=e[t];if(null!=n&&n.length){const e=n.split(/\s+/);for(let t=0,n=e.length;t<n;++t){const n=e[t];""!==n&&(o[n]=a,l.add(n))}}if(r.v=a+1,0!==a){a-=1;for(const e in o)o[e]===a&&l.remove(e)}},[v.event]:()=>{}};class si{constructor(e){this.updateTarget=null,this.aspectType=v.content,this.dataBinding=e}createHTML(e){return pn.interpolation(e(this))}createBehavior(){var t;if(null===this.updateTarget){const n=ii[this.aspectType],i=null!==(t=this.dataBinding.policy)&&void 0!==t?t:this.policy;if(!n)throw r.error(e.unsupportedBindingBehavior);this.data=`${this.id}-d`,this.updateTarget=i.protect(this.targetTagName,this.aspectType,this.targetAspect,n)}return this}bind(e){var t;const n=e.targets[this.targetNodeId];switch(this.aspectType){case v.event:n[this.data]=e,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case v.content:e.onUnbind(this);default:{const i=null!==(t=n[this.data])&&void 0!==t?t:n[this.data]=this.dataBinding.createObserver(this,this);i.target=n,i.controller=e;const s=i.bind(e);if(e._skipAttrUpdates&&(this.aspectType===v.attribute||this.aspectType===v.booleanAttribute))break;this.updateTarget(n,this.targetAspect,s,e);break}}}unbind(e){const t=e.targets[this.targetNodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){ne.setEvent(e);const n=this.dataBinding.evaluate(t.source,t.context);ne.setEvent(null),!0!==n&&e.preventDefault()}}handleChange(e,t){const n=t.controller;if(!n.isBound)return;const i=t.target;this.updateTarget(i,this.targetAspect,t.bind(n),n)}}vn.define(si,{aspected:!0});const ri=(e,t)=>`${e}.${t}`,oi={},ai={index:0,node:null};function li(t){t.startsWith("fast-")||r.warn(e.hostBindingWithoutHost,{name:t})}const ci=new Proxy(document.createElement("div"),{get(e,n){li(n);const i=Reflect.get(e,n);return t(i)?i.bind(e):i},set:(e,t,n)=>(li(t),Reflect.set(e,t,n))});class di{constructor(e,t,n){this.fragment=e,this.directives=t,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,n,i,s){var r,o;this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(t,n,i)),e.id=null!==(r=e.id)&&void 0!==r?r:fn(),e.targetNodeId=n,e.targetTagName=s,e.policy=null!==(o=e.policy)&&void 0!==o?o:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,n){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),n=e.substring(0,t),i=parseInt(e.substring(t+1),10);this.addTargetDescriptor(n,e,i)}let s=oi[t];if(!s){const i=`_${t}`;oi[t]=s={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[n]}}}i[t]=s}createView(e,t){const n=void 0===t?this.fragment.cloneNode(!0):function(e,t){var n;const i=t,s=null!==(n=i.customElementRegistry)&&void 0!==n?n:i.registry;if(s){if(s!==globalThis.customElements&&"function"==typeof s.initialize)return document.importNode(function(e){let t=ui.get(e);void 0===t&&(null!=hi||(hi=document.implementation.createHTMLDocument("")),t=e.cloneNode(!0),hi.adoptNode(t),ui.set(e,t));return t}(e),{selfOnly:!1,customElementRegistry:s});if("function"==typeof i.importNode)return i.importNode(e,!0)}return e.cloneNode(!0)}(this.fragment,t),i=Object.create(this.proto);i.r=n,i.h=null!=e?e:ci;for(const e of this.nodeIds)Reflect.get(i,e);return new Gn(n,this.factories,i,t)}}let hi;const ui=new WeakMap;function fi(e,t,n,i,s,r=!1){const o=n.attributes,a=e.directives;for(let l=0,c=o.length;l<c;++l){const d=o[l],h=d.value,u=gn.parse(h,a);let f=null;null===u?r&&(f=new si(D(()=>h,e.policy)),vn.assignAspect(f,d.name)):f=vi.aggregate(u,e.policy),null!==f&&(n.removeAttributeNode(d),l--,c--,e.addFactory(f,t,i,s,n.tagName))}}function pi(e,t,n){let i=0,s=t.firstChild;for(;s;){const t=gi(e,n,s,i);s=t.node,i=t.index}}function gi(e,t,i,s){const r=ri(t,s);switch(i.nodeType){case 1:fi(e,t,i,r,s),pi(e,i,r);break;case 3:return function(e,t,i,s,r){const o=gn.parse(t.textContent,e.directives);if(null===o)return ai.node=t.nextSibling,ai.index=r+1,ai;let a,l=a=t;for(let t=0,c=o.length;t<c;++t){const c=o[t];0!==t&&(r++,s=ri(i,r),a=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),n(c)?a.textContent=c:(a.textContent=" ",vn.assignAspect(c),e.addFactory(c,i,s,r,null)),l=a}return ai.index=r+1,ai.node=l.nextSibling,ai}(e,i,t,r,s);case 8:{const n=gn.parse(i.data,e.directives);null!==n&&e.addFactory(vi.aggregate(n),t,r,s,null);break}}return ai.index=s+1,ai.node=i.nextSibling,ai}const bi="TEMPLATE",vi={compile(e,t,i=S.policy){let s;if(n(e)){s=document.createElement(bi),s.innerHTML=i.createHTML(e);const t=s.content.firstElementChild;null!==t&&t.tagName===bi&&(s=t)}else s=e;s.content.firstChild||s.content.lastChild||s.content.appendChild(document.createComment(""));const r=document.adoptNode(s.content),o=new di(r,t,i);var a,l;return fi(o,"",s,"h",0,!0),a=r.firstChild,l=t,(a&&8===a.nodeType&&null!==gn.parse(a.data,l)||1===r.childNodes.length&&Object.keys(t).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),pi(o,r,"r"),ai.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=S.policy){if(1===e.length)return e[0];let i,s,r=!1;const o=e.length,a=e.map(e=>n(e)?()=>e:(i=e.sourceAspect||i,r=r||e.dataBinding.isVolatile,s=s||e.dataBinding.policy,e.dataBinding.evaluate)),l=new si(se((e,t)=>{let n="";for(let i=0;i<o;++i)n+=a[i](e,t);return n},null!=s?s:t,r));return vn.assignAspect(l,i),l}};class mi extends yn{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}vn.define(mi);const yi=e=>new mi(e),wi=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Ci=Object.create(null);class Si{constructor(e,t=Ci){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const n in t)e(t[n]);return this.html}}function Oi(e,t,n,i=vn.getForInstance(e)){if(i.aspected){const n=wi.exec(t);null!==n&&vn.assignAspect(e,n[2])}return e.createHTML(n)}Si.empty=new Si(""),vn.define(Si);class xi{constructor(e,t={},n){this.policy=n,this.result=null,this.html=e,this.factories=t}compile(){return null===this.result&&(this.result=vi.compile(this.html,this.factories,this.policy)),this.result}inline(){return new Si(n(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw r.error(e.cannotSetTemplatePolicyAfterCompilation);if(this.policy)throw r.error(e.onlySetTemplatePolicyOnce);return this.policy=t,this}render(e,t,n,i){const s=this.create(n,i);return s.bind(e),s.appendTo(t),s}create(e,t){return this.compile().createView(e,t)}static create(e,n,i){let s="";const r=Object.create(null),o=e=>{var t;const n=null!==(t=e.id)&&void 0!==t?t:e.id=fn();return r[n]=e,n};for(let i=0,r=e.length-1;i<r;++i){const r=e[i];let a,l=n[i];if(s+=r,t(l))l=new si(se(l));else if(l instanceof V)l=new si(l);else if(!(a=vn.getForInstance(l))){const e=l;l=new si(D(()=>e))}s+=Oi(l,r,o,a)}return new xi(s+e[e.length-1],r,i)}}d(xi);const Ti=(t,...n)=>{if(Array.isArray(t)&&Array.isArray(t.raw))return xi.create(t,n);throw r.error(e.directCallToHTMLTagNotAllowed)};Ti.partial=e=>new Si(e);class Bi{constructor(e){this.directive=e,this.location=null,this.controller=null,this.view=null,this.data=null,this.dataBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){if(this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.data=this.dataBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),e.onUnbind(this),Pn(this.template)&&Pn(e)&&e.hydrationStage!==ti&&!this.view){const t=e.bindingViewBoundaries[this.directive.targetNodeId];if(t)return this.view=this.template.hydrate(t.first,t.last),void this.bindView(this.view)}this.refreshView()}unbind(e){const t=this.view;null!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleChange(e,t){this.controller.isBound&&(t===this.dataBindingObserver&&(this.data=this.dataBindingObserver.bind(this.controller)),(this.directive.templateBindingDependsOnData||t===this.templateBindingObserver)&&(this.template=this.templateBindingObserver.bind(this.controller)),this.refreshView())}bindView(e){e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.data)):(e.isComposed=!0,e.bind(this.data),e.insertBefore(this.location),e.$fastTemplate=this.template)}refreshView(){let e=this.view;const t=this.template;null===e?(this.view=e=Jn(t,this.controller),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context):e.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),this.view=e=Jn(t,this.controller),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context),this.bindView(e)}}class Ni{constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.templateBindingDependsOnData=n}createHTML(e){return pn.comment(e(this))}createBehavior(){return new Bi(this)}}vn.define(Ni);const ki=new Map,Ai=Ti`
|
|
1
|
+
var e;!function(e){e[e.needsArrayObservation=1101]="needsArrayObservation",e[e.onlySetDOMPolicyOnce=1201]="onlySetDOMPolicyOnce",e[e.bindingInnerHTMLRequiresTrustedTypes=1202]="bindingInnerHTMLRequiresTrustedTypes",e[e.twoWayBindingRequiresObservables=1203]="twoWayBindingRequiresObservables",e[e.hostBindingWithoutHost=1204]="hostBindingWithoutHost",e[e.unsupportedBindingBehavior=1205]="unsupportedBindingBehavior",e[e.directCallToHTMLTagNotAllowed=1206]="directCallToHTMLTagNotAllowed",e[e.onlySetTemplatePolicyOnce=1207]="onlySetTemplatePolicyOnce",e[e.cannotSetTemplatePolicyAfterCompilation=1208]="cannotSetTemplatePolicyAfterCompilation",e[e.blockedByDOMPolicy=1209]="blockedByDOMPolicy",e[e.invalidHydrationAttributeMarker=1210]="invalidHydrationAttributeMarker",e[e.duplicateRenderInstruction=1211]="duplicateRenderInstruction",e[e.missingElementDefinition=1401]="missingElementDefinition",e[e.noRegistrationForContext=1501]="noRegistrationForContext",e[e.noFactoryForResolver=1502]="noFactoryForResolver",e[e.invalidResolverStrategy=1503]="invalidResolverStrategy",e[e.cannotAutoregisterDependency=1504]="cannotAutoregisterDependency",e[e.cannotResolveKey=1505]="cannotResolveKey",e[e.cannotConstructNativeFunction=1506]="cannotConstructNativeFunction",e[e.cannotJITRegisterNonConstructor=1507]="cannotJITRegisterNonConstructor",e[e.cannotJITRegisterIntrinsic=1508]="cannotJITRegisterIntrinsic",e[e.cannotJITRegisterInterface=1509]="cannotJITRegisterInterface",e[e.invalidResolver=1510]="invalidResolver",e[e.invalidKey=1511]="invalidKey",e[e.noDefaultResolver=1512]="noDefaultResolver",e[e.cyclicDependency=1513]="cyclicDependency",e[e.connectUpdateRequiresController=1514]="connectUpdateRequiresController"}(e||(e={}));const t=e=>"function"==typeof e,n=e=>"string"==typeof e,i=()=>{},s=Object.create(null),r={warn(e,t){},error:(e,t)=>new Error(`Error ${e}`),addMessages(e){Object.assign(s,e)}};function o(){return s}const a=Object.freeze([]);function l(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function c(){const e=new WeakMap;return function(t){let n=e.get(t);if(void 0===n){let i=Reflect.getPrototypeOf(t);for(;void 0===n&&null!==i;)n=e.get(i),i=Reflect.getPrototypeOf(i);n=void 0===n?[]:n.slice(0),e.set(t,n)}return n}}function d(e){e.prototype.toJSON=i}const h={1101:"Must call ArrayObserver.enable() before observing arrays.",1201:"The DOM Policy can only be set once.",1202:"To bind innerHTML, you must use a TrustedTypesPolicy.",1203:"View=>Model update skipped. To use twoWay binding, the target property must be observable.",1204:"No host element is present. Cannot bind host with ${name}.",1205:"The requested binding behavior is not supported by the binding engine.",1206:"Calling html`` as a normal function invalidates the security guarantees provided by FAST.",1207:"The DOM Policy for an HTML template can only be set once.",1208:"The DOM Policy cannot be set after a template is compiled.",1209:"'${aspectName}' on '${tagName}' is blocked by the current DOMPolicy.",1210:"Invalid data-fe attribute value '${value}'. Expected a positive integer.",1211:"Replacing existing RenderInstruction for '${type}' with name '${name}'.",1401:"Missing FASTElement definition.",1501:"No registration for Context/Interface '${name}'.",1502:"Dependency injection resolver for '${key}' returned a null factory.",1503:"Invalid dependency injection resolver strategy specified '${strategy}'.",1504:"Unable to autoregister dependency.",1505:"Unable to resolve dependency injection key '${key}'.",1506:"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",1507:"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",1508:"Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",1509:"Attempted to jitRegister an interface '${value}'.",1510:"A valid resolver was not returned from the register method.",1511:"Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",1512:"'${key}' not registered. Did you forget to add @singleton()?",1513:"Cyclic dependency found '${name}'.",1514:"Injected properties that are updated on changes to DOM connectivity require the target object to be an instance of FASTElement.",1601:"Invalid attribute marker name: ${name}. Expected format is ${expectedFormat}.",1602:"Invalid compact attribute marker values in ${markerName}. Both index and count must be positive integers.",1604:"Invalid compact attribute marker name: ${name}. Expected format is ${expectedFormat}."},u=/(\$\{\w+?})/g,f=/\$\{(\w+?)}/g,p=Object.freeze({});function g(e,t){return e.split(u).map(e=>{var n;const i=e.replace(f,"$1");return String(null!==(n=t[i])&&void 0!==n?n:e)}).join("")}function b(){const e=o();Object.assign(e,h),Object.assign(r,{addMessages(t){Object.assign(e,t)},warn(t,n=p){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Warning";console.warn(g(s,n))},error(t,n=p){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Error";return new Error(g(s,n))}})}const v=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),m=e=>e,y=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:m}):{createHTML:m};let w=Object.freeze({createHTML:e=>y.createHTML(e),protect:(e,t,n,i)=>i});const C=w,S=Object.freeze({get policy(){return w},setPolicy(t){if(w!==C)throw r.error(e.onlySetDOMPolicyOnce);w=t},setAttribute(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)},setBooleanAttribute(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}}),O=/^[\u0000-\u0020\u007F]+|[\u0000-\u0020\u007F]+$/g,x=/[\u0000-\u0020\u007F]+/g,T=/^(?:javascript|vbscript|data):/;function B(e){return e.replace(O,"")}function N(e){try{return decodeURIComponent(e)}catch(t){return e}}function k(e){const t=B(e);return function(e){let t=B(e);for(let e=0;e<3;++e){const e=N(t);if(e===t)break;t=B(e)}return t=t.replace(x,"").toLowerCase(),T.test(t)}(t)?"":t}function A(e,t,i,s){return(e,t,i,...r)=>{n(i)&&(i=k(i)),s(e,t,i,...r)}}function M(t,n,i,s){throw r.error(e.blockedByDOMPolicy,{aspectName:i,tagName:null!=t?t:"text"})}const $={onabort:M,onauxclick:M,onbeforeinput:M,onbeforematch:M,onblur:M,oncancel:M,oncanplay:M,oncanplaythrough:M,onchange:M,onclick:M,onclose:M,oncontextlost:M,oncontextmenu:M,oncontextrestored:M,oncopy:M,oncuechange:M,oncut:M,ondblclick:M,ondrag:M,ondragend:M,ondragenter:M,ondragleave:M,ondragover:M,ondragstart:M,ondrop:M,ondurationchange:M,onemptied:M,onended:M,onerror:M,onfocus:M,onformdata:M,oninput:M,oninvalid:M,onkeydown:M,onkeypress:M,onkeyup:M,onload:M,onloadeddata:M,onloadedmetadata:M,onloadstart:M,onmousedown:M,onmouseenter:M,onmouseleave:M,onmousemove:M,onmouseout:M,onmouseover:M,onmouseup:M,onpaste:M,onpause:M,onplay:M,onplaying:M,onprogress:M,onratechange:M,onreset:M,onresize:M,onscroll:M,onsecuritypolicyviolation:M,onseeked:M,onseeking:M,onselect:M,onslotchange:M,onstalled:M,onsubmit:M,onsuspend:M,ontimeupdate:M,ontoggle:M,onvolumechange:M,onwaiting:M,onwebkitanimationend:M,onwebkitanimationiteration:M,onwebkitanimationstart:M,onwebkittransitionend:M,onwheel:M},j={elements:{a:{[v.attribute]:{href:A},[v.property]:{href:A}},area:{[v.attribute]:{href:A},[v.property]:{href:A}},button:{[v.attribute]:{formaction:A},[v.property]:{formAction:A}},embed:{[v.attribute]:{src:M},[v.property]:{src:M}},form:{[v.attribute]:{action:A},[v.property]:{action:A}},frame:{[v.attribute]:{src:A},[v.property]:{src:A}},iframe:{[v.attribute]:{src:A},[v.property]:{src:A,srcdoc:M}},input:{[v.attribute]:{formaction:A},[v.property]:{formAction:A}},link:{[v.attribute]:{href:M},[v.property]:{href:M}},object:{[v.attribute]:{codebase:M,data:M},[v.property]:{codeBase:M,data:M}},script:{[v.attribute]:{src:M,text:M},[v.property]:{src:M,text:M,innerText:M,textContent:M}},style:{[v.property]:{innerText:M,textContent:M}}},aspects:{[v.attribute]:Object.assign({},$),[v.property]:Object.assign({innerHTML:M},$),[v.event]:Object.assign({},$)}};function E(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=r;break;default:n[i]=s}}for(const t in e)t in n||(n[t]=e[t]);return Object.freeze(n)}function P(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=E(r,{});break;default:n[i]=E(s,r)}}for(const t in e)t in n||(n[t]=E(e[t],{}));return Object.freeze(n)}function R(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=P(r,{});break;default:n[i]=P(s,r)}}for(const t in e)t in n||(n[t]=P(e[t],{}));return Object.freeze(n)}function I(e,t,n,i,s){const r=e[n];if(r){const e=r[i];if(e)return e(t,n,i,s)}}const _=Object.freeze({create(e={}){var t,n;const i=null!==(t=e.trustedType)&&void 0!==t?t:function(){const e=e=>e;return globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:e}):{createHTML:e}}(),s=(r=null!==(n=e.guards)&&void 0!==n?n:{},o=j,Object.freeze({elements:r.elements?R(r.elements,o.elements):o.elements,aspects:r.aspects?P(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>i.createHTML(e),protect(e,t,n,i){var r;const o=(null!=e?e:"").toLowerCase(),a=s.elements[o];if(a){const s=I(a,e,t,n,i);if(s)return s}return null!==(r=I(s.aspects,e,t,n,i))&&void 0!==r?r:i}})}});class V{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}}class L extends V{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function D(e,t){return new L(e,t)}d(L);class H{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}notify(e){const t=this.spillover,n=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(n,e),void 0!==i&&i.handleChange(n,e)}else for(let i=0,s=t.length;i<s;++i)t[i].handleChange(n,e)}}class z{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,n;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(n=this.subjectSubscribers)||void 0===n||n.notify(e)}subscribe(e,t){var n,i;let s;s=t?null!==(n=this.subscribers[t])&&void 0!==n?n:this.subscribers[t]=new H(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new H(this.subject),s.subscribe(e)}unsubscribe(e,t){var n,i;t?null===(n=this.subscribers[t])||void 0===n||n.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const F=[],U=[],W=globalThis.requestAnimationFrame;let q=!0;function Q(){if(U.length)throw U.shift()}function J(e){try{e.call()}catch(e){if(!q)throw F.length=0,e;U.push(e),setTimeout(Q,0)}}function K(){let e=0;for(;e<F.length;)if(J(F[e]),e++,e>1024){for(let t=0,n=F.length-e;t<n;t++)F[t]=F[t+e];F.length-=e,e=0}F.length=0}function X(e){F.push(e),F.length<2&&(q?W(K):K())}const G=Object.freeze({enqueue:X,next:()=>new Promise(X),process:K,setMode:e=>q=e}),Y=Object.freeze({unknown:void 0,coupled:1}),Z=(()=>{const i=G.enqueue,s=/(:|&&|\|\||if|\?\.)/,o=new WeakMap;let a,l=t=>{throw r.error(e.needsArrayObservation)};function h(e){var t;let n=null!==(t=e.$fastController)&&void 0!==t?t:o.get(e);return void 0===n&&(Array.isArray(e)?n=l(e):o.set(e,n=new z(e))),n}const u=c();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==a&&a.watch(e,this.name),e[this.field]}setValue(e,n){const i=this.field,s=e[i];if(s!==n){e[i]=n;const r=e[this.callback];t(r)&&r.call(e,s,n),h(e).notify(this.name)}}}class p extends H{constructor(e,t,n=!1){super(e,t),this.expression=e,this.isVolatileBinding=n,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==Y.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const n=a;let i;a=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{a=n}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=!0,this.needsQueue=this.isAsync}}watch(e,t){const n=this.last,i=h(e),s=null===n?this.first:{};if(s.propertySource=e,s.propertyName=t,s.notifier=i,i.subscribe(this,t),null!==n){if(!this.needsRefresh){let t;a=void 0,t=n.propertySource[n.propertyName],a=this,e===t&&(this.needsRefresh=!0)}n.next=s}this.last=s}handleChange(){this.needsQueue?(this.needsQueue=!1,i(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return d(p),Object.freeze({setArrayObserverFactory(e){l=e},getNotifier:h,track(e,t){a&&a.watch(e,t)},trackVolatile(){a&&(a.needsRefresh=!0)},notify(e,t){h(e).notify(t)},defineProperty(e,t){n(t)&&(t=new f(t)),u(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:u,binding(e,t,n=this.isVolatileBinding(e)){return new p(e,t,n)},isVolatileBinding:e=>s.test(e.toString())})})();function ee(e,t){Z.defineProperty(e,t)}const te=(()=>{let e=null;return{get:()=>e,set(t){e=t}}})(),ne=Object.freeze({default:{index:0,length:0,get event(){return ne.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>te.get(),setEvent(e){te.set(e)}});class ie extends V{createObserver(e){return Z.binding(this.evaluate,e,this.isVolatile)}}function se(e,t,n=Z.isVolatileBinding(e)){return new ie(e,t,n)}function re(e,t){const n=new ie(e);return n.options=t,n}function oe(e){return t(e)?se(e):e instanceof V?e:D(()=>e)}const ae=Object.create(null),le=Object.freeze({subscribe(e,t){const n=ae[e];n?n instanceof Set?n.add(t):ae[e]=new Set([n,t]):ae[e]=t},unsubscribe(e,t){const n=ae[e];n&&n instanceof Set?n.delete(t):ae[e]=void 0},send(e){const t=ae[e];t&&(t instanceof Set?t.forEach(n=>n.handleChange(t,e)):t.handleChange(this,e))}});class ce{constructor(e,t){this.dataBinding=e,this.subscriber=t,this.isNotBound=!0}bind(e){return this.isNotBound&&(le.subscribe(this.getSignal(e),this),e.onUnbind(this),this.isNotBound=!1),this.dataBinding.evaluate(e.source,e.context)}unbind(e){this.isNotBound=!0,le.unsubscribe(this.getSignal(e),this)}handleChange(){this.subscriber.handleChange(this.dataBinding.evaluate,this)}getSignal(e){const t=this.dataBinding.options;return n(t)?t:t(e.source,e.context)}}d(ce);class de extends V{createObserver(e){return new ce(this,e)}}function he(e,t,n){const i=new de(e,n);return i.options=t,i}const ue={fromView:e=>e};let fe={determineChangeEvent:()=>"change"};const pe=Object.freeze({configure(e){fe=e}});class ge{constructor(e,t,n){this.directive=e,this.subscriber=t,this.dataBinding=n,this.isNotBound=!0,this.notifier=Z.binding(n.evaluate,this,n.isVolatile)}bind(e){var t;return this.changeEvent||(this.changeEvent=null!==(t=this.dataBinding.options.changeEvent)&&void 0!==t?t:fe.determineChangeEvent(this.directive,this.target)),this.isNotBound&&(this.target.addEventListener(this.changeEvent,this),e.onUnbind(this),this.isNotBound=!1),this.notifier.bind(e)}unbind(e){this.isNotBound=!0,this.target.removeEventListener(this.changeEvent,this)}handleChange(e,t){this.subscriber.handleChange(this.dataBinding.evaluate,this)}handleEvent(t){const n=this.directive,i=t.currentTarget,s=this.notifier.last;if(!s)return void r.warn(e.twoWayBindingRequiresObservables);let o;switch(n.aspectType){case 1:o=i.getAttribute(n.targetAspect);break;case 2:o=i.hasAttribute(n.targetAspect);break;case 4:o=i.innerText;break;default:o=i[n.targetAspect]}s.propertySource[s.propertyName]=this.dataBinding.options.fromView(o)}}d(ge);class be extends V{createObserver(e,t){return new ge(t,e,this)}}function ve(e,t,i,s=Z.isVolatileBinding(e)){n(t)&&(t={changeEvent:t}),t?t.fromView||(t.fromView=ue.fromView):t=ue;const r=new be(e,i,s);return r.options=t,r}const me="boolean",ye="reflect",we=Object.freeze({locate:c()}),Ce={toView:e=>e?"":null,fromView:e=>!!e},Se={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:Ce.fromView(e)};function Oe(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const xe={toView(e){const t=Oe(e);return t?t.toString():t},fromView:Oe};class Te{constructor(e,t,n=t.toLowerCase(),i=ye,s){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=n,this.mode=i,this.converter=s,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,i===me&&void 0===s&&(this.converter=Ce)}setValue(e,t){const n=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),n!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](n,t),e.$fastController.notify(this.name))}getValue(e){return Z.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.mode===me?this.setValue(e,null!==t):this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,n=this.guards;n.has(e)||"fromView"===t||G.enqueue(()=>{n.add(e);const i=e[this.fieldName];switch(t){case ye:{const t=this.converter;S.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break}case me:S.setBooleanAttribute(e,this.attribute,i)}n.delete(e)})}static collect(e,...t){const i=[];t.push(we.locate(e));for(let s=0,r=t.length;s<r;++s){const r=t[s];if(void 0!==r)for(let t=0,s=r.length;t<s;++t){const s=r[t];n(s)?i.push(new Te(e,s)):i.push(new Te(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function Be(e,t){let n;function i(e,t){arguments.length>1&&(n.property=t),we.locate(e.constructor).push(n)}return arguments.length>1?(n={},void i(e,t)):(n=void 0===e?{}:e,i)}let Ne;function ke(e){return e.reduce((e,t)=>(t instanceof Ae?e.push(...ke(t.styles)):e.push(t),e),[])}class Ae{get strategy(){return null===this._strategy&&(Ne||Ae.setDefaultStrategy(Ae.supportsAdoptedStyleSheets?function(){const e=new Map;return class{constructor(t){this.sheets=t.map(t=>{if(t instanceof CSSStyleSheet)return t;let n=e.get(t);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(t),e.set(t,n)),n})}addStylesTo(e){const t=e;t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=e;t.adoptedStyleSheets=t.adoptedStyleSheets.filter(e=>-1===this.sheets.indexOf(e))}}}():class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++Me}addStylesTo(e){const t=e===document?document.body:e;for(let e=0;e<this.styles.length;e++){const n=document.createElement("style");n.innerHTML=this.styles[e],n.className=this.styleClass,t.append(n)}}removeStylesFrom(e){const t=e===document?document.body:e,n=t.querySelectorAll(`.${this.styleClass}`);for(let e=0,i=n.length;e<i;++e)t.removeChild(n[e])}}),this.withStrategy(Ne)),this._strategy}constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withStrategy(e){return this._strategy=new e(ke(this.styles)),this}static setDefaultStrategy(e){Ne=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new Ae(e):e instanceof Ae?e:new Ae([e])}}Ae.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;let Me=0;const $e="__trust";var je=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function Ee(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}const Pe={},Re=new WeakMap,Ie=l(),_e=Object.freeze({register(e){if(!Ie.register(e))return!1;const t=Ve(e.registry);return Object.prototype.hasOwnProperty.call(t,e.name)||Z.defineProperty(t,e.name),t[e.name]=e.type,!0},getByType:Ie.getByType,getForInstance:Ie.getForInstance,whenRegistered:function(e,t=customElements){const n=Ve(t);Object.prototype.hasOwnProperty.call(n,e)||Z.defineProperty(n,e);const i=Le(n[e]);if(void 0!==i)return Promise.resolve(i);return new Promise(t=>{const i=Z.getNotifier(n),s={handleChange:()=>{const r=Le(n[e]);void 0!==r&&(i.unsubscribe(s,e),t(r))}};i.subscribe(s,e)})}});function Ve(e=customElements){if(e===customElements)return Pe;let t=Re.get(e);return t||(t={},Re.set(e,t)),t}function Le(e){return void 0===e?void 0:_e.getByType(e)}const De={mode:"open"},He={},ze=new Set;const Fe=new WeakMap,Ue=new WeakMap,We=new WeakMap,qe=new WeakMap,Qe=new Set,Je=new WeakMap;function Ke(e,t){if(Ue.delete(e),void 0===e.template&&void 0!==t&&(e.template=t),void 0!==e.template)return We.delete(e),Fe.delete(e),e.template}function Xe(e,t=e.registry,n){if(0===Qe.size&&!(null==n?void 0:n.length))return;const i=e;let s=qe.get(i);if(!(null==s?void 0:s.has(t))){void 0===s&&(s=new WeakSet,qe.set(i,s)),s.add(t);for(const n of Qe)n(e,t);for(const i of null!=n?n:[])Qe.has(i)||i(e,t)}}function Ge(e){var t;return null!==(t=Je.get(e))&&void 0!==t?t:null}function Ye(e){if(void 0!==e.template)return We.delete(e),e.template;const t=Ue.get(e);if(t)return t;const n=Fe.get(e);if(!n)return;let i;We.delete(e);try{i=n(e)}catch(t){throw We.set(e,t),t}if("function"==typeof(null==(s=i)?void 0:s.then)){const t=Promise.resolve(i).then(t=>Ke(e,t)).catch(t=>{throw Ue.delete(e),We.set(e,t),t});return Ue.set(e,t),t}var s;return Ke(e,i)}class Ze{get isDefined(){return this.platformDefined}constructor(e,i=e.definition){var s,r;this.platformDefined=!1,n(i)&&(i={name:i}),this.type=e,this.name=i.name,this.registry=null!==(s=i.registry)&&void 0!==s?s:customElements,r=i.template,t(r)?Fe.set(this,i.template):this.template=i.template;const o=e.prototype,a=Te.collect(e,i.attributes),l=new Array(a.length),c={},d={};for(let e=0,t=a.length;e<t;++e){const t=a[e];l[e]=t.attribute,c[t.name]=t,d[t.attribute]=t,Z.defineProperty(o,t)}Reflect.defineProperty(e,"observedAttributes",{value:l,enumerable:!0}),this.attributes=a,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=function(e){if(null===e)return;const t=Object.assign(Object.assign({},De),e);return void 0===t.customElementRegistry&&void 0!==t.registry&&(t.customElementRegistry=t.registry),void 0===t.registry&&void 0!==t.customElementRegistry&&(t.registry=t.customElementRegistry),t}(i.shadowOptions),this.elementOptions=void 0===i.elementOptions?He:Object.assign(Object.assign({},He),i.elementOptions),this.styles=Ae.normalize(i.styles),this.schema=i.schema,_e.register(this)}define(e=this.registry,t){const n=this.type;if(!e.get(this.name)){if(Xe(this,e,t),void 0===this.template&&Fe.has(this))return Promise.resolve().then(()=>Ye(this)).then(t=>{void 0===t||e.get(this.name)||(this.platformDefined=!0,e.define(this.name,n,this.elementOptions))}).catch(e=>{!function(e,t){const n=e;void 0!==t?We.set(n,t):We.delete(n)}(this,e),Z.notify(this,"template")}),this;this.platformDefined=!0,e.define(this.name,n,this.elementOptions)}return this}static compose(e,t){const n=ze.has(e)||_e.getByType(e)?new Ze(class extends e{},t):new Ze(e,t);return Promise.resolve(n)}static registerBaseType(e){ze.add(e)}}Ze.getByType=_e.getByType,Ze.getForInstance=_e.getForInstance,Z.defineProperty(Ze.prototype,"template");var et=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};const tt={bubbles:!0,composed:!0,cancelable:!0},nt="isConnected",it=new WeakMap,st=Symbol("fast-late-attribute-observer"),rt=new Set;function ot(e){var t,n;return null!==(n=null!==(t=e.shadowRoot)&&void 0!==t?t:it.get(e))&&void 0!==n?n:null}let at;var lt;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(lt||(lt={}));class ct{get isConnected(){return Z.track(this,nt),this.stage===lt.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:ne.default}get isBound(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.isBound)&&void 0!==t&&t}get sourceLifetime(){var e;return null===(e=this.view)||void 0===e?void 0:e.sourceLifetime}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(void 0===this._shadowRootOptions&&void 0!==e){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),"closed"===e.mode&&it.set(this.source,t))}}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}constructor(e,t){this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this.isPrerendered=new Promise(e=>{this._resolvePrerendered=e}),this.isHydrated=new Promise(e=>{this._resolveHydrated=e}),this._template=null,this.stage=lt.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this._notifier=new z(e),this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const n=Reflect.getPrototypeOf(e),i=null===n?[]:Z.getAccessors(n);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let n=0,s=i.length;n<s;++n){const s=i[n].name,r=e[s];void 0!==r&&(delete e[s],t[s]=r)}0===Object.keys(t).length&&(this.boundObservables=null)}this.captureBoundObservables();for(const t of rt){const n=t(e);void 0!==n&&this.addBehavior(n)}}get subject(){return this._notifier.subject}notify(e){this._notifier.notify(e)}subscribe(e,t){this._notifier.subscribe(e,t)}unsubscribe(e,t){this._notifier.unsubscribe(e,t)}onUnbind(e){var t;null===(t=this.view)||void 0===t||t.onUnbind(e)}addBehavior(e){var t,n;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,s=null!==(n=i.get(e))&&void 0!==n?n:0;0===s?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||this.stage!==lt.connected&&this.stage!==lt.connecting||e.connectedCallback(this)):i.set(e,s+1)}removeBehavior(e,t=!1){const n=this.behaviors;if(null===n)return;const i=n.get(e);void 0!==i&&(1===i||t?(n.delete(e),e.disconnectedCallback&&this.stage!==lt.disconnected&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):n.set(e,i-1))}addStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=ot(n))&&void 0!==t?t:this.source).append(e)}else e.isAttachedTo(n)||e.addStylesTo(n)}removeStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=ot(n))&&void 0!==t?t:n).removeChild(e)}else e.isAttachedTo(n)&&e.removeStylesFrom(n)}connect(){this.stage===lt.disconnected&&(this.stage=lt.connecting,this.captureBoundObservables(),this.syncLateAttributes(),this.observeLateAttributes(),this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=lt.connected,Z.notify(this,nt))}bindObservables(){if(null!==this.boundObservables){const e=this.source,t=this.boundObservables,n=Object.keys(t);for(let i=0,s=n.length;i<s;++i){const s=n[i];e[s]=t[s]}this.boundObservables=null}}captureBoundObservables(){const e=this.source,t=Object.getOwnPropertyNames(e),n=t=>{let n=Reflect.getPrototypeOf(e);for(;null!==n;){const e=Reflect.getOwnPropertyDescriptor(n,t);if((null==e?void 0:e.get)||(null==e?void 0:e.set))return!0;n=Reflect.getPrototypeOf(n)}return!1};let i=this.boundObservables;for(let s=0,r=t.length;s<r;++s){const r=t[s];if(!n(r))continue;const o=e[r];void 0!==o?(delete e[r],(null!=i?i:i=this.boundObservables=Object.create(null))[r]=o):delete e[r]}}syncLateAttributes(){const e=Ge(this.definition);if(null!==e)for(const t of Object.keys(e))this.source.hasAttribute(t)&&this.onAttributeChangedCallback(t,null,this.source.getAttribute(t))}observeLateAttributes(){const e=Ge(this.definition);if(null===e)return;const t=this.source;void 0===t[st]&&(t[st]=new MutationObserver(e=>{const n=t.$fastController,i=Ge(n.definition);if(null!==i)for(let s=0,r=e.length;s<r;++s){const r=e[s].attributeName;null!==r&&void 0!==i[r]&&n.onAttributeChangedCallback(r,null,t.getAttribute(r))}}),t[st].observe(t,{attributes:!0,attributeFilter:Object.keys(e)}))}connectBehaviors(){if(!1===this.behaviorsConnected){const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(!0===this.behaviorsConnected){const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===lt.connected&&(this.stage=lt.disconnecting,Z.notify(this,nt),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=lt.disconnected)}onAttributeChangedCallback(e,t,n){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,n)}emit(e,t,n){if(this.stage===lt.connected){const i=null!=n?n:{},{confidence:s,reasoning:r,warnings:o}=i,a=et(i,["confidence","reasoning","warnings"]),l=function(e,t){const{confidence:n,reasoning:i}=null!=t?t:{},s=Array.isArray(null==t?void 0:t.warnings)?t.warnings:void 0;if(void 0===n&&void 0===i&&void 0===s){if(Ee(e)&&$e in e){const t=e,n=$e;return t[n],je(t,[n+""])}return e}if(void 0!==n&&(!Number.isFinite(n)||n<0||n>1))throw new RangeError("Trust confidence must be a finite number from 0 to 1.");const r={};if(void 0!==n&&(r.confidence=n),void 0!==i&&(r.reasoning=i),void 0!==s&&(r.warnings=s.map(e=>Object.assign({},e))),Ee(e)){const t=e,n=$e;t[n];const i=je(t,[n+""]);return Object.assign(Object.assign({},i),{[$e]:r})}return{value:e,[$e]:r}}(t,{confidence:s,reasoning:r,warnings:o});return this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign(Object.assign({},tt),a),{detail:l})))}return!1}renderTemplate(e){var t;const n=this.source,i=null!==(t=ot(n))&&void 0!==t?t:n;if(null!==this.view)this.view.dispose(),this.view=null;else if((!this.needsInitialization||this.hasExistingShadowRoot)&&(!this.hasExistingShadowRoot||!this.needsInitialization))for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e);if(e){const t=this.hasExistingShadowRoot&&this.needsInitialization;let s=!1;t&&ct.hydrationHook&&(s=ct.hydrationHook(this,e,n,i)),s||this.renderClientSide(e,n,i),this._resolvePrerendered(t),this._resolveHydrated(s)}else this.needsInitialization&&(this._resolvePrerendered(!1),this._resolveHydrated(!1))}renderClientSide(e,t,n){var i;if(this.hasExistingShadowRoot){for(let e=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e);this.hasExistingShadowRoot=!1}const s=void 0!==(null===(i=this._shadowRootOptions)||void 0===i?void 0:i.customElementRegistry)?n:void 0;this.view=e.render(t,n,t,s),this.view.sourceLifetime=Y.coupled}static forCustomElement(t,n=!1){const i=t.$fastController;if(void 0!==i&&!n)return i;const s=Ze.getForInstance(t);if(void 0===s)throw r.error(e.missingElementDefinition);return Z.getNotifier(s).subscribe({handleChange:()=>{ct.forCustomElement(t,!0),t.$fastController.connect()}},"template"),Z.getNotifier(s).subscribe({handleChange:()=>{ct.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new at(t,s)}static setStrategy(e){at=e}static installHydrationHook(e){ct.hydrationHook=e}}function dt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=ot(e))&&void 0!==t?t:e.getRootNode()}ct.hydrationHook=null,d(ct),ct.setStrategy(ct);class ht{constructor(e){const t=ht.styleSheetCache;this.sheets=e.map(e=>{if(e instanceof CSSStyleSheet)return e;let n=t.get(e);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(e),t.set(e,n)),n})}addStylesTo(e){gt(dt(e),this.sheets)}removeStylesFrom(e){bt(dt(e),this.sheets)}}ht.styleSheetCache=new Map;let ut=0;function ft(e){return e===document?document.body:e}class pt{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ut}addStylesTo(e){e=ft(dt(e));const t=this.styles,n=this.styleClass;for(let i=0;i<t.length;i++){const s=document.createElement("style");s.innerHTML=t[i],s.className=n,e.append(s)}}removeStylesFrom(e){const t=(e=ft(dt(e))).querySelectorAll(`.${this.styleClass}`);for(let n=0,i=t.length;n<i;++n)e.removeChild(t[n])}}let gt=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},bt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(Ae.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),gt=(e,t)=>{e.adoptedStyleSheets.push(...t)},bt=(e,t)=>{for(const n of t){const t=e.adoptedStyleSheets.indexOf(n);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}Ae.setDefaultStrategy(ht)}else Ae.setDefaultStrategy(pt);function vt(e){const t=class extends e{constructor(){super(),ct.forCustomElement(this)}$emit(e,t,n){return this.$fastController.emit(e,t,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,n){this.$fastController.onAttributeChangedCallback(e,t,n)}};return Ze.registerBaseType(t),t}function mt(e,n,i){Array.isArray(n)&&(i=n,n=void 0);return(t(e)?Ze.compose(e,n):Ze.compose(this,e)).then(e=>{Xe(e,e.registry,i);const t=Ye(e);return"function"==typeof(null==(n=t)?void 0:n.then)?t.then(()=>e.define().type):e.define().type;var n})}const yt=Object.assign(vt(HTMLElement),{from:function(e){return vt(e)},define:mt});function wt(e){return function(t){mt(t,e)}}class Ct{constructor(e,t,n){this.index=e,this.removed=t,this.addedCount=n}adjustTo(e){let t=this.index;const n=e.length;return t>n?t=n-this.addedCount:t<0&&(t=n+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}class St{constructor(e){this.sorted=e}}const Ot=Object.freeze({reset:1,splice:2,optimized:3}),xt=new Ct(0,a,0);xt.reset=!0;const Tt=[xt];var Bt;function Nt(e,t,n,i){return t<n||i<e?-1:t===n||i===e?0:e<n?t<i?t-n:i-n:i<t?i-e:t-e}function kt(e,t,n,i,s,r){let o=0,l=0;const c=Math.min(n-t,r-s);if(0===t&&0===s&&(o=function(e,t,n){for(let i=0;i<n;++i)if(e[i]!==t[i])return i;return n}(e,i,c)),n===e.length&&r===i.length&&(l=function(e,t,n){let i=e.length,s=t.length,r=0;for(;r<n&&e[--i]===t[--s];)r++;return r}(e,i,c-o)),s+=o,r-=l,(n-=l)-(t+=o)===0&&r-s===0)return a;if(t===n){const e=new Ct(t,[],0);for(;s<r;)e.removed.push(i[s++]);return[e]}if(s===r)return[new Ct(t,[],n-t)];const d=function(e){let t=e.length-1,n=e[0].length-1,i=e[t][n];const s=[];for(;t>0||n>0;){if(0===t){s.push(Bt.add),n--;continue}if(0===n){s.push(Bt.delete),t--;continue}const r=e[t-1][n-1],o=e[t-1][n],a=e[t][n-1];let l;l=o<a?o<r?o:r:a<r?a:r,l===r?(r===i?s.push(Bt.leave):(s.push(Bt.update),i=r),t--,n--):l===o?(s.push(Bt.delete),t--,i=o):(s.push(Bt.add),n--,i=a)}return s.reverse()}(function(e,t,n,i,s,r){const o=r-s+1,a=n-t+1,l=new Array(o);let c,d;for(let e=0;e<o;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let n=1;n<o;++n)for(let r=1;r<a;++r)e[t+r-1]===i[s+n-1]?l[n][r]=l[n-1][r-1]:(c=l[n-1][r]+1,d=l[n][r-1]+1,l[n][r]=c<d?c:d);return l}(e,t,n,i,s,r)),h=[];let u,f=t,p=s;for(let e=0;e<d.length;++e)switch(d[e]){case Bt.leave:void 0!==u&&(h.push(u),u=void 0),f++,p++;break;case Bt.update:void 0===u&&(u=new Ct(f,[],0)),u.addedCount++,f++,u.removed.push(i[p]),p++;break;case Bt.add:void 0===u&&(u=new Ct(f,[],0)),u.addedCount++,f++;break;case Bt.delete:void 0===u&&(u=new Ct(f,[],0)),u.removed.push(i[p]),p++}return void 0!==u&&h.push(u),h}function At(e,t){let n=!1,i=0;for(let s=0;s<t.length;s++){const r=t[s];if(r.index+=i,n)continue;const o=Nt(e.index,e.index+e.removed.length,r.index,r.index+r.addedCount);if(o>=0){t.splice(s,1),s--,i-=r.addedCount-r.removed.length,e.addedCount+=r.addedCount-o;const a=e.removed.length+r.removed.length-o;if(e.addedCount||a){let t=r.removed;if(e.index<r.index){const n=e.removed.slice(0,r.index-e.index);n.push(...t),t=n}if(e.index+e.removed.length>r.index+r.addedCount){const n=e.removed.slice(r.index+r.addedCount-e.index);t.push(...n)}e.removed=t,r.index<e.index&&(e.index=r.index)}else n=!0}else if(e.index<r.index){n=!0,t.splice(s,0,e),s++;const o=e.addedCount-e.removed.length;r.index+=o,i+=o}}n||t.push(e)}!function(e){e[e.leave=0]="leave",e[e.update=1]="update",e[e.add=2]="add",e[e.delete=3]="delete"}(Bt||(Bt={}));let Mt=Object.freeze({support:Ot.optimized,normalize:(e,t,n)=>void 0===e?void 0===n?a:function(e,t){let n=[];const i=[];for(let e=0,n=t.length;e<n;e++)At(t[e],i);for(let t=0,s=i.length;t<s;++t){const s=i[t];1!==s.addedCount||1!==s.removed.length?n=n.concat(kt(e,s.index,s.index+s.addedCount,s.removed,0,s.removed.length)):s.removed[0]!==e[s.index]&&n.push(s)}return n}(t,n):Tt,pop(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new Ct(e.length,[r],0)),r},push(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Ct(e.length-i.length,[],i.length).adjustTo(e)),s},reverse(e,t,n,i){const s=n.apply(e,i);e.sorted++;const r=[];for(let t=e.length-1;t>=0;t--)r.push(t);return t.addSort(new St(r)),s},shift(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new Ct(0,[r],0)),r},sort(e,t,n,i){const s=new Map;for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t])||[];s.set(e[t],[...n,t])}const r=n.apply(e,i);e.sorted++;const o=[];for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t]);o.push(n[0]),s.set(e[t],n.splice(1))}return t.addSort(new St(o)),r},splice(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Ct(+i[0],s,i.length>2?i.length-2:0).adjustTo(e)),s},unshift(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Ct(0,[],i.length).adjustTo(e)),s}});const $t=Object.freeze({reset:Tt,setDefaultStrategy(e){Mt=e}});function jt(e,t,n,i=!0){Reflect.defineProperty(e,t,{value:n,enumerable:!1,writable:i})}class Et extends H{get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,Z.notify(e,"length"))}},this.subscribe(e)}return e}get sortObserver(){let e=this._sortObserver;if(void 0===e){const t=this.subject;this._sortObserver=e={sorted:t.sorted,handleChange(){this.sorted!==t.sorted&&(this.sorted=t.sorted,Z.notify(e,"sorted"))}},this.subscribe(e)}return e}constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,jt(e,"$fastController",this)}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){void 0===this.sorts?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,n=this.sorts,i=this.oldCollection;void 0===t&&void 0===i&&void 0===n||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,void 0!==n?this.notify(n):this.notify((null!==(e=this._strategy)&&void 0!==e?e:Mt).normalize(i,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,G.enqueue(this))}}let Pt=!1;const Rt=Object.freeze({sorted:0,enable(){if(Pt)return;Pt=!0,Z.setArrayObserverFactory(e=>new Et(e));const e=Array.prototype;e.$fastPatch||(jt(e,"$fastPatch",1),jt(e,"sorted",0),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach(t=>{e[t.name]=function(...e){var n;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(n=i.strategy)&&void 0!==n?n:Mt)[t.name](this,i,t,e)}}))}});function It(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Rt.enable(),t=Z.getNotifier(e)),Z.track(t.lengthObserver,"length"),e.length}function _t(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Rt.enable(),t=Z.getNotifier(e)),Z.track(t.sortObserver,"sorted"),e.sorted}function Vt(e,t,n){return Object.assign({},n,{get(){return Z.trackVolatile(),n.get.apply(this)}})}const Lt="$fast_context",Dt="$fast_parent_contexts",Ht="$defs",zt="$ref",Ft=new Map;class Ut{constructor(e){this.customElementName=e,this.schemaMap=new Map,Ft.set(e,this.schemaMap)}addPath(e){var t,n,i;const s=this.getSplitPath(e.pathConfig.path);let r=this.schemaMap.get(e.rootPropertyName),o=null;switch(r||(this.addNewSchema(e.rootPropertyName),r=this.schemaMap.get(e.rootPropertyName)),e.childrenMap&&(o=this.getSchemaId(e.childrenMap.customElementName,e.childrenMap.attributeName),1===s.length&&(r.anyOf?r.anyOf.push({[zt]:o}):r.anyOf=[{[zt]:o}])),e.pathConfig.type){case"default":case"access":s.length>1&&(null===e.pathConfig.currentContext?this.addPropertiesToAnObject(r,s.slice(1),e.pathConfig.currentContext,o):((null===(t=r[Ht])||void 0===t?void 0:t[s[0]])||(r[Ht]=Object.assign(Object.assign({},r[Ht]),{[s[0]]:{}})),this.addPropertiesToAContext(r[Ht][s[0]],s.slice(1),e.pathConfig.currentContext,o)));break;case"repeat":if(this.addContext(r,s[s.length-1],e.pathConfig.currentContext,e.pathConfig.parentContext),s.length>2){let t=r;const i=!!e.pathConfig.parentContext;i&&(t=this.addPropertiesToAnObject(null===(n=r[Ht])||void 0===n?void 0:n[e.pathConfig.parentContext],s.slice(1,-1),e.pathConfig.parentContext,o)),this.addPropertiesToAnObject(t,i?s.slice(2):s.slice(1),e.pathConfig.currentContext,o,"array")}else if(s.length>1){let t;e.pathConfig.parentContext&&(t=null===(i=null==r?void 0:r[Ht])||void 0===i?void 0:i[e.pathConfig.parentContext]),this.addPropertiesToAnObject(null!=t?t:r,s.slice(1),e.pathConfig.currentContext,o,"array")}else r.type="array",r[zt]=this.getDefsPath(e.pathConfig.currentContext)}}getSchema(e){var t;return null!==(t=this.schemaMap.get(e))&&void 0!==t?t:null}getRootProperties(){return this.schemaMap.keys()}getSplitPath(e){return e.split(".")}getDefsPath(e){return`#/${Ht}/${e}`}getSchemaId(e,t){return`https://fast.design/schemas/${e}/${t}.json`}addNewSchema(e){this.schemaMap.set(e,{$schema:"https://json-schema.org/draft/2019-09/schema",$id:this.getSchemaId(this.customElementName,e),[Ht]:{}})}addPropertiesToAContext(e,t,n,i){e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i):i&&(e.properties[t[0]].anyOf?e.properties[t[0]].anyOf.push({[zt]:i}):e.properties[t[0]].anyOf=[{[zt]:i}])}addPropertiesToAnObject(e,t,n,i,s="object"){return e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),"object"===s&&t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):"array"===s?t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):this.addArrayToAnObject(e.properties[t[0]],n):(e.properties[t[0]].anyOf&&i?e.properties[t[0]].anyOf.push({[zt]:i}):i&&(e.properties[t[0]].anyOf=[{[zt]:i}]),e.properties[t[0]])}addArrayToAnObject(e,t){return e.type="array",e.items={[zt]:this.getDefsPath(t)},e.items}addContext(e,t,n,i){e[Ht][n]||(e[Ht][n]={[Lt]:t,[Dt]:this.getParentContexts(e,i)})}getParentContexts(e,t,n=[]){var i;if(null===t)return[null,...n];const s=null===(i=null==e?void 0:e[Ht])||void 0===i?void 0:i[t][Dt];return this.getParentContexts(e,s[s.length-1],[t,...n])}}function Wt(e,t,n,i,s){if(function(e,t){return null!=e&&"object"==typeof e&&!t.has(e)}(e,s))if(s.add(e),Array.isArray(e)){n.visitArray(e,i);for(const r of e)Wt(r,t,n,i,s)}else{n.visitObject(e,i);for(const r in e){const o=e[r];n.visitProperty(e,r,o,i),t&&Wt(o,t,n,i,s)}}}const qt=new WeakSet,Qt={visitObject:i,visitArray:i,visitProperty(e,t,n){Reflect.defineProperty(e,t,{enumerable:!0,get:()=>(Z.track(e,t),n),set(i){n!==i&&(n=i,Z.notify(e,t))}})}};function Jt(e,t=!1){return Wt(e,t,Qt,void 0,qt),e}const Kt={deep:!1};function Xt(e,t=Kt){var i;n(t)&&(t={deep:!1,name:t});const s=Jt({value:e},t.deep),r=()=>s.value;return Object.defineProperty(r,"current",{get:()=>s.value,set:e=>s.value=e}),Object.defineProperty(r,"name",{value:null!==(i=t.name)&&void 0!==i?i:"SharedState"}),r.set=e=>s.value=e,r.asReadonly=()=>{const e=()=>s.value;return Object.defineProperty(e,"current",{get:()=>s.value}),Object.defineProperty(e,"name",{value:`${r.name} (Readonly)`}),Object.freeze(e)},r}function Gt(e,i=Kt){var s;if(n(i)&&(i={deep:!1,name:i}),!t(e)){const t=e;e=()=>t}const r=new WeakMap,o=t=>{let n=r.get(t);return void 0===n&&(n=Jt({value:e()},i.deep),r.set(t,n)),n},a=e=>o(e).value;return Object.defineProperty(a,"name",{value:null!==(s=i.name)&&void 0!==s?s:"OwnedState"}),a.set=(e,t)=>o(e).value=t,a.asReadonly=()=>{const e=e=>o(e).value;return Object.defineProperty(e,"name",{value:`${a.name} (Readonly)`}),Object.freeze(e)},a}function Yt(e,t="ComputedState"){let n=null;const i=e({on:{setup(e){n=e}}}),s=Jt({value:null},!1),r=()=>s.value;let o;Object.defineProperty(r,"current",{get:()=>s.value}),Object.defineProperty(r,"name",{value:t});const a={handleChange(){s.value=o.observe(null)}};let l,c;if(o=Z.binding(i,a),o.setMode(!1),n){const e={handleChange(){l&&l(),l=c.observe(null),s.value=i()}};c=Z.binding(n,e),c.setMode(!1),l=c.observe(null)}return s.value=o.observe(null),r.dispose=()=>{l&&l(),c&&c.dispose(),o.dispose()},r.subscribe=e=>{o.subscribe(e)},r.unsubscribe=e=>{o.unsubscribe(e)},r}function Zt(e,t){const n=Z.getNotifier(e);n.subscribe(t.subscriber),t.notifiers.push(n)}const en={visitProperty:i,visitObject:Zt,visitArray:Zt};function tn(e,n){const i={notifiers:[],subscriber:t(n)?{handleChange:n}:n};return Rt.enable(),Wt(e,!0,en,i,new Set),{dispose(){for(const e of i.notifiers)e.unsubscribe(i.subscriber)}}}const nn=l(),sn=Object.freeze({getForInstance:nn.getForInstance,getByType:nn.getByType,define:e=>(nn.register({type:e}),e)});function rn(){return function(e){sn.define(e)}}function on(e,t){const n=[];let i="";for(let s=0,r=e.length-1;s<r;++s){i+=e[s];let r=t[s];void 0!==sn.getForInstance(r)&&(r=r.createCSS()),r instanceof Ae||r instanceof CSSStyleSheet?(""!==i.trim()&&(n.push(i),i=""),n.push(r)):i+=r}return i+=e[e.length-1],""!==i.trim()&&n.push(i),n}const an=(e,...t)=>new Ae(on(e,t));class ln{constructor(e){this.value=0===e.length?"":1===e.length?e[0]:new Ae(e)}createCSS(){return this.value}}sn.define(ln),an.partial=(e,...t)=>new ln(on(e,t));const cn=`fast-${Math.random().toString(36).substring(2,8)}`,dn=`${cn}{`,hn=`}${cn}`,un=hn.length;let fn=0;const pn=()=>`${cn}-${++fn}`,gn=Object.freeze({interpolation:e=>`${dn}${e}${hn}`,attribute:e=>`${pn()}="${dn}${e}${hn}"`,comment:e=>`\x3c!--${dn}${e}${hn}--\x3e`}),bn=Object.freeze({parse(e,t){const n=e.split(dn);if(1===n.length)return null;const i=[];for(let e=0,s=n.length;e<s;++e){const s=n[e],r=s.indexOf(hn);let o;if(-1===r)o=s;else{const e=s.substring(0,r);i.push(t[e]),o=s.substring(r+un)}""!==o&&i.push(o)}return i}}),vn=l(),mn=Object.freeze({getForInstance:vn.getForInstance,getByType:vn.getByType,define:(e,t)=>((t=t||{}).type=e,vn.register(t),e),assignAspect(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?v.tokenList:v.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=v.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=v.event;break;default:e.targetAspect=t,e.aspectType=v.attribute}else e.aspectType=v.content}});function yn(e){return function(t){mn.define(t,e)}}class wn{constructor(e){this.options=e}createHTML(e){return gn.attribute(e(this))}createBehavior(){return this}}d(wn);const Cn=e=>1===e.nodeType,Sn=e=>e?t=>1===t.nodeType&&t.matches(e):Cn;class On extends wn{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,a),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class xn extends On{constructor(e){super(e),this.observerProperty=Symbol(),e.childList=!0}observe(e){let t=e[this.observerProperty];if(!t){t=new MutationObserver((t,n)=>{this.updateTarget(this.getSource(e),this.computeNodes(e))}),t.toJSON=i,e[this.observerProperty]=t}t.observe(e,this.options)}disconnect(e){e[this.observerProperty].disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function Tn(e){return n(e)&&(e={property:e}),new xn(e)}mn.define(xn);const Bn=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,Nn=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,kn=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,An=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,Mn=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,$n=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function jn(e){return e&&e.nodeType===Node.COMMENT_NODE}const En=Object.freeze({attributeMarkerName:"data-fe",legacyAttributeMarkerName:"data-fe-b",legacyCompactAttributeMarkerName:"data-fe-c",contentBindingStartMarker:()=>"fe:b",contentBindingEndMarker:()=>"fe:/b",repeatStartMarker:()=>"fe:r",repeatEndMarker:()=>"fe:/r",elementBoundaryStartMarker:()=>"fe:e",elementBoundaryEndMarker:()=>"fe:/e",isContentBindingStartMarker:e=>"fe:b"===e||Bn.test(e),isContentBindingEndMarker:e=>"fe:/b"===e||Nn.test(e),isRepeatViewStartMarker:e=>"fe:r"===e||kn.test(e),isRepeatViewEndMarker:e=>"fe:/r"===e||An.test(e),isElementBoundaryStartMarker:e=>jn(e)&&("fe:e"===e.data||Mn.test(e.data)),isElementBoundaryEndMarker:e=>jn(e)&&("fe:/e"===e.data||$n.test(e.data)),parseAttributeBindingCount(t){const n=t.getAttribute(this.attributeMarkerName);if(null===n)return null;const i=n.trim();if(!/^\d+$/.test(i))throw r.error(e.invalidHydrationAttributeMarker,{value:n});const s=parseInt(i,10);if(s<1)throw r.error(e.invalidHydrationAttributeMarker,{value:n});return s},parseLegacyAttributeBindingIndices(t){const n=[],i=t.getAttribute(this.legacyAttributeMarkerName);if(null!==i)for(const t of i.trim().split(/\s+/)){if(""===t)continue;const s=Number(t);if(!Number.isInteger(s)||s<0)throw r.error(e.invalidHydrationAttributeMarker,{value:i});n.push(s)}const s=`${this.legacyAttributeMarkerName}-`,o=`${this.legacyCompactAttributeMarkerName}-`;for(const i of t.getAttributeNames())if(i.startsWith(s)){const t=Number(i.slice(s.length));if(!Number.isInteger(t)||t<0)throw r.error(e.invalidHydrationAttributeMarker,{value:i});n.push(t)}else if(i.startsWith(o)){const[t,s]=i.slice(o.length).split("-").map(e=>Number(e));if(!Number.isInteger(t)||!Number.isInteger(s)||t<0||s<1)throw r.error(e.invalidHydrationAttributeMarker,{value:i});for(let e=0;e<s;e++)n.push(t+e)}return 0===n.length?null:n},removeLegacyAttributeBindingMarkers(e){e.removeAttribute(this.legacyAttributeMarkerName);for(const t of e.getAttributeNames())(t.startsWith(`${this.legacyAttributeMarkerName}-`)||t.startsWith(`${this.legacyCompactAttributeMarkerName}-`))&&e.removeAttribute(t)},parseLegacyContentBindingStartIndex:e=>function(e,t){const n=e.exec(t);return null===n?null:Number(n[1])}(Bn,e)});const Pn=Symbol.for("fe-hydration");function Rn(e){return e[Pn]===Pn}function In(e){return`no more attribute bindings (template defines ${e})`}function _n(e){return`no more content bindings (template defines ${e})`}function Vn(e,t){return function(e,t){return`Hydration mismatch in <${e}>${t?`: ${t}`:""}. Install hydrationDebugger() from "@lushly-dev/fast-element/hydration.js" and pass it as enableHydration({ debugger: hydrationDebugger() }) for an "Expected / Received" report including the SSR HTML snippet.`}((null!=e?e:"unknown").toLowerCase(),t)}let Ln={formatBindingMismatch:(e,t,n,i)=>({message:Vn(i,void 0)}),formatStructuralError:(e,t,n)=>({message:Vn(t,n)})};function Dn(){return Ln}function Hn(e){var t;if(!e)return;return null===(t=e.getRootNode().host)||void 0===t?void 0:t.nodeName}class zn extends Error{constructor(e,t,n,i,s){super(e),this.factories=t,this.node=n,this.expected=i,this.received=s}}function Fn(e){return e.nodeType===Node.COMMENT_NODE}function Un(e){return e.nodeType===Node.TEXT_NODE}function Wn(e,t){const n=document.createRange();return n.setStart(e,0),n.setEnd(t,Fn(t)||Un(t)?t.data.length:t.childNodes.length),n}function qn(e,t,n,i,s,r){const o=[];let a=t.nextSibling();if(e.data="",null===a){const t="content following `\x3c!--fe:b--\x3e` content binding marker",n=Dn().formatStructuralError(e,Hn(e),t);throw new zn(n.message,i,e,n.expected,n.received)}const l=a;let c=0;for(;null!==a;){if(Fn(a))if(En.isContentBindingStartMarker(a.data))c++;else if(En.isContentBindingEndMarker(a.data)){if(0===c)break;c--}o.push(a),a=t.nextSibling()}if(null===a){const t="matching `\x3c!--fe:/b--\x3e` content binding close marker",n=Dn().formatStructuralError(e,Hn(e),t);throw new zn(n.message,i,e,n.expected,n.received)}if(a.data="",1===o.length&&Un(o[0]))Jn(n,o[0],s);else{a!==l&&null!==a.previousSibling&&(r[n.targetNodeId]={first:l,last:a.previousSibling});Jn(n,a.parentNode.insertBefore(document.createTextNode(""),a),s)}}function Qn(e,t,n){let i=0,s=e.nextSibling();for(;null!==s;){if(Fn(s))if(En.isElementBoundaryStartMarker(s))s.data="",i++;else if(En.isElementBoundaryEndMarker(s)){if(0===i)return void(s.data="");s.data="",i--}s=e.nextSibling()}const r=Dn().formatStructuralError(n,Hn(n),"matching `\x3c!--fe:/e--\x3e` element boundary close marker");throw new zn(r.message,t,n,r.expected,r.received)}function Jn(e,t,n){if(void 0===e.targetNodeId)throw new Error("Factory could not be target to the node");n[e.targetNodeId]=t}function Kn(e,t){const n=t._scope;return void 0===n?e.create():e.create(void 0,n)}function Xn(e,t){const n=e.parentNode;let i,s=e;for(;s!==t;){if(i=s.nextSibling,!i)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);n.removeChild(s),s=i}n.removeChild(t)}class Gn{constructor(){this.index=0,this.length=0}get event(){return ne.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class Yn extends Gn{constructor(e,t,n,i){super(),this.fragment=e,this.factories=t,this.targets=n,this._scope=i,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Y.unknown,this._skipAttrUpdates=!1,this.isPrerendered=Promise.resolve(!1),this.isHydrated=Promise.resolve(!1),this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,e.appendChild(i),i=n;e.appendChild(t)}dispose(){Xn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e&&this.context===t)return;let n=this.behaviors;if(null===n){this.source=e,this.context=t,this.behaviors=n=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),n[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){Xn(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,n=e.length;t<n;++t)e[t].unbind()}}}var Zn;d(Yn),Z.defineProperty(Yn.prototype,"index"),Z.defineProperty(Yn.prototype,"length");const ei="unhydrated",ti="hydrating",ni="hydrated";class ii extends Error{constructor(e,t,n,i,s,r){super(e),this.factory=t,this.fragment=n,this.templateString=i,this.expected=s,this.received=r}}Zn=Pn,d(class extends Gn{get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}constructor(e,t,n,i){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=n,this.hostBindingTarget=i,this[Zn]=Pn,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Y.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=ei,this._bindingViewBoundaries={},this._targets={},this.factories=n.compile().factories}insertBefore(e){if(null!==this.fragment)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}appendTo(e){null!==this.fragment&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let n,i=this.firstChild;for(;i!==t;){if(n=i.nextSibling,!n)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=n}e.appendChild(t)}bind(e,t=this){if(this.source===e&&this.context===t)return;this.hydrationStage!==ni&&(this._hydrationStage=ti);let n=this.behaviors;if(null===n){this.source=e,this.context=t;try{const{targets:e,boundaries:t}=function(e,t,n){const i=Wn(e,t),s=i.commonAncestorContainer,r=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode:e=>0===i.comparePoint(e,0)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),o={},a={},l=function(e){let t=0;for(let n=0,i=e.length;n<i&&"h"===e[n].targetNodeId;++n)t++;return t}(n);let c=l,d=r.currentNode=e;for(;null!==d;){switch(d.nodeType){case Node.ELEMENT_NODE:{const e=d,t=En.parseLegacyAttributeBindingIndices(e);if(null!==t){for(const i of t){const t=i+l,s=n[t];if(!s){const t=In(n.length),i=Dn().formatStructuralError(d,Hn(d),t);throw new zn(i.message,n,e,i.expected,i.received)}Jn(s,d,o),c=Math.max(c,t+1)}En.removeLegacyAttributeBindingMarkers(e);break}const i=En.parseAttributeBindingCount(e);if(null!==i){for(let e=0;e<i;e++){const e=n[c++];if(!e){const e=In(n.length),t=Dn().formatStructuralError(d,Hn(d),e);throw new zn(t.message,n,d,t.expected,t.received)}Jn(e,d,o)}e.removeAttribute(En.attributeMarkerName)}break}case Node.COMMENT_NODE:{const e=d.data;if(En.isElementBoundaryStartMarker(d))d.data="",Qn(r,n,d);else if(En.isContentBindingStartMarker(e)){const t=En.parseLegacyContentBindingStartIndex(e),i=null===t?c++:t+l,s=n[i];if(c=Math.max(c,i+1),!s){const e=_n(n.length),t=Dn().formatStructuralError(d,Hn(d),e);throw new zn(t.message,n,d,t.expected,t.received)}qn(d,r,s,n,o,a)}break}}d=r.nextNode()}return i.detach(),{targets:o,boundaries:a}}(this.firstChild,this.lastChild,this.factories);this._targets=e,this._bindingViewBoundaries=t}catch(e){if(e instanceof zn){let t=this.sourceTemplate.html;"string"!=typeof t&&(t=t.innerHTML),e.templateString=t}throw e}this.behaviors=n=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e];if("h"===t.targetNodeId&&this.hostBindingTarget&&Jn(t,this.hostBindingTarget,this._targets),!(t.targetNodeId in this.targets)){let e=this.sourceTemplate.html;"string"!=typeof e&&(e=e.innerHTML);const n=Wn(this.firstChild,this.lastChild).cloneContents(),i=Dn().formatBindingMismatch(t,this.firstChild,this.lastChild,Hn(this.firstChild));throw new ii(i.message,t,n,e,i.expected,i.received)}{const i=t.createBehavior();i.bind(this),n[e]=i}}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0,this._hydrationStage=ni}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){Xn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}});const si={[v.attribute]:S.setAttribute,[v.booleanAttribute]:S.setBooleanAttribute,[v.property]:(e,t,n)=>e[t]=n,[v.content]:function(e,t,n,i){if(null==n&&(n=""),function(e){return void 0!==e.create}(n)){e.textContent="";let t=e.$fastView;if(void 0===t)if(Rn(i)&&Rn(n)&&void 0!==i.bindingViewBoundaries[this.targetNodeId]&&i.hydrationStage!==ni){const e=i.bindingViewBoundaries[this.targetNodeId];t=n.hydrate(e.first,e.last)}else t=Kn(n,i);else e.$fastTemplate!==n&&(t.isComposed&&(t.remove(),t.unbind()),t=Kn(n,i));t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=n)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=n}},[v.tokenList]:function(e,t,n){var i;const s=`${this.id}-t`,r=null!==(i=e[s])&&void 0!==i?i:e[s]={v:0,cv:Object.create(null)},o=r.cv;let a=r.v;const l=e[t];if(null!=n&&n.length){const e=n.split(/\s+/);for(let t=0,n=e.length;t<n;++t){const n=e[t];""!==n&&(o[n]=a,l.add(n))}}if(r.v=a+1,0!==a){a-=1;for(const e in o)o[e]===a&&l.remove(e)}},[v.event]:()=>{}};class ri{constructor(e){this.updateTarget=null,this.aspectType=v.content,this.dataBinding=e}createHTML(e){return gn.interpolation(e(this))}createBehavior(){var t;if(null===this.updateTarget){const n=si[this.aspectType],i=null!==(t=this.dataBinding.policy)&&void 0!==t?t:this.policy;if(!n)throw r.error(e.unsupportedBindingBehavior);this.data=`${this.id}-d`,this.updateTarget=i.protect(this.targetTagName,this.aspectType,this.targetAspect,n)}return this}bind(e){var t;const n=e.targets[this.targetNodeId];switch(this.aspectType){case v.event:n[this.data]=e,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case v.content:e.onUnbind(this);default:{const i=null!==(t=n[this.data])&&void 0!==t?t:n[this.data]=this.dataBinding.createObserver(this,this);i.target=n,i.controller=e;const s=i.bind(e);if(e._skipAttrUpdates&&(this.aspectType===v.attribute||this.aspectType===v.booleanAttribute))break;this.updateTarget(n,this.targetAspect,s,e);break}}}unbind(e){const t=e.targets[this.targetNodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){ne.setEvent(e);const n=this.dataBinding.evaluate(t.source,t.context);ne.setEvent(null),!0!==n&&e.preventDefault()}}handleChange(e,t){const n=t.controller;if(!n.isBound)return;const i=t.target;this.updateTarget(i,this.targetAspect,t.bind(n),n)}}mn.define(ri,{aspected:!0});const oi=(e,t)=>`${e}.${t}`,ai={},li={index:0,node:null};function ci(t){t.startsWith("fast-")||r.warn(e.hostBindingWithoutHost,{name:t})}const di=new Proxy(document.createElement("div"),{get(e,n){ci(n);const i=Reflect.get(e,n);return t(i)?i.bind(e):i},set:(e,t,n)=>(ci(t),Reflect.set(e,t,n))});class hi{constructor(e,t,n){this.fragment=e,this.directives=t,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,n,i,s){var r,o;this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(t,n,i)),e.id=null!==(r=e.id)&&void 0!==r?r:pn(),e.targetNodeId=n,e.targetTagName=s,e.policy=null!==(o=e.policy)&&void 0!==o?o:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,n){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),n=e.substring(0,t),i=parseInt(e.substring(t+1),10);this.addTargetDescriptor(n,e,i)}let s=ai[t];if(!s){const i=`_${t}`;ai[t]=s={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[n]}}}i[t]=s}createView(e,t){const n=void 0===t?this.fragment.cloneNode(!0):function(e,t){var n;const i=t,s=null!==(n=i.customElementRegistry)&&void 0!==n?n:i.registry;if(s){if(s!==globalThis.customElements&&"function"==typeof s.initialize)return document.importNode(function(e){let t=fi.get(e);void 0===t&&(null!=ui||(ui=document.implementation.createHTMLDocument("")),t=e.cloneNode(!0),ui.adoptNode(t),fi.set(e,t));return t}(e),{selfOnly:!1,customElementRegistry:s});if("function"==typeof i.importNode)return i.importNode(e,!0)}return e.cloneNode(!0)}(this.fragment,t),i=Object.create(this.proto);i.r=n,i.h=null!=e?e:di;for(const e of this.nodeIds)Reflect.get(i,e);return new Yn(n,this.factories,i,t)}}let ui;const fi=new WeakMap;function pi(e,t,n,i,s,r=!1){const o=n.attributes,a=e.directives;for(let l=0,c=o.length;l<c;++l){const d=o[l],h=d.value,u=bn.parse(h,a);let f=null;null===u?r&&(f=new ri(D(()=>h,e.policy)),mn.assignAspect(f,d.name)):f=mi.aggregate(u,e.policy),null!==f&&(n.removeAttributeNode(d),l--,c--,e.addFactory(f,t,i,s,n.tagName))}}function gi(e,t,n){let i=0,s=t.firstChild;for(;s;){const t=bi(e,n,s,i);s=t.node,i=t.index}}function bi(e,t,i,s){const r=oi(t,s);switch(i.nodeType){case 1:pi(e,t,i,r,s),gi(e,i,r);break;case 3:return function(e,t,i,s,r){const o=bn.parse(t.textContent,e.directives);if(null===o)return li.node=t.nextSibling,li.index=r+1,li;let a,l=a=t;for(let t=0,c=o.length;t<c;++t){const c=o[t];0!==t&&(r++,s=oi(i,r),a=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),n(c)?a.textContent=c:(a.textContent=" ",mn.assignAspect(c),e.addFactory(c,i,s,r,null)),l=a}return li.index=r+1,li.node=l.nextSibling,li}(e,i,t,r,s);case 8:{const n=bn.parse(i.data,e.directives);null!==n&&e.addFactory(mi.aggregate(n),t,r,s,null);break}}return li.index=s+1,li.node=i.nextSibling,li}const vi="TEMPLATE",mi={compile(e,t,i=S.policy){let s;if(n(e)){s=document.createElement(vi),s.innerHTML=i.createHTML(e);const t=s.content.firstElementChild;null!==t&&t.tagName===vi&&(s=t)}else s=e;s.content.firstChild||s.content.lastChild||s.content.appendChild(document.createComment(""));const r=document.adoptNode(s.content),o=new hi(r,t,i);var a,l;return pi(o,"",s,"h",0,!0),a=r.firstChild,l=t,(a&&8===a.nodeType&&null!==bn.parse(a.data,l)||1===r.childNodes.length&&Object.keys(t).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),gi(o,r,"r"),li.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=S.policy){if(1===e.length)return e[0];let i,s,r=!1;const o=e.length,a=e.map(e=>n(e)?()=>e:(i=e.sourceAspect||i,r=r||e.dataBinding.isVolatile,s=s||e.dataBinding.policy,e.dataBinding.evaluate)),l=new ri(se((e,t)=>{let n="";for(let i=0;i<o;++i)n+=a[i](e,t);return n},null!=s?s:t,r));return mn.assignAspect(l,i),l}};class yi extends wn{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}mn.define(yi);const wi=e=>new yi(e),Ci=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Si=Object.create(null);class Oi{constructor(e,t=Si){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const n in t)e(t[n]);return this.html}}function xi(e,t,n,i=mn.getForInstance(e)){if(i.aspected){const n=Ci.exec(t);null!==n&&mn.assignAspect(e,n[2])}return e.createHTML(n)}Oi.empty=new Oi(""),mn.define(Oi);class Ti{constructor(e,t={},n){this.policy=n,this.result=null,this.html=e,this.factories=t}compile(){return null===this.result&&(this.result=mi.compile(this.html,this.factories,this.policy)),this.result}inline(){return new Oi(n(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw r.error(e.cannotSetTemplatePolicyAfterCompilation);if(this.policy)throw r.error(e.onlySetTemplatePolicyOnce);return this.policy=t,this}render(e,t,n,i){const s=this.create(n,i);return s.bind(e),s.appendTo(t),s}create(e,t){return this.compile().createView(e,t)}static create(e,n,i){let s="";const r=Object.create(null),o=e=>{var t;const n=null!==(t=e.id)&&void 0!==t?t:e.id=pn();return r[n]=e,n};for(let i=0,r=e.length-1;i<r;++i){const r=e[i];let a,l=n[i];if(s+=r,t(l))l=new ri(se(l));else if(l instanceof V)l=new ri(l);else if(!(a=mn.getForInstance(l))){const e=l;l=new ri(D(()=>e))}s+=xi(l,r,o,a)}return new Ti(s+e[e.length-1],r,i)}}d(Ti);const Bi=(t,...n)=>{if(Array.isArray(t)&&Array.isArray(t.raw))return Ti.create(t,n);throw r.error(e.directCallToHTMLTagNotAllowed)};Bi.partial=e=>new Oi(e);class Ni{constructor(e){this.directive=e,this.location=null,this.controller=null,this.view=null,this.data=null,this.dataBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){if(this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.data=this.dataBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),e.onUnbind(this),Rn(this.template)&&Rn(e)&&e.hydrationStage!==ni&&!this.view){const t=e.bindingViewBoundaries[this.directive.targetNodeId];if(t)return this.view=this.template.hydrate(t.first,t.last),void this.bindView(this.view)}this.refreshView()}unbind(e){const t=this.view;null!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleChange(e,t){this.controller.isBound&&(t===this.dataBindingObserver&&(this.data=this.dataBindingObserver.bind(this.controller)),(this.directive.templateBindingDependsOnData||t===this.templateBindingObserver)&&(this.template=this.templateBindingObserver.bind(this.controller)),this.refreshView())}bindView(e){e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.data)):(e.isComposed=!0,e.bind(this.data),e.insertBefore(this.location),e.$fastTemplate=this.template)}refreshView(){let e=this.view;const t=this.template;null===e?(this.view=e=Kn(t,this.controller),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context):e.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),this.view=e=Kn(t,this.controller),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context),this.bindView(e)}}class ki{constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.templateBindingDependsOnData=n}createHTML(e){return gn.comment(e(this))}createBehavior(){return new Ni(this)}}mn.define(ki);const Ai=new Map,Mi=Bi`
|
|
2
2
|
|
|
3
|
-
`;function Mi(e){return void 0===e?Ai:e.template}function $i(e,t){const i=e.evaluate,s=Object.create(Object.getPrototypeOf(e));for(const t of Object.getOwnPropertyNames(e))"evaluate"!==t&&Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t));return Object.defineProperty(s,"evaluate",{configurable:!0,enumerable:!0,value:(e,s)=>function(e,t,i,s){var r;return n(e)?Mi(ji(t.evaluate(i,s),e)):e instanceof Node?null!==(r=e.$fastTemplate)&&void 0!==r?r:new Ei(e):e}(i(e,s),t,e,s),writable:!0}),s}function ji(e,t){if(e)return function(e,t){const n=ki.get(e);if(void 0!==n)return n[null!=t?t:"default-view"]}(e.constructor,t)}class Ei{constructor(e){this.node=e,e.$fastTemplate=this}get context(){return this}bind(e){}unbind(){}insertBefore(e){e.parentNode.insertBefore(this.node,e)}remove(){this.node.parentNode.removeChild(this.node)}create(){return this}hydrate(e,t){return this}}function Pi(e,i){let s,r;s=void 0===e?D(e=>e):oe(e);let o=!1;return void 0===i?(o=!0,r=D((e,t)=>{var n;const i=s.evaluate(e,t);return i instanceof Node?null!==(n=i.$fastTemplate)&&void 0!==n?n:new Ei(i):Mi(ji(i))})):t(i)?r=se((e,t)=>{var r;let o=i(e,t);return n(o)?o=Mi(ji(s.evaluate(e,t),o)):o instanceof Node&&(o=null!==(r=o.$fastTemplate)&&void 0!==r?r:new Ei(o)),o},void 0,!0):n(i)?(o=!0,r=D((e,t)=>{var n;const r=s.evaluate(e,t);return r instanceof Node?null!==(n=r.$fastTemplate)&&void 0!==n?n:new Ei(r):Mi(ji(r,i))})):r=i instanceof V?$i(i,s):D((e,t)=>i),new Ni(s,r,o)}const Ri=Object.freeze({positioning:!1,recycle:!0});function Ii(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[n])}function _i(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=n,e.bind(t[n])}function Vi(e){return e.nodeType===Node.COMMENT_NODE}function Li(e,t){const n=e.parentNode;if(null===n)return;let i=e;for(;null!==i;){const e=i.nextSibling;if(n.removeChild(i),i===t)break;i=e}}class Di extends Error{constructor(e,t){super(e),this.propertyBag=t}}class Hi{constructor(e){this.directive=e,this.isBound=!1,this.items=null,this.itemsObserver=null,this.bindView=Ii,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=_i)}bind(e){this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.isBound=!0,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),Pn(this.template)&&Pn(e)&&e.hydrationStage!==ti?this.hydrateViews(this.template):this.refreshAllViews(),e.onUnbind(this)}unbind(){this.isBound=!1,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(this.isBound)if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=a);const t=this.itemsObserver,n=this.itemsObserver=Z.getNotifier(this.items),i=t!==n;i&&null!==t&&t.unsubscribe(this),(i||e)&&n.subscribe(this)}updateSortedViews(e){const t=this.views;for(let n=0,i=e.length;n<i;++n){const i=e[n].sorted.slice(),s=i.slice().sort();for(let e=0,n=i.length;e<n;++e){const n=i.find(t=>i[e]===s[t]);if(n!==e){const i=s.splice(n,1);s.splice(e,0,...i);const r=t[e],o=r?r.firstChild:this.location;t[n].remove(),t[n].insertBefore(o);const a=t.splice(n,1);t.splice(e,0,...a)}}}}updateSplicedViews(e){const t=this.views,n=this.bindView,i=this.items,s=this.template,r=this.controller,o=this.directive.options.recycle,a=[];let l=0,c=0;for(let d=0,h=e.length;d<h;++d){const h=e[d],u=h.removed;let f=0,p=h.index;const g=p+h.addedCount,b=t.splice(h.index,u.length),v=c=a.length+b.length;for(;p<g;++p){const e=t[p],d=e?e.firstChild:this.location;let h;o&&c>0?(f<=v&&b.length>0?(h=b[f],f++):(h=a[l],l++),c--):h=Jn(s,r),t.splice(p,0,h),n(h,i,p,r),h.insertBefore(d)}b[f]&&a.push(...b.slice(f))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.directive.options.positioning)for(let e=0,n=t.length;e<n;++e){const i=t[e].context;i.length=n,i.index=e}}refreshAllViews(e=!1){const t=this.items,n=this.template,i=this.location,s=this.bindView,r=this.controller;let o=t.length,a=this.views,l=a.length;if(0!==o&&!e&&this.directive.options.recycle||(Gn.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(o);for(let e=0;e<o;++e){const o=Jn(n,r);s(o,t,e,r),a[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<l){const i=a[e];if(!i){const t=new XMLSerializer;throw new Di(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:e,hydrationStage:this.controller.hydrationStage,itemsLength:o,viewsState:a.map(e=>e?"hydrated":"empty"),viewTemplateString:t.serializeToString(n.create().fragment),rootNodeContent:t.serializeToString(this.location.getRootNode())})}s(i,t,e,r)}else{const o=Jn(n,r);s(o,t,e,r),a.push(o),o.insertBefore(i)}const c=a.splice(e,l-e);for(e=0,o=c.length;e<o;++e)c[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,n=e.length;t<n;++t){const n=e[t];if(!n){const n=new XMLSerializer;throw new Di(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map(e=>e?"hydrated":"empty"),rootNodeContent:n.serializeToString(this.location.getRootNode())})}n.unbind()}}hydrateViews(e){var t;if(!this.items)return;const n=this.items,i=n.length,s=this.views=new Array(i),r=[];let o=this.location.previousSibling;for(;null!==o;){if(!Vi(o)||!jn.isRepeatViewEndMarker(o.data)){o=o.previousSibling;continue}const e=o;e.data="";const n=e.previousSibling;if(!n)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let i=n,s=0;for(;null!==i;){if(Vi(i))if(jn.isRepeatViewEndMarker(i.data))s++;else if(jn.isRepeatViewStartMarker(i.data)){if(0===s){const s=i;s.data="",o=s.previousSibling;const a=null!==(t=s.nextSibling)&&void 0!==t?t:e,l=n===s?a:n;r.push({start:a,end:l,startMarker:s,endMarker:e});break}s--}i=i.previousSibling}if(!i)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": repeat start marker not found.`)}r.reverse();const a=Math.min(r.length,i);for(let t=0;t<a;t++){const{start:i,end:o}=r[t],a=e.hydrate(i,o);s[t]=a,this.bindView(a,n,t,this.controller)}for(let t=a;t<i;t++){const i=Jn(e,this.controller);s[t]=i,this.bindView(i,n,t,this.controller),i.insertBefore(this.location)}for(let e=i,t=r.length;e<t;e++){const{startMarker:t,endMarker:n}=r[e];Li(t,n)}}}class zi{createHTML(e){return pn.comment(e(this))}constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.options=n,Pt.enable()}createBehavior(){return new Hi(this)}}function Fi(e,t,n=Ri){const i=oe(e),s=oe(t);return new zi(i,s,Object.assign(Object.assign({},Ri),n))}vn.define(zi);const Ui="slotchange";class Wi extends Sn{observe(e){e.addEventListener(Ui,this)}disconnect(e){e.removeEventListener(Ui,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function qi(e){return n(e)&&(e={property:e}),new Wi(e)}vn.define(Wi);const Qi=()=>null;function Ji(e){return void 0===e?Qi:t(e)?e:()=>e}function Ki(e,n,i){const s=t(e)?e:()=>e,r=Ji(n),o=Ji(i);return(e,t)=>s(e,t)?r(e,t):o(e,t)}function Xi(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function Gi(e,t){let n=t;for(;null!==n;){if(n===e)return!0;n=Xi(n)}return!1}class Yi extends MutationObserver{constructor(e){super(function(e){this.callback.call(null,e.filter(e=>this.observedNodes.has(e.target)))}),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}const Zi=Object.freeze({create(e){const t=[],n={};let i=null,s=!1;return{source:e,context:ne.default,targets:n,get isBound(){return s},addBehaviorFactory(e,t){var n,i,s,r;const o=e;o.id=null!==(n=o.id)&&void 0!==n?n:fn(),o.targetNodeId=null!==(i=o.targetNodeId)&&void 0!==i?i:fn(),o.targetTagName=null!==(s=t.tagName)&&void 0!==s?s:null,o.policy=null!==(r=o.policy)&&void 0!==r?r:S.policy,this.addTarget(o.targetNodeId,t),this.addBehavior(o.createBehavior())},addTarget(e,t){n[e]=t},addBehavior(e){t.push(e),s&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){s||(s=!0,t.forEach(e=>e.bind(this)))},disconnectedCallback(e){s&&(s=!1,null!==i&&i.forEach(e=>e.unbind(this)))}}}});b(),S.setPolicy(_.create());export{Pt as ArrayObserver,we as AttributeConfiguration,Te as AttributeDefinition,V as Binding,nn as CSSDirective,On as ChildrenDirective,vi as Compiler,S as DOM,v as DOMAspect,_ as DOMPolicy,Xn as DefaultExecutionContext,lt as ElementController,Me as ElementStyles,ne as ExecutionContext,r as FAST,mt as FASTElement,Ze as FASTElementDefinition,si as HTMLBindingDirective,vn as HTMLDirective,Gn as HTMLView,Si as InlineTemplateDirective,pn as Markup,Sn as NodeObservationDirective,Z as Observable,gn as Parser,z as PropertyChangeNotifier,mi as RefDirective,Bi as RenderBehavior,Ni as RenderDirective,Hi as RepeatBehavior,zi as RepeatDirective,Ft as Schema,le as Signal,Wi as SlottedDirective,Ct as Sort,Y as SourceLifetime,wt as Splice,Mt as SpliceStrategy,St as SpliceStrategySupport,at as Stages,yn as StatelessAttachedAttributeDirective,H as SubscriberSet,pe as TwoWaySettings,Yi as UnobservableMutationObserver,G as Updates,Zi as ViewBehaviorOrchestrator,xi as ViewTemplate,Be as attr,Ce as booleanConverter,xn as children,Gi as composedContains,Xi as composedParent,Gt as computedState,on as css,sn as cssDirective,yt as customElement,Cn as elements,a as emptyArray,b as enableDebug,_e as fastElementRegistry,Ti as html,mn as htmlDirective,Rt as lengthOf,re as listener,oe as normalizeBinding,Se as nullableBooleanConverter,xe as nullableNumberConverter,ee as observable,D as oneTime,se as oneWay,Xt as ownedState,Qt as reactive,yi as ref,Pi as render,Fi as repeat,zt as schemaRegistry,he as signal,qi as slotted,It as sortedCount,Kt as state,ve as twoWay,_t as volatile,en as watch,Ki as when};
|
|
3
|
+
`;function $i(e){return void 0===e?Mi:e.template}function ji(e,t){const i=e.evaluate,s=Object.create(Object.getPrototypeOf(e));for(const t of Object.getOwnPropertyNames(e))"evaluate"!==t&&Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t));return Object.defineProperty(s,"evaluate",{configurable:!0,enumerable:!0,value:(e,s)=>function(e,t,i,s){var r;return n(e)?$i(Ei(t.evaluate(i,s),e)):e instanceof Node?null!==(r=e.$fastTemplate)&&void 0!==r?r:new Pi(e):e}(i(e,s),t,e,s),writable:!0}),s}function Ei(e,t){if(e)return function(e,t){const n=Ai.get(e);if(void 0!==n)return n[null!=t?t:"default-view"]}(e.constructor,t)}class Pi{constructor(e){this.node=e,e.$fastTemplate=this}get context(){return this}bind(e){}unbind(){}insertBefore(e){e.parentNode.insertBefore(this.node,e)}remove(){this.node.parentNode.removeChild(this.node)}create(){return this}hydrate(e,t){return this}}function Ri(e,i){let s,r;s=void 0===e?D(e=>e):oe(e);let o=!1;return void 0===i?(o=!0,r=D((e,t)=>{var n;const i=s.evaluate(e,t);return i instanceof Node?null!==(n=i.$fastTemplate)&&void 0!==n?n:new Pi(i):$i(Ei(i))})):t(i)?r=se((e,t)=>{var r;let o=i(e,t);return n(o)?o=$i(Ei(s.evaluate(e,t),o)):o instanceof Node&&(o=null!==(r=o.$fastTemplate)&&void 0!==r?r:new Pi(o)),o},void 0,!0):n(i)?(o=!0,r=D((e,t)=>{var n;const r=s.evaluate(e,t);return r instanceof Node?null!==(n=r.$fastTemplate)&&void 0!==n?n:new Pi(r):$i(Ei(r,i))})):r=i instanceof V?ji(i,s):D((e,t)=>i),new ki(s,r,o)}const Ii=Object.freeze({positioning:!1,recycle:!0});function _i(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[n])}function Vi(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=n,e.bind(t[n])}function Li(e){return e.nodeType===Node.COMMENT_NODE}function Di(e,t){const n=e.parentNode;if(null===n)return;let i=e;for(;null!==i;){const e=i.nextSibling;if(n.removeChild(i),i===t)break;i=e}}class Hi extends Error{constructor(e,t){super(e),this.propertyBag=t}}class zi{constructor(e){this.directive=e,this.isBound=!1,this.items=null,this.itemsObserver=null,this.bindView=_i,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=Vi)}bind(e){this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.isBound=!0,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),Rn(this.template)&&Rn(e)&&e.hydrationStage!==ni?this.hydrateViews(this.template):this.refreshAllViews(),e.onUnbind(this)}unbind(){this.isBound=!1,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(this.isBound)if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=a);const t=this.itemsObserver,n=this.itemsObserver=Z.getNotifier(this.items),i=t!==n;i&&null!==t&&t.unsubscribe(this),(i||e)&&n.subscribe(this)}updateSortedViews(e){const t=this.views;for(let n=0,i=e.length;n<i;++n){const i=e[n].sorted.slice(),s=i.slice().sort();for(let e=0,n=i.length;e<n;++e){const n=i.find(t=>i[e]===s[t]);if(n!==e){const i=s.splice(n,1);s.splice(e,0,...i);const r=t[e],o=r?r.firstChild:this.location;t[n].remove(),t[n].insertBefore(o);const a=t.splice(n,1);t.splice(e,0,...a)}}}}updateSplicedViews(e){const t=this.views,n=this.bindView,i=this.items,s=this.template,r=this.controller,o=this.directive.options.recycle,a=[];let l=0,c=0;for(let d=0,h=e.length;d<h;++d){const h=e[d],u=h.removed;let f=0,p=h.index;const g=p+h.addedCount,b=t.splice(h.index,u.length),v=c=a.length+b.length;for(;p<g;++p){const e=t[p],d=e?e.firstChild:this.location;let h;o&&c>0?(f<=v&&b.length>0?(h=b[f],f++):(h=a[l],l++),c--):h=Kn(s,r),t.splice(p,0,h),n(h,i,p,r),h.insertBefore(d)}b[f]&&a.push(...b.slice(f))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.directive.options.positioning)for(let e=0,n=t.length;e<n;++e){const i=t[e].context;i.length=n,i.index=e}}refreshAllViews(e=!1){const t=this.items,n=this.template,i=this.location,s=this.bindView,r=this.controller;let o=t.length,a=this.views,l=a.length;if(0!==o&&!e&&this.directive.options.recycle||(Yn.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(o);for(let e=0;e<o;++e){const o=Kn(n,r);s(o,t,e,r),a[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<l){const i=a[e];if(!i){const t=new XMLSerializer;throw new Hi(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:e,hydrationStage:this.controller.hydrationStage,itemsLength:o,viewsState:a.map(e=>e?"hydrated":"empty"),viewTemplateString:t.serializeToString(n.create().fragment),rootNodeContent:t.serializeToString(this.location.getRootNode())})}s(i,t,e,r)}else{const o=Kn(n,r);s(o,t,e,r),a.push(o),o.insertBefore(i)}const c=a.splice(e,l-e);for(e=0,o=c.length;e<o;++e)c[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,n=e.length;t<n;++t){const n=e[t];if(!n){const n=new XMLSerializer;throw new Hi(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map(e=>e?"hydrated":"empty"),rootNodeContent:n.serializeToString(this.location.getRootNode())})}n.unbind()}}hydrateViews(e){var t;if(!this.items)return;const n=this.items,i=n.length,s=this.views=new Array(i),r=[];let o=this.location.previousSibling;for(;null!==o;){if(!Li(o)||!En.isRepeatViewEndMarker(o.data)){o=o.previousSibling;continue}const e=o;e.data="";const n=e.previousSibling;if(!n)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let i=n,s=0;for(;null!==i;){if(Li(i))if(En.isRepeatViewEndMarker(i.data))s++;else if(En.isRepeatViewStartMarker(i.data)){if(0===s){const s=i;s.data="",o=s.previousSibling;const a=null!==(t=s.nextSibling)&&void 0!==t?t:e,l=n===s?a:n;r.push({start:a,end:l,startMarker:s,endMarker:e});break}s--}i=i.previousSibling}if(!i)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": repeat start marker not found.`)}r.reverse();const a=Math.min(r.length,i);for(let t=0;t<a;t++){const{start:i,end:o}=r[t],a=e.hydrate(i,o);s[t]=a,this.bindView(a,n,t,this.controller)}for(let t=a;t<i;t++){const i=Kn(e,this.controller);s[t]=i,this.bindView(i,n,t,this.controller),i.insertBefore(this.location)}for(let e=i,t=r.length;e<t;e++){const{startMarker:t,endMarker:n}=r[e];Di(t,n)}}}class Fi{createHTML(e){return gn.comment(e(this))}constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.options=n,Rt.enable()}createBehavior(){return new zi(this)}}function Ui(e,t,n=Ii){const i=oe(e),s=oe(t);return new Fi(i,s,Object.assign(Object.assign({},Ii),n))}mn.define(Fi);const Wi="slotchange";class qi extends On{observe(e){e.addEventListener(Wi,this)}disconnect(e){e.removeEventListener(Wi,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Qi(e){return n(e)&&(e={property:e}),new qi(e)}mn.define(qi);const Ji=()=>null;function Ki(e){return void 0===e?Ji:t(e)?e:()=>e}function Xi(e,n,i){const s=t(e)?e:()=>e,r=Ki(n),o=Ki(i);return(e,t)=>s(e,t)?r(e,t):o(e,t)}function Gi(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function Yi(e,t){let n=t;for(;null!==n;){if(n===e)return!0;n=Gi(n)}return!1}class Zi extends MutationObserver{constructor(e){super(function(e){this.callback.call(null,e.filter(e=>this.observedNodes.has(e.target)))}),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}const es=Object.freeze({create(e){const t=[],n={};let i=null,s=!1;return{source:e,context:ne.default,targets:n,get isBound(){return s},addBehaviorFactory(e,t){var n,i,s,r;const o=e;o.id=null!==(n=o.id)&&void 0!==n?n:pn(),o.targetNodeId=null!==(i=o.targetNodeId)&&void 0!==i?i:pn(),o.targetTagName=null!==(s=t.tagName)&&void 0!==s?s:null,o.policy=null!==(r=o.policy)&&void 0!==r?r:S.policy,this.addTarget(o.targetNodeId,t),this.addBehavior(o.createBehavior())},addTarget(e,t){n[e]=t},addBehavior(e){t.push(e),s&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){s||(s=!0,t.forEach(e=>e.bind(this)))},disconnectedCallback(e){s&&(s=!1,null!==i&&i.forEach(e=>e.unbind(this)))}}}});b(),S.setPolicy(_.create());export{Rt as ArrayObserver,we as AttributeConfiguration,Te as AttributeDefinition,V as Binding,sn as CSSDirective,xn as ChildrenDirective,mi as Compiler,S as DOM,v as DOMAspect,_ as DOMPolicy,Gn as DefaultExecutionContext,ct as ElementController,Ae as ElementStyles,ne as ExecutionContext,r as FAST,yt as FASTElement,Ze as FASTElementDefinition,ri as HTMLBindingDirective,mn as HTMLDirective,Yn as HTMLView,Oi as InlineTemplateDirective,gn as Markup,On as NodeObservationDirective,Z as Observable,bn as Parser,z as PropertyChangeNotifier,yi as RefDirective,Ni as RenderBehavior,ki as RenderDirective,zi as RepeatBehavior,Fi as RepeatDirective,Ut as Schema,le as Signal,qi as SlottedDirective,St as Sort,Y as SourceLifetime,Ct as Splice,$t as SpliceStrategy,Ot as SpliceStrategySupport,lt as Stages,wn as StatelessAttachedAttributeDirective,H as SubscriberSet,pe as TwoWaySettings,Zi as UnobservableMutationObserver,G as Updates,es as ViewBehaviorOrchestrator,Ti as ViewTemplate,Be as attr,Ce as booleanConverter,Tn as children,Yi as composedContains,Gi as composedParent,Yt as computedState,an as css,rn as cssDirective,wt as customElement,Sn as elements,a as emptyArray,b as enableDebug,_e as fastElementRegistry,Bi as html,yn as htmlDirective,It as lengthOf,re as listener,oe as normalizeBinding,Se as nullableBooleanConverter,xe as nullableNumberConverter,ee as observable,D as oneTime,se as oneWay,Gt as ownedState,Jt as reactive,wi as ref,Ri as render,Ui as repeat,Ft as schemaRegistry,he as signal,Qi as slotted,_t as sortedCount,Xt as state,ve as twoWay,Vt as volatile,tn as watch,Xi as when};
|