suggestionsPanelWebview.js 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. "use strict";(()=>{var it=function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}}();it.trustedTypes===void 0&&(it.trustedTypes={createPolicy:(r,t)=>t});var Rn={configurable:!1,enumerable:!1,writable:!1};it.FAST===void 0&&Reflect.defineProperty(it,"FAST",Object.assign({value:Object.create(null)},Rn));var gt=it.FAST;if(gt.getById===void 0){let r=Object.create(null);Reflect.defineProperty(gt,"getById",Object.assign({value(t,e){let n=r[t];return n===void 0&&(n=e?r[t]=e():null),n}},Rn))}var lt=Object.freeze([]);function xe(){let r=new WeakMap;return function(t){let e=r.get(t);if(e===void 0){let n=Reflect.getPrototypeOf(t);for(;e===void 0&&n!==null;)e=r.get(n),n=Reflect.getPrototypeOf(n);e=e===void 0?[]:e.slice(0),r.set(t,e)}return e}}var ar=it.FAST.getById(1,()=>{let r=[],t=[];function e(){if(t.length)throw t.shift()}function n(a){try{a.call()}catch(l){t.push(l),setTimeout(e,0)}}function o(){let l=0;for(;l<r.length;)if(n(r[l]),l++,l>1024){for(let f=0,c=r.length-l;f<c;f++)r[f]=r[f+l];r.length-=l,l=0}r.length=0}function i(a){r.length<1&&it.requestAnimationFrame(o),r.push(a)}return Object.freeze({enqueue:i,process:o})}),Dn=it.trustedTypes.createPolicy("fast-html",{createHTML:r=>r}),lr=Dn,Vt=`fast-${Math.random().toString(36).substring(2,8)}`,cr=`${Vt}{`,we=`}${Vt}`,g=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(r){if(lr!==Dn)throw new Error("The HTML policy can only be set once.");lr=r},createHTML(r){return lr.createHTML(r)},isMarker(r){return r&&r.nodeType===8&&r.data.startsWith(Vt)},extractDirectiveIndexFromMarker(r){return parseInt(r.data.replace(`${Vt}:`,""))},createInterpolationPlaceholder(r){return`${cr}${r}${we}`},createCustomAttributePlaceholder(r,t){return`${r}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder(r){return`<!--${Vt}:${r}-->`},queueUpdate:ar.enqueue,processUpdates:ar.process,nextUpdate(){return new Promise(ar.enqueue)},setAttribute(r,t,e){e==null?r.removeAttribute(t):r.setAttribute(t,e)},setBooleanAttribute(r,t,e){e?r.setAttribute(t,""):r.removeAttribute(t)},removeChildNodes(r){for(let t=r.firstChild;t!==null;t=r.firstChild)r.removeChild(t)},createTemplateWalker(r){return document.createTreeWalker(r,133,null,!1)}});var Pt=class{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){let e=this.spillover;if(e===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else e.indexOf(t)===-1&&e.push(t)}unsubscribe(t){let e=this.spillover;if(e===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}}notify(t){let e=this.spillover,n=this.source;if(e===void 0){let o=this.sub1,i=this.sub2;o!==void 0&&o.handleChange(n,t),i!==void 0&&i.handleChange(n,t)}else for(let o=0,i=e.length;o<i;++o)e[o].handleChange(n,t)}},It=class{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;let n=this.subscribers[t];n!==void 0&&n.notify(t),(e=this.sourceSubscribers)===null||e===void 0||e.notify(t)}subscribe(t,e){var n;if(e){let o=this.subscribers[e];o===void 0&&(this.subscribers[e]=o=new Pt(this.source)),o.subscribe(t)}else this.sourceSubscribers=(n=this.sourceSubscribers)!==null&&n!==void 0?n:new Pt(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var n;if(e){let o=this.subscribers[e];o!==void 0&&o.unsubscribe(t)}else(n=this.sourceSubscribers)===null||n===void 0||n.unsubscribe(t)}};var S=gt.getById(2,()=>{let r=/(:|&&|\|\||if)/,t=new WeakMap,e=g.queueUpdate,n,o=c=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function i(c){let d=c.$fastController||t.get(c);return d===void 0&&(Array.isArray(c)?d=o(c):t.set(c,d=new It(c))),d}let a=xe();class l{constructor(d){this.name=d,this.field=`_${d}`,this.callback=`${d}Changed`}getValue(d){return n!==void 0&&n.watch(d,this.name),d[this.field]}setValue(d,x){let k=this.field,M=d[k];if(M!==x){d[k]=x;let C=d[this.callback];typeof C=="function"&&C.call(d,M,x),i(d).notify(this.name)}}}class f extends Pt{constructor(d,x,k=!1){super(d,x),this.binding=d,this.isVolatileBinding=k,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(d,x){this.needsRefresh&&this.last!==null&&this.disconnect();let k=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let M=this.binding(d,x);return n=k,M}disconnect(){if(this.last!==null){let d=this.first;for(;d!==void 0;)d.notifier.unsubscribe(this,d.propertyName),d=d.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(d,x){let k=this.last,M=i(d),C=k===null?this.first:{};if(C.propertySource=d,C.propertyName=x,C.notifier=M,M.subscribe(this,x),k!==null){if(!this.needsRefresh){let W;n=void 0,W=k.propertySource[k.propertyName],n=this,d===W&&(this.needsRefresh=!0)}k.next=C}this.last=C}handleChange(){this.needsQueue&&(this.needsQueue=!1,e(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let d=this.first;return{next:()=>{let x=d;return x===void 0?{value:void 0,done:!0}:(d=d.next,{value:x,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(c){o=c},getNotifier:i,track(c,d){n!==void 0&&n.watch(c,d)},trackVolatile(){n!==void 0&&(n.needsRefresh=!0)},notify(c,d){i(c).notify(d)},defineProperty(c,d){typeof d=="string"&&(d=new l(d)),a(c).push(d),Reflect.defineProperty(c,d.name,{enumerable:!0,get:function(){return d.getValue(this)},set:function(x){d.setValue(this,x)}})},getAccessors:a,binding(c,d,x=this.isVolatileBinding(c)){return new f(c,d,x)},isVolatileBinding(c){return r.test(c.toString())}})});function Y(r,t){S.defineProperty(r,t)}var Pn=gt.getById(3,()=>{let r=null;return{get(){return r},set(t){r=t}}}),ct=class{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return Pn.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){Pn.set(t)}};S.defineProperty(ct.prototype,"index");S.defineProperty(ct.prototype,"length");var ut=Object.seal(new ct);var Lt=class{constructor(){this.targetIndex=0}},Mt=class extends Lt{constructor(){super(...arguments),this.createPlaceholder=g.createInterpolationPlaceholder}},Nt=class extends Lt{constructor(t,e,n){super(),this.name=t,this.behavior=e,this.options=n}createPlaceholder(t){return g.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}};function vi(r,t){this.source=r,this.context=t,this.bindingObserver===null&&(this.bindingObserver=S.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(r,t))}function xi(r,t){this.source=r,this.context=t,this.target.addEventListener(this.targetName,this)}function wi(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Si(){this.bindingObserver.disconnect(),this.source=null,this.context=null;let r=this.target.$fastView;r!==void 0&&r.isComposed&&(r.unbind(),r.needsBindOnly=!0)}function Ti(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Ci(r){g.setAttribute(this.target,this.targetName,r)}function Ei(r){g.setBooleanAttribute(this.target,this.targetName,r)}function _i(r){if(r==null&&(r=""),r.create){this.target.textContent="";let t=this.target.$fastView;t===void 0?t=r.create():this.target.$fastTemplate!==r&&(t.isComposed&&(t.remove(),t.unbind()),t=r.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=r)}else{let t=this.target.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=r}}function Ai(r){this.target[this.targetName]=r}function ki(r){let t=this.classVersions||Object.create(null),e=this.target,n=this.version||0;if(r!=null&&r.length){let o=r.split(/\s+/);for(let i=0,a=o.length;i<a;++i){let l=o[i];l!==""&&(t[l]=n,e.classList.add(l))}}if(this.classVersions=t,this.version=n+1,n!==0){n-=1;for(let o in t)t[o]===n&&e.classList.remove(o)}}var bt=class extends Mt{constructor(t){super(),this.binding=t,this.bind=vi,this.unbind=wi,this.updateTarget=Ci,this.isBindingVolatile=S.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,t!==void 0)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=Ai,this.cleanedTargetName==="innerHTML"){let e=this.binding;this.binding=(n,o)=>g.createHTML(e(n,o))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=Ei;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=xi,this.unbind=Ti;break;default:this.cleanedTargetName=t,t==="class"&&(this.updateTarget=ki);break}}targetAtContent(){this.updateTarget=_i,this.unbind=Si}createBehavior(t){return new ur(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}},ur=class{constructor(t,e,n,o,i,a,l){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=n,this.bind=o,this.unbind=i,this.updateTarget=a,this.targetName=l}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){ct.setEvent(t);let e=this.binding(this.source,this.context);ct.setEvent(null),e!==!0&&t.preventDefault()}};var fr=null,dr=class r{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){fr=this}static borrow(t){let e=fr||new r;return e.directives=t,e.reset(),fr=null,e}};function Oi(r){if(r.length===1)return r[0];let t,e=r.length,n=r.map(a=>typeof a=="string"?()=>a:(t=a.targetName||t,a.binding)),o=(a,l)=>{let f="";for(let c=0;c<e;++c)f+=n[c](a,l);return f},i=new bt(o);return i.targetName=t,i}var Ri=we.length;function Ln(r,t){let e=t.split(cr);if(e.length===1)return null;let n=[];for(let o=0,i=e.length;o<i;++o){let a=e[o],l=a.indexOf(we),f;if(l===-1)f=a;else{let c=parseInt(a.substring(0,l));n.push(r.directives[c]),f=a.substring(l+Ri)}f!==""&&n.push(f)}return n}function In(r,t,e=!1){let n=t.attributes;for(let o=0,i=n.length;o<i;++o){let a=n[o],l=a.value,f=Ln(r,l),c=null;f===null?e&&(c=new bt(()=>l),c.targetName=a.name):c=Oi(f),c!==null&&(t.removeAttributeNode(a),o--,i--,r.addFactory(c))}}function Di(r,t,e){let n=Ln(r,t.textContent);if(n!==null){let o=t;for(let i=0,a=n.length;i<a;++i){let l=n[i],f=i===0?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);typeof l=="string"?f.textContent=l:(f.textContent=" ",r.captureContentBinding(l)),o=f,r.targetIndex++,f!==t&&e.nextNode()}r.targetIndex--}}function Mn(r,t){let e=r.content;document.adoptNode(e);let n=dr.borrow(t);In(n,r,!0);let o=n.behaviorFactories;n.reset();let i=g.createTemplateWalker(e),a;for(;a=i.nextNode();)switch(n.targetIndex++,a.nodeType){case 1:In(n,a);break;case 3:Di(n,a,i);break;case 8:g.isMarker(a)&&n.addFactory(t[g.extractDirectiveIndexFromMarker(a)])}let l=0;(g.isMarker(e.firstChild)||e.childNodes.length===1&&t.length)&&(e.insertBefore(document.createComment(""),e.firstChild),l=-1);let f=n.behaviorFactories;return n.release(),{fragment:e,viewBehaviorFactories:f,hostBehaviorFactories:o,targetOffset:l}}var hr=document.createRange(),Se=class{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{let e=this.lastChild;if(t.previousSibling===e)return;let n=t.parentNode,o=this.firstChild,i;for(;o!==e;)i=o.nextSibling,n.insertBefore(o,t),o=i;n.insertBefore(e,t)}}remove(){let t=this.fragment,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.appendChild(n),n=o;t.appendChild(e)}dispose(){let t=this.firstChild.parentNode,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.removeChild(n),n=o;t.removeChild(e);let i=this.behaviors,a=this.source;for(let l=0,f=i.length;l<f;++l)i[l].unbind(a)}bind(t,e){let n=this.behaviors;if(this.source!==t)if(this.source!==null){let o=this.source;this.source=t,this.context=e;for(let i=0,a=n.length;i<a;++i){let l=n[i];l.unbind(o),l.bind(t,e)}}else{this.source=t,this.context=e;for(let o=0,i=n.length;o<i;++o)n[o].bind(t,e)}}unbind(){if(this.source===null)return;let t=this.behaviors,e=this.source;for(let n=0,o=t.length;n<o;++n)t[n].unbind(e);this.source=null}static disposeContiguousBatch(t){if(t.length!==0){hr.setStartBefore(t[0].firstChild),hr.setEndAfter(t[t.length-1].lastChild),hr.deleteContents();for(let e=0,n=t.length;e<n;++e){let o=t[e],i=o.behaviors,a=o.source;for(let l=0,f=i.length;l<f;++l)i[l].unbind(a)}}}};var Te=class{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(this.fragment===null){let c,d=this.html;if(typeof d=="string"){c=document.createElement("template"),c.innerHTML=g.createHTML(d);let k=c.content.firstElementChild;k!==null&&k.tagName==="TEMPLATE"&&(c=k)}else c=d;let x=Mn(c,this.directives);this.fragment=x.fragment,this.viewBehaviorFactories=x.viewBehaviorFactories,this.hostBehaviorFactories=x.hostBehaviorFactories,this.targetOffset=x.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}let e=this.fragment.cloneNode(!0),n=this.viewBehaviorFactories,o=new Array(this.behaviorCount),i=g.createTemplateWalker(e),a=0,l=this.targetOffset,f=i.nextNode();for(let c=n.length;a<c;++a){let d=n[a],x=d.targetIndex;for(;f!==null;)if(l===x){o[a]=d.createBehavior(f);break}else f=i.nextNode(),l++}if(this.hasHostBehaviors){let c=this.hostBehaviorFactories;for(let d=0,x=c.length;d<x;++d,++a)o[a]=c[d].createBehavior(t)}return new Se(e,o)}render(t,e,n){typeof e=="string"&&(e=document.getElementById(e)),n===void 0&&(n=e);let o=this.create(n);return o.bind(t,ut),o.appendTo(e),o}},Pi=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function yt(r,...t){let e=[],n="";for(let o=0,i=r.length-1;o<i;++o){let a=r[o],l=t[o];if(n+=a,l instanceof Te){let f=l;l=()=>f}if(typeof l=="function"&&(l=new bt(l)),l instanceof Mt){let f=Pi.exec(a);f!==null&&(l.targetName=f[2])}l instanceof Lt?(n+=l.createPlaceholder(e.length),e.push(l)):n+=l}return n+=r[r.length-1],new Te(n,e)}var A=class{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}};A.create=(()=>{if(g.supportsAdoptedStyleSheets){let r=new Map;return t=>new pr(t,r)}return r=>new mr(r)})();function gr(r){return r.map(t=>t instanceof A?gr(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function Nn(r){return r.map(t=>t instanceof A?t.behaviors:null).reduce((t,e)=>e===null?t:(t===null&&(t=[]),t.concat(e)),null)}var Ce=Symbol("prependToAdoptedStyleSheets");function Fn(r){let t=[],e=[];return r.forEach(n=>(n[Ce]?t:e).push(n)),{prepend:t,append:e}}var $n=(r,t)=>{let{prepend:e,append:n}=Fn(t);r.adoptedStyleSheets=[...e,...r.adoptedStyleSheets,...n]},Bn=(r,t)=>{r.adoptedStyleSheets=r.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(g.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),$n=(r,t)=>{let{prepend:e,append:n}=Fn(t);r.adoptedStyleSheets.splice(0,0,...e),r.adoptedStyleSheets.push(...n)},Bn=(r,t)=>{for(let e of t){let n=r.adoptedStyleSheets.indexOf(e);n!==-1&&r.adoptedStyleSheets.splice(n,1)}}}catch{}var pr=class extends A{constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=Nn(t)}get styleSheets(){if(this._styleSheets===void 0){let t=this.styles,e=this.styleSheetCache;this._styleSheets=gr(t).map(n=>{if(n instanceof CSSStyleSheet)return n;let o=e.get(n);return o===void 0&&(o=new CSSStyleSheet,o.replaceSync(n),e.set(n,o)),o})}return this._styleSheets}addStylesTo(t){$n(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){Bn(t,this.styleSheets),super.removeStylesFrom(t)}},Ii=0;function Li(){return`fast-style-class-${++Ii}`}var mr=class extends A{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=Nn(t),this.styleSheets=gr(t),this.styleClass=Li()}addStylesTo(t){let e=this.styleSheets,n=this.styleClass;t=this.normalizeTarget(t);for(let o=0;o<e.length;o++){let i=document.createElement("style");i.innerHTML=e[o],i.className=n,t.append(i)}super.addStylesTo(t)}removeStylesFrom(t){t=this.normalizeTarget(t);let e=t.querySelectorAll(`.${this.styleClass}`);for(let n=0,o=e.length;n<o;++n)t.removeChild(e[n]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}};var Wt=Object.freeze({locate:xe()}),jn={toView(r){return r?"true":"false"},fromView(r){return!(r==null||r==="false"||r===!1||r===0)}};var Ee=class r{constructor(t,e,n=e.toLowerCase(),o="reflect",i){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=n,this.mode=o,this.converter=i,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,o==="boolean"&&i===void 0&&(this.converter=jn)}setValue(t,e){let n=t[this.fieldName],o=this.converter;o!==void 0&&(e=o.fromView(e)),n!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](n,e),t.$fastController.notify(this.name))}getValue(t){return S.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){let e=this.mode,n=this.guards;n.has(t)||e==="fromView"||g.queueUpdate(()=>{n.add(t);let o=t[this.fieldName];switch(e){case"reflect":let i=this.converter;g.setAttribute(t,this.attribute,i!==void 0?i.toView(o):o);break;case"boolean":g.setBooleanAttribute(t,this.attribute,o);break}n.delete(t)})}static collect(t,...e){let n=[];e.push(Wt.locate(t));for(let o=0,i=e.length;o<i;++o){let a=e[o];if(a!==void 0)for(let l=0,f=a.length;l<f;++l){let c=a[l];typeof c=="string"?n.push(new r(t,c)):n.push(new r(t,c.property,c.attribute,c.mode,c.converter))}}return n}};function b(r,t){let e;function n(o,i){arguments.length>1&&(e.property=i),Wt.locate(o.constructor).push(e)}if(arguments.length>1){e={},n(r,t);return}return e=r===void 0?{}:r,n}var Hn={mode:"open"},Un={},br=gt.getById(4,()=>{let r=new Map;return Object.freeze({register(t){return r.has(t.type)?!1:(r.set(t.type,t),!0)},getByType(t){return r.get(t)}})}),K=class{constructor(t,e=t.definition){typeof e=="string"&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;let n=Ee.collect(t,e.attributes),o=new Array(n.length),i={},a={};for(let l=0,f=n.length;l<f;++l){let c=n[l];o[l]=c.attribute,i[c.name]=c,a[c.attribute]=c}this.attributes=n,this.observedAttributes=o,this.propertyLookup=i,this.attributeLookup=a,this.shadowOptions=e.shadowOptions===void 0?Hn:e.shadowOptions===null?void 0:Object.assign(Object.assign({},Hn),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?Un:Object.assign(Object.assign({},Un),e.elementOptions),this.styles=e.styles===void 0?void 0:Array.isArray(e.styles)?A.create(e.styles):e.styles instanceof A?e.styles:A.create([e.styles])}get isDefined(){return!!br.getByType(this.type)}define(t=customElements){let e=this.type;if(br.register(this)){let n=this.attributes,o=e.prototype;for(let i=0,a=n.length;i<a;++i)S.defineProperty(o,n[i]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}};K.forType=br.getByType;var zn=new WeakMap,Mi={bubbles:!0,composed:!0,cancelable:!0};function yr(r){return r.shadowRoot||zn.get(r)||null}var _e=class r extends It{constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;let n=e.shadowOptions;if(n!==void 0){let i=t.attachShadow(n);n.mode==="closed"&&zn.set(t,i)}let o=S.getAccessors(t);if(o.length>0){let i=this.boundObservables=Object.create(null);for(let a=0,l=o.length;a<l;++a){let f=o[a].name,c=t[f];c!==void 0&&(delete t[f],i[f]=c)}}}get isConnected(){return S.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,S.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=t,!this.needsInitialization&&t!==null&&this.addStyles(t))}addStyles(t){let e=yr(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){let n=t.behaviors;t.addStylesTo(e),n!==null&&this.addBehaviors(n)}}removeStyles(t){let e=yr(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){let n=t.behaviors;t.removeStylesFrom(e),n!==null&&this.removeBehaviors(n)}}addBehaviors(t){let e=this.behaviors||(this.behaviors=new Map),n=t.length,o=[];for(let i=0;i<n;++i){let a=t[i];e.has(a)?e.set(a,e.get(a)+1):(e.set(a,1),o.push(a))}if(this._isConnected){let i=this.element;for(let a=0;a<o.length;++a)o[a].bind(i,ut)}}removeBehaviors(t,e=!1){let n=this.behaviors;if(n===null)return;let o=t.length,i=[];for(let a=0;a<o;++a){let l=t[a];if(n.has(l)){let f=n.get(l)-1;f===0||e?n.delete(l)&&i.push(l):n.set(l,f)}}if(this._isConnected){let a=this.element;for(let l=0;l<i.length;++l)i[l].unbind(a)}}onConnectedCallback(){if(this._isConnected)return;let t=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(t,ut);let e=this.behaviors;if(e!==null)for(let[n]of e)n.bind(t,ut);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);let t=this.view;t!==null&&t.unbind();let e=this.behaviors;if(e!==null){let n=this.element;for(let[o]of e)o.unbind(n)}}onAttributeChangedCallback(t,e,n){let o=this.definition.attributeLookup[t];o!==void 0&&o.onAttributeChangedCallback(this.element,n)}emit(t,e,n){return this._isConnected?this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},Mi),n))):!1}finishInitialization(){let t=this.element,e=this.boundObservables;if(e!==null){let o=Object.keys(e);for(let i=0,a=o.length;i<a;++i){let l=o[i];t[l]=e[l]}this.boundObservables=null}let n=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():n.template&&(this._template=n.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():n.styles&&(this._styles=n.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){let e=this.element,n=yr(e)||e;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||g.removeChildNodes(n),t&&(this.view=t.render(e,n,e))}static forCustomElement(t){let e=t.$fastController;if(e!==void 0)return e;let n=K.forType(t.constructor);if(n===void 0)throw new Error("Missing FASTElement definition.");return t.$fastController=new r(t,n)}};function Vn(r){return class extends r{constructor(){super(),_e.forCustomElement(this)}$emit(t,e,n){return this.$fastController.emit(t,e,n)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,n){this.$fastController.onAttributeChangedCallback(t,e,n)}}}var ft=Object.assign(Vn(HTMLElement),{from(r){return Vn(r)},define(r,t){return new K(r,t).define().type}});var vt=class{createCSS(){return""}createBehavior(){}};function Ni(r,t){let e=[],n="",o=[];for(let i=0,a=r.length-1;i<a;++i){n+=r[i];let l=t[i];if(l instanceof vt){let f=l.createBehavior();l=l.createCSS(),f&&o.push(f)}l instanceof A||l instanceof CSSStyleSheet?(n.trim()!==""&&(e.push(n),n=""),e.push(l)):n+=l}return n+=r[r.length-1],n.trim()!==""&&e.push(n),{styles:e,behaviors:o}}function xt(r,...t){let{styles:e,behaviors:n}=Ni(r,t),o=A.create(e);return n.length&&o.withBehaviors(...n),o}var vr=class{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}};function X(r){return new Nt("fast-ref",vr,r)}var Ae=class{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){let e=this.options.property;this.shouldUpdate=S.getAccessors(t).some(n=>n.name===e),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(lt),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return this.options.filter!==void 0&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}};var xr=class extends Ae{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}};function Wn(r){return typeof r=="string"&&(r={property:r}),new Nt("fast-slotted",xr,r)}var ke=class{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}},qn=(r,t)=>yt`
  2. <span
  3. part="end"
  4. ${X("endContainer")}
  5. class=${e=>t.end?"end":void 0}
  6. >
  7. <slot name="end" ${X("end")} @slotchange="${e=>e.handleEndContentChange()}">
  8. ${t.end||""}
  9. </slot>
  10. </span>
  11. `,Gn=(r,t)=>yt`
  12. <span
  13. part="start"
  14. ${X("startContainer")}
  15. class="${e=>t.start?"start":void 0}"
  16. >
  17. <slot
  18. name="start"
  19. ${X("start")}
  20. @slotchange="${e=>e.handleStartContentChange()}"
  21. >
  22. ${t.start||""}
  23. </slot>
  24. </span>
  25. `,ol=yt`
  26. <span part="end" ${X("endContainer")}>
  27. <slot
  28. name="end"
  29. ${X("end")}
  30. @slotchange="${r=>r.handleEndContentChange()}"
  31. ></slot>
  32. </span>
  33. `,il=yt`
  34. <span part="start" ${X("startContainer")}>
  35. <slot
  36. name="start"
  37. ${X("start")}
  38. @slotchange="${r=>r.handleStartContentChange()}"
  39. ></slot>
  40. </span>
  41. `;function y(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var wr=new Map;"metadata"in Reflect||(Reflect.metadata=function(r,t){return function(e){Reflect.defineMetadata(r,t,e)}},Reflect.defineMetadata=function(r,t,e){let n=wr.get(e);n===void 0&&wr.set(e,n=new Map),n.set(r,t)},Reflect.getOwnMetadata=function(r,t){let e=wr.get(t);if(e!==void 0)return e.get(r)});var Er=class{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,oo(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){let{container:n,key:o}=this;return this.container=this.key=void 0,n.registerResolver(o,new $(o,t,e))}};function qt(r){let t=r.slice(),e=Object.keys(r),n=e.length,o;for(let i=0;i<n;++i)o=e[i],io(o)||(t[o]=r[o]);return t}var Fi=Object.freeze({none(r){throw Error(`${r.toString()} not registered, did you forget to add @singleton()?`)},singleton(r){return new $(r,1,r)},transient(r){return new $(r,2,r)}}),Sr=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Fi.singleton})}),Yn=new Map;function Xn(r){return t=>Reflect.getOwnMetadata(r,t)}var Qn=null,w=Object.freeze({createContainer(r){return new Gt(null,Object.assign({},Sr.default,r))},findResponsibleContainer(r){let t=r.$$container$$;return t&&t.responsibleForOwnerRequests?t:w.findParentContainer(r)},findParentContainer(r){let t=new CustomEvent(no,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return r.dispatchEvent(t),t.detail.container||w.getOrCreateDOMContainer()},getOrCreateDOMContainer(r,t){return r?r.$$container$$||new Gt(r,Object.assign({},Sr.default,t,{parentLocator:w.findParentContainer})):Qn||(Qn=new Gt(null,Object.assign({},Sr.default,t,{parentLocator:()=>null})))},getDesignParamtypes:Xn("design:paramtypes"),getAnnotationParamtypes:Xn("di:paramtypes"),getOrCreateAnnotationParamTypes(r){let t=this.getAnnotationParamtypes(r);return t===void 0&&Reflect.defineMetadata("di:paramtypes",t=[],r),t},getDependencies(r){let t=Yn.get(r);if(t===void 0){let e=r.inject;if(e===void 0){let n=w.getDesignParamtypes(r),o=w.getAnnotationParamtypes(r);if(n===void 0)if(o===void 0){let i=Object.getPrototypeOf(r);typeof i=="function"&&i!==Function.prototype?t=qt(w.getDependencies(i)):t=[]}else t=qt(o);else if(o===void 0)t=qt(n);else{t=qt(n);let i=o.length,a;for(let c=0;c<i;++c)a=o[c],a!==void 0&&(t[c]=a);let l=Object.keys(o);i=l.length;let f;for(let c=0;c<i;++c)f=l[c],io(f)||(t[f]=o[f])}}else t=qt(e);Yn.set(r,t)}return t},defineProperty(r,t,e,n=!1){let o=`$di_${t}`;Reflect.defineProperty(r,t,{get:function(){let i=this[o];if(i===void 0&&(i=(this instanceof HTMLElement?w.findResponsibleContainer(this):w.getOrCreateDOMContainer()).get(e),this[o]=i,n&&this instanceof ft)){let l=this.$fastController,f=()=>{let d=w.findResponsibleContainer(this).get(e),x=this[o];d!==x&&(this[o]=i,l.notify(t))};l.subscribe({handleChange:f},"isConnected")}return i}})},createInterface(r,t){let e=typeof r=="function"?r:t,n=typeof r=="string"?r:r&&"friendlyName"in r&&r.friendlyName||to,o=typeof r=="string"?!1:r&&"respectConnection"in r&&r.respectConnection||!1,i=function(a,l,f){if(a==null||new.target!==void 0)throw new Error(`No registration for interface: '${i.friendlyName}'`);if(l)w.defineProperty(a,l,i,o);else{let c=w.getOrCreateAnnotationParamTypes(a);c[f]=i}};return i.$isInterface=!0,i.friendlyName=n??"(anonymous)",e!=null&&(i.register=function(a,l){return e(new Er(a,l??i))}),i.toString=function(){return`InterfaceSymbol<${i.friendlyName}>`},i},inject(...r){return function(t,e,n){if(typeof n=="number"){let o=w.getOrCreateAnnotationParamTypes(t),i=r[0];i!==void 0&&(o[n]=i)}else if(e)w.defineProperty(t,e,r[0]);else{let o=n?w.getOrCreateAnnotationParamTypes(n.value):w.getOrCreateAnnotationParamTypes(t),i;for(let a=0;a<r.length;++a)i=r[a],i!==void 0&&(o[a]=i)}}},transient(r){return r.register=function(e){return wt.transient(r,r).register(e)},r.registerInRequestor=!1,r},singleton(r,t=Bi){return r.register=function(n){return wt.singleton(r,r).register(n)},r.registerInRequestor=t.scoped,r}}),$i=w.createInterface("Container");function Pe(r){return function(t){let e=function(n,o,i){w.inject(e)(n,o,i)};return e.$isResolver=!0,e.resolve=function(n,o){return r(t,n,o)},e}}var cl=w.inject;var Bi={scoped:!1};function ji(r){return function(t,e){e=!!e;let n=function(o,i,a){w.inject(n)(o,i,a)};return n.$isResolver=!0,n.resolve=function(o,i){return r(t,o,i,e)},n}}var ul=ji((r,t,e,n)=>e.getAll(r,n)),fl=Pe((r,t,e)=>()=>e.get(r)),dl=Pe((r,t,e)=>{if(e.has(r,!0))return e.get(r)});function Ar(r,t,e){w.inject(Ar)(r,t,e)}Ar.$isResolver=!0;Ar.resolve=()=>{};var hl=Pe((r,t,e)=>{let n=ro(r,t),o=new $(r,0,n);return e.registerResolver(r,o),n}),pl=Pe((r,t,e)=>ro(r,t));function ro(r,t){return t.getFactory(r).construct(t)}var $=class{constructor(t,e,n){this.key=t,this.strategy=e,this.state=n,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:{if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state}case 2:{let n=t.getFactory(this.state);if(n===null)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return n.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){var e,n,o;switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return(o=(n=(e=t.getResolver(this.state))===null||e===void 0?void 0:e.getFactory)===null||n===void 0?void 0:n.call(e,t))!==null&&o!==void 0?o:null;default:return null}}};function Zn(r){return this.get(r)}function Hi(r,t){return t(r)}var _r=class{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let n;return e===void 0?n=new this.Type(...this.dependencies.map(Zn,t)):n=new this.Type(...this.dependencies.map(Zn,t),...e),this.transformers==null?n:this.transformers.reduce(Hi,n)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}},Ui={$isResolver:!0,resolve(r,t){return t}};function De(r){return typeof r.register=="function"}function zi(r){return De(r)&&typeof r.registerInRequestor=="boolean"}function Jn(r){return zi(r)&&r.registerInRequestor}function Vi(r){return r.prototype!==void 0}var Wi=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),no="__DI_LOCATE_PARENT__",Tr=new Map,Gt=class r{constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,t!==null&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set($i,Ui),t instanceof Node&&t.addEventListener(no,n=>{n.composedPath()[0]!==this.owner&&(n.detail.container=this,n.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let e,n,o,i,a,l=this.context;for(let f=0,c=t.length;f<c;++f)if(e=t[f],!!eo(e))if(De(e))e.register(this,l);else if(Vi(e))wt.singleton(e,e).register(this);else for(n=Object.keys(e),i=0,a=n.length;i<a;++i)o=e[n[i]],eo(o)&&(De(o)?o.register(this,l):this.register(o));return--this.registerDepth,this}registerResolver(t,e){Oe(t);let n=this.resolvers,o=n.get(t);return o==null?n.set(t,e):o instanceof $&&o.strategy===4?o.state.push(e):n.set(t,new $(t,4,[o,e])),e}registerTransformer(t,e){let n=this.getResolver(t);if(n==null)return!1;if(n.getFactory){let o=n.getFactory(this);return o==null?!1:(o.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(Oe(t),t.resolve!==void 0)return t;let n=this,o;for(;n!=null;)if(o=n.resolvers.get(t),o==null){if(n.parent==null){let i=Jn(t)?this:n;return e?this.jitRegister(t,i):null}n=n.parent}else return o;return null}has(t,e=!1){return this.resolvers.has(t)?!0:e&&this.parent!=null?this.parent.has(t,!0):!1}get(t){if(Oe(t),t.$isResolver)return t.resolve(this,this);let e=this,n;for(;e!=null;)if(n=e.resolvers.get(t),n==null){if(e.parent==null){let o=Jn(t)?this:e;return n=this.jitRegister(t,o),n.resolve(e,this)}e=e.parent}else return n.resolve(e,this);throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){Oe(t);let n=this,o=n,i;if(e){let a=lt;for(;o!=null;)i=o.resolvers.get(t),i!=null&&(a=a.concat(Kn(i,o,n))),o=o.parent;return a}else for(;o!=null;)if(i=o.resolvers.get(t),i==null){if(o=o.parent,o==null)return lt}else return Kn(i,o,n);return lt}getFactory(t){let e=Tr.get(t);if(e===void 0){if(qi(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);Tr.set(t,e=new _r(t,w.getDependencies(t)))}return e}registerFactory(t,e){Tr.set(t,e)}createChild(t){return new r(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if(typeof t!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(Wi.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(De(t)){let n=t.register(e);if(!(n instanceof Object)||n.resolve==null){let o=e.resolvers.get(t);if(o!=null)return o;throw new Error("A valid resolver was not returned from the static register method")}return n}else{if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{let n=this.config.defaultResolver(t,e);return e.resolvers.set(t,n),n}}}},Cr=new WeakMap;function oo(r){return function(t,e,n){if(Cr.has(n))return Cr.get(n);let o=r(t,e,n);return Cr.set(n,o),o}}var wt=Object.freeze({instance(r,t){return new $(r,0,t)},singleton(r,t){return new $(r,1,t)},transient(r,t){return new $(r,2,t)},callback(r,t){return new $(r,3,t)},cachedCallback(r,t){return new $(r,3,oo(t))},aliasTo(r,t){return new $(t,5,r)}});function Oe(r){if(r==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function Kn(r,t,e){if(r instanceof $&&r.strategy===4){let n=r.state,o=n.length,i=new Array(o);for(;o--;)i[o]=n[o].resolve(t,e);return i}return[r.resolve(t,e)]}var to="(anonymous)";function eo(r){return typeof r=="object"&&r!==null||typeof r=="function"}var qi=function(){let r=new WeakMap,t=!1,e="",n=0;return function(o){return t=r.get(o),t===void 0&&(e=o.toString(),n=e.length,t=n>=29&&n<=100&&e.charCodeAt(n-1)===125&&e.charCodeAt(n-2)<=32&&e.charCodeAt(n-3)===93&&e.charCodeAt(n-4)===101&&e.charCodeAt(n-5)===100&&e.charCodeAt(n-6)===111&&e.charCodeAt(n-7)===99&&e.charCodeAt(n-8)===32&&e.charCodeAt(n-9)===101&&e.charCodeAt(n-10)===118&&e.charCodeAt(n-11)===105&&e.charCodeAt(n-12)===116&&e.charCodeAt(n-13)===97&&e.charCodeAt(n-14)===110&&e.charCodeAt(n-15)===88,r.set(o,t)),t}}(),Re={};function io(r){switch(typeof r){case"number":return r>=0&&(r|0)===r;case"string":{let t=Re[r];if(t!==void 0)return t;let e=r.length;if(e===0)return Re[r]=!1;let n=0;for(let o=0;o<e;++o)if(n=r.charCodeAt(o),o===0&&n===48&&e>1||n<48||n>57)return Re[r]=!1;return Re[r]=!0}default:return!1}}function so(r){return`${r.toLowerCase()}:presentation`}var Ie=new Map,Me=Object.freeze({define(r,t,e){let n=so(r);Ie.get(n)===void 0?Ie.set(n,t):Ie.set(n,!1),e.register(wt.instance(n,t))},forTag(r,t){let e=so(r),n=Ie.get(e);return n===!1?w.findResponsibleContainer(t).get(e):n||null}}),Le=class{constructor(t,e){this.template=t||null,this.styles=e===void 0?null:Array.isArray(e)?A.create(e):e instanceof A?e:A.create([e])}applyTo(t){let e=t.$fastController;e.template===null&&(e.template=this.template),e.styles===null&&(e.styles=this.styles)}};var dt=class r extends ft{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=Me.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new kr(this===r?class extends r{}:this,t,e)}};y([Y],dt.prototype,"template",void 0);y([Y],dt.prototype,"styles",void 0);function Yt(r,t,e){return typeof r=="function"?r(t,e):r}var kr=class{constructor(t,e,n){this.type=t,this.elementDefinition=e,this.overrideDefinition=n,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(t,e){let n=this.definition,o=this.overrideDefinition,a=`${n.prefix||e.elementPrefix}-${n.baseName}`;e.tryDefineElement({name:a,type:this.type,baseClass:this.elementDefinition.baseClass,callback:l=>{let f=new Le(Yt(n.template,l,n),Yt(n.styles,l,n));l.definePresentation(f);let c=Yt(n.shadowOptions,l,n);l.shadowRootMode&&(c?o.shadowOptions||(c.mode=l.shadowRootMode):c!==null&&(c={mode:l.shadowRootMode})),l.defineElement({elementOptions:Yt(n.elementOptions,l,n),shadowOptions:c,attributes:Yt(n.attributes,l,n)})}})}};function Or(r,...t){let e=Wt.locate(r);t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i))}),Wt.locate(n).forEach(i=>e.push(i))})}function ao(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Gi(){let r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}var St;function lo(){if(typeof St=="boolean")return St;if(!ao())return St=!1,St;let r=document.createElement("style"),t=Gi();t!==null&&r.setAttribute("nonce",t),document.head.appendChild(r);try{r.sheet.insertRule("foo:focus-visible {color:inherit}",0),St=!0}catch{St=!1}finally{document.head.removeChild(r)}return St}var co;(function(r){r[r.alt=18]="alt",r[r.arrowDown=40]="arrowDown",r[r.arrowLeft=37]="arrowLeft",r[r.arrowRight=39]="arrowRight",r[r.arrowUp=38]="arrowUp",r[r.back=8]="back",r[r.backSlash=220]="backSlash",r[r.break=19]="break",r[r.capsLock=20]="capsLock",r[r.closeBracket=221]="closeBracket",r[r.colon=186]="colon",r[r.colon2=59]="colon2",r[r.comma=188]="comma",r[r.ctrl=17]="ctrl",r[r.delete=46]="delete",r[r.end=35]="end",r[r.enter=13]="enter",r[r.equals=187]="equals",r[r.equals2=61]="equals2",r[r.equals3=107]="equals3",r[r.escape=27]="escape",r[r.forwardSlash=191]="forwardSlash",r[r.function1=112]="function1",r[r.function10=121]="function10",r[r.function11=122]="function11",r[r.function12=123]="function12",r[r.function2=113]="function2",r[r.function3=114]="function3",r[r.function4=115]="function4",r[r.function5=116]="function5",r[r.function6=117]="function6",r[r.function7=118]="function7",r[r.function8=119]="function8",r[r.function9=120]="function9",r[r.home=36]="home",r[r.insert=45]="insert",r[r.menu=93]="menu",r[r.minus=189]="minus",r[r.minus2=109]="minus2",r[r.numLock=144]="numLock",r[r.numPad0=96]="numPad0",r[r.numPad1=97]="numPad1",r[r.numPad2=98]="numPad2",r[r.numPad3=99]="numPad3",r[r.numPad4=100]="numPad4",r[r.numPad5=101]="numPad5",r[r.numPad6=102]="numPad6",r[r.numPad7=103]="numPad7",r[r.numPad8=104]="numPad8",r[r.numPad9=105]="numPad9",r[r.numPadDivide=111]="numPadDivide",r[r.numPadDot=110]="numPadDot",r[r.numPadMinus=109]="numPadMinus",r[r.numPadMultiply=106]="numPadMultiply",r[r.numPadPlus=107]="numPadPlus",r[r.openBracket=219]="openBracket",r[r.pageDown=34]="pageDown",r[r.pageUp=33]="pageUp",r[r.period=190]="period",r[r.print=44]="print",r[r.quote=222]="quote",r[r.scrollLock=145]="scrollLock",r[r.shift=16]="shift",r[r.space=32]="space",r[r.tab=9]="tab",r[r.tilde=192]="tilde",r[r.windowsLeft=91]="windowsLeft",r[r.windowsOpera=219]="windowsOpera",r[r.windowsRight=92]="windowsRight"})(co||(co={}));var uo="Enter";var E=class{};y([b({attribute:"aria-atomic"})],E.prototype,"ariaAtomic",void 0);y([b({attribute:"aria-busy"})],E.prototype,"ariaBusy",void 0);y([b({attribute:"aria-controls"})],E.prototype,"ariaControls",void 0);y([b({attribute:"aria-current"})],E.prototype,"ariaCurrent",void 0);y([b({attribute:"aria-describedby"})],E.prototype,"ariaDescribedby",void 0);y([b({attribute:"aria-details"})],E.prototype,"ariaDetails",void 0);y([b({attribute:"aria-disabled"})],E.prototype,"ariaDisabled",void 0);y([b({attribute:"aria-errormessage"})],E.prototype,"ariaErrormessage",void 0);y([b({attribute:"aria-flowto"})],E.prototype,"ariaFlowto",void 0);y([b({attribute:"aria-haspopup"})],E.prototype,"ariaHaspopup",void 0);y([b({attribute:"aria-hidden"})],E.prototype,"ariaHidden",void 0);y([b({attribute:"aria-invalid"})],E.prototype,"ariaInvalid",void 0);y([b({attribute:"aria-keyshortcuts"})],E.prototype,"ariaKeyshortcuts",void 0);y([b({attribute:"aria-label"})],E.prototype,"ariaLabel",void 0);y([b({attribute:"aria-labelledby"})],E.prototype,"ariaLabelledby",void 0);y([b({attribute:"aria-live"})],E.prototype,"ariaLive",void 0);y([b({attribute:"aria-owns"})],E.prototype,"ariaOwns",void 0);y([b({attribute:"aria-relevant"})],E.prototype,"ariaRelevant",void 0);y([b({attribute:"aria-roledescription"})],E.prototype,"ariaRoledescription",void 0);var fo=(r,t)=>yt`
  42. <button
  43. class="control"
  44. part="control"
  45. ?autofocus="${e=>e.autofocus}"
  46. ?disabled="${e=>e.disabled}"
  47. form="${e=>e.formId}"
  48. formaction="${e=>e.formaction}"
  49. formenctype="${e=>e.formenctype}"
  50. formmethod="${e=>e.formmethod}"
  51. formnovalidate="${e=>e.formnovalidate}"
  52. formtarget="${e=>e.formtarget}"
  53. name="${e=>e.name}"
  54. type="${e=>e.type}"
  55. value="${e=>e.value}"
  56. aria-atomic="${e=>e.ariaAtomic}"
  57. aria-busy="${e=>e.ariaBusy}"
  58. aria-controls="${e=>e.ariaControls}"
  59. aria-current="${e=>e.ariaCurrent}"
  60. aria-describedby="${e=>e.ariaDescribedby}"
  61. aria-details="${e=>e.ariaDetails}"
  62. aria-disabled="${e=>e.ariaDisabled}"
  63. aria-errormessage="${e=>e.ariaErrormessage}"
  64. aria-expanded="${e=>e.ariaExpanded}"
  65. aria-flowto="${e=>e.ariaFlowto}"
  66. aria-haspopup="${e=>e.ariaHaspopup}"
  67. aria-hidden="${e=>e.ariaHidden}"
  68. aria-invalid="${e=>e.ariaInvalid}"
  69. aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
  70. aria-label="${e=>e.ariaLabel}"
  71. aria-labelledby="${e=>e.ariaLabelledby}"
  72. aria-live="${e=>e.ariaLive}"
  73. aria-owns="${e=>e.ariaOwns}"
  74. aria-pressed="${e=>e.ariaPressed}"
  75. aria-relevant="${e=>e.ariaRelevant}"
  76. aria-roledescription="${e=>e.ariaRoledescription}"
  77. ${X("control")}
  78. >
  79. ${Gn(r,t)}
  80. <span class="content" part="content">
  81. <slot ${Wn("defaultSlottedContent")}></slot>
  82. </span>
  83. ${qn(r,t)}
  84. </button>
  85. `;var ho="form-associated-proxy",po="ElementInternals",mo=po in window&&"setFormValue"in window[po].prototype,go=new WeakMap;function bo(r){let t=class extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return mo}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){let e=this.proxy.labels,n=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),o=e?n.concat(Array.from(e)):n;return Object.freeze(o)}else return lt}valueChanged(e,n){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,n){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),g.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),g.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!mo)return null;let e=go.get(this);return e||(e=this.attachInternals(),go.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,n,o){this.elementInternals?this.elementInternals.setValidity(e,n,o):typeof n=="string"&&this.proxy.setCustomValidity(n)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(n=>this.proxy.addEventListener(n,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",ho),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",ho)),(e=this.shadowRoot)===null||e===void 0||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),(e=this.shadowRoot)===null||e===void 0||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,n){this.elementInternals&&this.elementInternals.setFormValue(e,n||e)}_keypressHandler(e){switch(e.key){case uo:if(this.form instanceof HTMLFormElement){let n=this.form.querySelector("[type=submit]");n?.click()}break}}stopPropagation(e){e.stopPropagation()}};return b({mode:"boolean"})(t.prototype,"disabled"),b({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),b({attribute:"current-value"})(t.prototype,"currentValue"),b(t.prototype,"name"),b({mode:"boolean"})(t.prototype,"required"),Y(t.prototype,"value"),t}var Rr=class extends dt{},Ne=class extends bo(Rr){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var V=class extends Ne{constructor(){super(...arguments),this.handleClick=t=>{var e;this.disabled&&((e=this.defaultSlottedContent)===null||e===void 0?void 0:e.length)<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;let t=this.proxy.isConnected;t||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{var t;(t=this.form)===null||t===void 0||t.reset()},this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((t=this.$fastController.definition.shadowOptions)===null||t===void 0)&&t.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),e==="submit"&&this.addEventListener("click",this.handleSubmission),t==="submit"&&this.removeEventListener("click",this.handleSubmission),e==="reset"&&this.addEventListener("click",this.handleFormReset),t==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var t;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.addEventListener("click",this.handleClick)})}disconnectedCallback(){var t;super.disconnectedCallback();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.removeEventListener("click",this.handleClick)})}};y([b({mode:"boolean"})],V.prototype,"autofocus",void 0);y([b({attribute:"form"})],V.prototype,"formId",void 0);y([b],V.prototype,"formaction",void 0);y([b],V.prototype,"formenctype",void 0);y([b],V.prototype,"formmethod",void 0);y([b({mode:"boolean"})],V.prototype,"formnovalidate",void 0);y([b],V.prototype,"formtarget",void 0);y([b],V.prototype,"type",void 0);y([Y],V.prototype,"defaultSlottedContent",void 0);var Ft=class{};y([b({attribute:"aria-expanded"})],Ft.prototype,"ariaExpanded",void 0);y([b({attribute:"aria-pressed"})],Ft.prototype,"ariaPressed",void 0);Or(Ft,E);Or(V,ke,Ft);function Xt(r){let t=r.parentElement;if(t)return t;{let e=r.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function yo(r,t){let e=t;for(;e!==null;){if(e===r)return!0;e=Xt(e)}return!1}var tt=document.createElement("div");function Yi(r){return r instanceof ft}var Qt=class{setProperty(t,e){g.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){g.queueUpdate(()=>this.target.removeProperty(t))}},Pr=class extends Qt{constructor(t){super();let e=new CSSStyleSheet;e[Ce]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(A.create([e]))}},Ir=class extends Qt{constructor(){super();let t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}},Lr=class extends Qt{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);let{sheet:t}=this.style;if(t){let e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}},Fe=class{constructor(t){this.store=new Map,this.target=null;let e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),S.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}targetChanged(){if(this.target!==null)for(let[t,e]of this.store.entries())this.target.setProperty(t,e)}setProperty(t,e){this.store.set(t,e),g.queueUpdate(()=>{this.target!==null&&this.target.setProperty(t,e)})}removeProperty(t){this.store.delete(t),g.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(t)})}handleChange(t,e){let{sheet:n}=this.style;if(n){let o=n.insertRule(":host{}",n.cssRules.length);this.target=n.cssRules[o].style}else this.target=null}};y([Y],Fe.prototype,"target",void 0);var Mr=class{constructor(t){this.target=t.style}setProperty(t,e){g.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){g.queueUpdate(()=>this.target.removeProperty(t))}},ht=class r{setProperty(t,e){r.properties[t]=e;for(let n of r.roots.values())Tt.getOrCreate(r.normalizeRoot(n)).setProperty(t,e)}removeProperty(t){delete r.properties[t];for(let e of r.roots.values())Tt.getOrCreate(r.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){let{roots:e}=r;if(!e.has(t)){e.add(t);let n=Tt.getOrCreate(this.normalizeRoot(t));for(let o in r.properties)n.setProperty(o,r.properties[o])}}static unregisterRoot(t){let{roots:e}=r;if(e.has(t)){e.delete(t);let n=Tt.getOrCreate(r.normalizeRoot(t));for(let o in r.properties)n.removeProperty(o)}}static normalizeRoot(t){return t===tt?document:t}};ht.roots=new Set;ht.properties={};var Dr=new WeakMap,Xi=g.supportsAdoptedStyleSheets?Pr:Fe,Tt=Object.freeze({getOrCreate(r){if(Dr.has(r))return Dr.get(r);let t;return r===tt?t=new ht:r instanceof Document?t=g.supportsAdoptedStyleSheets?new Ir:new Lr:Yi(r)?t=new Xi(r):t=new Mr(r),Dr.set(r,t),t}});var Q=class r extends vt{constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,t.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=r.uniqueId(),r.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(t){return new r({name:typeof t=="string"?t:t.name,cssCustomPropertyName:typeof t=="string"?t:t.cssCustomPropertyName===void 0?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return typeof t.cssCustomProperty=="string"}static isDerivedDesignTokenValue(t){return typeof t=="function"}static getTokenById(t){return r.tokensById.get(t)}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}createCSS(){return this.cssVar||""}getValueFor(t){let e=B.getOrCreate(t).get(this);if(e!==void 0)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof r&&(e=this.alias(e)),B.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),B.existsFor(t)&&B.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(tt,t),this}subscribe(t,e){let n=this.getOrCreateSubscriberSet(e);e&&!B.existsFor(e)&&B.getOrCreate(e),n.has(t)||n.add(t)}unsubscribe(t,e){let n=this.subscribers.get(e||this);n&&n.has(t)&&n.delete(t)}notify(t){let e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach(n=>n.handleChange(e)),this.subscribers.has(t)&&this.subscribers.get(t).forEach(n=>n.handleChange(e))}alias(t){return e=>t.getValueFor(e)}};Q.uniqueId=(()=>{let r=0;return()=>(r++,r.toString(16))})();Q.tokensById=new Map;var Nr=class{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){let{token:e,target:n}=t;this.add(e,n)}add(t,e){Tt.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(B.getOrCreate(e).get(t)))}remove(t,e){Tt.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&typeof t.createCSS=="function"?t.createCSS():t}},Fr=class{constructor(t,e,n){this.source=t,this.token=e,this.node=n,this.dependencies=new Set,this.observer=S.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,ut))}catch(t){console.error(t)}}},$r=class{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),S.getNotifier(this).notify(t.id))}get(t){return S.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),S.getNotifier(this).notify(t.id)}all(){return this.values.entries()}},Zt=new WeakMap,Jt=new WeakMap,B=class r{constructor(t){this.target=t,this.store=new $r,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,n)=>{let o=Q.getTokenById(n);o&&(o.notify(this.target),this.updateCSSTokenReflection(e,o))}},Zt.set(t,this),S.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof ft?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}static getOrCreate(t){return Zt.get(t)||new r(t)}static existsFor(t){return Zt.has(t)}static findParent(t){if(tt!==t.target){let e=Xt(t.target);for(;e!==null;){if(Zt.has(e))return Zt.get(e);e=Xt(e)}return r.getOrCreate(tt)}return null}static findClosestAssignedNode(t,e){let n=e;do{if(n.has(t))return n;n=n.parent?n.parent:n.target!==tt?r.getOrCreate(tt):null}while(n!==null);return null}get parent(){return Jt.get(this)||null}updateCSSTokenReflection(t,e){if(Q.isCSSDesignToken(e)){let n=this.parent,o=this.isReflecting(e);if(n){let i=n.get(e),a=t.get(e);i!==a&&!o?this.reflectToCSS(e):i===a&&o&&this.stopReflectToCSS(e)}else o||this.reflectToCSS(e)}}has(t){return this.assignedValues.has(t)}get(t){let e=this.store.get(t);if(e!==void 0)return e;let n=this.getRaw(t);if(n!==void 0)return this.hydrate(t,n),this.get(t)}getRaw(t){var e;return this.assignedValues.has(t)?this.assignedValues.get(t):(e=r.findClosestAssignedNode(t,this))===null||e===void 0?void 0:e.getRaw(t)}set(t,e){Q.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),Q.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);let e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){let t=r.findParent(this);t&&t.appendChild(this);for(let e of this.assignedValues.keys())e.notify(this.target)}unbind(){this.parent&&Jt.get(this).removeChild(this);for(let t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&Jt.get(t).removeChild(t);let e=this.children.filter(n=>t.contains(n));Jt.set(t,this),this.children.push(t),e.forEach(n=>t.appendChild(n)),S.getNotifier(this.store).subscribe(t);for(let[n,o]of this.store.all())t.hydrate(n,this.bindingObservers.has(n)?this.getRaw(n):o),t.updateCSSTokenReflection(t.store,n)}removeChild(t){let e=this.children.indexOf(t);if(e!==-1&&this.children.splice(e,1),S.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;let n=Jt.delete(t);for(let[o]of this.store.all())t.hydrate(o,t.getRaw(o)),t.updateCSSTokenReflection(t.store,o);return n}contains(t){return yo(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),r.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),r.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){let n=Q.getTokenById(e);n&&(this.hydrate(n,this.getRaw(n)),this.updateCSSTokenReflection(this.store,n))}hydrate(t,e){if(!this.has(t)){let n=this.bindingObservers.get(t);Q.isDerivedDesignTokenValue(e)?n?n.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(n&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){let n=new Fr(e,t,this);return this.bindingObservers.set(t,n),n}tearDownBindingObserver(t){return this.bindingObservers.has(t)?(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0):!1}};B.cssCustomPropertyReflector=new Nr;y([Y],B.prototype,"children",void 0);function Qi(r){return Q.from(r)}var Kt=Object.freeze({create:Qi,notifyConnection(r){return!r.isConnected||!B.existsFor(r)?!1:(B.getOrCreate(r).bind(),!0)},notifyDisconnection(r){return r.isConnected||!B.existsFor(r)?!1:(B.getOrCreate(r).unbind(),!0)},registerRoot(r=tt){ht.registerRoot(r)},unregisterRoot(r=tt){ht.unregisterRoot(r)}});var Br=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),jr=new Map,$e=new Map,$t=null,te=w.createInterface(r=>r.cachedCallback(t=>($t===null&&($t=new Be(null,t)),$t))),Ur=Object.freeze({tagFor(r){return $e.get(r)},responsibleFor(r){let t=r.$$designSystem$$;return t||w.findResponsibleContainer(r).get(te)},getOrCreate(r){if(!r)return $t===null&&($t=w.getOrCreateDOMContainer().get(te)),$t;let t=r.$$designSystem$$;if(t)return t;let e=w.getOrCreateDOMContainer(r);if(e.has(te,!1))return e.get(te);{let n=new Be(r,e);return e.register(wt.instance(te,n)),n}}});function Zi(r,t,e){return typeof r=="string"?{name:r,type:t,callback:e}:r}var Be=class{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Br.definitionCallbackOnly,t!==null&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){let e=this.container,n=[],o=this.disambiguate,i=this.shadowRootMode,a={elementPrefix:this.prefix,tryDefineElement(l,f,c){let d=Zi(l,f,c),{name:x,callback:k,baseClass:M}=d,{type:C}=d,W=x,Et=jr.get(W),Bt=!0;for(;Et;){let ue=o(W,C,Et);switch(ue){case Br.ignoreDuplicate:return;case Br.definitionCallbackOnly:Bt=!1,Et=void 0;break;default:W=ue,Et=jr.get(W);break}}Bt&&(($e.has(C)||C===dt)&&(C=class extends C{}),jr.set(W,C),$e.set(C,W),M&&$e.set(M,W)),n.push(new Hr(e,W,C,i,k,Bt))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&Kt.registerRoot(this.designTokenRoot)),e.registerWithContext(a,...t);for(let l of n)l.callback(l),l.willDefine&&l.definition!==null&&l.definition.define();return this}},Hr=class{constructor(t,e,n,o,i,a){this.container=t,this.name=e,this.type=n,this.shadowRootMode=o,this.callback=i,this.willDefine=a,this.definition=null}definePresentation(t){Me.define(this.name,t,this.container)}defineElement(t){this.definition=new K(this.type,Object.assign(Object.assign({},t),{name:this.name}))}tagFor(t){return Ur.tagFor(t)}};var vo="not-allowed";var Ji=":host([hidden]){display:none}";function xo(r){return`${Ji}:host{display:${r}}`}var ee=lo()?"focus-visible":"focus";function wo(r){return Ur.getOrCreate(r).withPrefix("vscode")}function To(r){window.addEventListener("load",()=>{new MutationObserver(()=>{So(r)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),So(r)})}function So(r){let t=getComputedStyle(document.body),e=document.querySelector("body");if(e){let n=e.getAttribute("data-vscode-theme-kind");for(let[o,i]of r){let a=t.getPropertyValue(o).toString();if(n==="vscode-high-contrast")a.length===0&&i.name.includes("background")&&(a="transparent"),i.name==="button-icon-hover-background"&&(a="transparent");else if(n==="vscode-high-contrast-light"){if(a.length===0&&i.name.includes("background"))switch(i.name){case"button-primary-hover-background":a="#0F4A85";break;case"button-secondary-hover-background":a="transparent";break;case"button-icon-hover-background":a="transparent";break}}else i.name==="contrast-active-border"&&(a="transparent");i.setValueFor(e,a)}}}var Co=new Map,Eo=!1;function h(r,t){let e=Kt.create(r);if(t){if(t.includes("--fake-vscode-token")){let n="id"+Math.random().toString(16).slice(2);t=`${t}-${n}`}Co.set(t,e)}return Eo||(To(Co),Eo=!0),e}var Cu=h("background","--vscode-editor-background").withDefault("#1e1e1e"),st=h("border-width").withDefault(1),_o=h("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518"),Eu=h("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df"),_u=h("corner-radius").withDefault(0),Ao=h("corner-radius-round").withDefault(2),zr=h("design-unit").withDefault(4),ko=h("disabled-opacity").withDefault(.4),re=h("focus-border","--vscode-focusBorder").withDefault("#007fd4"),Oo=h("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"),Au=h("font-weight","--vscode-font-weight").withDefault("400"),Ro=h("foreground","--vscode-foreground").withDefault("#cccccc"),ku=h("input-height").withDefault("26"),Ou=h("input-min-width").withDefault("100px"),Do=h("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),Po=h("type-ramp-base-line-height").withDefault("normal"),Ru=h("type-ramp-minus1-font-size").withDefault("11px"),Du=h("type-ramp-minus1-line-height").withDefault("16px"),Pu=h("type-ramp-minus2-font-size").withDefault("9px"),Iu=h("type-ramp-minus2-line-height").withDefault("16px"),Lu=h("type-ramp-plus1-font-size").withDefault("16px"),Mu=h("type-ramp-plus1-line-height").withDefault("24px"),Nu=h("scrollbarWidth").withDefault("10px"),Fu=h("scrollbarHeight").withDefault("10px"),$u=h("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),Bu=h("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),ju=h("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),Hu=h("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),Uu=h("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),Io=h("button-border","--vscode-button-border").withDefault("transparent"),Vr=h("button-icon-background").withDefault("transparent"),Lo=h("button-icon-corner-radius").withDefault("5px"),Mo=h("button-icon-outline-offset").withDefault(0),Wr=h("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),No=h("button-icon-padding").withDefault("3px"),Ct=h("button-primary-background","--vscode-button-background").withDefault("#0e639c"),qr=h("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),Gr=h("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),je=h("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),Fo=h("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),$o=h("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),Bo=h("button-padding-horizontal").withDefault("11px"),jo=h("button-padding-vertical").withDefault("4px"),zu=h("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),Vu=h("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),Wu=h("checkbox-corner-radius").withDefault(3),qu=h("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0"),Gu=h("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),Yu=h("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),Xu=h("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),Qu=h("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),Zu=h("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),Ju=h("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c"),Ku=h("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0"),tf=h("dropdown-list-max-height").withDefault("200px"),ef=h("input-background","--vscode-input-background").withDefault("#3c3c3c"),rf=h("input-foreground","--vscode-input-foreground").withDefault("#cccccc"),nf=h("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc"),of=h("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),sf=h("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),af=h("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),lf=h("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),cf=h("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),uf=h("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799"),ff=h("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),df=h("panel-view-border","--vscode-panel-border").withDefault("#80808059"),hf=h("tag-corner-radius").withDefault("2px");function Ho(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var Ki=xt`
  86. ${xo("inline-flex")} :host {
  87. outline: none;
  88. font-family: ${Oo};
  89. font-size: ${Do};
  90. line-height: ${Po};
  91. color: ${qr};
  92. background: ${Ct};
  93. border-radius: calc(${Ao} * 1px);
  94. fill: currentColor;
  95. cursor: pointer;
  96. }
  97. .control {
  98. background: transparent;
  99. height: inherit;
  100. flex-grow: 1;
  101. box-sizing: border-box;
  102. display: inline-flex;
  103. justify-content: center;
  104. align-items: center;
  105. padding: ${jo} ${Bo};
  106. white-space: wrap;
  107. outline: none;
  108. text-decoration: none;
  109. border: calc(${st} * 1px) solid ${Io};
  110. color: inherit;
  111. border-radius: inherit;
  112. fill: inherit;
  113. cursor: inherit;
  114. font-family: inherit;
  115. }
  116. :host(:hover) {
  117. background: ${Gr};
  118. }
  119. :host(:active) {
  120. background: ${Ct};
  121. }
  122. .control:${ee} {
  123. outline: calc(${st} * 1px) solid ${re};
  124. outline-offset: calc(${st} * 2px);
  125. }
  126. .control::-moz-focus-inner {
  127. border: 0;
  128. }
  129. :host([disabled]) {
  130. opacity: ${ko};
  131. background: ${Ct};
  132. cursor: ${vo};
  133. }
  134. .content {
  135. display: flex;
  136. }
  137. .start {
  138. display: flex;
  139. }
  140. ::slotted(svg),
  141. ::slotted(span) {
  142. width: calc(${zr} * 4px);
  143. height: calc(${zr} * 4px);
  144. }
  145. .start {
  146. margin-inline-end: 8px;
  147. }
  148. `,ts=xt`
  149. :host([appearance='primary']) {
  150. background: ${Ct};
  151. color: ${qr};
  152. }
  153. :host([appearance='primary']:hover) {
  154. background: ${Gr};
  155. }
  156. :host([appearance='primary']:active) .control:active {
  157. background: ${Ct};
  158. }
  159. :host([appearance='primary']) .control:${ee} {
  160. outline: calc(${st} * 1px) solid ${re};
  161. outline-offset: calc(${st} * 2px);
  162. }
  163. :host([appearance='primary'][disabled]) {
  164. background: ${Ct};
  165. }
  166. `,es=xt`
  167. :host([appearance='secondary']) {
  168. background: ${je};
  169. color: ${Fo};
  170. }
  171. :host([appearance='secondary']:hover) {
  172. background: ${$o};
  173. }
  174. :host([appearance='secondary']:active) .control:active {
  175. background: ${je};
  176. }
  177. :host([appearance='secondary']) .control:${ee} {
  178. outline: calc(${st} * 1px) solid ${re};
  179. outline-offset: calc(${st} * 2px);
  180. }
  181. :host([appearance='secondary'][disabled]) {
  182. background: ${je};
  183. }
  184. `,rs=xt`
  185. :host([appearance='icon']) {
  186. background: ${Vr};
  187. border-radius: ${Lo};
  188. color: ${Ro};
  189. }
  190. :host([appearance='icon']:hover) {
  191. background: ${Wr};
  192. outline: 1px dotted ${_o};
  193. outline-offset: -1px;
  194. }
  195. :host([appearance='icon']) .control {
  196. padding: ${No};
  197. border: none;
  198. }
  199. :host([appearance='icon']:active) .control:active {
  200. background: ${Wr};
  201. }
  202. :host([appearance='icon']) .control:${ee} {
  203. outline: calc(${st} * 1px) solid ${re};
  204. outline-offset: ${Mo};
  205. }
  206. :host([appearance='icon'][disabled]) {
  207. background: ${Vr};
  208. }
  209. `,Uo=(r,t)=>xt`
  210. ${Ki}
  211. ${ts}
  212. ${es}
  213. ${rs}
  214. `;var He=class extends V{connectedCallback(){if(super.connectedCallback(),!this.appearance){let t=this.getAttribute("appearance");this.appearance=t}}attributeChangedCallback(t,e,n){t==="appearance"&&n==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),t==="aria-label"&&(this.ariaLabel=n),t==="disabled"&&(this.disabled=n!==null)}};Ho([b],He.prototype,"appearance",void 0);var Yr=He.compose({baseName:"button",template:fo,styles:Uo,shadowOptions:{delegatesFocus:!0}});var{entries:Zo,setPrototypeOf:zo,isFrozen:ns,getPrototypeOf:os,getOwnPropertyDescriptor:is}=Object,{freeze:H,seal:G,create:Ve}=Object,{apply:en,construct:rn}=typeof Reflect<"u"&&Reflect;H||(H=function(t){return t});G||(G=function(t){return t});en||(en=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return t.apply(e,o)});rn||(rn=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});var Ue=U(Array.prototype.forEach),ss=U(Array.prototype.lastIndexOf),Vo=U(Array.prototype.pop),ne=U(Array.prototype.push),as=U(Array.prototype.splice),We=U(String.prototype.toLowerCase),Xr=U(String.prototype.toString),Qr=U(String.prototype.match),oe=U(String.prototype.replace),ls=U(String.prototype.indexOf),cs=U(String.prototype.trim),q=U(Object.prototype.hasOwnProperty),j=U(RegExp.prototype.test),ie=us(TypeError);function U(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return en(r,t,n)}}function us(r){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return rn(r,e)}}function v(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:We;zo&&zo(r,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){let i=e(o);i!==o&&(ns(t)||(t[n]=i),o=i)}r[o]=!0}return r}function fs(r){for(let t=0;t<r.length;t++)q(r,t)||(r[t]=null);return r}function et(r){let t=Ve(null);for(let[e,n]of Zo(r))q(r,e)&&(Array.isArray(n)?t[e]=fs(n):n&&typeof n=="object"&&n.constructor===Object?t[e]=et(n):t[e]=n);return t}function se(r,t){for(;r!==null;){let n=is(r,t);if(n){if(n.get)return U(n.get);if(typeof n.value=="function")return U(n.value)}r=os(r)}function e(){return null}return e}var Wo=H(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Zr=H(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Jr=H(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ds=H(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Kr=H(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hs=H(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qo=H(["#text"]),Go=H(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),tn=H(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Yo=H(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ze=H(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ps=G(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ms=G(/<%[\w\W]*|[\w\W]*%>/gm),gs=G(/\$\{[\w\W]*/gm),bs=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),ys=G(/^aria-[\-\w]+$/),Jo=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vs=G(/^(?:\w+script|data):/i),xs=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ko=G(/^html$/i),ws=G(/^[a-z][.\w]*(-[.\w]+)+$/i),Xo=Object.freeze({__proto__:null,ARIA_ATTR:ys,ATTR_WHITESPACE:xs,CUSTOM_ELEMENT:ws,DATA_ATTR:bs,DOCTYPE_NAME:Ko,ERB_EXPR:ms,IS_ALLOWED_URI:Jo,IS_SCRIPT_OR_DATA:vs,MUSTACHE_EXPR:ps,TMPLIT_EXPR:gs}),ae={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ss=function(){return typeof window>"u"?null:window},Ts=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));let i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Qo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ti(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ss(),t=m=>ti(m);if(t.version="3.3.2",t.removed=[],!r||!r.document||r.document.nodeType!==ae.document||!r.Element)return t.isSupported=!1,t;let{document:e}=r,n=e,o=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:l,Element:f,NodeFilter:c,NamedNodeMap:d=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:x,DOMParser:k,trustedTypes:M}=r,C=f.prototype,W=se(C,"cloneNode"),Et=se(C,"remove"),Bt=se(C,"nextSibling"),ue=se(C,"childNodes"),fe=se(C,"parentNode");if(typeof a=="function"){let m=e.createElement("template");m.content&&m.content.ownerDocument&&(e=m.content.ownerDocument)}let N,jt="",{implementation:qe,createNodeIterator:ni,createDocumentFragment:oi,getElementsByTagName:ii}=e,{importNode:si}=n,F=Qo();t.isSupported=typeof Zo=="function"&&typeof fe=="function"&&qe&&qe.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ge,ERB_EXPR:Ye,TMPLIT_EXPR:Xe,DATA_ATTR:ai,ARIA_ATTR:li,IS_SCRIPT_OR_DATA:ci,ATTR_WHITESPACE:sn,CUSTOM_ELEMENT:ui}=Xo,{IS_ALLOWED_URI:an}=Xo,D=null,ln=v({},[...Wo,...Zr,...Jr,...Kr,...qo]),P=null,cn=v({},[...Go,...tn,...Yo,...ze]),_=Object.seal(Ve(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ht=null,de=null,at=Object.seal(Ve(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),un=!0,Qe=!0,fn=!1,dn=!0,_t=!1,he=!0,pt=!1,Ze=!1,Je=!1,At=!1,pe=!1,me=!1,hn=!0,pn=!1,fi="user-content-",Ke=!0,Ut=!1,kt={},Z=null,tr=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),mn=null,gn=v({},["audio","video","img","source","image","track"]),er=null,bn=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml",Ot=rt,rr=!1,nr=null,di=v({},[ge,be,rt],Xr),ye=v({},["mi","mo","mn","ms","mtext"]),ve=v({},["annotation-xml"]),hi=v({},["title","style","font","a","script"]),zt=null,pi=["application/xhtml+xml","text/html"],mi="text/html",R=null,Rt=null,gi=e.createElement("form"),yn=function(s){return s instanceof RegExp||s instanceof Function},or=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===s)){if((!s||typeof s!="object")&&(s={}),s=et(s),zt=pi.indexOf(s.PARSER_MEDIA_TYPE)===-1?mi:s.PARSER_MEDIA_TYPE,R=zt==="application/xhtml+xml"?Xr:We,D=q(s,"ALLOWED_TAGS")?v({},s.ALLOWED_TAGS,R):ln,P=q(s,"ALLOWED_ATTR")?v({},s.ALLOWED_ATTR,R):cn,nr=q(s,"ALLOWED_NAMESPACES")?v({},s.ALLOWED_NAMESPACES,Xr):di,er=q(s,"ADD_URI_SAFE_ATTR")?v(et(bn),s.ADD_URI_SAFE_ATTR,R):bn,mn=q(s,"ADD_DATA_URI_TAGS")?v(et(gn),s.ADD_DATA_URI_TAGS,R):gn,Z=q(s,"FORBID_CONTENTS")?v({},s.FORBID_CONTENTS,R):tr,Ht=q(s,"FORBID_TAGS")?v({},s.FORBID_TAGS,R):et({}),de=q(s,"FORBID_ATTR")?v({},s.FORBID_ATTR,R):et({}),kt=q(s,"USE_PROFILES")?s.USE_PROFILES:!1,un=s.ALLOW_ARIA_ATTR!==!1,Qe=s.ALLOW_DATA_ATTR!==!1,fn=s.ALLOW_UNKNOWN_PROTOCOLS||!1,dn=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=s.SAFE_FOR_TEMPLATES||!1,he=s.SAFE_FOR_XML!==!1,pt=s.WHOLE_DOCUMENT||!1,At=s.RETURN_DOM||!1,pe=s.RETURN_DOM_FRAGMENT||!1,me=s.RETURN_TRUSTED_TYPE||!1,Je=s.FORCE_BODY||!1,hn=s.SANITIZE_DOM!==!1,pn=s.SANITIZE_NAMED_PROPS||!1,Ke=s.KEEP_CONTENT!==!1,Ut=s.IN_PLACE||!1,an=s.ALLOWED_URI_REGEXP||Jo,Ot=s.NAMESPACE||rt,ye=s.MATHML_TEXT_INTEGRATION_POINTS||ye,ve=s.HTML_INTEGRATION_POINTS||ve,_=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&yn(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&yn(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(Qe=!1),pe&&(At=!0),kt&&(D=v({},qo),P=Ve(null),kt.html===!0&&(v(D,Wo),v(P,Go)),kt.svg===!0&&(v(D,Zr),v(P,tn),v(P,ze)),kt.svgFilters===!0&&(v(D,Jr),v(P,tn),v(P,ze)),kt.mathMl===!0&&(v(D,Kr),v(P,Yo),v(P,ze))),q(s,"ADD_TAGS")||(at.tagCheck=null),q(s,"ADD_ATTR")||(at.attributeCheck=null),s.ADD_TAGS&&(typeof s.ADD_TAGS=="function"?at.tagCheck=s.ADD_TAGS:(D===ln&&(D=et(D)),v(D,s.ADD_TAGS,R))),s.ADD_ATTR&&(typeof s.ADD_ATTR=="function"?at.attributeCheck=s.ADD_ATTR:(P===cn&&(P=et(P)),v(P,s.ADD_ATTR,R))),s.ADD_URI_SAFE_ATTR&&v(er,s.ADD_URI_SAFE_ATTR,R),s.FORBID_CONTENTS&&(Z===tr&&(Z=et(Z)),v(Z,s.FORBID_CONTENTS,R)),s.ADD_FORBID_CONTENTS&&(Z===tr&&(Z=et(Z)),v(Z,s.ADD_FORBID_CONTENTS,R)),Ke&&(D["#text"]=!0),pt&&v(D,["html","head","body"]),D.table&&(v(D,["tbody"]),delete Ht.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=s.TRUSTED_TYPES_POLICY,jt=N.createHTML("")}else N===void 0&&(N=Ts(M,o)),N!==null&&typeof jt=="string"&&(jt=N.createHTML(""));H&&H(s),Rt=s}},vn=v({},[...Zr,...Jr,...ds]),xn=v({},[...Kr,...hs]),bi=function(s){let u=fe(s);(!u||!u.tagName)&&(u={namespaceURI:Ot,tagName:"template"});let p=We(s.tagName),T=We(u.tagName);return nr[s.namespaceURI]?s.namespaceURI===be?u.namespaceURI===rt?p==="svg":u.namespaceURI===ge?p==="svg"&&(T==="annotation-xml"||ye[T]):!!vn[p]:s.namespaceURI===ge?u.namespaceURI===rt?p==="math":u.namespaceURI===be?p==="math"&&ve[T]:!!xn[p]:s.namespaceURI===rt?u.namespaceURI===be&&!ve[T]||u.namespaceURI===ge&&!ye[T]?!1:!xn[p]&&(hi[p]||!vn[p]):!!(zt==="application/xhtml+xml"&&nr[s.namespaceURI]):!1},J=function(s){ne(t.removed,{element:s});try{fe(s).removeChild(s)}catch{Et(s)}},mt=function(s,u){try{ne(t.removed,{attribute:u.getAttributeNode(s),from:u})}catch{ne(t.removed,{attribute:null,from:u})}if(u.removeAttribute(s),s==="is")if(At||pe)try{J(u)}catch{}else try{u.setAttribute(s,"")}catch{}},wn=function(s){let u=null,p=null;if(Je)s="<remove></remove>"+s;else{let O=Qr(s,/^[\r\n\t ]+/);p=O&&O[0]}zt==="application/xhtml+xml"&&Ot===rt&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");let T=N?N.createHTML(s):s;if(Ot===rt)try{u=new k().parseFromString(T,zt)}catch{}if(!u||!u.documentElement){u=qe.createDocument(Ot,"template",null);try{u.documentElement.innerHTML=rr?jt:T}catch{}}let L=u.body||u.documentElement;return s&&p&&L.insertBefore(e.createTextNode(p),L.childNodes[0]||null),Ot===rt?ii.call(u,pt?"html":"body")[0]:pt?u.documentElement:L},Sn=function(s){return ni.call(s.ownerDocument||s,s,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ir=function(s){return s instanceof x&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof d)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},Tn=function(s){return typeof l=="function"&&s instanceof l};function nt(m,s,u){Ue(m,p=>{p.call(t,s,u,Rt)})}let Cn=function(s){let u=null;if(nt(F.beforeSanitizeElements,s,null),ir(s))return J(s),!0;let p=R(s.nodeName);if(nt(F.uponSanitizeElement,s,{tagName:p,allowedTags:D}),he&&s.hasChildNodes()&&!Tn(s.firstElementChild)&&j(/<[/\w!]/g,s.innerHTML)&&j(/<[/\w!]/g,s.textContent)||s.nodeType===ae.progressingInstruction||he&&s.nodeType===ae.comment&&j(/<[/\w]/g,s.data))return J(s),!0;if(!(at.tagCheck instanceof Function&&at.tagCheck(p))&&(!D[p]||Ht[p])){if(!Ht[p]&&_n(p)&&(_.tagNameCheck instanceof RegExp&&j(_.tagNameCheck,p)||_.tagNameCheck instanceof Function&&_.tagNameCheck(p)))return!1;if(Ke&&!Z[p]){let T=fe(s)||s.parentNode,L=ue(s)||s.childNodes;if(L&&T){let O=L.length;for(let z=O-1;z>=0;--z){let ot=W(L[z],!0);ot.__removalCount=(s.__removalCount||0)+1,T.insertBefore(ot,Bt(s))}}}return J(s),!0}return s instanceof f&&!bi(s)||(p==="noscript"||p==="noembed"||p==="noframes")&&j(/<\/no(script|embed|frames)/i,s.innerHTML)?(J(s),!0):(_t&&s.nodeType===ae.text&&(u=s.textContent,Ue([Ge,Ye,Xe],T=>{u=oe(u,T," ")}),s.textContent!==u&&(ne(t.removed,{element:s.cloneNode()}),s.textContent=u)),nt(F.afterSanitizeElements,s,null),!1)},En=function(s,u,p){if(de[u]||hn&&(u==="id"||u==="name")&&(p in e||p in gi))return!1;if(!(Qe&&!de[u]&&j(ai,u))){if(!(un&&j(li,u))){if(!(at.attributeCheck instanceof Function&&at.attributeCheck(u,s))){if(!P[u]||de[u]){if(!(_n(s)&&(_.tagNameCheck instanceof RegExp&&j(_.tagNameCheck,s)||_.tagNameCheck instanceof Function&&_.tagNameCheck(s))&&(_.attributeNameCheck instanceof RegExp&&j(_.attributeNameCheck,u)||_.attributeNameCheck instanceof Function&&_.attributeNameCheck(u,s))||u==="is"&&_.allowCustomizedBuiltInElements&&(_.tagNameCheck instanceof RegExp&&j(_.tagNameCheck,p)||_.tagNameCheck instanceof Function&&_.tagNameCheck(p))))return!1}else if(!er[u]){if(!j(an,oe(p,sn,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&s!=="script"&&ls(p,"data:")===0&&mn[s])){if(!(fn&&!j(ci,oe(p,sn,"")))){if(p)return!1}}}}}}}return!0},_n=function(s){return s!=="annotation-xml"&&Qr(s,ui)},An=function(s){nt(F.beforeSanitizeAttributes,s,null);let{attributes:u}=s;if(!u||ir(s))return;let p={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:P,forceKeepAttr:void 0},T=u.length;for(;T--;){let L=u[T],{name:O,namespaceURI:z,value:ot}=L,Dt=R(O),sr=ot,I=O==="value"?sr:cs(sr);if(p.attrName=Dt,p.attrValue=I,p.keepAttr=!0,p.forceKeepAttr=void 0,nt(F.uponSanitizeAttribute,s,p),I=p.attrValue,pn&&(Dt==="id"||Dt==="name")&&(mt(O,s),I=fi+I),he&&j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,I)){mt(O,s);continue}if(Dt==="attributename"&&Qr(I,"href")){mt(O,s);continue}if(p.forceKeepAttr)continue;if(!p.keepAttr){mt(O,s);continue}if(!dn&&j(/\/>/i,I)){mt(O,s);continue}_t&&Ue([Ge,Ye,Xe],On=>{I=oe(I,On," ")});let kn=R(s.nodeName);if(!En(kn,Dt,I)){mt(O,s);continue}if(N&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!z)switch(M.getAttributeType(kn,Dt)){case"TrustedHTML":{I=N.createHTML(I);break}case"TrustedScriptURL":{I=N.createScriptURL(I);break}}if(I!==sr)try{z?s.setAttributeNS(z,O,I):s.setAttribute(O,I),ir(s)?J(s):Vo(t.removed)}catch{mt(O,s)}}nt(F.afterSanitizeAttributes,s,null)},yi=function m(s){let u=null,p=Sn(s);for(nt(F.beforeSanitizeShadowDOM,s,null);u=p.nextNode();)nt(F.uponSanitizeShadowNode,u,null),Cn(u),An(u),u.content instanceof i&&m(u.content);nt(F.afterSanitizeShadowDOM,s,null)};return t.sanitize=function(m){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,p=null,T=null,L=null;if(rr=!m,rr&&(m="<!-->"),typeof m!="string"&&!Tn(m))if(typeof m.toString=="function"){if(m=m.toString(),typeof m!="string")throw ie("dirty is not a string, aborting")}else throw ie("toString is not a function");if(!t.isSupported)return m;if(Ze||or(s),t.removed=[],typeof m=="string"&&(Ut=!1),Ut){if(m.nodeName){let ot=R(m.nodeName);if(!D[ot]||Ht[ot])throw ie("root node is forbidden and cannot be sanitized in-place")}}else if(m instanceof l)u=wn("<!---->"),p=u.ownerDocument.importNode(m,!0),p.nodeType===ae.element&&p.nodeName==="BODY"||p.nodeName==="HTML"?u=p:u.appendChild(p);else{if(!At&&!_t&&!pt&&m.indexOf("<")===-1)return N&&me?N.createHTML(m):m;if(u=wn(m),!u)return At?null:me?jt:""}u&&Je&&J(u.firstChild);let O=Sn(Ut?m:u);for(;T=O.nextNode();)Cn(T),An(T),T.content instanceof i&&yi(T.content);if(Ut)return m;if(At){if(pe)for(L=oi.call(u.ownerDocument);u.firstChild;)L.appendChild(u.firstChild);else L=u;return(P.shadowroot||P.shadowrootmode)&&(L=si.call(n,L,!0)),L}let z=pt?u.outerHTML:u.innerHTML;return pt&&D["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&j(Ko,u.ownerDocument.doctype.name)&&(z="<!DOCTYPE "+u.ownerDocument.doctype.name+`>
  215. `+z),_t&&Ue([Ge,Ye,Xe],ot=>{z=oe(z,ot," ")}),N&&me?N.createHTML(z):z},t.setConfig=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};or(m),Ze=!0},t.clearConfig=function(){Rt=null,Ze=!1},t.isValidAttribute=function(m,s,u){Rt||or({});let p=R(m),T=R(s);return En(p,T,u)},t.addHook=function(m,s){typeof s=="function"&&ne(F[m],s)},t.removeHook=function(m,s){if(s!==void 0){let u=ss(F[m],s);return u===-1?void 0:as(F[m],u,1)[0]}return Vo(F[m])},t.removeHooks=function(m){F[m]=[]},t.removeAllHooks=function(){F=Qo()},t}var le=ti();var ce=document.getElementById("solutionsContainer"),nn=acquireVsCodeApi(),on=0,ei=!1;wo().register(Yr());window.addEventListener("DOMContentLoaded",()=>{nn.postMessage({command:"webviewReady"}),ks()});window.addEventListener("message",r=>{let t=r.data;switch(t.command){case"solutionsUpdated":Cs(t);break;case"navigatePreviousSolution":Es();break;case"navigateNextSolution":_s();break}});function Cs(r){As(r),ce&&(ce.innerHTML=r.solutions.map((t,e)=>{let n=t.citation?`<p>
  216. <span style="vertical-align: text-bottom" aria-hidden="true">Warning</span>
  217. ${le.sanitize(t.citation.message)}
  218. <a href="${le.sanitize(t.citation.url)}" target="_blank">Inspect source code</a>
  219. </p>`:"",o=le.sanitize(t.htmlSnippet);return`<h3 class='solutionHeading' id="solution-${e+1}-heading">Suggestion ${e+1}</h3>
  220. <div class='snippetContainer' aria-labelledby="solution-${e+1}-heading" role="group" data-solution-index="${e}">${o}</div>
  221. ${le.sanitize(n)}
  222. <vscode-button role="button" class="acceptButton" id="acceptButton${e}" appearance="secondary" data-solution-index="${e}">Accept suggestion ${e+1}</vscode-button>`}).join(""))}function Es(){let r=document.querySelectorAll(".snippetContainer pre"),t=on-1;r[t]?.focus()}function _s(){let r=document.querySelectorAll(".snippetContainer pre"),t=(on??-1)+1;r[t]?r[t].focus():r[0]&&r[0].focus()}function As(r){let t=document.getElementById("progress-bar"),e=document.getElementById("loadingContainer");if(!(!t||!e))if(r.percentage>=100)e.innerHTML=`${r.solutions.length} Suggestions`;else{let n=e.querySelector("label");n.textContent!=="Loading suggestions:\xA0"&&(n.textContent="Loading suggestions:\xA0"),t.value=r.percentage}}function ks(){ei||ce===null||(ce.addEventListener("focusin",r=>{let t=r.target,e=ri(t);e!==void 0&&Os(e)}),ce.addEventListener("click",r=>{let e=r.target?.closest("vscode-button[data-solution-index]");if(!(e instanceof HTMLElement))return;let n=ri(e);n!==void 0&&Rs(n)}),ei=!0)}function ri(r){let t=r?.closest("[data-solution-index]");if(!(t instanceof HTMLElement))return;let e=t.getAttribute("data-solution-index");if(e===null)return;let n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}function Os(r){on=r,nn.postMessage({command:"focusSolution",solutionIndex:r})}function Rs(r){nn.postMessage({command:"acceptSolution",solutionIndex:r})}})();
  223. /*! Bundled license information:
  224. tslib/tslib.es6.js:
  225. (*! *****************************************************************************
  226. Copyright (c) Microsoft Corporation.
  227. Permission to use, copy, modify, and/or distribute this software for any
  228. purpose with or without fee is hereby granted.
  229. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  230. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  231. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  232. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  233. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  234. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  235. PERFORMANCE OF THIS SOFTWARE.
  236. ***************************************************************************** *)
  237. dompurify/dist/purify.es.mjs:
  238. (*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE *)
  239. */