@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.
@@ -803,12 +803,10 @@ class PropertyChangeNotifier {
803
803
  var _a, _b;
804
804
  let subscribers;
805
805
  if (propertyToWatch) {
806
- subscribers =
807
- (_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : (this.subscribers[propertyToWatch] = new SubscriberSet(this.subject));
806
+ subscribers = (_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : (this.subscribers[propertyToWatch] = new SubscriberSet(this.subject));
808
807
  }
809
808
  else {
810
- subscribers =
811
- (_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : (this.subjectSubscribers = new SubscriberSet(this.subject));
809
+ subscribers = (_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : (this.subjectSubscribers = new SubscriberSet(this.subject));
812
810
  }
813
811
  subscribers.subscribe(subscriber);
814
812
  }
@@ -1378,8 +1376,7 @@ class TwoWayObserver {
1378
1376
  bind(controller) {
1379
1377
  var _a;
1380
1378
  if (!this.changeEvent) {
1381
- this.changeEvent =
1382
- (_a = this.dataBinding.options.changeEvent) !== null && _a !== void 0 ? _a : twoWaySettings.determineChangeEvent(this.directive, this.target);
1379
+ this.changeEvent = (_a = this.dataBinding.options.changeEvent) !== null && _a !== void 0 ? _a : twoWaySettings.determineChangeEvent(this.directive, this.target);
1383
1380
  }
1384
1381
  if (this.isNotBound) {
1385
1382
  this.target.addEventListener(this.changeEvent, this);
@@ -1668,40 +1665,6 @@ function attr(configOrTarget, prop) {
1668
1665
  return decorator;
1669
1666
  }
1670
1667
 
1671
- /******************************************************************************
1672
- Copyright (c) Microsoft Corporation.
1673
-
1674
- Permission to use, copy, modify, and/or distribute this software for any
1675
- purpose with or without fee is hereby granted.
1676
-
1677
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1678
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1679
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1680
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1681
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1682
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1683
- PERFORMANCE OF THIS SOFTWARE.
1684
- ***************************************************************************** */
1685
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1686
-
1687
-
1688
- function __rest(s, e) {
1689
- var t = {};
1690
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1691
- t[p] = s[p];
1692
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1693
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1694
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1695
- t[p[i]] = s[p[i]];
1696
- }
1697
- return t;
1698
- }
1699
-
1700
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1701
- var e = new Error(message);
1702
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1703
- };
1704
-
1705
1668
  let DefaultStyleStrategy;
1706
1669
  function reduceStyles(styles) {
1707
1670
  return styles.reduce((reduced, current) => {
@@ -1854,6 +1817,17 @@ function createStyleElementStrategy() {
1854
1817
  */
1855
1818
  const TRUST_KEY = "__trust";
1856
1819
 
1820
+ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
1821
+ var t = {};
1822
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1823
+ t[p] = s[p];
1824
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1825
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1826
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1827
+ t[p[i]] = s[p[i]];
1828
+ }
1829
+ return t;
1830
+ };
1857
1831
  function isPlainObject(value) {
1858
1832
  if (value === null || typeof value !== "object") {
1859
1833
  return false;
@@ -1879,7 +1853,7 @@ function wrapDetailWithTrust(detail, signals) {
1879
1853
  const warnings = Array.isArray(signals === null || signals === void 0 ? void 0 : signals.warnings) ? signals.warnings : undefined;
1880
1854
  if (confidence === undefined && reasoning === undefined && warnings === undefined) {
1881
1855
  if (isPlainObject(detail) && TRUST_KEY in detail) {
1882
- const _a = detail, _b = TRUST_KEY; _a[_b]; const rest = __rest(_a, [_b + ""]);
1856
+ const _a = detail, _b = TRUST_KEY; _a[_b]; const rest = __rest$1(_a, [_b + ""]);
1883
1857
  return rest;
1884
1858
  }
1885
1859
  return detail; // No-op when no trust signals
@@ -1896,7 +1870,7 @@ function wrapDetailWithTrust(detail, signals) {
1896
1870
  if (warnings !== undefined)
1897
1871
  trust.warnings = warnings.map(warning => (Object.assign({}, warning)));
1898
1872
  if (isPlainObject(detail)) {
1899
- const _c = detail, _d = TRUST_KEY; _c[_d]; const rest = __rest(_c, [_d + ""]);
1873
+ const _c = detail, _d = TRUST_KEY; _c[_d]; const rest = __rest$1(_c, [_d + ""]);
1900
1874
  return Object.assign(Object.assign({}, rest), { [TRUST_KEY]: trust });
1901
1875
  }
1902
1876
  // Wrap everything that is not a plain object in an envelope
@@ -2217,6 +2191,17 @@ FASTElementDefinition.getByType = fastElementRegistry.getByType;
2217
2191
  FASTElementDefinition.getForInstance = fastElementRegistry.getForInstance;
2218
2192
  Observable.defineProperty(FASTElementDefinition.prototype, "template");
2219
2193
 
2194
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
2195
+ var t = {};
2196
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2197
+ t[p] = s[p];
2198
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
2199
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2200
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2201
+ t[p[i]] = s[p[i]];
2202
+ }
2203
+ return t;
2204
+ };
2220
2205
  const defaultEventOptions = {
2221
2206
  bubbles: true,
2222
2207
  composed: true,
@@ -2263,14 +2248,16 @@ class ElementController {
2263
2248
  * The context the expression is evaluated against.
2264
2249
  */
2265
2250
  get context() {
2266
- var _a, _b;
2251
+ var _a;
2252
+ var _b;
2267
2253
  return (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.context) !== null && _b !== void 0 ? _b : ExecutionContext.default;
2268
2254
  }
2269
2255
  /**
2270
2256
  * Indicates whether the controller is bound.
2271
2257
  */
2272
2258
  get isBound() {
2273
- var _a, _b;
2259
+ var _a;
2260
+ var _b;
2274
2261
  return (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.isBound) !== null && _b !== void 0 ? _b : false;
2275
2262
  }
2276
2263
  /**
@@ -2296,8 +2283,7 @@ class ElementController {
2296
2283
  }
2297
2284
  else if (definition.template) {
2298
2285
  // 3. Default to the static definition.
2299
- this._template =
2300
- (_a = definition.template) !== null && _a !== void 0 ? _a : null;
2286
+ this._template = (_a = definition.template) !== null && _a !== void 0 ? _a : null;
2301
2287
  }
2302
2288
  }
2303
2289
  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=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),u=e=>e,f=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:u}):{createHTML:u};let p=Object.freeze({createHTML:e=>f.createHTML(e),protect:(e,t,n,i)=>i});const g=p,b=Object.freeze({get policy(){return p},setPolicy(t){if(p!==g)throw r.error(e.onlySetDOMPolicyOnce);p=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)}}),v=/^[\u0000-\u0020\u007F]+|[\u0000-\u0020\u007F]+$/g,m=/[\u0000-\u0020\u007F]+/g,y=/^(?:javascript|vbscript|data):/;function w(e){return e.replace(v,"")}function C(e){try{return decodeURIComponent(e)}catch(t){return e}}function S(e){const t=w(e);return function(e){let t=w(e);for(let e=0;e<3;++e){const e=C(t);if(e===t)break;t=w(e)}return t=t.replace(m,"").toLowerCase(),y.test(t)}(t)?"":t}function O(e,t,i,s){return(e,t,i,...r)=>{n(i)&&(i=S(i)),s(e,t,i,...r)}}function x(t,n,i,s){throw r.error(e.blockedByDOMPolicy,{aspectName:i,tagName:null!=t?t:"text"})}const T={onabort:x,onauxclick:x,onbeforeinput:x,onbeforematch:x,onblur:x,oncancel:x,oncanplay:x,oncanplaythrough:x,onchange:x,onclick:x,onclose:x,oncontextlost:x,oncontextmenu:x,oncontextrestored:x,oncopy:x,oncuechange:x,oncut:x,ondblclick:x,ondrag:x,ondragend:x,ondragenter:x,ondragleave:x,ondragover:x,ondragstart:x,ondrop:x,ondurationchange:x,onemptied:x,onended:x,onerror:x,onfocus:x,onformdata:x,oninput:x,oninvalid:x,onkeydown:x,onkeypress:x,onkeyup:x,onload:x,onloadeddata:x,onloadedmetadata:x,onloadstart:x,onmousedown:x,onmouseenter:x,onmouseleave:x,onmousemove:x,onmouseout:x,onmouseover:x,onmouseup:x,onpaste:x,onpause:x,onplay:x,onplaying:x,onprogress:x,onratechange:x,onreset:x,onresize:x,onscroll:x,onsecuritypolicyviolation:x,onseeked:x,onseeking:x,onselect:x,onslotchange:x,onstalled:x,onsubmit:x,onsuspend:x,ontimeupdate:x,ontoggle:x,onvolumechange:x,onwaiting:x,onwebkitanimationend:x,onwebkitanimationiteration:x,onwebkitanimationstart:x,onwebkittransitionend:x,onwheel:x},B={elements:{a:{[h.attribute]:{href:O},[h.property]:{href:O}},area:{[h.attribute]:{href:O},[h.property]:{href:O}},button:{[h.attribute]:{formaction:O},[h.property]:{formAction:O}},embed:{[h.attribute]:{src:x},[h.property]:{src:x}},form:{[h.attribute]:{action:O},[h.property]:{action:O}},frame:{[h.attribute]:{src:O},[h.property]:{src:O}},iframe:{[h.attribute]:{src:O},[h.property]:{src:O,srcdoc:x}},input:{[h.attribute]:{formaction:O},[h.property]:{formAction:O}},link:{[h.attribute]:{href:x},[h.property]:{href:x}},object:{[h.attribute]:{codebase:x,data:x},[h.property]:{codeBase:x,data:x}},script:{[h.attribute]:{src:x,text:x},[h.property]:{src:x,text:x,innerText:x,textContent:x}},style:{[h.property]:{innerText:x,textContent:x}}},aspects:{[h.attribute]:Object.assign({},T),[h.property]:Object.assign({innerHTML:x},T),[h.event]:Object.assign({},T)}};function N(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 k(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]=N(r,{});break;default:n[i]=N(s,r)}}for(const t in e)t in n||(n[t]=N(e[t],{}));return Object.freeze(n)}function A(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]=k(r,{});break;default:n[i]=k(s,r)}}for(const t in e)t in n||(n[t]=k(e[t],{}));return Object.freeze(n)}function M(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=B,Object.freeze({elements:r.elements?A(r.elements,o.elements):o.elements,aspects:r.aspects?k(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=M(a,e,t,n,i);if(s)return s}return null!==(r=M(s.aspects,e,t,n,i))&&void 0!==r?r:i}})}});class j{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}}class E extends j{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function P(e,t){return new E(e,t)}d(E);class R{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 I{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 R(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new R(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 _=[],V=[],L=globalThis.requestAnimationFrame;let D=!0;function H(){if(V.length)throw V.shift()}function z(e){try{e.call()}catch(e){if(!D)throw _.length=0,e;V.push(e),setTimeout(H,0)}}function F(){let e=0;for(;e<_.length;)if(z(_[e]),e++,e>1024){for(let t=0,n=_.length-e;t<n;t++)_[t]=_[t+e];_.length-=e,e=0}_.length=0}function U(e){_.push(e),_.length<2&&(D?L(F):F())}const W=Object.freeze({enqueue:U,next:()=>new Promise(U),process:F,setMode:e=>D=e}),q=Object.freeze({unknown:void 0,coupled:1}),Q=(()=>{const i=W.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 I(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 R{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!==q.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 J(e,t){Q.defineProperty(e,t)}const K=(()=>{let e=null;return{get:()=>e,set(t){e=t}}})(),X=Object.freeze({default:{index:0,length:0,get event(){return X.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>K.get(),setEvent(e){K.set(e)}});class G extends j{createObserver(e){return Q.binding(this.evaluate,e,this.isVolatile)}}function Y(e,t,n=Q.isVolatileBinding(e)){return new G(e,t,n)}function Z(e,t){const n=new G(e);return n.options=t,n}function ee(e){return t(e)?Y(e):e instanceof j?e:P(()=>e)}const te=Object.create(null),ne=Object.freeze({subscribe(e,t){const n=te[e];n?n instanceof Set?n.add(t):te[e]=new Set([n,t]):te[e]=t},unsubscribe(e,t){const n=te[e];n&&n instanceof Set?n.delete(t):te[e]=void 0},send(e){const t=te[e];t&&(t instanceof Set?t.forEach(n=>n.handleChange(t,e)):t.handleChange(this,e))}});class ie{constructor(e,t){this.dataBinding=e,this.subscriber=t,this.isNotBound=!0}bind(e){return this.isNotBound&&(ne.subscribe(this.getSignal(e),this),e.onUnbind(this),this.isNotBound=!1),this.dataBinding.evaluate(e.source,e.context)}unbind(e){this.isNotBound=!0,ne.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(ie);class se extends j{createObserver(e){return new ie(this,e)}}function re(e,t,n){const i=new se(e,n);return i.options=t,i}const oe={fromView:e=>e};let ae={determineChangeEvent:()=>"change"};const le=Object.freeze({configure(e){ae=e}});class ce{constructor(e,t,n){this.directive=e,this.subscriber=t,this.dataBinding=n,this.isNotBound=!0,this.notifier=Q.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:ae.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(ce);class de extends j{createObserver(e,t){return new ce(t,e,this)}}function he(e,t,i,s=Q.isVolatileBinding(e)){n(t)&&(t={changeEvent:t}),t?t.fromView||(t.fromView=oe.fromView):t=oe;const r=new de(e,i,s);return r.options=t,r}const ue="boolean",fe="reflect",pe=Object.freeze({locate:c()}),ge={toView:e=>e?"":null,fromView:e=>!!e},be={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:ge.fromView(e)};function ve(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const me={toView(e){const t=ve(e);return t?t.toString():t},fromView:ve};class ye{constructor(e,t,n=t.toLowerCase(),i=fe,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===ue&&void 0===s&&(this.converter=ge)}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 Q.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.mode===ue?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||W.enqueue(()=>{n.add(e);const i=e[this.fieldName];switch(t){case fe:{const t=this.converter;b.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break}case ue:b.setBooleanAttribute(e,this.attribute,i)}n.delete(e)})}static collect(e,...t){const i=[];t.push(pe.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 ye(e,s)):i.push(new ye(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function we(e,t){let n;function i(e,t){arguments.length>1&&(n.property=t),pe.locate(e.constructor).push(n)}return arguments.length>1?(n={},void i(e,t)):(n=void 0===e?{}:e,i)}function Ce(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 Se;function Oe(e){return e.reduce((e,t)=>(t instanceof xe?e.push(...Oe(t.styles)):e.push(t),e),[])}"function"==typeof SuppressedError&&SuppressedError;class xe{get strategy(){return null===this._strategy&&(Se||xe.setDefaultStrategy(xe.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-"+ ++Te}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(Se)),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(Oe(this.styles)),this}static setDefaultStrategy(e){Se=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new xe(e):e instanceof xe?e:new xe([e])}}xe.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;let Te=0;const Be="__trust";function Ne(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}const ke={},Ae=new WeakMap,Me=l(),$e=Object.freeze({register(e){if(!Me.register(e))return!1;const t=je(e.registry);return Object.prototype.hasOwnProperty.call(t,e.name)||Q.defineProperty(t,e.name),t[e.name]=e.type,!0},getByType:Me.getByType,getForInstance:Me.getForInstance,whenRegistered:function(e,t=customElements){const n=je(t);Object.prototype.hasOwnProperty.call(n,e)||Q.defineProperty(n,e);const i=Ee(n[e]);if(void 0!==i)return Promise.resolve(i);return new Promise(t=>{const i=Q.getNotifier(n),s={handleChange:()=>{const r=Ee(n[e]);void 0!==r&&(i.unsubscribe(s,e),t(r))}};i.subscribe(s,e)})}});function je(e=customElements){if(e===customElements)return ke;let t=Ae.get(e);return t||(t={},Ae.set(e,t)),t}function Ee(e){return void 0===e?void 0:$e.getByType(e)}const Pe={mode:"open"},Re={},Ie=new Set;const _e=new WeakMap,Ve=new WeakMap,Le=new WeakMap,De=new WeakMap,He=new Set,ze=new WeakMap;function Fe(e,t){if(Ve.delete(e),void 0===e.template&&void 0!==t&&(e.template=t),void 0!==e.template)return Le.delete(e),_e.delete(e),e.template}function Ue(e,t=e.registry,n){if(0===He.size&&!(null==n?void 0:n.length))return;const i=e;let s=De.get(i);if(!(null==s?void 0:s.has(t))){void 0===s&&(s=new WeakSet,De.set(i,s)),s.add(t);for(const n of He)n(e,t);for(const i of null!=n?n:[])He.has(i)||i(e,t)}}function We(e){var t;return null!==(t=ze.get(e))&&void 0!==t?t:null}function qe(e){if(void 0!==e.template)return Le.delete(e),e.template;const t=Ve.get(e);if(t)return t;const n=_e.get(e);if(!n)return;let i;Le.delete(e);try{i=n(e)}catch(t){throw Le.set(e,t),t}if("function"==typeof(null==(s=i)?void 0:s.then)){const t=Promise.resolve(i).then(t=>Fe(e,t)).catch(t=>{throw Ve.delete(e),Le.set(e,t),t});return Ve.set(e,t),t}var s;return Fe(e,i)}class Qe{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)?_e.set(this,i.template):this.template=i.template;const o=e.prototype,a=ye.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,Q.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({},Pe),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?Re:Object.assign(Object.assign({},Re),i.elementOptions),this.styles=xe.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(Ue(this,e,t),void 0===this.template&&_e.has(this))return Promise.resolve().then(()=>qe(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?Le.set(n,t):Le.delete(n)}(this,e),Q.notify(this,"template")}),this;this.platformDefined=!0,e.define(this.name,n,this.elementOptions)}return this}static compose(e,t){const n=Ie.has(e)||$e.getByType(e)?new Qe(class extends e{},t):new Qe(e,t);return Promise.resolve(n)}static registerBaseType(e){Ie.add(e)}}Qe.getByType=$e.getByType,Qe.getForInstance=$e.getForInstance,Q.defineProperty(Qe.prototype,"template");const Je={bubbles:!0,composed:!0,cancelable:!0},Ke="isConnected",Xe=new WeakMap,Ge=Symbol("fast-late-attribute-observer"),Ye=new Set;function Ze(e){var t,n;return null!==(n=null!==(t=e.shadowRoot)&&void 0!==t?t:Xe.get(e))&&void 0!==n?n:null}let et;var tt;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(tt||(tt={}));class nt{get isConnected(){return Q.track(this,Ke),this.stage===tt.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:X.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&&Xe.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=tt.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this._notifier=new I(e),this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const n=Reflect.getPrototypeOf(e),i=null===n?[]:Q.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 Ye){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!==tt.connected&&this.stage!==tt.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!==tt.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=Ze(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=Ze(n))&&void 0!==t?t:n).removeChild(e)}else e.isAttachedTo(n)&&e.removeStylesFrom(n)}connect(){this.stage===tt.disconnected&&(this.stage=tt.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=tt.connected,Q.notify(this,Ke))}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=We(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=We(this.definition);if(null===e)return;const t=this.source;void 0===t[Ge]&&(t[Ge]=new MutationObserver(e=>{const n=t.$fastController,i=We(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[Ge].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===tt.connected&&(this.stage=tt.disconnecting,Q.notify(this,Ke),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=tt.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===tt.connected){const i=null!=n?n:{},{confidence:s,reasoning:r,warnings:o}=i,a=Ce(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(Ne(e)&&Be in e){const t=e,n=Be;return t[n],Ce(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))),Ne(e)){const t=e,n=Be;t[n];const i=Ce(t,[n+""]);return Object.assign(Object.assign({},i),{[Be]:r})}return{value:e,[Be]:r}}(t,{confidence:s,reasoning:r,warnings:o});return this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign(Object.assign({},Je),a),{detail:l})))}return!1}renderTemplate(e){var t;const n=this.source,i=null!==(t=Ze(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&&nt.hydrationHook&&(s=nt.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=q.coupled}static forCustomElement(t,n=!1){const i=t.$fastController;if(void 0!==i&&!n)return i;const s=Qe.getForInstance(t);if(void 0===s)throw r.error(e.missingElementDefinition);return Q.getNotifier(s).subscribe({handleChange:()=>{nt.forCustomElement(t,!0),t.$fastController.connect()}},"template"),Q.getNotifier(s).subscribe({handleChange:()=>{nt.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new et(t,s)}static setStrategy(e){et=e}static installHydrationHook(e){nt.hydrationHook=e}}function it(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=Ze(e))&&void 0!==t?t:e.getRootNode()}nt.hydrationHook=null,d(nt),nt.setStrategy(nt);class st{constructor(e){const t=st.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){lt(it(e),this.sheets)}removeStylesFrom(e){ct(it(e),this.sheets)}}st.styleSheetCache=new Map;let rt=0;function ot(e){return e===document?document.body:e}class at{constructor(e){this.styles=e,this.styleClass="fast-"+ ++rt}addStylesTo(e){e=ot(it(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=ot(it(e))).querySelectorAll(`.${this.styleClass}`);for(let n=0,i=t.length;n<i;++n)e.removeChild(t[n])}}let lt=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},ct=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(xe.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),lt=(e,t)=>{e.adoptedStyleSheets.push(...t)},ct=(e,t)=>{for(const n of t){const t=e.adoptedStyleSheets.indexOf(n);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}xe.setDefaultStrategy(st)}else xe.setDefaultStrategy(at);function dt(e){const t=class extends e{constructor(){super(),nt.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 Qe.registerBaseType(t),t}function ht(e,n,i){Array.isArray(n)&&(i=n,n=void 0);return(t(e)?Qe.compose(e,n):Qe.compose(this,e)).then(e=>{Ue(e,e.registry,i);const t=qe(e);return"function"==typeof(null==(n=t)?void 0:n.then)?t.then(()=>e.define().type):e.define().type;var n})}const ut=Object.assign(dt(HTMLElement),{from:function(e){return dt(e)},define:ht});function ft(e){return function(t){ht(t,e)}}const pt={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}."},gt=/(\$\{\w+?})/g,bt=/\$\{(\w+?)}/g,vt=Object.freeze({});function mt(e,t){return e.split(gt).map(e=>{var n;const i=e.replace(bt,"$1");return String(null!==(n=t[i])&&void 0!==n?n:e)}).join("")}function yt(){const e=o();Object.assign(e,pt),Object.assign(r,{addMessages(t){Object.assign(e,t)},warn(t,n=vt){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Warning";console.warn(mt(s,n))},error(t,n=vt){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Error";return new Error(mt(s,n))}})}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 R{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,Q.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,Q.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,W.enqueue(this))}}let Et=!1;const Pt=Object.freeze({sorted:0,enable(){if(Et)return;Et=!0,Q.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=Q.getNotifier(e)),Q.track(t.lengthObserver,"length"),e.length}function It(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Pt.enable(),t=Q.getNotifier(e)),Q.track(t.sortObserver,"sorted"),e.sorted}function _t(e,t,n){return Object.assign({},n,{get(){return Q.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:()=>(Q.track(e,t),n),set(i){n!==i&&(n=i,Q.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=Q.binding(i,a),o.setMode(!1),n){const e={handleChange(){l&&l(),l=c.observe(null),s.value=i()}};c=Q.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=Q.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 xe||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 xe(rn(e,t));class an{constructor(e){this.value=0===e.length?"":1===e.length?e[0]:new xe(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?h.tokenList:h.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=h.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=h.event;break;default:e.targetAspect=t,e.aspectType=h.attribute}else e.aspectType=h.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 X.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=q.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),Q.defineProperty(Gn.prototype,"index"),Q.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=q.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={[h.attribute]:b.setAttribute,[h.booleanAttribute]:b.setBooleanAttribute,[h.property]:(e,t,n)=>e[t]=n,[h.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}},[h.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)}},[h.event]:()=>{}};class si{constructor(e){this.updateTarget=null,this.aspectType=h.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 h.event:n[this.data]=e,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case h.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===h.attribute||this.aspectType===h.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){X.setEvent(e);const n=this.dataBinding.evaluate(t.source,t.context);X.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(P(()=>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=b.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=b.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(Y((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(Y(l));else if(l instanceof j)l=new si(l);else if(!(a=vn.getForInstance(l))){const e=l;l=new si(P(()=>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=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),u=e=>e,f=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:u}):{createHTML:u};let p=Object.freeze({createHTML:e=>f.createHTML(e),protect:(e,t,n,i)=>i});const g=p,b=Object.freeze({get policy(){return p},setPolicy(t){if(p!==g)throw r.error(e.onlySetDOMPolicyOnce);p=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)}}),v=/^[\u0000-\u0020\u007F]+|[\u0000-\u0020\u007F]+$/g,m=/[\u0000-\u0020\u007F]+/g,y=/^(?:javascript|vbscript|data):/;function w(e){return e.replace(v,"")}function C(e){try{return decodeURIComponent(e)}catch(t){return e}}function S(e){const t=w(e);return function(e){let t=w(e);for(let e=0;e<3;++e){const e=C(t);if(e===t)break;t=w(e)}return t=t.replace(m,"").toLowerCase(),y.test(t)}(t)?"":t}function O(e,t,i,s){return(e,t,i,...r)=>{n(i)&&(i=S(i)),s(e,t,i,...r)}}function x(t,n,i,s){throw r.error(e.blockedByDOMPolicy,{aspectName:i,tagName:null!=t?t:"text"})}const T={onabort:x,onauxclick:x,onbeforeinput:x,onbeforematch:x,onblur:x,oncancel:x,oncanplay:x,oncanplaythrough:x,onchange:x,onclick:x,onclose:x,oncontextlost:x,oncontextmenu:x,oncontextrestored:x,oncopy:x,oncuechange:x,oncut:x,ondblclick:x,ondrag:x,ondragend:x,ondragenter:x,ondragleave:x,ondragover:x,ondragstart:x,ondrop:x,ondurationchange:x,onemptied:x,onended:x,onerror:x,onfocus:x,onformdata:x,oninput:x,oninvalid:x,onkeydown:x,onkeypress:x,onkeyup:x,onload:x,onloadeddata:x,onloadedmetadata:x,onloadstart:x,onmousedown:x,onmouseenter:x,onmouseleave:x,onmousemove:x,onmouseout:x,onmouseover:x,onmouseup:x,onpaste:x,onpause:x,onplay:x,onplaying:x,onprogress:x,onratechange:x,onreset:x,onresize:x,onscroll:x,onsecuritypolicyviolation:x,onseeked:x,onseeking:x,onselect:x,onslotchange:x,onstalled:x,onsubmit:x,onsuspend:x,ontimeupdate:x,ontoggle:x,onvolumechange:x,onwaiting:x,onwebkitanimationend:x,onwebkitanimationiteration:x,onwebkitanimationstart:x,onwebkittransitionend:x,onwheel:x},B={elements:{a:{[h.attribute]:{href:O},[h.property]:{href:O}},area:{[h.attribute]:{href:O},[h.property]:{href:O}},button:{[h.attribute]:{formaction:O},[h.property]:{formAction:O}},embed:{[h.attribute]:{src:x},[h.property]:{src:x}},form:{[h.attribute]:{action:O},[h.property]:{action:O}},frame:{[h.attribute]:{src:O},[h.property]:{src:O}},iframe:{[h.attribute]:{src:O},[h.property]:{src:O,srcdoc:x}},input:{[h.attribute]:{formaction:O},[h.property]:{formAction:O}},link:{[h.attribute]:{href:x},[h.property]:{href:x}},object:{[h.attribute]:{codebase:x,data:x},[h.property]:{codeBase:x,data:x}},script:{[h.attribute]:{src:x,text:x},[h.property]:{src:x,text:x,innerText:x,textContent:x}},style:{[h.property]:{innerText:x,textContent:x}}},aspects:{[h.attribute]:Object.assign({},T),[h.property]:Object.assign({innerHTML:x},T),[h.event]:Object.assign({},T)}};function N(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 k(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]=N(r,{});break;default:n[i]=N(s,r)}}for(const t in e)t in n||(n[t]=N(e[t],{}));return Object.freeze(n)}function A(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]=k(r,{});break;default:n[i]=k(s,r)}}for(const t in e)t in n||(n[t]=k(e[t],{}));return Object.freeze(n)}function M(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=B,Object.freeze({elements:r.elements?A(r.elements,o.elements):o.elements,aspects:r.aspects?k(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=M(a,e,t,n,i);if(s)return s}return null!==(r=M(s.aspects,e,t,n,i))&&void 0!==r?r:i}})}});class j{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}}class E extends j{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function P(e,t){return new E(e,t)}d(E);class R{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 I{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 R(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new R(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 _=[],V=[],L=globalThis.requestAnimationFrame;let D=!0;function H(){if(V.length)throw V.shift()}function z(e){try{e.call()}catch(e){if(!D)throw _.length=0,e;V.push(e),setTimeout(H,0)}}function F(){let e=0;for(;e<_.length;)if(z(_[e]),e++,e>1024){for(let t=0,n=_.length-e;t<n;t++)_[t]=_[t+e];_.length-=e,e=0}_.length=0}function U(e){_.push(e),_.length<2&&(D?L(F):F())}const W=Object.freeze({enqueue:U,next:()=>new Promise(U),process:F,setMode:e=>D=e}),q=Object.freeze({unknown:void 0,coupled:1}),Q=(()=>{const i=W.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 I(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 R{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!==q.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 J(e,t){Q.defineProperty(e,t)}const K=(()=>{let e=null;return{get:()=>e,set(t){e=t}}})(),X=Object.freeze({default:{index:0,length:0,get event(){return X.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>K.get(),setEvent(e){K.set(e)}});class G extends j{createObserver(e){return Q.binding(this.evaluate,e,this.isVolatile)}}function Y(e,t,n=Q.isVolatileBinding(e)){return new G(e,t,n)}function Z(e,t){const n=new G(e);return n.options=t,n}function ee(e){return t(e)?Y(e):e instanceof j?e:P(()=>e)}const te=Object.create(null),ne=Object.freeze({subscribe(e,t){const n=te[e];n?n instanceof Set?n.add(t):te[e]=new Set([n,t]):te[e]=t},unsubscribe(e,t){const n=te[e];n&&n instanceof Set?n.delete(t):te[e]=void 0},send(e){const t=te[e];t&&(t instanceof Set?t.forEach(n=>n.handleChange(t,e)):t.handleChange(this,e))}});class ie{constructor(e,t){this.dataBinding=e,this.subscriber=t,this.isNotBound=!0}bind(e){return this.isNotBound&&(ne.subscribe(this.getSignal(e),this),e.onUnbind(this),this.isNotBound=!1),this.dataBinding.evaluate(e.source,e.context)}unbind(e){this.isNotBound=!0,ne.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(ie);class se extends j{createObserver(e){return new ie(this,e)}}function re(e,t,n){const i=new se(e,n);return i.options=t,i}const oe={fromView:e=>e};let ae={determineChangeEvent:()=>"change"};const le=Object.freeze({configure(e){ae=e}});class ce{constructor(e,t,n){this.directive=e,this.subscriber=t,this.dataBinding=n,this.isNotBound=!0,this.notifier=Q.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:ae.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(ce);class de extends j{createObserver(e,t){return new ce(t,e,this)}}function he(e,t,i,s=Q.isVolatileBinding(e)){n(t)&&(t={changeEvent:t}),t?t.fromView||(t.fromView=oe.fromView):t=oe;const r=new de(e,i,s);return r.options=t,r}const ue="boolean",fe="reflect",pe=Object.freeze({locate:c()}),ge={toView:e=>e?"":null,fromView:e=>!!e},be={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:ge.fromView(e)};function ve(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const me={toView(e){const t=ve(e);return t?t.toString():t},fromView:ve};class ye{constructor(e,t,n=t.toLowerCase(),i=fe,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===ue&&void 0===s&&(this.converter=ge)}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 Q.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.mode===ue?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||W.enqueue(()=>{n.add(e);const i=e[this.fieldName];switch(t){case fe:{const t=this.converter;b.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break}case ue:b.setBooleanAttribute(e,this.attribute,i)}n.delete(e)})}static collect(e,...t){const i=[];t.push(pe.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 ye(e,s)):i.push(new ye(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function we(e,t){let n;function i(e,t){arguments.length>1&&(n.property=t),pe.locate(e.constructor).push(n)}return arguments.length>1?(n={},void i(e,t)):(n=void 0===e?{}:e,i)}let Ce;function Se(e){return e.reduce((e,t)=>(t instanceof Oe?e.push(...Se(t.styles)):e.push(t),e),[])}class Oe{get strategy(){return null===this._strategy&&(Ce||Oe.setDefaultStrategy(Oe.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-"+ ++xe}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(Ce)),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(Se(this.styles)),this}static setDefaultStrategy(e){Ce=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new Oe(e):e instanceof Oe?e:new Oe([e])}}Oe.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;let xe=0;const Te="__trust";var Be=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 Ne(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}const ke={},Ae=new WeakMap,Me=l(),$e=Object.freeze({register(e){if(!Me.register(e))return!1;const t=je(e.registry);return Object.prototype.hasOwnProperty.call(t,e.name)||Q.defineProperty(t,e.name),t[e.name]=e.type,!0},getByType:Me.getByType,getForInstance:Me.getForInstance,whenRegistered:function(e,t=customElements){const n=je(t);Object.prototype.hasOwnProperty.call(n,e)||Q.defineProperty(n,e);const i=Ee(n[e]);if(void 0!==i)return Promise.resolve(i);return new Promise(t=>{const i=Q.getNotifier(n),s={handleChange:()=>{const r=Ee(n[e]);void 0!==r&&(i.unsubscribe(s,e),t(r))}};i.subscribe(s,e)})}});function je(e=customElements){if(e===customElements)return ke;let t=Ae.get(e);return t||(t={},Ae.set(e,t)),t}function Ee(e){return void 0===e?void 0:$e.getByType(e)}const Pe={mode:"open"},Re={},Ie=new Set;const _e=new WeakMap,Ve=new WeakMap,Le=new WeakMap,De=new WeakMap,He=new Set,ze=new WeakMap;function Fe(e,t){if(Ve.delete(e),void 0===e.template&&void 0!==t&&(e.template=t),void 0!==e.template)return Le.delete(e),_e.delete(e),e.template}function Ue(e,t=e.registry,n){if(0===He.size&&!(null==n?void 0:n.length))return;const i=e;let s=De.get(i);if(!(null==s?void 0:s.has(t))){void 0===s&&(s=new WeakSet,De.set(i,s)),s.add(t);for(const n of He)n(e,t);for(const i of null!=n?n:[])He.has(i)||i(e,t)}}function We(e){var t;return null!==(t=ze.get(e))&&void 0!==t?t:null}function qe(e){if(void 0!==e.template)return Le.delete(e),e.template;const t=Ve.get(e);if(t)return t;const n=_e.get(e);if(!n)return;let i;Le.delete(e);try{i=n(e)}catch(t){throw Le.set(e,t),t}if("function"==typeof(null==(s=i)?void 0:s.then)){const t=Promise.resolve(i).then(t=>Fe(e,t)).catch(t=>{throw Ve.delete(e),Le.set(e,t),t});return Ve.set(e,t),t}var s;return Fe(e,i)}class Qe{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)?_e.set(this,i.template):this.template=i.template;const o=e.prototype,a=ye.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,Q.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({},Pe),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?Re:Object.assign(Object.assign({},Re),i.elementOptions),this.styles=Oe.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(Ue(this,e,t),void 0===this.template&&_e.has(this))return Promise.resolve().then(()=>qe(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?Le.set(n,t):Le.delete(n)}(this,e),Q.notify(this,"template")}),this;this.platformDefined=!0,e.define(this.name,n,this.elementOptions)}return this}static compose(e,t){const n=Ie.has(e)||$e.getByType(e)?new Qe(class extends e{},t):new Qe(e,t);return Promise.resolve(n)}static registerBaseType(e){Ie.add(e)}}Qe.getByType=$e.getByType,Qe.getForInstance=$e.getForInstance,Q.defineProperty(Qe.prototype,"template");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};const Ke={bubbles:!0,composed:!0,cancelable:!0},Xe="isConnected",Ge=new WeakMap,Ye=Symbol("fast-late-attribute-observer"),Ze=new Set;function et(e){var t,n;return null!==(n=null!==(t=e.shadowRoot)&&void 0!==t?t:Ge.get(e))&&void 0!==n?n:null}let tt;var nt;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(nt||(nt={}));class it{get isConnected(){return Q.track(this,Xe),this.stage===nt.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:X.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&&Ge.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=nt.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this._notifier=new I(e),this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const n=Reflect.getPrototypeOf(e),i=null===n?[]:Q.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 Ze){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!==nt.connected&&this.stage!==nt.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!==nt.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=et(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=et(n))&&void 0!==t?t:n).removeChild(e)}else e.isAttachedTo(n)&&e.removeStylesFrom(n)}connect(){this.stage===nt.disconnected&&(this.stage=nt.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=nt.connected,Q.notify(this,Xe))}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=We(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=We(this.definition);if(null===e)return;const t=this.source;void 0===t[Ye]&&(t[Ye]=new MutationObserver(e=>{const n=t.$fastController,i=We(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[Ye].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===nt.connected&&(this.stage=nt.disconnecting,Q.notify(this,Xe),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=nt.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===nt.connected){const i=null!=n?n:{},{confidence:s,reasoning:r,warnings:o}=i,a=Je(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(Ne(e)&&Te in e){const t=e,n=Te;return t[n],Be(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))),Ne(e)){const t=e,n=Te;t[n];const i=Be(t,[n+""]);return Object.assign(Object.assign({},i),{[Te]:r})}return{value:e,[Te]:r}}(t,{confidence:s,reasoning:r,warnings:o});return this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign(Object.assign({},Ke),a),{detail:l})))}return!1}renderTemplate(e){var t;const n=this.source,i=null!==(t=et(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&&it.hydrationHook&&(s=it.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=q.coupled}static forCustomElement(t,n=!1){const i=t.$fastController;if(void 0!==i&&!n)return i;const s=Qe.getForInstance(t);if(void 0===s)throw r.error(e.missingElementDefinition);return Q.getNotifier(s).subscribe({handleChange:()=>{it.forCustomElement(t,!0),t.$fastController.connect()}},"template"),Q.getNotifier(s).subscribe({handleChange:()=>{it.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new tt(t,s)}static setStrategy(e){tt=e}static installHydrationHook(e){it.hydrationHook=e}}function st(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=et(e))&&void 0!==t?t:e.getRootNode()}it.hydrationHook=null,d(it),it.setStrategy(it);class rt{constructor(e){const t=rt.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){ct(st(e),this.sheets)}removeStylesFrom(e){dt(st(e),this.sheets)}}rt.styleSheetCache=new Map;let ot=0;function at(e){return e===document?document.body:e}class lt{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ot}addStylesTo(e){e=at(st(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=at(st(e))).querySelectorAll(`.${this.styleClass}`);for(let n=0,i=t.length;n<i;++n)e.removeChild(t[n])}}let ct=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},dt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(Oe.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),ct=(e,t)=>{e.adoptedStyleSheets.push(...t)},dt=(e,t)=>{for(const n of t){const t=e.adoptedStyleSheets.indexOf(n);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}Oe.setDefaultStrategy(rt)}else Oe.setDefaultStrategy(lt);function ht(e){const t=class extends e{constructor(){super(),it.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 Qe.registerBaseType(t),t}function ut(e,n,i){Array.isArray(n)&&(i=n,n=void 0);return(t(e)?Qe.compose(e,n):Qe.compose(this,e)).then(e=>{Ue(e,e.registry,i);const t=qe(e);return"function"==typeof(null==(n=t)?void 0:n.then)?t.then(()=>e.define().type):e.define().type;var n})}const ft=Object.assign(ht(HTMLElement),{from:function(e){return ht(e)},define:ut});function pt(e){return function(t){ut(t,e)}}const gt={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}."},bt=/(\$\{\w+?})/g,vt=/\$\{(\w+?)}/g,mt=Object.freeze({});function yt(e,t){return e.split(bt).map(e=>{var n;const i=e.replace(vt,"$1");return String(null!==(n=t[i])&&void 0!==n?n:e)}).join("")}function wt(){const e=o();Object.assign(e,gt),Object.assign(r,{addMessages(t){Object.assign(e,t)},warn(t,n=mt){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Warning";console.warn(yt(s,n))},error(t,n=mt){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Error";return new Error(yt(s,n))}})}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 R{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,Q.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,Q.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,W.enqueue(this))}}let Pt=!1;const Rt=Object.freeze({sorted:0,enable(){if(Pt)return;Pt=!0,Q.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=Q.getNotifier(e)),Q.track(t.lengthObserver,"length"),e.length}function _t(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Rt.enable(),t=Q.getNotifier(e)),Q.track(t.sortObserver,"sorted"),e.sorted}function Vt(e,t,n){return Object.assign({},n,{get(){return Q.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:()=>(Q.track(e,t),n),set(i){n!==i&&(n=i,Q.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=Q.binding(i,a),o.setMode(!1),n){const e={handleChange(){l&&l(),l=c.observe(null),s.value=i()}};c=Q.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=Q.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 Oe||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 Oe(on(e,t));class ln{constructor(e){this.value=0===e.length?"":1===e.length?e[0]:new Oe(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?h.tokenList:h.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=h.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=h.event;break;default:e.targetAspect=t,e.aspectType=h.attribute}else e.aspectType=h.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 X.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=q.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),Q.defineProperty(Yn.prototype,"index"),Q.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=q.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={[h.attribute]:b.setAttribute,[h.booleanAttribute]:b.setBooleanAttribute,[h.property]:(e,t,n)=>e[t]=n,[h.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}},[h.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)}},[h.event]:()=>{}};class ri{constructor(e){this.updateTarget=null,this.aspectType=h.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 h.event:n[this.data]=e,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case h.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===h.attribute||this.aspectType===h.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){X.setEvent(e);const n=this.dataBinding.evaluate(t.source,t.context);X.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(P(()=>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=b.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=b.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(Y((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(Y(l));else if(l instanceof j)l=new ri(l);else if(!(a=mn.getForInstance(l))){const e=l;l=new ri(P(()=>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
  &nbsp;
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?P(e=>e):ee(e);let o=!1;return void 0===i?(o=!0,r=P((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=Y((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=P((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 j?$i(i,s):P((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=Q.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=ee(e),s=ee(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:X.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:b.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.setPolicy($.create());export{Pt as ArrayObserver,pe as AttributeConfiguration,ye as AttributeDefinition,j as Binding,nn as CSSDirective,On as ChildrenDirective,vi as Compiler,b as DOM,h as DOMAspect,$ as DOMPolicy,Xn as DefaultExecutionContext,nt as ElementController,xe as ElementStyles,X as ExecutionContext,r as FAST,ut as FASTElement,Qe as FASTElementDefinition,si as HTMLBindingDirective,vn as HTMLDirective,Gn as HTMLView,Si as InlineTemplateDirective,pn as Markup,Sn as NodeObservationDirective,Q as Observable,gn as Parser,I as PropertyChangeNotifier,mi as RefDirective,Bi as RenderBehavior,Ni as RenderDirective,Hi as RepeatBehavior,zi as RepeatDirective,Ft as Schema,ne as Signal,Wi as SlottedDirective,Ct as Sort,q as SourceLifetime,wt as Splice,Mt as SpliceStrategy,St as SpliceStrategySupport,tt as Stages,yn as StatelessAttachedAttributeDirective,R as SubscriberSet,le as TwoWaySettings,Yi as UnobservableMutationObserver,W as Updates,Zi as ViewBehaviorOrchestrator,xi as ViewTemplate,we as attr,ge as booleanConverter,xn as children,Gi as composedContains,Xi as composedParent,Gt as computedState,on as css,sn as cssDirective,ft as customElement,Cn as elements,a as emptyArray,yt as enableDebug,$e as fastElementRegistry,Ti as html,mn as htmlDirective,Rt as lengthOf,Z as listener,ee as normalizeBinding,be as nullableBooleanConverter,me as nullableNumberConverter,J as observable,P as oneTime,Y as oneWay,Xt as ownedState,Qt as reactive,yi as ref,Pi as render,Fi as repeat,zt as schemaRegistry,re as signal,qi as slotted,It as sortedCount,Kt as state,he 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?P(e=>e):ee(e);let o=!1;return void 0===i?(o=!0,r=P((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=Y((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=P((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 j?ji(i,s):P((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=Q.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=ee(e),s=ee(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:X.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:b.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.setPolicy($.create());export{Rt as ArrayObserver,pe as AttributeConfiguration,ye as AttributeDefinition,j as Binding,sn as CSSDirective,xn as ChildrenDirective,mi as Compiler,b as DOM,h as DOMAspect,$ as DOMPolicy,Gn as DefaultExecutionContext,it as ElementController,Oe as ElementStyles,X as ExecutionContext,r as FAST,ft as FASTElement,Qe as FASTElementDefinition,ri as HTMLBindingDirective,mn as HTMLDirective,Yn as HTMLView,Oi as InlineTemplateDirective,gn as Markup,On as NodeObservationDirective,Q as Observable,bn as Parser,I as PropertyChangeNotifier,yi as RefDirective,Ni as RenderBehavior,ki as RenderDirective,zi as RepeatBehavior,Fi as RepeatDirective,Ut as Schema,ne as Signal,qi as SlottedDirective,St as Sort,q as SourceLifetime,Ct as Splice,$t as SpliceStrategy,Ot as SpliceStrategySupport,nt as Stages,wn as StatelessAttachedAttributeDirective,R as SubscriberSet,le as TwoWaySettings,Zi as UnobservableMutationObserver,W as Updates,es as ViewBehaviorOrchestrator,Ti as ViewTemplate,we as attr,ge as booleanConverter,Tn as children,Yi as composedContains,Gi as composedParent,Yt as computedState,an as css,rn as cssDirective,pt as customElement,Sn as elements,a as emptyArray,wt as enableDebug,$e as fastElementRegistry,Bi as html,yn as htmlDirective,It as lengthOf,Z as listener,ee as normalizeBinding,be as nullableBooleanConverter,me as nullableNumberConverter,J as observable,P as oneTime,Y as oneWay,Gt as ownedState,Jt as reactive,wi as ref,Ri as render,Ui as repeat,Ft as schemaRegistry,re as signal,Qi as slotted,_t as sortedCount,Xt as state,he as twoWay,Vt as volatile,tn as watch,Xi as when};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.58.1",
4
+ "toolVersion": "7.60.1",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -636,7 +636,7 @@
636
636
  {
637
637
  "kind": "MethodSignature",
638
638
  "canonicalReference": "@lushly-dev/fast-element!Notifier#notify:member(1)",
639
- "docComment": "/**\n * Notifies all subscribers, based on the args.\n *\n * @remarks\n *\n * In some implementations, the args may be used to target specific subscribers. This is usually in the case where a propertyName was passed during subscription.\n *\n * @param args - Data passed along to subscribers during notification.\n */\n",
639
+ "docComment": "/**\n * Notifies all subscribers, based on the args.\n *\n * @remarks\n *\n * In some implementations, the args may be used to target specific subscribers.\n * This is usually in the case where a propertyName was passed during subscription.\n *\n * @param args - Data passed along to subscribers during notification.\n */\n",
640
640
  "excerptTokens": [
641
641
  {
642
642
  "kind": "Content",
@@ -998,7 +998,7 @@
998
998
  {
999
999
  "kind": "PropertySignature",
1000
1000
  "canonicalReference": "@lushly-dev/fast-element!SortObserver#sorted:member",
1001
- "docComment": "/**\n * The sorted times on the observed array, this should be incremented every time an item in the array changes location.\n */\n",
1001
+ "docComment": "/**\n * The sorted times on the observed array, this should be incremented every time\n * an item in the array changes location.\n */\n",
1002
1002
  "excerptTokens": [
1003
1003
  {
1004
1004
  "kind": "Content",
@@ -1033,7 +1033,7 @@
1033
1033
  {
1034
1034
  "kind": "Class",
1035
1035
  "canonicalReference": "@lushly-dev/fast-element!Splice:class",
1036
- "docComment": "/**\n * A splice map is a representation of how a previous array of items was transformed into a new array of items. Conceptually it is a list of tuples of\n *\n * (index, removed, addedCount)\n *\n * which are kept in ascending index order of. The tuple represents that at the |index|, |removed| sequence of items were removed, and counting forward from |index|, |addedCount| items were added.\n *\n * @public\n */\n",
1036
+ "docComment": "/**\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * (index, removed, addedCount)\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n *\n * @public\n */\n",
1037
1037
  "excerptTokens": [
1038
1038
  {
1039
1039
  "kind": "Content",
@@ -2204,7 +2204,7 @@
2204
2204
  {
2205
2205
  "kind": "Variable",
2206
2206
  "canonicalReference": "@lushly-dev/fast-element!SpliceStrategySupport:var",
2207
- "docComment": "/**\n * Indicates what level of feature support the splice strategy provides.\n *\n * @public\n */\n",
2207
+ "docComment": "/**\n * Indicates what level of feature support the splice\n * strategy provides.\n *\n * @public\n */\n",
2208
2208
  "excerptTokens": [
2209
2209
  {
2210
2210
  "kind": "Content",
@@ -2311,7 +2311,7 @@
2311
2311
  {
2312
2312
  "kind": "Class",
2313
2313
  "canonicalReference": "@lushly-dev/fast-element!SubscriberSet:class",
2314
- "docComment": "/**\n * An implementation of {@link Notifier} that efficiently keeps track of subscribers interested in a specific change notification on an observable subject.\n *\n * @remarks\n *\n * This set is optimized for the most common scenario of 1 or 2 subscribers. With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations. If the set ever exceeds two subscribers, it upgrades to an array automatically.\n *\n * @public\n */\n",
2314
+ "docComment": "/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable subject.\n *\n * @remarks\n *\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n *\n * @public\n */\n",
2315
2315
  "excerptTokens": [
2316
2316
  {
2317
2317
  "kind": "Content",