@fluid-topics/ft-typography
Version:
Typography components
4 lines • 295 kB
JavaScript
"use strict";(()=>{var vc=Object.create;var Gr=Object.defineProperty;var Sc=Object.getOwnPropertyDescriptor;var Oc=Object.getOwnPropertyNames;var Ec=Object.getPrototypeOf,Cc=Object.prototype.hasOwnProperty;var Ac=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),D=(t,e)=>{for(var o in e)Gr(t,o,{get:e[o],enumerable:!0})},wc=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Oc(e))!Cc.call(t,a)&&a!==o&&Gr(t,a,{get:()=>e[a],enumerable:!(n=Sc(e,a))||n.enumerable});return t};var Rc=(t,e,o)=>(o=t!=null?vc(Ec(t)):{},wc(e||!t||!t.__esModule?Gr(o,"default",{value:t,enumerable:!0}):o,t));var ps=Ac((Ie,fs)=>{var Mr=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Ur=function(){function t(){this.fetch=!1,this.DOMException=Mr.DOMException}return t.prototype=Mr,new t}();(function(t){var e=function(o){var n=typeof t<"u"&&t||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 s=["[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&&s.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 T=y.shift();return{done:T===void 0,value:T}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function p(y){this.map={},y instanceof p?y.forEach(function(v,T){this.append(T,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 T=this.map[y];this.map[y]=T?T+", "+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 T in this.map)this.map.hasOwnProperty(T)&&y.call(v,this.map[T],T,this)},p.prototype.keys=function(){var y=[];return this.forEach(function(v,T){y.push(T)}),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,T){y.push([T,v])}),h(y)},a.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(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,T){y.onload=function(){v(y.result)},y.onerror=function(){T(y.error)}})}function g(y){var v=new FileReader,T=b(v);return v.readAsArrayBuffer(y),T}function O(y){var v=new FileReader,T=b(v),B=/charset=([A-Za-z0-9_-]+)/.exec(y.type),$=B?B[1]:"utf-8";return v.readAsText(y,$),T}function C(y){for(var v=new Uint8Array(y),T=new Array(v.length),B=0;B<v.length;B++)T[B]=String.fromCharCode(v[B]);return T.join("")}function A(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function w(){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=A(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||l(y))?this._bodyArrayBuffer=A(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=m(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=m(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(g);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return O(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(R)}),this.json=function(){return this.text().then(JSON.parse)},this}var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(y){var v=y.toUpperCase();return S.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 T=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,!T&&y._bodyInit!=null&&(T=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 F=new AbortController;return F.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(T),(this.method==="GET"||this.method==="HEAD")&&(v.cache==="no-store"||v.cache==="no-cache")){var B=/([?&])_=[^&]*/;if(B.test(this.url))this.url=this.url.replace(B,"$1_="+new Date().getTime());else{var $=/\?/;this.url+=($.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function R(y){var v=new FormData;return y.trim().split("&").forEach(function(T){if(T){var B=T.split("="),$=B.shift().replace(/\+/g," "),F=B.join("=").replace(/\+/g," ");v.append(decodeURIComponent($),decodeURIComponent(F))}}),v}function P(y){var v=new p,T=y.replace(/\r?\n[\t ]+/g," ");return T.split("\r").map(function(B){return B.indexOf(`
`)===0?B.substr(1,B.length):B}).forEach(function(B){var $=B.split(":"),F=$.shift().trim();if(F){var sr=$.join(":").trim();try{v.append(F,sr)}catch(Wr){console.warn("Response "+Wr.message)}}}),v}w.call(E.prototype);function U(y,v){if(!(this instanceof U))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)}w.call(U.prototype),U.prototype.clone=function(){return new U(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},U.error=function(){var y=new U(null,{status:200,statusText:""});return y.ok=!1,y.status=0,y.type="error",y};var N=[301,302,303,307,308];U.redirect=function(y,v){if(N.indexOf(v)===-1)throw new RangeError("Invalid status code");return new U(null,{status:v,headers:{location:y}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(v,T){this.message=v,this.name=T;var B=Error(v);this.stack=B.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function I(y,v){return new Promise(function(T,B){var $=new E(y,v);if($.signal&&$.signal.aborted)return B(new o.DOMException("Aborted","AbortError"));var F=new XMLHttpRequest;function sr(){F.abort()}F.onload=function(){var j={statusText:F.statusText,headers:P(F.getAllResponseHeaders()||"")};$.url.indexOf("file://")===0&&(F.status<200||F.status>599)?j.status=200:j.status=F.status,j.url="responseURL"in F?F.responseURL:j.headers.get("X-Request-URL");var _e="response"in F?F.response:F.responseText;setTimeout(function(){T(new U(_e,j))},0)},F.onerror=function(){setTimeout(function(){B(new TypeError("Network request failed"))},0)},F.ontimeout=function(){setTimeout(function(){B(new TypeError("Network request timed out"))},0)},F.onabort=function(){setTimeout(function(){B(new o.DOMException("Aborted","AbortError"))},0)};function Wr(j){try{return j===""&&n.location.href?n.location.href:j}catch{return j}}if(F.open($.method,Wr($.url),!0),$.credentials==="include"?F.withCredentials=!0:$.credentials==="omit"&&(F.withCredentials=!1),"responseType"in F&&(a.blob?F.responseType="blob":a.arrayBuffer&&(F.responseType="arraybuffer")),v&&typeof v.headers=="object"&&!(v.headers instanceof p||n.Headers&&v.headers instanceof n.Headers)){var ya=[];Object.getOwnPropertyNames(v.headers).forEach(function(j){ya.push(d(j)),F.setRequestHeader(j,f(v.headers[j]))}),$.headers.forEach(function(j,_e){ya.indexOf(_e)===-1&&F.setRequestHeader(_e,j)})}else $.headers.forEach(function(j,_e){F.setRequestHeader(_e,j)});$.signal&&($.signal.addEventListener("abort",sr),F.onreadystatechange=function(){F.readyState===4&&$.signal.removeEventListener("abort",sr)}),F.send(typeof $._bodyInit>"u"?null:$._bodyInit)})}return I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=p,n.Request=E,n.Response=U),o.Headers=p,o.Request=E,o.Response=U,o.fetch=I,o}({})})(Ur);Ur.fetch.ponyfill=!0;delete Ur.fetch.polyfill;var gt=Mr.fetch?Mr:Ur;Ie=gt.fetch;Ie.default=gt.fetch;Ie.fetch=gt.fetch;Ie.Headers=gt.Headers;Ie.Request=gt.Request;Ie.Response=gt.Response;fs.exports=Ie});if(!ShadowRoot.prototype.createElement){let t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,n=window.customElements,a=new WeakMap,i=new WeakMap,s=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(S,x){if(S=S.toLowerCase(),this._getDefinition(S)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${S}" 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,R=new Set(x.observedAttributes||[]);m(x,R,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:R};this._definitionsByTag.set(S,P),this._definitionsByClass.set(x,P);let U=o.call(n,S);U||(U=p(S),e.call(n,S,U)),this===window.customElements&&(s.set(x,P),P.standInClass=U);let N=this._awaitingUpgrade.get(S);if(N){this._awaitingUpgrade.delete(S);for(let y of N)i.delete(y),g(y,P,!0)}let I=this._whenDefinedPromises.get(S);return I!==void 0&&(I.resolve(x),this._whenDefinedPromises.delete(S)),x}upgrade(){C.push(this),n.upgrade.apply(n,arguments),C.pop()}get(S){return this._definitionsByTag.get(S)?.elementClass}_getDefinition(S){return this._definitionsByTag.get(S)}whenDefined(S){let x=this._getDefinition(S);if(x!==void 0)return Promise.resolve(x.elementClass);let E=this._whenDefinedPromises.get(S);return E===void 0&&(E={},E.promise=new Promise(R=>E.resolve=R),this._whenDefinedPromises.set(S,E)),E.promise}_upgradeWhenDefined(S,x,E){let R=this._awaitingUpgrade.get(x);R||this._awaitingUpgrade.set(x,R=new Set),E?R.add(S):R.delete(S)}};let d;window.HTMLElement=function(){let x=d;if(x)return d=void 0,x;let E=s.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(t,[],E.standInClass),Object.setPrototypeOf(x,this.constructor.prototype),a.set(x,E),x},window.HTMLElement.prototype=t.prototype;let f=S=>S===document||S instanceof ShadowRoot,h=S=>{let x=S.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=S=>class{static get formAssociated(){return!0}constructor(){let E=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(E,HTMLElement.prototype);let R=h(E)||window.customElements,P=R._getDefinition(S);return P?g(E,P):i.set(E,R),E}connectedCallback(){let E=a.get(this);E?E.connectedCallback&&E.connectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,S,!0)}disconnectedCallback(){let E=a.get(this);E?E.disconnectedCallback&&E.disconnectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,S,!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)}},m=(S,x,E)=>{if(x.size===0||E===void 0)return;let R=S.prototype.setAttribute;R&&(S.prototype.setAttribute=function(N,I){let y=N.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);R.call(this,y,I),E.call(this,y,v,I)}else R.call(this,y,I)});let P=S.prototype.removeAttribute;P&&(S.prototype.removeAttribute=function(N){let I=N.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 U=S.prototype.toggleAttribute;U&&(S.prototype.toggleAttribute=function(N,I){let y=N.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);U.call(this,y,I);let T=this.getAttribute(y);E.call(this,y,v,T)}else U.call(this,y,I)})},b=S=>{let x=Object.getPrototypeOf(S);if(x!==window.HTMLElement)return x===t?Object.setPrototypeOf(S,window.HTMLElement):b(x)},g=(S,x,E=!1)=>{Object.setPrototypeOf(S,x.elementClass.prototype),a.set(S,x),d=S;try{new x.elementClass}catch{b(x.elementClass),new x.elementClass}x.attributeChangedCallback&&x.observedAttributes.forEach(R=>{S.hasAttribute(R)&&x.attributeChangedCallback.call(S,R,null,S.getAttribute(R))}),E&&x.connectedCallback&&S.isConnected&&x.connectedCallback.call(S)},O=Element.prototype.attachShadow;Element.prototype.attachShadow=function(S){let x=O.apply(this,arguments);return S.customElements&&(x.customElements=S.customElements),x};let C=[document],A=(S,x,E=void 0)=>{let R=(E?Object.getPrototypeOf(E):S.prototype)[x];S.prototype[x]=function(){C.push(this);let P=R.apply(E||this,arguments);return P!==void 0&&l.set(P,this),C.pop(),P}};A(ShadowRoot,"createElement",document),A(ShadowRoot,"importNode",document),A(Element,"insertAdjacentHTML");let w=(S,x)=>{let E=Object.getOwnPropertyDescriptor(S.prototype,x);Object.defineProperty(S.prototype,x,{...E,set(R){C.push(this),E.set.call(this,R),C.pop()}})};if(w(Element,"innerHTML"),w(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){let S=new WeakMap,x=HTMLElement.prototype.attachInternals,E=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...N){let I=x.call(this,...N);return S.set(I,this),I},E.forEach(N=>{let I=window.ElementInternals.prototype,y=I[N];I[N]=function(...v){let T=S.get(this);if(a.get(T).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 R 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,T)=>{let B=v.getAttribute("name"),$=y.get(B)||[];this[+T]=v,$.push(v),y.set(B,$)}),this.length=I.length,y.forEach((v,T)=>{v&&(v.length===1?this[T]=v[0]:this[T]=new R(v))})}namedItem(I){return this[I]}}let U=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let N=U.get.call(this,[]),I=[];for(let y of N){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 oo={};D(oo,{CSSResult:()=>Qe,LitElement:()=>ce,ReactiveElement:()=>ee,_$LE:()=>Ia,_$LH:()=>eo,adoptStyles:()=>Ft,css:()=>M,defaultConverter:()=>et,getCompatibleStyle:()=>lr,html:()=>ve,isServer:()=>Ku,mathml:()=>Qr,noChange:()=>W,notEqual:()=>Mt,nothing:()=>H,render:()=>to,supportsAdoptingStyleSheets:()=>kt,svg:()=>Jr,unsafeCSS:()=>xe});var cr=globalThis,kt=cr.ShadowRoot&&(cr.ShadyCSS===void 0||cr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jr=Symbol(),ma=new WeakMap,Qe=class{constructor(e,o,n){if(this._$cssResult$=!0,n!==jr)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(kt&&e===void 0){let n=o!==void 0&&o.length===1;n&&(e=ma.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ma.set(o,e))}return e}toString(){return this.cssText}},xe=t=>new Qe(typeof t=="string"?t:t+"",void 0,jr),M=(t,...e)=>{let o=t.length===1?t[0]:e.reduce((n,a,i)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+t[i+1],t[0]);return new Qe(o,t,jr)},Ft=(t,e)=>{if(kt)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=cr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}},lr=kt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(let n of e.cssRules)o+=n.cssText;return xe(o)})(t):t;var{is:Tc,defineProperty:Ic,getOwnPropertyDescriptor:_c,getOwnPropertyNames:Pc,getOwnPropertySymbols:Lc,getPrototypeOf:Nc}=Object,dr=globalThis,ga=dr.trustedTypes,kc=ga?ga.emptyScript:"",Fc=dr.reactiveElementPolyfillSupport,Dt=(t,e)=>t,et={toAttribute(t,e){switch(e){case Boolean:t=t?kc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}}return o}},Mt=(t,e)=>!Tc(t,e),ba={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:Mt};Symbol.metadata??=Symbol("metadata"),dr.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=ba){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&&Ic(this.prototype,e,a)}}static getPropertyDescriptor(e,o,n){let{get:a,set:i}=_c(this.prototype,e)??{get(){return this[o]},set(s){this[o]=s}};return{get:a,set(s){let l=a?.call(this);i?.call(this,s),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ba}static _$Ei(){if(this.hasOwnProperty(Dt("elementProperties")))return;let e=Nc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dt("properties"))){let o=this.properties,n=[...Pc(o),...Lc(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(lr(a))}else e!==void 0&&o.push(lr(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 Ft(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:et).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),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:et;this._$Em=a,this[a]=s.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??Mt)(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},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??o??this[e]),i!==!0||s!==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:s}=i,l=this[a];s!==!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[Dt("elementProperties")]=new Map,ee[Dt("finalized")]=new Map,Fc?.({ReactiveElement:ee}),(dr.reactiveElementVersions??=[]).push("2.1.0");var Kr=globalThis,ur=Kr.trustedTypes,xa=ur?ur.createPolicy("lit-html",{createHTML:t=>t}):void 0,Zr="$lit$",ye=`lit$${Math.random().toFixed(9).slice(2)}$`,qr="?"+ye,Dc=`<${qr}>`,Ne=document,Bt=()=>Ne.createComment(""),$t=t=>t===null||typeof t!="object"&&typeof t!="function",Yr=Array.isArray,Aa=t=>Yr(t)||typeof t?.[Symbol.iterator]=="function",Vr=`[
\f\r]`,Ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,va=/-->/g,Sa=/>/g,Pe=RegExp(`>|${Vr}(?:([^\\s"'>=/]+)(${Vr}*=${Vr}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Oa=/'/g,Ea=/"/g,wa=/^(?:script|style|textarea|title)$/i,Xr=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),ve=Xr(1),Jr=Xr(2),Qr=Xr(3),W=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),Ca=new WeakMap,Le=Ne.createTreeWalker(Ne,129);function Ra(t,e){if(!Yr(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xa!==void 0?xa.createHTML(e):e}var Ta=(t,e)=>{let o=t.length-1,n=[],a,i=e===2?"<svg>":e===3?"<math>":"",s=Ut;for(let l=0;l<o;l++){let d=t[l],f,h,p=-1,m=0;for(;m<d.length&&(s.lastIndex=m,h=s.exec(d),h!==null);)m=s.lastIndex,s===Ut?h[1]==="!--"?s=va:h[1]!==void 0?s=Sa:h[2]!==void 0?(wa.test(h[2])&&(a=RegExp("</"+h[2],"g")),s=Pe):h[3]!==void 0&&(s=Pe):s===Pe?h[0]===">"?(s=a??Ut,p=-1):h[1]===void 0?p=-2:(p=s.lastIndex-h[2].length,f=h[1],s=h[3]===void 0?Pe:h[3]==='"'?Ea:Oa):s===Ea||s===Oa?s=Pe:s===va||s===Sa?s=Ut:(s=Pe,a=void 0);let b=s===Pe&&t[l+1].startsWith("/>")?" ":"";i+=s===Ut?d+Dc:p>=0?(n.push(f),d.slice(0,p)+Zr+d.slice(p)+ye+b):d+ye+(p===-2?l:b)}return[Ra(t,i+(t[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Ht=class t{constructor({strings:e,_$litType$:o},n){let a;this.parts=[];let i=0,s=0,l=e.length-1,d=this.parts,[f,h]=Ta(e,o);if(this.el=t.createElement(f,n),Le.currentNode=this.el.content,o===2||o===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=Le.nextNode())!==null&&d.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Zr)){let m=h[s++],b=a.getAttribute(p).split(ye),g=/([.?@])?(.*)/.exec(m);d.push({type:1,index:i,name:g[2],strings:b,ctor:g[1]==="."?pr:g[1]==="?"?hr:g[1]==="@"?yr:Fe}),a.removeAttribute(p)}else p.startsWith(ye)&&(d.push({type:6,index:i}),a.removeAttribute(p));if(wa.test(a.tagName)){let p=a.textContent.split(ye),m=p.length-1;if(m>0){a.textContent=ur?ur.emptyScript:"";for(let b=0;b<m;b++)a.append(p[b],Bt()),Le.nextNode(),d.push({type:2,index:++i});a.append(p[m],Bt())}}}else if(a.nodeType===8)if(a.data===qr)d.push({type:2,index:i});else{let p=-1;for(;(p=a.data.indexOf(ye,p+1))!==-1;)d.push({type:7,index:i}),p+=ye.length-1}i++}}static createElement(e,o){let n=Ne.createElement("template");return n.innerHTML=e,n}};function ke(t,e,o=t,n){if(e===W)return e;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=$t(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(t),a._$AT(t,o,n)),n!==void 0?(o._$Co??=[])[n]=a:o._$Cl=a),a!==void 0&&(e=ke(t,a._$AS(t,e.values),a,n)),e}var fr=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??Ne).importNode(o,!0);Le.currentNode=a;let i=Le.nextNode(),s=0,l=0,d=n[0];for(;d!==void 0;){if(s===d.index){let f;d.type===2?f=new tt(i,i.nextSibling,this,e):d.type===1?f=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(f=new mr(i,this,e)),this._$AV.push(f),d=n[++l]}s!==d?.index&&(i=Le.nextNode(),s++)}return Le.currentNode=Ne,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++}},tt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,o,n,a){this.type=2,this._$AH=H,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=ke(this,e,o),$t(e)?e===H||e==null||e===""?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Aa(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!==H&&$t(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ne.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=Ht.createElement(Ra(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new fr(a,this),s=i.u(this.options);i.p(o),this.T(s),this._$AH=i}}_$AC(e){let o=Ca.get(e.strings);return o===void 0&&Ca.set(e.strings,o=new Ht(e)),o}k(e){Yr(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 t(this.O(Bt()),this.O(Bt()),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))}},Fe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,n,a,i){this.type=1,this._$AH=H,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=H}_$AI(e,o=this,n,a){let i=this.strings,s=!1;if(i===void 0)e=ke(this,e,o,0),s=!$t(e)||e!==this._$AH&&e!==W,s&&(this._$AH=e);else{let l=e,d,f;for(e=i[0],d=0;d<i.length-1;d++)f=ke(this,l[n+d],o,d),f===W&&(f=this._$AH[d]),s||=!$t(f)||f!==this._$AH[d],f===H?e=H:e!==H&&(e+=(f??"")+i[d+1]),this._$AH[d]=f}s&&!a&&this.j(e)}j(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},pr=class extends Fe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===H?void 0:e}},hr=class extends Fe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==H)}},yr=class extends Fe{constructor(e,o,n,a,i){super(e,o,n,a,i),this.type=5}_$AI(e,o=this){if((e=ke(this,e,o,0)??H)===W)return;let n=this._$AH,a=e===H&&n!==H||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==H&&(n===H||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)}},mr=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){ke(this,e)}},eo={M:Zr,P:ye,A:qr,C:1,L:Ta,R:fr,D:Aa,V:ke,I:tt,H:Fe,N:hr,U:yr,B:pr,F:mr},Mc=Kr.litHtmlPolyfillSupport;Mc?.(Ht,tt),(Kr.litHtmlVersions??=[]).push("3.3.0");var to=(t,e,o)=>{let n=o?.renderBefore??e,a=n._$litPart$;if(a===void 0){let i=o?.renderBefore??null;n._$litPart$=a=new tt(e.insertBefore(Bt(),i),i,void 0,o??{})}return a._$AI(t),a};var ro=globalThis,ce=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=to(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}};ce._$litElement$=!0,ce.finalized=!0,ro.litElementHydrateSupport?.({LitElement:ce});var Uc=ro.litElementPolyfillSupport;Uc?.({LitElement:ce});var Ia={_$AK:(t,e,o)=>{t._$AK(e,o)},_$AL:t=>t._$AL};(ro.litElementVersions??=[]).push("4.2.0");var Ku=!1;var no={};D(no,{customElement:()=>Bc,eventOptions:()=>Hc,property:()=>k,query:()=>zc,queryAll:()=>Gc,queryAssignedElements:()=>Vc,queryAssignedNodes:()=>Kc,queryAsync:()=>jc,standardProperty:()=>_a,state:()=>le});var Bc=t=>(e,o)=>{o!==void 0?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};var $c={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:Mt},_a=(t=$c,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"&&((t=Object.create(t)).wrapped=!0),i.set(o.name,t),n==="accessor"){let{name:s}=o;return{set(l){let d=e.get.call(this);e.set.call(this,l),this.requestUpdate(s,d,t)},init(l){return l!==void 0&&this.C(s,void 0,t,l),l}}}if(n==="setter"){let{name:s}=o;return function(l){let d=this[s];e.call(this,l),this.requestUpdate(s,d,t)}}throw Error("Unsupported decorator location: "+n)};function k(t){return(e,o)=>typeof o=="object"?_a(t,e,o):((n,a,i)=>{let s=a.hasOwnProperty(i);return a.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(a,i):void 0})(t,e,o)}function le(t){return k({...t,state:!0,attribute:!1})}function Hc(t){return(e,o)=>{let n=typeof e=="function"?e:e[o];Object.assign(n,t)}}var ae=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,o),o);function zc(t,e){return(o,n,a)=>{let i=s=>s.renderRoot?.querySelector(t)??null;if(e){let{get:s,set:l}=typeof n=="object"?o:a??(()=>{let d=Symbol();return{get(){return this[d]},set(f){this[d]=f}}})();return ae(o,n,{get(){let d=s.call(this);return d===void 0&&(d=i(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return ae(o,n,{get(){return i(this)}})}}var Wc;function Gc(t){return(e,o)=>ae(e,o,{get(){return(this.renderRoot??(Wc??=document.createDocumentFragment())).querySelectorAll(t)}})}function jc(t){return(e,o)=>ae(e,o,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}function Vc(t){return(e,o)=>{let{slot:n,selector:a}=t??{},i="slot"+(n?`[name=${n}]`:":not([name])");return ae(e,o,{get(){let s=this.renderRoot?.querySelector(i),l=s?.assignedElements(t)??[];return a===void 0?l:l.filter(d=>d.matches(a))}})}}function Kc(t){return(e,o)=>{let{slot:n}=t??{},a="slot"+(n?`[name=${n}]`:":not([name])");return ae(e,o,{get(){return this.renderRoot?.querySelector(a)?.assignedNodes(t)??[]}})}}var ao={};D(ao,{repeat:()=>br});var de={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},X=t=>(...e)=>({_$litDirective$:t,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:Zc}=eo;var La=t=>t.strings===void 0,Pa=()=>document.createComment(""),rt=(t,e,o)=>{let n=t._$AA.parentNode,a=e===void 0?t._$AB:e._$AA;if(o===void 0){let i=n.insertBefore(Pa(),a),s=n.insertBefore(Pa(),a);o=new Zc(i,s,t,t.options)}else{let i=o._$AB.nextSibling,s=o._$AM,l=s!==t;if(l){let d;o._$AQ?.(t),o._$AM=t,o._$AP!==void 0&&(d=t._$AU)!==s._$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},Se=(t,e,o=t)=>(t._$AI(e,o),t),qc={},Na=(t,e=qc)=>t._$AH=e,ka=t=>t._$AH,gr=t=>{t._$AP?.(!1,!0);let e=t._$AA,o=t._$AB.nextSibling;for(;e!==o;){let n=e.nextSibling;e.remove(),e=n}};var Fa=(t,e,o)=>{let n=new Map;for(let a=e;a<=o;a++)n.set(t[a],a);return n},br=X(class extends te{constructor(t){if(super(t),t.type!==de.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,o){let n;o===void 0?o=e:e!==void 0&&(n=e);let a=[],i=[],s=0;for(let l of t)a[s]=n?n(l,s):s,i[s]=o(l,s),s++;return{values:i,keys:a}}render(t,e,o){return this.dt(t,e,o).values}update(t,[e,o,n]){let a=ka(t),{values:i,keys:s}=this.dt(e,o,n);if(!Array.isArray(a))return this.ut=s,i;let l=this.ut??=[],d=[],f,h,p=0,m=a.length-1,b=0,g=i.length-1;for(;p<=m&&b<=g;)if(a[p]===null)p++;else if(a[m]===null)m--;else if(l[p]===s[b])d[b]=Se(a[p],i[b]),p++,b++;else if(l[m]===s[g])d[g]=Se(a[m],i[g]),m--,g--;else if(l[p]===s[g])d[g]=Se(a[p],i[g]),rt(t,d[g+1],a[p]),p++,g--;else if(l[m]===s[b])d[b]=Se(a[m],i[b]),rt(t,a[p],a[m]),m--,b++;else if(f===void 0&&(f=Fa(s,b,g),h=Fa(l,p,m)),f.has(l[p]))if(f.has(l[m])){let O=h.get(s[b]),C=O!==void 0?a[O]:null;if(C===null){let A=rt(t,a[p]);Se(A,i[b]),d[b]=A}else d[b]=Se(C,i[b]),rt(t,a[p],C),a[O]=null;b++}else gr(a[m]),m--;else gr(a[p]),p++;for(;b<=g;){let O=rt(t,d[g+1]);Se(O,i[b]),d[b++]=O}for(;p<=m;){let O=a[p++];O!==null&&gr(O)}return this.ut=s,Na(t,d),W}});var io={};D(io,{classMap:()=>Yc});var Yc=X(class extends te{constructor(t){if(super(t),t.type!==de.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.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=t.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 W}});var so={};D(so,{styleMap:()=>Jc});var Da="important",Xc=" !"+Da,Jc=X(class extends te{constructor(t){if(super(t),t.type!==de.ATTRIBUTE||t.name!=="style"||t.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(t){return Object.keys(t).reduce((e,o)=>{let n=t[o];return n==null?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(t,[e]){let{style:o}=t.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(Xc);n.includes("-")||i?o.setProperty(n,i?a.slice(0,-11):a,i?Da:""):o[n]=a}}return W}});var co={};D(co,{UnsafeHTMLDirective:()=>ot,unsafeHTML:()=>Qc});var ot=class extends te{constructor(e){if(super(e),this.it=H,e.type!==de.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||e==null)return this._t=void 0,this.it=e;if(e===W)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:[]}}};ot.directiveName="unsafeHTML",ot.resultType=1;var Qc=X(ot);var xo={};D(xo,{CacheRegistry:()=>bo,ClearCacheEvent:()=>jt});var uo={};D(uo,{CancelablePromise:()=>xr,CanceledPromiseError:()=>zt,cancelable:()=>lo});var zt=class extends Error{constructor(e,o,n){super(e),this.canceledPromiseResult=o,this.canceledPromiseError=n}},xr=class extends Promise{constructor(e){super((o,n)=>e(a=>{this.isCanceled?n(new zt("Promise has been canceled",a)):o(a)},a=>{this.isCanceled?n(new zt("Promise has been canceled",void 0,a)):n(a)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},lo=t=>new xr((e,o)=>t.then(e).catch(o));var go={};D(go,{FtNotificationEvent:()=>Gt,PostResizeEvent:()=>mo,PreResizeEvent:()=>yo,WithEventBus:()=>Ue,withEventBus:()=>Ga});var ho={};D(ho,{applyMixinOnce:()=>J,dateReviver:()=>rl,deepCopy:()=>po,deepEqual:()=>Wt,delay:()=>Ma,eventPathContainsMatchingElement:()=>nl,everyDeep:()=>tl,flatDeep:()=>Ba,forEachDeep:()=>$a,getComposedPathTo:()=>fo,hasChanged:()=>De,ignoreComposingEvents:()=>sl,last:()=>al,minmax:()=>Me,parseDate:()=>za,randomId:()=>il,someDeep:()=>Ha,unslotText:()=>Wa,waitFor:()=>Ua,waitUntil:()=>el});var Ma=t=>new Promise(e=>setTimeout(e,t));async function el(t,e=10,o=2e4){await Ua(async()=>await t()||void 0,e,o)}async function Ua(t,e=10,o=2e4){let n=await t(),a,i;for(a=i=performance.now();n==null&&(!o||i-a<o);)await Ma(e),n=await t(),i=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function Ba(t,e){return t.flatMap(o=>[o,...Ba(e(o),e)])}function $a(t,e,o){let n=(a,i)=>{var s;for(let l=0;l<a.length;l++){let d=a[l];if(!(((s=o(d,l,a,i))!==null&&s!==void 0?s:!0)&&n(e(d),[...i,d])))return!1}return!0};n(t,[])}function Ha(t,e,o){let n=!1;return $a(t,e,(a,i,s,l)=>(n=!!o(a,i,s,l),!n)),n}function tl(t,e,o){return!Ha(t,e,(n,a,i,s)=>!o(n,a,i,s))}function rl(...t){return(e,o)=>t.includes(e)?za(o):o}function za(t){return t.match(/^\d{4}-\d{2}-\d{2}$/)&&(t=t.replace(/-/g,"/")),t=t.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,(e,o,n,a)=>o+n+":"+a),new Date(t)}function ol(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Wt(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Wt(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(t),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 s=a[n];if(!Wt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Wt(t,e){try{return ol(t,e)}catch{return!1}}function De(t,e){return!Wt(t,e)}function nl(t,e,o=window.document.body){if(e.length>0){let n=t.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 Me(t,e,o){return Math.min(Math.max(t,e),o)}function al(t){return t[t.length-1]}function Wa(t){return t instanceof HTMLSlotElement?t.assignedNodes().map(e=>Wa(e)).join(""):t?.textContent||""}function fo(t){let e=[],o=n=>{n.stopPropagation(),e=n.composedPath()};return t.addEventListener("get-composed-path",o),t.dispatchEvent(new Event("get-composed-path",{composed:!0})),t.removeEventListener("get-composed-path",o),e}function po(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function il(t,e){return(e??"")+(""+Math.floor(Math.random()*10**t)).padStart(t,"0")}function J(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=e(n);return a[t]=!0,a}}function sl(){return function(t,e,o){let n=o.value;o.value=function(a){if(!(a.isComposing||a.keyCode===229))return n.apply(this,[a])}}}var Gt=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},yo=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},mo=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}},Ga=J(Symbol("withEventBus"),function(t,e){return class extends t{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)}}}),Ue=class extends Ga(Object){};var jt=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},bo=class extends Ue{constructor(){super(...arguments),this.content={}}register(e,o,n=!1){var a;let i=this.content[e],s=(a=i?.status)!==null&&a!==void 0?a:"REGISTERED";this.content[e]={...i,loader:o,final:n,status:s}}registerFinal(e,o){this.register(e,o,!0)}clearAll(e=!0){return this.clearMatching(()=>!0,e)}clearMatching(e,o=!0){let n=Object.keys(this.content).filter(e).filter(a=>this.clear(a,!1)!=null);return o&&n.length>0&&this.dispatchEvent(new jt(n)),n}clear(e,o=!0){if(this.content[e]&&!this.content[e].final)return this.forceClear(e),o&&this.dispatchEvent(new jt([e])),e}forceClear(e){var o;let n=this.content[e];n&&(this.clearClearTimeout(e),(o=n.promise)===null||o===void 0||o.cancel(),this.content[e]={loader:n.loader,final:n.final,status:"REGISTERED"})}clearClearTimeout(e){var o,n,a;((o=this.content[e])===null||o===void 0?void 0:o.clearTimeout)!=null&&(window.clearTimeout((n=this.content[e])===null||n===void 0?void 0:n.clearTimeout),(a=this.content[e])===null||a===void 0||delete a.clearTimeout)}set(e,o,n=!1){this.forceClear(e);let a=async()=>o,i="RESOLVED";this.content[e]={loader:a,final:n,status:i,value:o}}setFinal(e,o){return this.set(e,o,!0)}async get(e,o,n){if(!this.isRegistered(e)){if(!o)throw new Error("Unknown cache key "+e);this.register(e,o)}let a=this.content[e];switch(a.status){case"ERROR":throw a.error;case"LOADING":return a.promise;case"RESOLVED":return a.value;case"REGISTERED":return o=o??a.loader,a.status="LOADING",a.promise=lo(o()),a.promise.then(i=>(a.status="RESOLVED",a.value=i,n!=null&&(this.clearClearTimeout(e),a.clearTimeout=window.setTimeout(()=>this.clear(e),n)),i)).catch(i=>{var s;throw!((s=a.promise)===null||s===void 0)&&s.isCanceled||(a.status="ERROR",a.error=i),i})}}isRegistered(e){return this.content[e]!=null}getNow(e){var o;return(o=this.content[e])===null||o===void 0?void 0:o.value}has(e){var o,n;return((o=this.content[e])===null||o===void 0?void 0:o.status)!==void 0&&((n=this.content[e])===null||n===void 0?void 0:n.status)!=="REGISTERED"}resolvedKeys(){return Object.keys(this.content).filter(e=>{var o;return((o=this.content[e])===null||o===void 0?void 0:o.status)==="RESOLVED"})}resolvedValues(){return this.resolvedKeys().map(e=>this.content[e].value)}keys(){return Object.keys(this.content)}};var Co={};D(Co,{ClusteringHelper:()=>Eo,formatHierarchicalValues:()=>Oo});var So={};D(So,{accessBreadcrumb:()=>dl,accessResult:()=>vo,accessResultId:()=>cl,accessResultUrl:()=>ll});function vo(t){var e,o,n,a;return(a=(n=(o=(e=t?.map)!==null&&e!==void 0?e:t?.topic)!==null&&o!==void 0?o:t?.document)!==null&&n!==void 0?n:t?.htmlPackage)!==null&&a!==void 0?a:t?.htmlPackagePage}function cl(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.mapId)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.tocId)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.documentId)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.packageId)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.contentId}function ll(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.readerUrl)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.readerUrl)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.viewerUrl)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.viewerUrl)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.viewerUrl}function dl(t){return t?.topic?[t.topic.mapTitle,...t.topic.breadcrumb]:t?.map?[t.map.title]:t?.document?[t.document.title]:t?.htmlPackage?[t.htmlPackage.title]:t?.htmlPackagePage?[t.htmlPackagePage.packageTitle,t.htmlPackagePage.title]:[]}function Oo(t,e){return e&&e>1&&t.length>=e?`... > ${t[t.length-1]}`:t.join(" > ")}var Eo=class t{constructor(e,o,n,a){this.allResults=e,this.selectedResult=o,this.clusteringMetadata=n,this.metadataDescriptors=a}static findResultWithMetadataValue(e,o,n){return e?.find(a=>{var i;return((i=this.extractResultMetadata({result:a}).find(s=>s.key==o))===null||i===void 0?void 0:i.value)==n})}static extractResultMetadata(e){var o,n;let a=(n=(o=vo(e.result))===null||o===void 0?void 0:o.metadata)!==null&&n!==void 0?n:[];return e.key==null?t.flattenMetadata(a,e.hierarchicalValueTruncatingLevel,e.dateFormatter):t.flattenMetada