@fluid-topics/ft-typography
Version:
Typography components
4 lines • 270 kB
JavaScript
"use strict";(()=>{var Rc=Object.create;var wr=Object.defineProperty;var Nc=Object.getOwnPropertyDescriptor;var Ic=Object.getOwnPropertyNames;var Tc=Object.getPrototypeOf,Pc=Object.prototype.hasOwnProperty;var _c=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),U=(r,e)=>{for(var o in e)wr(r,o,{get:e[o],enumerable:!0})},Lc=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ic(e))!Pc.call(r,a)&&a!==o&&wr(r,a,{get:()=>e[a],enumerable:!(n=Nc(e,a))||n.enumerable});return r};var kc=(r,e,o)=>(o=r!=null?Rc(Tc(r)):{},Lc(e||!r||!r.__esModule?wr(o,"default",{value:r,enumerable:!0}):o,r));var Ui=_c((Ce,Di)=>{var xr=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,vr=function(){function r(){this.fetch=!1,this.DOMException=xr.DOMException}return r.prototype=xr,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),F=/charset=([A-Za-z0-9_-]+)/.exec(y.type),B=F?F[1]:"utf-8";return v.readAsText(y,B),R}function w(y){for(var v=new Uint8Array(y),R=new Array(v.length),F=0;F<v.length;F++)R[F]=String.fromCharCode(v[F]);return R.join("")}function C(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=C(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||l(y))?this._bodyArrayBuffer=C(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(w(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 L=new AbortController;return L.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 F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var B=/\?/;this.url+=(B.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 F=R.split("="),B=F.shift().replace(/\+/g," "),L=F.join("=").replace(/\+/g," ");v.append(decodeURIComponent(B),decodeURIComponent(L))}}),v}function P(y){var v=new p,R=y.replace(/\r?\n[\t ]+/g," ");return R.split("\r").map(function(F){return F.indexOf(`
`)===0?F.substr(1,F.length):F}).forEach(function(F){var B=F.split(":"),L=B.shift().trim();if(L){var Vt=B.join(":").trim();try{v.append(L,Vt)}catch(Cr){console.warn("Response "+Cr.message)}}}),v}A.call(E.prototype);function k(y,v){if(!(this instanceof k))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(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},k.error=function(){var y=new k(null,{status:200,statusText:""});return y.ok=!1,y.status=0,y.type="error",y};var _=[301,302,303,307,308];k.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new k(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 F=Error(v);this.stack=F.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function I(y,v){return new Promise(function(R,F){var B=new E(y,v);if(B.signal&&B.signal.aborted)return F(new o.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function Vt(){L.abort()}L.onload=function(){var H={statusText:L.statusText,headers:P(L.getAllResponseHeaders()||"")};B.url.indexOf("file://")===0&&(L.status<200||L.status>599)?H.status=200:H.status=L.status,H.url="responseURL"in L?L.responseURL:H.headers.get("X-Request-URL");var we="response"in L?L.response:L.responseText;setTimeout(function(){R(new k(we,H))},0)},L.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},L.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request timed out"))},0)},L.onabort=function(){setTimeout(function(){F(new o.DOMException("Aborted","AbortError"))},0)};function Cr(H){try{return H===""&&n.location.href?n.location.href:H}catch{return H}}if(L.open(B.method,Cr(B.url),!0),B.credentials==="include"?L.withCredentials=!0:B.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&(a.blob?L.responseType="blob":a.arrayBuffer&&(L.responseType="arraybuffer")),v&&typeof v.headers=="object"&&!(v.headers instanceof p||n.Headers&&v.headers instanceof n.Headers)){var Jn=[];Object.getOwnPropertyNames(v.headers).forEach(function(H){Jn.push(d(H)),L.setRequestHeader(H,f(v.headers[H]))}),B.headers.forEach(function(H,we){Jn.indexOf(we)===-1&&L.setRequestHeader(we,H)})}else B.headers.forEach(function(H,we){L.setRequestHeader(we,H)});B.signal&&(B.signal.addEventListener("abort",Vt),L.onreadystatechange=function(){L.readyState===4&&B.signal.removeEventListener("abort",Vt)}),L.send(typeof B._bodyInit>"u"?null:B._bodyInit)})}return I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=p,n.Request=E,n.Response=k),o.Headers=p,o.Request=E,o.Response=k,o.fetch=I,o}({})})(vr);vr.fetch.ponyfill=!0;delete vr.fetch.polyfill;var it=xr.fetch?xr:vr;Ce=it.fetch;Ce.default=it.fetch;Ce.fetch=it.fetch;Ce.Headers=it.Headers;Ce.Request=it.Request;Ce.Response=it.Response;Di.exports=Ce});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 k=o.call(n,O);k||(k=p(O),e.call(n,O,k)),this===window.customElements&&(c.set(x,P),P.standInClass=k);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(){w.push(this),n.upgrade.apply(n,arguments),w.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=w[w.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 k=O.prototype.toggleAttribute;k&&(O.prototype.toggleAttribute=function(_,I){let y=_.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);k.call(this,y,I);let R=this.getAttribute(y);E.call(this,y,v,R)}else k.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 w=[document],C=(O,x,E=void 0)=>{let N=(E?Object.getPrototypeOf(E):O.prototype)[x];O.prototype[x]=function(){w.push(this);let P=N.apply(E||this,arguments);return P!==void 0&&l.set(P,this),w.pop(),P}};C(ShadowRoot,"createElement",document),C(ShadowRoot,"importNode",document),C(Element,"insertAdjacentHTML");let A=(O,x)=>{let E=Object.getOwnPropertyDescriptor(O.prototype,x);Object.defineProperty(O.prototype,x,{...E,set(N){w.push(this),E.set.call(this,N),w.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 F=v.getAttribute("name"),B=y.get(F)||[];this[+R]=v,B.push(v),y.set(F,B)}),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 k=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let _=k.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 Br={};U(Br,{CSSResult:()=>He,LitElement:()=>ce,ReactiveElement:()=>te,_$LE:()=>Vc,_$LH:()=>Dr,adoptStyles:()=>vt,css:()=>D,defaultConverter:()=>ze,getCompatibleStyle:()=>Zt,html:()=>Lr,isServer:()=>kd,mathml:()=>Fr,noChange:()=>G,notEqual:()=>Ot,nothing:()=>$,render:()=>Ur,supportsAdoptingStyleSheets:()=>xt,svg:()=>kr,unsafeCSS:()=>Ae});var Kt=globalThis,xt=Kt.ShadowRoot&&(Kt.ShadyCSS===void 0||Kt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ar=Symbol(),Xn=new WeakMap,He=class{constructor(e,o,n){if(this._$cssResult$=!0,n!==Ar)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(xt&&e===void 0){let n=o!==void 0&&o.length===1;n&&(e=Xn.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Xn.set(o,e))}return e}toString(){return this.cssText}},Ae=r=>new He(typeof r=="string"?r:r+"",void 0,Ar),D=(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 He(o,r,Ar)},vt=(r,e)=>{if(xt)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)}},Zt=xt?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let o="";for(let n of e.cssRules)o+=n.cssText;return Ae(o)})(r):r;var{is:Fc,defineProperty:Dc,getOwnPropertyDescriptor:Uc,getOwnPropertyNames:Mc,getOwnPropertySymbols:Bc,getPrototypeOf:Wc}=Object,qt=globalThis,Qn=qt.trustedTypes,$c=Qn?Qn.emptyScript:"",Hc=qt.reactiveElementPolyfillSupport,St=(r,e)=>r,ze={toAttribute(r,e){switch(e){case Boolean:r=r?$c: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}},Ot=(r,e)=>!Fc(r,e),ea={attribute:!0,type:String,converter:ze,reflect:!1,useDefault:!1,hasChanged:Ot};Symbol.metadata??=Symbol("metadata"),qt.litPropertyMetadata??=new WeakMap;var te=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=ea){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&&Dc(this.prototype,e,a)}}static getPropertyDescriptor(e,o,n){let{get:a,set:i}=Uc(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)??ea}static _$Ei(){if(this.hasOwnProperty(St("elementProperties")))return;let e=Wc(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=[...Mc(o),...Bc(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(Zt(a))}else e!==void 0&&o.push(Zt(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 vt(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:ze).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:ze;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??Ot)(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){}};te.elementStyles=[],te.shadowRootOptions={mode:"open"},te[St("elementProperties")]=new Map,te[St("finalized")]=new Map,Hc?.({ReactiveElement:te}),(qt.reactiveElementVersions??=[]).push("2.1.0");var Nr=globalThis,Yt=Nr.trustedTypes,ta=Yt?Yt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ir="$lit$",ie=`lit$${Math.random().toFixed(9).slice(2)}$`,Tr="?"+ie,zc=`<${Tr}>`,Ie=document,Ct=()=>Ie.createComment(""),wt=r=>r===null||typeof r!="object"&&typeof r!="function",Pr=Array.isArray,ca=r=>Pr(r)||typeof r?.[Symbol.iterator]=="function",Rr=`[
\f\r]`,Et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ra=/-->/g,oa=/>/g,Re=RegExp(`>|${Rr}(?:([^\\s"'>=/]+)(${Rr}*=${Rr}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),na=/'/g,aa=/"/g,sa=/^(?:script|style|textarea|title)$/i,_r=r=>(e,...o)=>({_$litType$:r,strings:e,values:o}),Lr=_r(1),kr=_r(2),Fr=_r(3),G=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),ia=new WeakMap,Ne=Ie.createTreeWalker(Ie,129);function la(r,e){if(!Pr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ta!==void 0?ta.createHTML(e):e}var da=(r,e)=>{let o=r.length-1,n=[],a,i=e===2?"<svg>":e===3?"<math>":"",c=Et;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===Et?h[1]==="!--"?c=ra:h[1]!==void 0?c=oa:h[2]!==void 0?(sa.test(h[2])&&(a=RegExp("</"+h[2],"g")),c=Re):h[3]!==void 0&&(c=Re):c===Re?h[0]===">"?(c=a??Et,p=-1):h[1]===void 0?p=-2:(p=c.lastIndex-h[2].length,f=h[1],c=h[3]===void 0?Re:h[3]==='"'?aa:na):c===aa||c===na?c=Re:c===ra||c===oa?c=Et:(c=Re,a=void 0);let b=c===Re&&r[l+1].startsWith("/>")?" ":"";i+=c===Et?d+zc:p>=0?(n.push(f),d.slice(0,p)+Ir+d.slice(p)+ie+b):d+ie+(p===-2?l:b)}return[la(r,i+(r[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},At=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]=da(e,o);if(this.el=r.createElement(f,n),Ne.currentNode=this.el.content,o===2||o===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=Ne.nextNode())!==null&&d.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Ir)){let g=h[c++],b=a.getAttribute(p).split(ie),m=/([.?@])?(.*)/.exec(g);d.push({type:1,index:i,name:m[2],strings:b,ctor:m[1]==="."?Xt:m[1]==="?"?Qt:m[1]==="@"?er:Pe}),a.removeAttribute(p)}else p.startsWith(ie)&&(d.push({type:6,index:i}),a.removeAttribute(p));if(sa.test(a.tagName)){let p=a.textContent.split(ie),g=p.length-1;if(g>0){a.textContent=Yt?Yt.emptyScript:"";for(let b=0;b<g;b++)a.append(p[b],Ct()),Ne.nextNode(),d.push({type:2,index:++i});a.append(p[g],Ct())}}}else if(a.nodeType===8)if(a.data===Tr)d.push({type:2,index:i});else{let p=-1;for(;(p=a.data.indexOf(ie,p+1))!==-1;)d.push({type:7,index:i}),p+=ie.length-1}i++}}static createElement(e,o){let n=Ie.createElement("template");return n.innerHTML=e,n}};function Te(r,e,o=r,n){if(e===G)return e;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=wt(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=Te(r,a._$AS(r,e.values),a,n)),e}var Jt=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??Ie).importNode(o,!0);Ne.currentNode=a;let i=Ne.nextNode(),c=0,l=0,d=n[0];for(;d!==void 0;){if(c===d.index){let f;d.type===2?f=new je(i,i.nextSibling,this,e):d.type===1?f=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(f=new tr(i,this,e)),this._$AV.push(f),d=n[++l]}c!==d?.index&&(i=Ne.nextNode(),c++)}return Ne.currentNode=Ie,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++}},je=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,o,n,a){this.type=2,this._$AH=$,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=Te(this,e,o),wt(e)?e===$||e==null||e===""?(this._$AH!==$&&this._$AR(),this._$AH=$):e!==this._$AH&&e!==G&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ca(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!==$&&wt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ie.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=At.createElement(la(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new Jt(a,this),c=i.u(this.options);i.p(o),this.T(c),this._$AH=i}}_$AC(e){let o=ia.get(e.strings);return o===void 0&&ia.set(e.strings,o=new At(e)),o}k(e){Pr(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(Ct()),this.O(Ct()),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))}},Pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,n,a,i){this.type=1,this._$AH=$,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=$}_$AI(e,o=this,n,a){let i=this.strings,c=!1;if(i===void 0)e=Te(this,e,o,0),c=!wt(e)||e!==this._$AH&&e!==G,c&&(this._$AH=e);else{let l=e,d,f;for(e=i[0],d=0;d<i.length-1;d++)f=Te(this,l[n+d],o,d),f===G&&(f=this._$AH[d]),c||=!wt(f)||f!==this._$AH[d],f===$?e=$:e!==$&&(e+=(f??"")+i[d+1]),this._$AH[d]=f}c&&!a&&this.j(e)}j(e){e===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Xt=class extends Pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===$?void 0:e}},Qt=class extends Pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==$)}},er=class extends Pe{constructor(e,o,n,a,i){super(e,o,n,a,i),this.type=5}_$AI(e,o=this){if((e=Te(this,e,o,0)??$)===G)return;let n=this._$AH,a=e===$&&n!==$||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==$&&(n===$||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)}},tr=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){Te(this,e)}},Dr={M:Ir,P:ie,A:Tr,C:1,L:da,R:Jt,D:ca,V:Te,I:je,H:Pe,N:Qt,U:er,B:Xt,F:tr},jc=Nr.litHtmlPolyfillSupport;jc?.(At,je),(Nr.litHtmlVersions??=[]).push("3.3.0");var Ur=(r,e,o)=>{let n=o?.renderBefore??e,a=n._$litPart$;if(a===void 0){let i=o?.renderBefore??null;n._$litPart$=a=new je(e.insertBefore(Ct(),i),i,void 0,o??{})}return a._$AI(r),a};var Mr=globalThis,ce=class extends te{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=Ur(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};ce._$litElement$=!0,ce.finalized=!0,Mr.litElementHydrateSupport?.({LitElement:ce});var Gc=Mr.litElementPolyfillSupport;Gc?.({LitElement:ce});var Vc={_$AK:(r,e,o)=>{r._$AK(e,o)},_$AL:r=>r._$AL};(Mr.litElementVersions??=[]).push("4.2.0");var kd=!1;var $r={};U($r,{customElement:()=>Kc,eventOptions:()=>qc,property:()=>z,query:()=>Yc,queryAll:()=>Xc,queryAssignedElements:()=>es,queryAssignedNodes:()=>ts,queryAsync:()=>Qc,standardProperty:()=>ua,state:()=>Wr});var Kc=r=>(e,o)=>{o!==void 0?o.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};var Zc={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:Ot},ua=(r=Zc,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 z(r){return(e,o)=>typeof o=="object"?ua(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 z({...r,state:!0,attribute:!1})}function qc(r){return(e,o)=>{let n=typeof e=="function"?e:e[o];Object.assign(n,r)}}var X=(r,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,o),o);function Yc(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 X(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 X(o,n,{get(){return i(this)}})}}var Jc;function Xc(r){return(e,o)=>X(e,o,{get(){return(this.renderRoot??(Jc??=document.createDocumentFragment())).querySelectorAll(r)}})}function Qc(r){return(e,o)=>X(e,o,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(r)??null}})}function es(r){return(e,o)=>{let{slot:n,selector:a}=r??{},i="slot"+(n?`[name=${n}]`:":not([name])");return X(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 ts(r){return(e,o)=>{let{slot:n}=r??{},a="slot"+(n?`[name=${n}]`:":not([name])");return X(e,o,{get(){return this.renderRoot?.querySelector(a)?.assignedNodes(r)??[]}})}}var Hr={};U(Hr,{repeat:()=>ns});var he={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ye=r=>(...e)=>({_$litDirective$:r,values:e}),re=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:rs}=Dr;var fa=()=>document.createComment(""),Ge=(r,e,o)=>{let n=r._$AA.parentNode,a=e===void 0?r._$AB:e._$AA;if(o===void 0){let i=n.insertBefore(fa(),a),c=n.insertBefore(fa(),a);o=new rs(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},ge=(r,e,o=r)=>(r._$AI(e,o),r),os={},pa=(r,e=os)=>r._$AH=e,ha=r=>r._$AH,rr=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 ya=(r,e,o)=>{let n=new Map;for(let a=e;a<=o;a++)n.set(r[a],a);return n},ns=ye(class extends re{constructor(r){if(super(r),r.type!==he.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=ha(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]=ge(a[p],i[b]),p++,b++;else if(l[g]===c[m])d[m]=ge(a[g],i[m]),g--,m--;else if(l[p]===c[m])d[m]=ge(a[p],i[m]),Ge(r,d[m+1],a[p]),p++,m--;else if(l[g]===c[b])d[b]=ge(a[g],i[b]),Ge(r,a[p],a[g]),g--,b++;else if(f===void 0&&(f=ya(c,b,m),h=ya(l,p,g)),f.has(l[p]))if(f.has(l[g])){let S=h.get(c[b]),w=S!==void 0?a[S]:null;if(w===null){let C=Ge(r,a[p]);ge(C,i[b]),d[b]=C}else d[b]=ge(w,i[b]),Ge(r,a[p],w),a[S]=null;b++}else rr(a[g]),g--;else rr(a[p]),p++;for(;b<=m;){let S=Ge(r,d[m+1]);ge(S,i[b]),d[b++]=S}for(;p<=g;){let S=a[p++];S!==null&&rr(S)}return this.ut=c,pa(r,d),G}});var zr={};U(zr,{classMap:()=>as});var as=ye(class extends re{constructor(r){if(super(r),r.type!==he.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 G}});var jr={};U(jr,{styleMap:()=>cs});var ga="important",is=" !"+ga,cs=ye(class extends re{constructor(r){if(super(r),r.type!==he.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(is);n.includes("-")||i?o.setProperty(n,i?a.slice(0,-11):a,i?ga:""):o[n]=a}}return G}});var Gr={};U(Gr,{UnsafeHTMLDirective:()=>Ve,unsafeHTML:()=>ss});var Ve=class extends re{constructor(e){if(super(e),this.it=$,e.type!==he.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===$||e==null)return this._t=void 0,this.it=e;if(e===G)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:[]}}};Ve.directiveName="unsafeHTML",Ve.resultType=1;var ss=ye(Ve);var Qr={};U(Qr,{CacheRegistry:()=>Xr,ClearCacheEvent:()=>Nt});var Kr={};U(Kr,{CancelablePromise:()=>Ke,CanceledPromiseError:()=>Rt,cancelable:()=>Vr});var Rt=class extends Error{constructor(e,o,n){super(e),this.canceledPromiseResult=o,this.canceledPromiseError=n}},Ke=class extends Promise{constructor(e){super((o,n)=>e(a=>{this.isCanceled?n(new Rt("Promise has been canceled",a)):o(a)},a=>{this.isCanceled?n(new Rt("Promise has been canceled",void 0,a)):n(a)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},Vr=r=>new Ke((e,o)=>r.then(e).catch(o));var Jr={};U(Jr,{FtNotificationEvent:()=>Zr,PostResizeEvent:()=>Yr,PreResizeEvent:()=>qr,WithEventBus:()=>_e,withEventBus:()=>ma});var Zr=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},qr=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},Yr=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}};function ma(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 _e=class extends ma(Object){};var Nt=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},Xr=class extends _e{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 Nt(o))}clear(e,o=!0){if(!this.finalContent.has(e))return this.forceClear(e),o&&this.dispatchEvent(new Nt([e])),e}forceClear(e){this.clearClearTimeout(e),this.content[e]instanceof Ke&&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=Vr(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 to={};U(to,{ClusteringHelper:()=>eo});var eo=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 ro={};U(ro,{Debouncer:()=>It});var It=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 co={};U(co,{customElement:()=>ao,isNumber:()=>Ea,jsonProperty:()=>io,optionalNumberProperty:()=>ys});var no={};U(no,{dateReviver:()=>ds,deepCopy:()=>hs,deepEqual:()=>Tt,delay:()=>ba,eventPathContainsMatchingElement:()=>fs,flatDeep:()=>va,getComposedPathTo:()=>oo,hasChanged:()=>Le,last:()=>ps,minmax:()=>Pt,parseDate:()=>Sa,unslotText:()=>Oa,waitFor:()=>xa,waitUntil:()=>ls});var ba=r=>new Promise(e=>setTimeout(e,r));async function ls(r,e=10,o=2e4){await xa(async()=>await r()||void 0,e,o)}async function xa(r,e=10,o=2e4){let n=await r(),a,i;for(a=i=performance.now();n==null&&(!o||i-a<o);)await ba(e),n=await r(),i=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function va(r,e){return r.flatMap(o=>[o,...va(e(o),e)])}function ds(...r){return function(e,o){return r.includes(e)?Sa(o):o}}function Sa(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 us(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(!Tt(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(!Tt(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(!Tt(r[c],e[c]))return!1}return!0}return r!==r&&e!==e||r==null&&e==null}function Tt(r,e){try{return us(r,e)}catch{return!1}}function Le(r,e){return!Tt(r,e)}function fs(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 Pt(r,e,o){return Math.min(Math.max(r,e),o)}function ps(r){return r[r.length-1]}function Oa(r){return