@fluid-topics/ft-loader
Version:
A fluid-topics loader component
4 lines • 260 kB
JavaScript
"use strict";(()=>{var Ki=Object.create;var ur=Object.defineProperty;var Zi=Object.getOwnPropertyDescriptor;var qi=Object.getOwnPropertyNames;var Yi=Object.getPrototypeOf,Ji=Object.prototype.hasOwnProperty;var Xi=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),D=(r,e)=>{for(var o in e)ur(r,o,{get:e[o],enumerable:!0})},Qi=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of qi(e))!Ji.call(r,a)&&a!==o&&ur(r,a,{get:()=>e[a],enumerable:!(n=Zi(e,a))||n.enumerable});return r};var ec=(r,e,o)=>(o=r!=null?Ki(Yi(r)):{},Qi(e||!r||!r.__esModule?ur(o,"default",{value:r,enumerable:!0}):o,r));var xi=Xi((Oe,bi)=>{var ar=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ir=function(){function r(){this.fetch=!1,this.DOMException=ar.DOMException}return r.prototype=ar,new r}();(function(r){var e=function(o){var n=typeof r<"u"&&r||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function i(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(y){return y&&c.indexOf(Object.prototype.toString.call(y))>-1};function d(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(y)||y==="")throw new TypeError('Invalid character in header field name: "'+y+'"');return y.toLowerCase()}function f(y){return typeof y!="string"&&(y=String(y)),y}function h(y){var v={next:function(){var R=y.shift();return{done:R===void 0,value:R}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function p(y){this.map={},y instanceof p?y.forEach(function(v,R){this.append(R,v)},this):Array.isArray(y)?y.forEach(function(v){if(v.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+v.length);this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}p.prototype.append=function(y,v){y=d(y),v=f(v);var R=this.map[y];this.map[y]=R?R+", "+v:v},p.prototype.delete=function(y){delete this.map[d(y)]},p.prototype.get=function(y){return y=d(y),this.has(y)?this.map[y]:null},p.prototype.has=function(y){return this.map.hasOwnProperty(d(y))},p.prototype.set=function(y,v){this.map[d(y)]=f(v)},p.prototype.forEach=function(y,v){for(var R in this.map)this.map.hasOwnProperty(R)&&y.call(v,this.map[R],R,this)},p.prototype.keys=function(){var y=[];return this.forEach(function(v,R){y.push(R)}),h(y)},p.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),h(y)},p.prototype.entries=function(){var y=[];return this.forEach(function(v,R){y.push([R,v])}),h(y)},a.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function g(y){if(!y._noBody){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}}function b(y){return new Promise(function(v,R){y.onload=function(){v(y.result)},y.onerror=function(){R(y.error)}})}function m(y){var v=new FileReader,R=b(v);return v.readAsArrayBuffer(y),R}function S(y){var v=new FileReader,R=b(v),k=/charset=([A-Za-z0-9_-]+)/.exec(y.type),U=k?k[1]:"utf-8";return v.readAsText(y,U),R}function C(y){for(var v=new Uint8Array(y),R=new Array(v.length),k=0;k<v.length;k++)R[k]=String.fromCharCode(v[k]);return R.join("")}function w(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(y){this.bodyUsed=this.bodyUsed,this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():a.arrayBuffer&&a.blob&&i(y)?(this._bodyArrayBuffer=w(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||l(y))?this._bodyArrayBuffer=w(y):this._bodyText=y=Object.prototype.toString.call(y):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=g(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var y=g(this);return y||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(m);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var y=g(this);if(y)return y;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(N)}),this.json=function(){return this.text().then(JSON.parse)},this}var O=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(y){var v=y.toUpperCase();return O.indexOf(v)>-1?v:y}function E(y,v){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');v=v||{};var R=v.body;if(y instanceof E){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new p(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!R&&y._bodyInit!=null&&(R=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new p(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal||function(){if("AbortController"in n){var T=new AbortController;return T.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&R)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(R),(this.method==="GET"||this.method==="HEAD")&&(v.cache==="no-store"||v.cache==="no-cache")){var k=/([?&])_=[^&]*/;if(k.test(this.url))this.url=this.url.replace(k,"$1_="+new Date().getTime());else{var U=/\?/;this.url+=(U.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function N(y){var v=new FormData;return y.trim().split("&").forEach(function(R){if(R){var k=R.split("="),U=k.shift().replace(/\+/g," "),T=k.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(T))}}),v}function P(y){var v=new p,R=y.replace(/\r?\n[\t ]+/g," ");return R.split("\r").map(function(k){return k.indexOf(`
`)===0?k.substr(1,k.length):k}).forEach(function(k){var U=k.split(":"),T=U.shift().trim();if(T){var Lt=U.join(":").trim();try{v.append(T,Lt)}catch(dr){console.warn("Response "+dr.message)}}}),v}A.call(E.prototype);function L(y,v){if(!(this instanceof L))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=v.statusText===void 0?"":""+v.statusText,this.headers=new p(v.headers),this.url=v.url||"",this._initBody(y)}A.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},L.error=function(){var y=new L(null,{status:200,statusText:""});return y.ok=!1,y.status=0,y.type="error",y};var _=[301,302,303,307,308];L.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new L(null,{status:v,headers:{location:y}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(v,R){this.message=v,this.name=R;var k=Error(v);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function I(y,v){return new Promise(function(R,k){var U=new E(y,v);if(U.signal&&U.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function Lt(){T.abort()}T.onload=function(){var H={statusText:T.statusText,headers:P(T.getAllResponseHeaders()||"")};U.url.indexOf("file://")===0&&(T.status<200||T.status>599)?H.status=200:H.status=T.status,H.url="responseURL"in T?T.responseURL:H.headers.get("X-Request-URL");var Ee="response"in T?T.response:T.responseText;setTimeout(function(){R(new L(Ee,H))},0)},T.onerror=function(){setTimeout(function(){k(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){k(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){k(new o.DOMException("Aborted","AbortError"))},0)};function dr(H){try{return H===""&&n.location.href?n.location.href:H}catch{return H}}if(T.open(U.method,dr(U.url),!0),U.credentials==="include"?T.withCredentials=!0:U.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(a.blob?T.responseType="blob":a.arrayBuffer&&(T.responseType="arraybuffer")),v&&typeof v.headers=="object"&&!(v.headers instanceof p||n.Headers&&v.headers instanceof n.Headers)){var sn=[];Object.getOwnPropertyNames(v.headers).forEach(function(H){sn.push(d(H)),T.setRequestHeader(H,f(v.headers[H]))}),U.headers.forEach(function(H,Ee){sn.indexOf(Ee)===-1&&T.setRequestHeader(Ee,H)})}else U.headers.forEach(function(H,Ee){T.setRequestHeader(Ee,H)});U.signal&&(U.signal.addEventListener("abort",Lt),T.onreadystatechange=function(){T.readyState===4&&U.signal.removeEventListener("abort",Lt)}),T.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=p,n.Request=E,n.Response=L),o.Headers=p,o.Request=E,o.Response=L,o.fetch=I,o}({})})(ir);ir.fetch.ponyfill=!0;delete ir.fetch.polyfill;var rt=ar.fetch?ar:ir;Oe=rt.fetch;Oe.default=rt.fetch;Oe.fetch=rt.fetch;Oe.Headers=rt.Headers;Oe.Request=rt.Request;Oe.Response=rt.Response;bi.exports=Oe});if(!ShadowRoot.prototype.createElement){let r=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,n=window.customElements,a=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(O,x){if(O=O.toLowerCase(),this._getDefinition(O)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${O}" has already been used with this registry`);if(this._definitionsByClass.get(x)!==void 0)throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");let E=x.prototype.attributeChangedCallback,N=new Set(x.observedAttributes||[]);g(x,N,E);let P={elementClass:x,connectedCallback:x.prototype.connectedCallback,disconnectedCallback:x.prototype.disconnectedCallback,adoptedCallback:x.prototype.adoptedCallback,attributeChangedCallback:E,formAssociated:x.formAssociated,formAssociatedCallback:x.prototype.formAssociatedCallback,formDisabledCallback:x.prototype.formDisabledCallback,formResetCallback:x.prototype.formResetCallback,formStateRestoreCallback:x.prototype.formStateRestoreCallback,observedAttributes:N};this._definitionsByTag.set(O,P),this._definitionsByClass.set(x,P);let L=o.call(n,O);L||(L=p(O),e.call(n,O,L)),this===window.customElements&&(c.set(x,P),P.standInClass=L);let _=this._awaitingUpgrade.get(O);if(_){this._awaitingUpgrade.delete(O);for(let y of _)i.delete(y),m(y,P,!0)}let I=this._whenDefinedPromises.get(O);return I!==void 0&&(I.resolve(x),this._whenDefinedPromises.delete(O)),x}upgrade(){C.push(this),n.upgrade.apply(n,arguments),C.pop()}get(O){return this._definitionsByTag.get(O)?.elementClass}_getDefinition(O){return this._definitionsByTag.get(O)}whenDefined(O){let x=this._getDefinition(O);if(x!==void 0)return Promise.resolve(x.elementClass);let E=this._whenDefinedPromises.get(O);return E===void 0&&(E={},E.promise=new Promise(N=>E.resolve=N),this._whenDefinedPromises.set(O,E)),E.promise}_upgradeWhenDefined(O,x,E){let N=this._awaitingUpgrade.get(x);N||this._awaitingUpgrade.set(x,N=new Set),E?N.add(O):N.delete(O)}};let d;window.HTMLElement=function(){let x=d;if(x)return d=void 0,x;let E=c.get(this.constructor);if(!E)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return x=Reflect.construct(r,[],E.standInClass),Object.setPrototypeOf(x,this.constructor.prototype),a.set(x,E),x},window.HTMLElement.prototype=r.prototype;let f=O=>O===document||O instanceof ShadowRoot,h=O=>{let x=O.getRootNode();if(!f(x)){let E=C[C.length-1];if(E instanceof CustomElementRegistry)return E;x=E.getRootNode(),f(x)||(x=l.get(x)?.getRootNode()||document)}return x.customElements},p=O=>class{static get formAssociated(){return!0}constructor(){let E=Reflect.construct(r,[],this.constructor);Object.setPrototypeOf(E,HTMLElement.prototype);let N=h(E)||window.customElements,P=N._getDefinition(O);return P?m(E,P):i.set(E,N),E}connectedCallback(){let E=a.get(this);E?E.connectedCallback&&E.connectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,O,!0)}disconnectedCallback(){let E=a.get(this);E?E.disconnectedCallback&&E.disconnectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,O,!1)}adoptedCallback(){a.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){let E=a.get(this);E&&E.formAssociated&&E?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){let E=a.get(this);E?.formAssociated&&E?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){let E=a.get(this);E?.formAssociated&&E?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){let E=a.get(this);E?.formAssociated&&E?.formStateRestoreCallback?.apply(this,arguments)}},g=(O,x,E)=>{if(x.size===0||E===void 0)return;let N=O.prototype.setAttribute;N&&(O.prototype.setAttribute=function(_,I){let y=_.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);N.call(this,y,I),E.call(this,y,v,I)}else N.call(this,y,I)});let P=O.prototype.removeAttribute;P&&(O.prototype.removeAttribute=function(_){let I=_.toLowerCase();if(x.has(I)){let y=this.getAttribute(I);P.call(this,I),E.call(this,I,y,null)}else P.call(this,I)});let L=O.prototype.toggleAttribute;L&&(O.prototype.toggleAttribute=function(_,I){let y=_.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);L.call(this,y,I);let R=this.getAttribute(y);E.call(this,y,v,R)}else L.call(this,y,I)})},b=O=>{let x=Object.getPrototypeOf(O);if(x!==window.HTMLElement)return x===r?Object.setPrototypeOf(O,window.HTMLElement):b(x)},m=(O,x,E=!1)=>{Object.setPrototypeOf(O,x.elementClass.prototype),a.set(O,x),d=O;try{new x.elementClass}catch{b(x.elementClass),new x.elementClass}x.attributeChangedCallback&&x.observedAttributes.forEach(N=>{O.hasAttribute(N)&&x.attributeChangedCallback.call(O,N,null,O.getAttribute(N))}),E&&x.connectedCallback&&O.isConnected&&x.connectedCallback.call(O)},S=Element.prototype.attachShadow;Element.prototype.attachShadow=function(O){let x=S.apply(this,arguments);return O.customElements&&(x.customElements=O.customElements),x};let C=[document],w=(O,x,E=void 0)=>{let N=(E?Object.getPrototypeOf(E):O.prototype)[x];O.prototype[x]=function(){C.push(this);let P=N.apply(E||this,arguments);return P!==void 0&&l.set(P,this),C.pop(),P}};w(ShadowRoot,"createElement",document),w(ShadowRoot,"importNode",document),w(Element,"insertAdjacentHTML");let A=(O,x)=>{let E=Object.getOwnPropertyDescriptor(O.prototype,x);Object.defineProperty(O.prototype,x,{...E,set(N){C.push(this),E.set.call(this,N),C.pop()}})};if(A(Element,"innerHTML"),A(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){let O=new WeakMap,x=HTMLElement.prototype.attachInternals,E=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(..._){let I=x.call(this,..._);return O.set(I,this),I},E.forEach(_=>{let I=window.ElementInternals.prototype,y=I[_];I[_]=function(...v){let R=O.get(this);if(a.get(R).formAssociated===!0)return y?.call(this,...v);throw new DOMException(`Failed to execute ${y} on 'ElementInternals': The target element is not a form-associated custom element.`)}});class N extends Array{constructor(I){super(...I),this._elements=I}get value(){return this._elements.find(I=>I.checked===!0)?.value||""}}class P{constructor(I){let y=new Map;I.forEach((v,R)=>{let k=v.getAttribute("name"),U=y.get(k)||[];this[+R]=v,U.push(v),y.set(k,U)}),this.length=I.length,y.forEach((v,R)=>{v&&(v.length===1?this[R]=v[0]:this[R]=new N(v))})}namedItem(I){return this[I]}}let L=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let _=L.get.call(this,[]),I=[];for(let y of _){let v=a.get(y);(!v||v.formAssociated===!0)&&I.push(y)}return new P(I)}})}}try{window.customElements.define("custom-element",null)}catch{let e=window.customElements.define;window.customElements.define=(o,n,a)=>{if(n!==null)try{e.bind(window.customElements)(o,n,a)}catch(i){console.info(o,n,a,i)}}}var Er={};D(Er,{CSSResult:()=>Me,LitElement:()=>ie,ReactiveElement:()=>ee,_$LE:()=>hc,_$LH:()=>vr,adoptStyles:()=>ct,css:()=>W,defaultConverter:()=>Be,getCompatibleStyle:()=>Dt,html:()=>xr,isServer:()=>rd,mathml:()=>uc,noChange:()=>z,notEqual:()=>lt,nothing:()=>B,render:()=>Sr,supportsAdoptingStyleSheets:()=>at,svg:()=>dc,unsafeCSS:()=>it});var kt=globalThis,at=kt.ShadowRoot&&(kt.ShadyCSS===void 0||kt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fr=Symbol(),ln=new WeakMap,Me=class{constructor(e,o,n){if(this._$cssResult$=!0,n!==fr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o}get styleSheet(){let e=this.o,o=this.t;if(at&&e===void 0){let n=o!==void 0&&o.length===1;n&&(e=ln.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ln.set(o,e))}return e}toString(){return this.cssText}},it=r=>new Me(typeof r=="string"?r:r+"",void 0,fr),W=(r,...e)=>{let o=r.length===1?r[0]:e.reduce((n,a,i)=>n+(c=>{if(c._$cssResult$===!0)return c.cssText;if(typeof c=="number")return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+r[i+1],r[0]);return new Me(o,r,fr)},ct=(r,e)=>{if(at)r.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=kt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)}},Dt=at?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let o="";for(let n of e.cssRules)o+=n.cssText;return it(o)})(r):r;var{is:tc,defineProperty:rc,getOwnPropertyDescriptor:oc,getOwnPropertyNames:nc,getOwnPropertySymbols:ac,getPrototypeOf:ic}=Object,Ft=globalThis,dn=Ft.trustedTypes,cc=dn?dn.emptyScript:"",sc=Ft.reactiveElementPolyfillSupport,st=(r,e)=>r,Be={toAttribute(r,e){switch(e){case Boolean:r=r?cc:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let o=r;switch(e){case Boolean:o=r!==null;break;case Number:o=r===null?null:Number(r);break;case Object:case Array:try{o=JSON.parse(r)}catch{o=null}}return o}},lt=(r,e)=>!tc(r,e),un={attribute:!0,type:String,converter:Be,reflect:!1,useDefault:!1,hasChanged:lt};Symbol.metadata??=Symbol("metadata"),Ft.litPropertyMetadata??=new WeakMap;var ee=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,o=un){if(o.state&&(o.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((o=Object.create(o)).wrapped=!0),this.elementProperties.set(e,o),!o.noAccessor){let n=Symbol(),a=this.getPropertyDescriptor(e,n,o);a!==void 0&&rc(this.prototype,e,a)}}static getPropertyDescriptor(e,o,n){let{get:a,set:i}=oc(this.prototype,e)??{get(){return this[o]},set(c){this[o]=c}};return{get:a,set(c){let l=a?.call(this);i?.call(this,c),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??un}static _$Ei(){if(this.hasOwnProperty(st("elementProperties")))return;let e=ic(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(st("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(st("properties"))){let o=this.properties,n=[...nc(o),...ac(o)];for(let a of n)this.createProperty(a,o[a])}let e=this[Symbol.metadata];if(e!==null){let o=litPropertyMetadata.get(e);if(o!==void 0)for(let[n,a]of o)this.elementProperties.set(n,a)}this._$Eh=new Map;for(let[o,n]of this.elementProperties){let a=this._$Eu(o,n);a!==void 0&&this._$Eh.set(a,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let o=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let a of n)o.unshift(Dt(a))}else e!==void 0&&o.push(Dt(e));return o}static _$Eu(e,o){let n=o.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,o=this.constructor.elementProperties;for(let n of o.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ct(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,o,n){this._$AK(e,n)}_$ET(e,o){let n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(a!==void 0&&n.reflect===!0){let i=(n.converter?.toAttribute!==void 0?n.converter:Be).toAttribute(o,n.type);this._$Em=e,i==null?this.removeAttribute(a):this.setAttribute(a,i),this._$Em=null}}_$AK(e,o){let n=this.constructor,a=n._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let i=n.getPropertyOptions(a),c=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Be;this._$Em=a,this[a]=c.fromAttribute(o,i.type)??this._$Ej?.get(a)??null,this._$Em=null}}requestUpdate(e,o,n){if(e!==void 0){let a=this.constructor,i=this[e];if(n??=a.getPropertyOptions(e),!((n.hasChanged??lt)(i,o)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,o,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,o,{useDefault:n,reflect:a,wrapped:i},c){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,c??o??this[e]),i!==!0||c!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(o=void 0),this._$AL.set(e,o)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(o){Promise.reject(o)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[a,i]of n){let{wrapped:c}=i,l=this[a];c!==!0||this._$AL.has(a)||l===void 0||this.C(a,void 0,i,l)}}let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(o)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(o)}willUpdate(e){}_$AE(e){this._$EO?.forEach(o=>o.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(o=>this._$ET(o,this[o])),this._$EM()}updated(e){}firstUpdated(e){}};ee.elementStyles=[],ee.shadowRootOptions={mode:"open"},ee[st("elementProperties")]=new Map,ee[st("finalized")]=new Map,sc?.({ReactiveElement:ee}),(Ft.reactiveElementVersions??=[]).push("2.1.0");var hr=globalThis,Ut=hr.trustedTypes,fn=Ut?Ut.createPolicy("lit-html",{createHTML:r=>r}):void 0,yr="$lit$",ae=`lit$${Math.random().toFixed(9).slice(2)}$`,gr="?"+ae,lc=`<${gr}>`,Ae=document,ut=()=>Ae.createComment(""),ft=r=>r===null||typeof r!="object"&&typeof r!="function",mr=Array.isArray,bn=r=>mr(r)||typeof r?.[Symbol.iterator]=="function",pr=`[
\f\r]`,dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pn=/-->/g,hn=/>/g,we=RegExp(`>|${pr}(?:([^\\s"'>=/]+)(${pr}*=${pr}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),yn=/'/g,gn=/"/g,xn=/^(?:script|style|textarea|title)$/i,br=r=>(e,...o)=>({_$litType$:r,strings:e,values:o}),xr=br(1),dc=br(2),uc=br(3),z=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),mn=new WeakMap,Ce=Ae.createTreeWalker(Ae,129);function vn(r,e){if(!mr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return fn!==void 0?fn.createHTML(e):e}var Sn=(r,e)=>{let o=r.length-1,n=[],a,i=e===2?"<svg>":e===3?"<math>":"",c=dt;for(let l=0;l<o;l++){let d=r[l],f,h,p=-1,g=0;for(;g<d.length&&(c.lastIndex=g,h=c.exec(d),h!==null);)g=c.lastIndex,c===dt?h[1]==="!--"?c=pn:h[1]!==void 0?c=hn:h[2]!==void 0?(xn.test(h[2])&&(a=RegExp("</"+h[2],"g")),c=we):h[3]!==void 0&&(c=we):c===we?h[0]===">"?(c=a??dt,p=-1):h[1]===void 0?p=-2:(p=c.lastIndex-h[2].length,f=h[1],c=h[3]===void 0?we:h[3]==='"'?gn:yn):c===gn||c===yn?c=we:c===pn||c===hn?c=dt:(c=we,a=void 0);let b=c===we&&r[l+1].startsWith("/>")?" ":"";i+=c===dt?d+lc:p>=0?(n.push(f),d.slice(0,p)+yr+d.slice(p)+ae+b):d+ae+(p===-2?l:b)}return[vn(r,i+(r[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},pt=class r{constructor({strings:e,_$litType$:o},n){let a;this.parts=[];let i=0,c=0,l=e.length-1,d=this.parts,[f,h]=Sn(e,o);if(this.el=r.createElement(f,n),Ce.currentNode=this.el.content,o===2||o===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=Ce.nextNode())!==null&&d.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(yr)){let g=h[c++],b=a.getAttribute(p).split(ae),m=/([.?@])?(.*)/.exec(g);d.push({type:1,index:i,name:m[2],strings:b,ctor:m[1]==="."?Bt:m[1]==="?"?Wt:m[1]==="@"?Ht:Ne}),a.removeAttribute(p)}else p.startsWith(ae)&&(d.push({type:6,index:i}),a.removeAttribute(p));if(xn.test(a.tagName)){let p=a.textContent.split(ae),g=p.length-1;if(g>0){a.textContent=Ut?Ut.emptyScript:"";for(let b=0;b<g;b++)a.append(p[b],ut()),Ce.nextNode(),d.push({type:2,index:++i});a.append(p[g],ut())}}}else if(a.nodeType===8)if(a.data===gr)d.push({type:2,index:i});else{let p=-1;for(;(p=a.data.indexOf(ae,p+1))!==-1;)d.push({type:7,index:i}),p+=ae.length-1}i++}}static createElement(e,o){let n=Ae.createElement("template");return n.innerHTML=e,n}};function Re(r,e,o=r,n){if(e===z)return e;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=ft(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(r),a._$AT(r,o,n)),n!==void 0?(o._$Co??=[])[n]=a:o._$Cl=a),a!==void 0&&(e=Re(r,a._$AS(r,e.values),a,n)),e}var Mt=class{constructor(e,o){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:o},parts:n}=this._$AD,a=(e?.creationScope??Ae).importNode(o,!0);Ce.currentNode=a;let i=Ce.nextNode(),c=0,l=0,d=n[0];for(;d!==void 0;){if(c===d.index){let f;d.type===2?f=new We(i,i.nextSibling,this,e):d.type===1?f=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(f=new $t(i,this,e)),this._$AV.push(f),d=n[++l]}c!==d?.index&&(i=Ce.nextNode(),c++)}return Ce.currentNode=Ae,a}p(e){let o=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,o),o+=n.strings.length-2):n._$AI(e[o])),o++}},We=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,o,n,a){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=e,this._$AB=o,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,o=this._$AM;return o!==void 0&&e?.nodeType===11&&(e=o.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,o=this){e=Re(this,e,o),ft(e)?e===B||e==null||e===""?(this._$AH!==B&&this._$AR(),this._$AH=B):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):bn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==B&&ft(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ae.createTextNode(e)),this._$AH=e}$(e){let{values:o,_$litType$:n}=e,a=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=pt.createElement(vn(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new Mt(a,this),c=i.u(this.options);i.p(o),this.T(c),this._$AH=i}}_$AC(e){let o=mn.get(e.strings);return o===void 0&&mn.set(e.strings,o=new pt(e)),o}k(e){mr(this._$AH)||(this._$AH=[],this._$AR());let o=this._$AH,n,a=0;for(let i of e)a===o.length?o.push(n=new r(this.O(ut()),this.O(ut()),this,this.options)):n=o[a],n._$AI(i),a++;a<o.length&&(this._$AR(n&&n._$AB.nextSibling,a),o.length=a)}_$AR(e=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,n,a,i){this.type=1,this._$AH=B,this._$AN=void 0,this.element=e,this.name=o,this._$AM=a,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=B}_$AI(e,o=this,n,a){let i=this.strings,c=!1;if(i===void 0)e=Re(this,e,o,0),c=!ft(e)||e!==this._$AH&&e!==z,c&&(this._$AH=e);else{let l=e,d,f;for(e=i[0],d=0;d<i.length-1;d++)f=Re(this,l[n+d],o,d),f===z&&(f=this._$AH[d]),c||=!ft(f)||f!==this._$AH[d],f===B?e=B:e!==B&&(e+=(f??"")+i[d+1]),this._$AH[d]=f}c&&!a&&this.j(e)}j(e){e===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Bt=class extends Ne{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===B?void 0:e}},Wt=class extends Ne{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==B)}},Ht=class extends Ne{constructor(e,o,n,a,i){super(e,o,n,a,i),this.type=5}_$AI(e,o=this){if((e=Re(this,e,o,0)??B)===z)return;let n=this._$AH,a=e===B&&n!==B||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==B&&(n===B||a);a&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},$t=class{constructor(e,o,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=o,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Re(this,e)}},vr={M:yr,P:ae,A:gr,C:1,L:Sn,R:Mt,D:bn,V:Re,I:We,H:Ne,N:Wt,U:Ht,B:Bt,F:$t},fc=hr.litHtmlPolyfillSupport;fc?.(pt,We),(hr.litHtmlVersions??=[]).push("3.3.0");var Sr=(r,e,o)=>{let n=o?.renderBefore??e,a=n._$litPart$;if(a===void 0){let i=o?.renderBefore??null;n._$litPart$=a=new We(e.insertBefore(ut(),i),i,void 0,o??{})}return a._$AI(r),a};var Or=globalThis,ie=class extends ee{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Sr(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return z}};ie._$litElement$=!0,ie.finalized=!0,Or.litElementHydrateSupport?.({LitElement:ie});var pc=Or.litElementPolyfillSupport;pc?.({LitElement:ie});var hc={_$AK:(r,e,o)=>{r._$AK(e,o)},_$AL:r=>r._$AL};(Or.litElementVersions??=[]).push("4.2.0");var rd=!1;var Cr={};D(Cr,{customElement:()=>yc,eventOptions:()=>mc,property:()=>G,query:()=>bc,queryAll:()=>vc,queryAssignedElements:()=>Oc,queryAssignedNodes:()=>Ec,queryAsync:()=>Sc,standardProperty:()=>On,state:()=>wr});var yc=r=>(e,o)=>{o!==void 0?o.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};var gc={attribute:!0,type:String,converter:Be,reflect:!1,hasChanged:lt},On=(r=gc,e,o)=>{let{kind:n,metadata:a}=o,i=globalThis.litPropertyMetadata.get(a);if(i===void 0&&globalThis.litPropertyMetadata.set(a,i=new Map),n==="setter"&&((r=Object.create(r)).wrapped=!0),i.set(o.name,r),n==="accessor"){let{name:c}=o;return{set(l){let d=e.get.call(this);e.set.call(this,l),this.requestUpdate(c,d,r)},init(l){return l!==void 0&&this.C(c,void 0,r,l),l}}}if(n==="setter"){let{name:c}=o;return function(l){let d=this[c];e.call(this,l),this.requestUpdate(c,d,r)}}throw Error("Unsupported decorator location: "+n)};function G(r){return(e,o)=>typeof o=="object"?On(r,e,o):((n,a,i)=>{let c=a.hasOwnProperty(i);return a.constructor.createProperty(i,n),c?Object.getOwnPropertyDescriptor(a,i):void 0})(r,e,o)}function wr(r){return G({...r,state:!0,attribute:!1})}function mc(r){return(e,o)=>{let n=typeof e=="function"?e:e[o];Object.assign(n,r)}}var J=(r,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,o),o);function bc(r,e){return(o,n,a)=>{let i=c=>c.renderRoot?.querySelector(r)??null;if(e){let{get:c,set:l}=typeof n=="object"?o:a??(()=>{let d=Symbol();return{get(){return this[d]},set(f){this[d]=f}}})();return J(o,n,{get(){let d=c.call(this);return d===void 0&&(d=i(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return J(o,n,{get(){return i(this)}})}}var xc;function vc(r){return(e,o)=>J(e,o,{get(){return(this.renderRoot??(xc??=document.createDocumentFragment())).querySelectorAll(r)}})}function Sc(r){return(e,o)=>J(e,o,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(r)??null}})}function Oc(r){return(e,o)=>{let{slot:n,selector:a}=r??{},i="slot"+(n?`[name=${n}]`:":not([name])");return J(e,o,{get(){let c=this.renderRoot?.querySelector(i),l=c?.assignedElements(r)??[];return a===void 0?l:l.filter(d=>d.matches(a))}})}}function Ec(r){return(e,o)=>{let{slot:n}=r??{},a="slot"+(n?`[name=${n}]`:":not([name])");return J(e,o,{get(){return this.renderRoot?.querySelector(a)?.assignedNodes(r)??[]}})}}var Ar={};D(Ar,{repeat:()=>Ac});var fe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},pe=r=>(...e)=>({_$litDirective$:r,values:e}),te=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,o,n){this._$Ct=e,this._$AM=o,this._$Ci=n}_$AS(e,o){return this.update(e,o)}update(e,o){return this.render(...o)}};var{I:wc}=vr;var En=()=>document.createComment(""),He=(r,e,o)=>{let n=r._$AA.parentNode,a=e===void 0?r._$AB:e._$AA;if(o===void 0){let i=n.insertBefore(En(),a),c=n.insertBefore(En(),a);o=new wc(i,c,r,r.options)}else{let i=o._$AB.nextSibling,c=o._$AM,l=c!==r;if(l){let d;o._$AQ?.(r),o._$AM=r,o._$AP!==void 0&&(d=r._$AU)!==c._$AU&&o._$AP(d)}if(i!==a||l){let d=o._$AA;for(;d!==i;){let f=d.nextSibling;n.insertBefore(d,a),d=f}}}return o},he=(r,e,o=r)=>(r._$AI(e,o),r),Cc={},wn=(r,e=Cc)=>r._$AH=e,Cn=r=>r._$AH,zt=r=>{r._$AP?.(!1,!0);let e=r._$AA,o=r._$AB.nextSibling;for(;e!==o;){let n=e.nextSibling;e.remove(),e=n}};var An=(r,e,o)=>{let n=new Map;for(let a=e;a<=o;a++)n.set(r[a],a);return n},Ac=pe(class extends te{constructor(r){if(super(r),r.type!==fe.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,o){let n;o===void 0?o=e:e!==void 0&&(n=e);let a=[],i=[],c=0;for(let l of r)a[c]=n?n(l,c):c,i[c]=o(l,c),c++;return{values:i,keys:a}}render(r,e,o){return this.dt(r,e,o).values}update(r,[e,o,n]){let a=Cn(r),{values:i,keys:c}=this.dt(e,o,n);if(!Array.isArray(a))return this.ut=c,i;let l=this.ut??=[],d=[],f,h,p=0,g=a.length-1,b=0,m=i.length-1;for(;p<=g&&b<=m;)if(a[p]===null)p++;else if(a[g]===null)g--;else if(l[p]===c[b])d[b]=he(a[p],i[b]),p++,b++;else if(l[g]===c[m])d[m]=he(a[g],i[m]),g--,m--;else if(l[p]===c[m])d[m]=he(a[p],i[m]),He(r,d[m+1],a[p]),p++,m--;else if(l[g]===c[b])d[b]=he(a[g],i[b]),He(r,a[p],a[g]),g--,b++;else if(f===void 0&&(f=An(c,b,m),h=An(l,p,g)),f.has(l[p]))if(f.has(l[g])){let S=h.get(c[b]),C=S!==void 0?a[S]:null;if(C===null){let w=He(r,a[p]);he(w,i[b]),d[b]=w}else d[b]=he(C,i[b]),He(r,a[p],C),a[S]=null;b++}else zt(a[g]),g--;else zt(a[p]),p++;for(;b<=m;){let S=He(r,d[m+1]);he(S,i[b]),d[b++]=S}for(;p<=g;){let S=a[p++];S!==null&&zt(S)}return this.ut=c,wn(r,d),z}});var Rr={};D(Rr,{classMap:()=>Rc});var Rc=pe(class extends te{constructor(r){if(super(r),r.type!==fe.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(let n in e)e[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(e)}let o=r.element.classList;for(let n of this.st)n in e||(o.remove(n),this.st.delete(n));for(let n in e){let a=!!e[n];a===this.st.has(n)||this.nt?.has(n)||(a?(o.add(n),this.st.add(n)):(o.remove(n),this.st.delete(n)))}return z}});var Nr={};D(Nr,{styleMap:()=>Ic});var Rn="important",Nc=" !"+Rn,Ic=pe(class extends te{constructor(r){if(super(r),r.type!==fe.ATTRIBUTE||r.name!=="style"||r.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((e,o)=>{let n=r[o];return n==null?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(r,[e]){let{style:o}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?o.removeProperty(n):o[n]=null);for(let n in e){let a=e[n];if(a!=null){this.ft.add(n);let i=typeof a=="string"&&a.endsWith(Nc);n.includes("-")||i?o.setProperty(n,i?a.slice(0,-11):a,i?Rn:""):o[n]=a}}return z}});var Ir={};D(Ir,{UnsafeHTMLDirective:()=>$e,unsafeHTML:()=>Pc});var $e=class extends te{constructor(e){if(super(e),this.it=B,e.type!==fe.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===B||e==null)return this._t=void 0,this.it=e;if(e===z)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let o=[e];return o.raw=o,this._t={_$litType$:this.constructor.resultType,strings:o,values:[]}}};$e.directiveName="unsafeHTML",$e.resultType=1;var Pc=pe($e);var Ur={};D(Ur,{CacheRegistry:()=>Fr,ClearCacheEvent:()=>yt});var _r={};D(_r,{CancelablePromise:()=>ze,CanceledPromiseError:()=>ht,cancelable:()=>Pr});var ht=class extends Error{constructor(e,o,n){super(e),this.canceledPromiseResult=o,this.canceledPromiseError=n}},ze=class extends Promise{constructor(e){super((o,n)=>e(a=>{this.isCanceled?n(new ht("Promise has been canceled",a)):o(a)},a=>{this.isCanceled?n(new ht("Promise has been canceled",void 0,a)):n(a)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},Pr=r=>new ze((e,o)=>r.then(e).catch(o));var Dr={};D(Dr,{FtNotificationEvent:()=>Tr,PostResizeEvent:()=>kr,PreResizeEvent:()=>Lr,WithEventBus:()=>Ie,withEventBus:()=>Nn});var Tr=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},Lr=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},kr=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}};function Nn(r,e){return class extends r{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var Ie=class extends Nn(Object){};var yt=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},Fr=class extends Ie{constructor(){super(...arguments),this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(e,o){this.loaders[e]=o,this.finalContent.delete(e)}registerFinal(e,o){this.loaders[e]=o,this.finalContent.add(e)}clearAll(e=!0){let o=[];for(let n in this.content)this.clear(n,!1)!=null&&o.push(n);e&&o.length>0&&this.dispatchEvent(new yt(o))}clear(e,o=!0){if(!this.finalContent.has(e))return this.forceClear(e),o&&this.dispatchEvent(new yt([e])),e}forceClear(e){this.clearClearTimeout(e),this.content[e]instanceof ze&&this.content[e].cancel(),delete this.content[e]}clearClearTimeout(e){this.clearTimeouts[e]!=null&&(window.clearTimeout(this.clearTimeouts[e]),delete this.clearTimeouts[e])}set(e,o){this.forceClear(e),this.register(e,async()=>o),this.content[e]=o}setFinal(e,o){this.forceClear(e),this.registerFinal(e,async()=>o),this.content[e]=o}async get(e,o,n){if(this.content[e]===void 0){if(o=o??this.loaders[e],o==null)throw new Error("Unknown cache key "+e);let a=Pr(o());return this.content[e]=a,a.then(i=>(this.content[e]=i,n!=null&&(this.clearClearTimeout(e),this.clearTimeouts[e]=window.setTimeout(()=>this.clear(e),n)),i))}if(this.content[e]instanceof Error)throw this.content[e];return this.content[e]}isResolvedValue(e){return e!=null&&!(e instanceof Promise)&&!(e instanceof Error)}getNow(e){if(this.isResolvedValue(this.content[e]))return this.content[e]}has(e){return this.content[e]!=null}resolvedKeys(){return Object.keys(this.content).filter(e=>this.isResolvedValue(this.content[e]))}resolvedValues(){return Object.values(this.content).filter(e=>this.isResolvedValue(e))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}};var Br={};D(Br,{ClusteringHelper:()=>Mr});var Mr=class r{constructor(e,o,n,a){this.allResults=e,this.selectedResult=o,this.clusteringMetadata=n,this.metadataDescriptors=a}static extractResultMetadata(e){var o,n,a,i,c;let l=((i=(n=(o=e.result)===null||o===void 0?void 0:o.map)!==null&&n!==void 0?n:(a=e.result)===null||a===void 0?void 0:a.document)!==null&&i!==void 0?i:(c=e.result)===null||c===void 0?void 0:c.topic).metadata;return e.key==null?r.flattenMetadata(l,e.hierarchicalValueTruncatingLevel,e.dateFormatter):r.flattenMetadata(l.find(d=>d.key===e.key),e.hierarchicalValueTruncatingLevel,e.dateFormatter)}static flattenMetadata(e,o,n){if(Array.isArray(e))return e.map(i=>r.flattenMetadata(i,o,n)).filter(i=>i!=null);let a=e?.hierarchicalValues!=null&&e.hierarchicalValues.length>0;if(!(e==null||e.values.length==0&&!a))if(a){let i=[],c=[];return e.hierarchicalValues.forEach(l=>{i.push(l.join(" > ")),o&&o>1&&l.length>=o?c.push(`... > ${l[l.length-1]}`):c.push(l.join(" > "))}),{key:e.key,label:e.label,value:i.join(", "),displayValue:c.join(", "),displayTooltipValue:i.join(", ")}}else{let i=e.values.join(", "),c=e.values.map(l=>n?n(l):l).join(", ");return{key:e.key,label:e.label,value:i,displayValue:c,displayTooltipValue:c}}}computeClustersItemsForMetadata(e,o,n="No value",a,i){var c,l;let d=r.extractResultMetadata({result:this.selectedResult,key:e,dateFormatter:i}),f=(c=d?.label)!==null&&c!==void 0?c:(l=this.getMetadataDescriptor(e))===null||l===void 0?void 0:l.label;return this.allResults.map(p=>r.extractResultMetadata({result:p,key:e,hierarchicalValueTruncatingLevel:a,dateFormatter:i})).map(p=>p??{key:e,label:f,value:void 0,displayValue:n}).filter(p=>p.value!=d?.value).filter((p,g,b)=>b.findIndex(m=>m.value===p.value)===g).map(p=>({result:this.findBestResultForMetadataValue(e,p.value),metadata:p})).sort((p,g)=>this.compareMetadata(p.metadata.value,g.metadata.value,e,o))}compareMetadata(e,o,n,a){if(e==null)return-1;if(o==null)return 1;let i=this.getMetadataDescriptor(n),c=i?.sortRule||"NONE",l=i?.reverseSort||!1;if(c=="ALPHABET"||c=="VERSION"){let d=e.localeCompare(o,a,{numeric:!0});return l?d*-1:d}return 0}getMetadataDescriptor(e){return this.metadataDescriptors.find(o=>e==o.key)}findBestResultForMetadataValue(e,o){let n=this.allResults.filter(d=>{var f;return((f=r.extractResultMetadata({result:d,key:e}))===null||f===void 0?void 0:f.value)==o}),i=[...r.extractResultMetadata({result:this.selectedResult}).filter(d=>this.clusteringMetadata.has(d.key)).filter(d=>d.key!==e)],c,l=-1;for(let d of n){let f=this.countMatchingMetadata(d,i);if(f>l&&(l=f,c=d,f===i.length))break}return c}countMatchingMetadata(e,o){return r.extractResultMetadata({result:e}).filter(n=>o.some(a=>a.key===n.key&&a.value===n.value)).length}};var Wr={};D(Wr,{Debouncer:()=>gt});var gt=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Gr={};D(Gr,{customElement:()=>zr,isNumber:()=>kn,jsonProperty:()=>jr,optionalNumberProperty:()=>Uc});var $r={};D($r,{dateReviver:()=>Tc,deepCopy:()=>Fc,deepEqual:()=>mt,delay:()=>In,eventPathContainsMatchingElement:()=>kc,flatDeep:()=>_n,getComposedPathTo:()=>Hr,hasChanged:()=>Pe,last:()=>Dc,minmax:()=>bt,parseDate:()=>Tn,unslotText:()=>Ln,waitFor:()=>Pn,waitUntil:()=>_c});var In=r=>new Promise(e=>setTimeout(e,r));async function _c(r,e=10,o=2e4){await Pn(async()=>await r()||void 0,e,o)}async function Pn(r,e=10,o=2e4){let n=await r(),a,i;for(a=i=performance.now();n==null&&(!o||i-a<o);)await In(e),n=await r(),i=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function _n(r,e){return r.flatMap(o=>[o,..._n(e(o),e)])}function Tc(...r){return function(e,o){return r.includes(e)?Tn(o):o}}function Tn(r){return r.match(/^\d{4}-\d{2}-\d{2}$/)&&(r=r.replace(/-/g,"/")),r=r.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,(e,o,n,a)=>o+n+":"+a),new Date(r)}function Lc(r,e){if(r===e)return!0;if(r&&e&&typeof r=="object"&&typeof e=="object"){if(r.constructor!==e.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!mt(r[n],e[n]))return!1;return!0}if(r instanceof Map&&e instanceof Map){if(r.size!==e.size)return!1;for(n of r.entries())if(!e.has(n[0]))return!1;for(n of r.entries())if(!mt(n[1],e.get(n[0])))return!1;return!0}if(r instanceof Set&&e instanceof Set){if(r.size!==e.size)return!1;for(n of r.entries())if(!e.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===e.source&&r.flags===e.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===e.valueOf();let i=c=>Object.keys(c).filter(l=>c[l]!=null);if(a=i(r),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let c=a[n];if(!mt(r[c],e[c]))return!1}return!0}return r!==r&&e!==e||r==null&&e==null}function mt(r,e){try{return Lc(r,e)}catch{return!1}}function Pe(r,e){return!mt(r,e)}function kc(r,e,o=window.document.body){if(e.length>0){let n=r.composedPath();for(let a of n){if(a===o)return!1;if(a.matches&&e.some(i=>a.matches(i)))return!0}}return!1}function bt(r,e,o){return Math.min(Math.max(r,e),o)}function Dc(r){return r[r.length-1]}function Ln(r){return