@fluid-topics/ft-reader-topic-context 1.1.36 → 1.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ const v={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:N},w=(t=v,o,
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
41
  */
42
- const R=globalThis,I=R.trustedTypes,W=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",K=`lit$${(Math.random()+"").slice(9)}$`,k="?"+K,Z=`<${k}>`,A=document,F=()=>A.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,B="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,P=/>/g,_=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,T=/"/g,G=/^(?:script|style|textarea|title)$/i,j=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),J=new WeakMap,V=A.createTreeWalker(A,129);function q(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==W?W.createHTML(o):o}let X=class t{constructor({strings:o,_$litType$:e},r){let i;this.parts=[];let a=0,n=0;const s=o.length-1,c=this.parts,[l,p]=((t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=z;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,c=n.exec(e),null!==c);)p=n.lastIndex,n===z?"!--"===c[1]?n=D:void 0!==c[1]?n=P:void 0!==c[2]?(G.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=_):void 0!==c[3]&&(n=_):n===_?">"===c[0]?(n=i??z,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?_:'"'===c[3]?T:H):n===T||n===H?n=_:n===D||n===P?n=z:(n=_,i=void 0);const f=n===_&&t[o+1].startsWith("/>")?" ":"";a+=n===z?e+Z:l>=0?(r.push(s),e.slice(0,l)+L+e.slice(l)+K+f):e+K+(-2===l?o:f)}return[q(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]})(o,e);if(this.el=t.createElement(l,r),V.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=V.nextNode())&&c.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(L)){const o=p[n++],e=i.getAttribute(t).split(K),r=/([.?@])?(.*)/.exec(o);c.push({type:1,index:a,name:r[2],strings:e,ctor:"."===r[1]?et:"?"===r[1]?rt:"@"===r[1]?it:ot}),i.removeAttribute(t)}else t.startsWith(K)&&(c.push({type:6,index:a}),i.removeAttribute(t));if(G.test(i.tagName)){const t=i.textContent.split(K),o=t.length-1;if(o>0){i.textContent=I?I.emptyScript:"";for(let e=0;e<o;e++)i.append(t[e],F()),V.nextNode(),c.push({type:2,index:++a});i.append(t[o],F())}}}else if(8===i.nodeType)if(i.data===k)c.push({type:2,index:a});else{let t=-1;for(;-1!==(t=i.data.indexOf(K,t+1));)c.push({type:7,index:a}),t+=K.length-1}a++}}static createElement(t,o){const e=A.createElement("template");return e.innerHTML=t,e}};function Q(t,o,e=t,r){if(o===j)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=M(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=Q(t,i._$AS(t,o.values),i,r)),o}let tt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=Q(this,t,o),M(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=X.createElement(q(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??A).importNode(o,!0);V.currentNode=r;let i=V.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new tt(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new at(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=V.nextNode(),a++)}return V.currentNode=A,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=J.get(t.strings);return void 0===o&&J.set(t.strings,o=new X(t)),o}T(o){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const a of o)i===e.length?e.push(r=new t(this.k(F()),this.k(F()),this,this.options)):r=e[i],r._$AI(a),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ot=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Y}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=Q(this,t,o,0),a=!M(t)||t!==this._$AH&&t!==j,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=Q(this,r[e+n],o,n),s===j&&(s=this._$AH[n]),a||=!M(s)||s!==this._$AH[n],s===Y?t=Y:t!==Y&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},et=class extends ot{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===Y?void 0:t}},rt=class extends ot{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}},it=class extends ot{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=Q(this,t,o,0)??Y)===j)return;const e=this._$AH,r=t===Y&&e!==Y||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==Y&&(e===Y||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}};const nt=R.litHtmlPolyfillSupport;nt?.(X,tt),(R.litHtmlVersions??=[]).push("3.1.0");
42
+ const R=globalThis,I=R.trustedTypes,W=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",K=`lit$${(Math.random()+"").slice(9)}$`,k="?"+K,Z=`<${k}>`,A=document,F=()=>A.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,B="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,P=/>/g,_=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,G=/"/g,T=/^(?:script|style|textarea|title)$/i,j=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),J=new WeakMap,V=A.createTreeWalker(A,129);function q(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==W?W.createHTML(o):o}let X=class t{constructor({strings:o,_$litType$:e},r){let i;this.parts=[];let a=0,n=0;const s=o.length-1,c=this.parts,[l,p]=((t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=z;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,c=n.exec(e),null!==c);)p=n.lastIndex,n===z?"!--"===c[1]?n=D:void 0!==c[1]?n=P:void 0!==c[2]?(T.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=_):void 0!==c[3]&&(n=_):n===_?">"===c[0]?(n=i??z,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?_:'"'===c[3]?G:H):n===G||n===H?n=_:n===D||n===P?n=z:(n=_,i=void 0);const f=n===_&&t[o+1].startsWith("/>")?" ":"";a+=n===z?e+Z:l>=0?(r.push(s),e.slice(0,l)+L+e.slice(l)+K+f):e+K+(-2===l?o:f)}return[q(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]})(o,e);if(this.el=t.createElement(l,r),V.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=V.nextNode())&&c.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(L)){const o=p[n++],e=i.getAttribute(t).split(K),r=/([.?@])?(.*)/.exec(o);c.push({type:1,index:a,name:r[2],strings:e,ctor:"."===r[1]?et:"?"===r[1]?rt:"@"===r[1]?it:ot}),i.removeAttribute(t)}else t.startsWith(K)&&(c.push({type:6,index:a}),i.removeAttribute(t));if(T.test(i.tagName)){const t=i.textContent.split(K),o=t.length-1;if(o>0){i.textContent=I?I.emptyScript:"";for(let e=0;e<o;e++)i.append(t[e],F()),V.nextNode(),c.push({type:2,index:++a});i.append(t[o],F())}}}else if(8===i.nodeType)if(i.data===k)c.push({type:2,index:a});else{let t=-1;for(;-1!==(t=i.data.indexOf(K,t+1));)c.push({type:7,index:a}),t+=K.length-1}a++}}static createElement(t,o){const e=A.createElement("template");return e.innerHTML=t,e}};function Q(t,o,e=t,r){if(o===j)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=M(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=Q(t,i._$AS(t,o.values),i,r)),o}let tt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=Q(this,t,o),M(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=X.createElement(q(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??A).importNode(o,!0);V.currentNode=r;let i=V.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new tt(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new at(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=V.nextNode(),a++)}return V.currentNode=A,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=J.get(t.strings);return void 0===o&&J.set(t.strings,o=new X(t)),o}T(o){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const a of o)i===e.length?e.push(r=new t(this.k(F()),this.k(F()),this,this.options)):r=e[i],r._$AI(a),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ot=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Y}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=Q(this,t,o,0),a=!M(t)||t!==this._$AH&&t!==j,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=Q(this,r[e+n],o,n),s===j&&(s=this._$AH[n]),a||=!M(s)||s!==this._$AH[n],s===Y?t=Y:t!==Y&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},et=class extends ot{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===Y?void 0:t}},rt=class extends ot{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}},it=class extends ot{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=Q(this,t,o,0)??Y)===j)return;const e=this._$AH,r=t===Y&&e!==Y||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==Y&&(e===Y||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}};const nt=R.litHtmlPolyfillSupport;nt?.(X,tt),(R.litHtmlVersions??=[]).push("3.1.0");
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2019 Google LLC
@@ -56,7 +56,7 @@ const st=globalThis,ct=st.ShadowRoot&&(void 0===st.ShadyCSS||st.ShadyCSS.nativeS
56
56
  * Copyright 2017 Google LLC
57
57
  * SPDX-License-Identifier: BSD-3-Clause
58
58
  */
59
- const Wt=globalThis,Lt=Wt.trustedTypes,Kt=Lt?Lt.createPolicy("lit-html",{createHTML:t=>t}):void 0,kt="$lit$",Zt=`lit$${(Math.random()+"").slice(9)}$`,At="?"+Zt,Ft=`<${At}>`,Mt=document,$t=()=>Mt.createComment(""),Bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,zt=Array.isArray,Dt="[ \t\n\f\r]",Pt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Ht=/>/g,Tt=RegExp(`>|${Dt}(?:([^\\s"'>=/]+)(${Dt}*=${Dt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,jt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Jt=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),Vt=Symbol.for("lit-noChange"),qt=Symbol.for("lit-nothing"),Xt=new WeakMap,Qt=Mt.createTreeWalker(Mt,129);function to(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Kt?Kt.createHTML(o):o}const oo=(t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=Pt;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,c=n.exec(e),null!==c);)p=n.lastIndex,n===Pt?"!--"===c[1]?n=_t:void 0!==c[1]?n=Ht:void 0!==c[2]?(Yt.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=Tt):void 0!==c[3]&&(n=Tt):n===Tt?">"===c[0]?(n=i??Pt,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?Tt:'"'===c[3]?jt:Gt):n===jt||n===Gt?n=Tt:n===_t||n===Ht?n=Pt:(n=Tt,i=void 0);const f=n===Tt&&t[o+1].startsWith("/>")?" ":"";a+=n===Pt?e+Ft:l>=0?(r.push(s),e.slice(0,l)+kt+e.slice(l)+Zt+f):e+Zt+(-2===l?o:f)}return[to(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]};class eo{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let i=0,a=0;const n=t.length-1,s=this.parts,[c,l]=oo(t,o);if(this.el=eo.createElement(c,e),Qt.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=Qt.nextNode())&&s.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(kt)){const o=l[a++],e=r.getAttribute(t).split(Zt),n=/([.?@])?(.*)/.exec(o);s.push({type:1,index:i,name:n[2],strings:e,ctor:"."===n[1]?no:"?"===n[1]?so:"@"===n[1]?co:ao}),r.removeAttribute(t)}else t.startsWith(Zt)&&(s.push({type:6,index:i}),r.removeAttribute(t));if(Yt.test(r.tagName)){const t=r.textContent.split(Zt),o=t.length-1;if(o>0){r.textContent=Lt?Lt.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],$t()),Qt.nextNode(),s.push({type:2,index:++i});r.append(t[o],$t())}}}else if(8===r.nodeType)if(r.data===At)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(Zt,t+1));)s.push({type:7,index:i}),t+=Zt.length-1}i++}}static createElement(t,o){const e=Mt.createElement("template");return e.innerHTML=t,e}}function ro(t,o,e=t,r){if(o===Vt)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=Bt(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=ro(t,i._$AS(t,o.values),i,r)),o}class io{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=qt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=ro(this,t,o),Bt(t)?t===qt||null==t||""===t?(this._$AH!==qt&&this._$AR(),this._$AH=qt):t!==this._$AH&&t!==Vt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>zt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==qt&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.$(Mt.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=eo.createElement(to(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??Mt).importNode(o,!0);Qt.currentNode=r;let i=Qt.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new io(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new lo(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=Qt.nextNode(),a++)}return Qt.currentNode=Mt,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=Xt.get(t.strings);return void 0===o&&Xt.set(t.strings,o=new eo(t)),o}T(t){zt(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,r=0;for(const i of t)r===o.length?o.push(e=new io(this.k($t()),this.k($t()),this,this.options)):e=o[r],e._$AI(i),r++;r<o.length&&(this._$AR(e&&e._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ao{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=qt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=qt}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=ro(this,t,o,0),a=!Bt(t)||t!==this._$AH&&t!==Vt,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=ro(this,r[e+n],o,n),s===Vt&&(s=this._$AH[n]),a||=!Bt(s)||s!==this._$AH[n],s===qt?t=qt:t!==qt&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class no extends ao{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===qt?void 0:t}}class so extends ao{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==qt)}}class co extends ao{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=ro(this,t,o,0)??qt)===Vt)return;const e=this._$AH,r=t===qt&&e!==qt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==qt&&(e===qt||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class lo{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){ro(this,t)}}const po=Wt.litHtmlPolyfillSupport;po?.(eo,io),(Wt.litHtmlVersions??=[]).push("3.1.0");
59
+ const Wt=globalThis,Lt=Wt.trustedTypes,Kt=Lt?Lt.createPolicy("lit-html",{createHTML:t=>t}):void 0,kt="$lit$",Zt=`lit$${(Math.random()+"").slice(9)}$`,At="?"+Zt,Ft=`<${At}>`,Mt=document,$t=()=>Mt.createComment(""),Bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,zt=Array.isArray,Dt="[ \t\n\f\r]",Pt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Ht=/>/g,Gt=RegExp(`>|${Dt}(?:([^\\s"'>=/]+)(${Dt}*=${Dt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Tt=/'/g,jt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Jt=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),Vt=Symbol.for("lit-noChange"),qt=Symbol.for("lit-nothing"),Xt=new WeakMap,Qt=Mt.createTreeWalker(Mt,129);function to(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Kt?Kt.createHTML(o):o}const oo=(t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=Pt;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,c=n.exec(e),null!==c);)p=n.lastIndex,n===Pt?"!--"===c[1]?n=_t:void 0!==c[1]?n=Ht:void 0!==c[2]?(Yt.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=Gt):void 0!==c[3]&&(n=Gt):n===Gt?">"===c[0]?(n=i??Pt,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?Gt:'"'===c[3]?jt:Tt):n===jt||n===Tt?n=Gt:n===_t||n===Ht?n=Pt:(n=Gt,i=void 0);const f=n===Gt&&t[o+1].startsWith("/>")?" ":"";a+=n===Pt?e+Ft:l>=0?(r.push(s),e.slice(0,l)+kt+e.slice(l)+Zt+f):e+Zt+(-2===l?o:f)}return[to(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]};class eo{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let i=0,a=0;const n=t.length-1,s=this.parts,[c,l]=oo(t,o);if(this.el=eo.createElement(c,e),Qt.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=Qt.nextNode())&&s.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(kt)){const o=l[a++],e=r.getAttribute(t).split(Zt),n=/([.?@])?(.*)/.exec(o);s.push({type:1,index:i,name:n[2],strings:e,ctor:"."===n[1]?no:"?"===n[1]?so:"@"===n[1]?co:ao}),r.removeAttribute(t)}else t.startsWith(Zt)&&(s.push({type:6,index:i}),r.removeAttribute(t));if(Yt.test(r.tagName)){const t=r.textContent.split(Zt),o=t.length-1;if(o>0){r.textContent=Lt?Lt.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],$t()),Qt.nextNode(),s.push({type:2,index:++i});r.append(t[o],$t())}}}else if(8===r.nodeType)if(r.data===At)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(Zt,t+1));)s.push({type:7,index:i}),t+=Zt.length-1}i++}}static createElement(t,o){const e=Mt.createElement("template");return e.innerHTML=t,e}}function ro(t,o,e=t,r){if(o===Vt)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=Bt(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=ro(t,i._$AS(t,o.values),i,r)),o}class io{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=qt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=ro(this,t,o),Bt(t)?t===qt||null==t||""===t?(this._$AH!==qt&&this._$AR(),this._$AH=qt):t!==this._$AH&&t!==Vt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>zt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==qt&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.$(Mt.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=eo.createElement(to(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??Mt).importNode(o,!0);Qt.currentNode=r;let i=Qt.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new io(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new lo(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=Qt.nextNode(),a++)}return Qt.currentNode=Mt,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=Xt.get(t.strings);return void 0===o&&Xt.set(t.strings,o=new eo(t)),o}T(t){zt(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,r=0;for(const i of t)r===o.length?o.push(e=new io(this.k($t()),this.k($t()),this,this.options)):e=o[r],e._$AI(i),r++;r<o.length&&(this._$AR(e&&e._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ao{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=qt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=qt}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=ro(this,t,o,0),a=!Bt(t)||t!==this._$AH&&t!==Vt,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=ro(this,r[e+n],o,n),s===Vt&&(s=this._$AH[n]),a||=!Bt(s)||s!==this._$AH[n],s===qt?t=qt:t!==qt&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class no extends ao{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===qt?void 0:t}}class so extends ao{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==qt)}}class co extends ao{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=ro(this,t,o,0)??qt)===Vt)return;const e=this._$AH,r=t===qt&&e!==qt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==qt&&(e===qt||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class lo{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){ro(this,t)}}const po=Wt.litHtmlPolyfillSupport;po?.(eo,io),(Wt.litHtmlVersions??=[]).push("3.1.0");
60
60
  /**
61
61
  * @license
62
62
  * Copyright 2017 Google LLC
@@ -68,7 +68,7 @@ class fo extends It{constructor(){super(...arguments),this.renderOptions={host:t
68
68
  * Copyright 2019 Google LLC
69
69
  * SPDX-License-Identifier: BSD-3-Clause
70
70
  */
71
- const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class No extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var xo,So=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const vo=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Co=Symbol("exportpartsDebouncer");class Uo extends No{constructor(){super(),this[xo]=new o(5),this[wo]=this.constructor.name,this[vo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[vo])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){var t,o,e;((null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())||null!==(e=null===(o=this.exportpartsPrefixes)||void 0===o?void 0:o.length)&&void 0!==e&&e)&&this[Co].run((()=>{var t,o;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&(null===(o=this.exportpartsPrefixes)||void 0===o?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const p=[...l.values()].flatMap((t=>c.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}xo=Co,So([C()],Uo.prototype,"exportpartsPrefix",void 0),So([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!E(t,o),...null!=o?o:{}})}([])],Uo.prototype,"exportpartsPrefixes",void 0),So([C()],Uo.prototype,"customStylesheet",void 0);const Eo=go.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");dt`
71
+ const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class No extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var xo,So=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const vo=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Co=Symbol("exportpartsDebouncer");class Uo extends No{constructor(){super(),this[xo]=new o(5),this[wo]=this.constructor.name,this[vo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[vo])}updated(t){super.updated(t),this.updateComplete.then((()=>{this.contentAvailableCallback(t),this.insertCustomStylesheet(),this.scheduleExportpartsUpdate()}))}contentAvailableCallback(t){}insertCustomStylesheet(){var t,o;if((null!==(o=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){var t,o,e;((null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())||null!==(e=null===(o=this.exportpartsPrefixes)||void 0===o?void 0:o.length)&&void 0!==e&&e)&&this[Co].run((()=>{var t,o;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&(null===(o=this.exportpartsPrefixes)||void 0===o?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const p=[...l.values()].flatMap((t=>c.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}xo=Co,So([C()],Uo.prototype,"exportpartsPrefix",void 0),So([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!E(t,o),...null!=o?o:{}})}([])],Uo.prototype,"exportpartsPrefixes",void 0),So([C()],Uo.prototype,"customStylesheet",void 0);const Eo=go.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");dt`
72
72
  .highlight-html-match {
73
73
  background: ${Eo};
74
74
  }
@@ -105,8 +105,8 @@ const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShado
105
105
  width: 0;
106
106
  }
107
107
  `;function Ro(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Io,Wo,Lo;const Ko=Symbol("internalReduxEventsUnsubscribers"),ko=Symbol("internalStoresUnsubscribers"),Zo=Symbol("internalStores");class Ao extends Uo{constructor(){super(...arguments),this[Io]=new Map,this[Wo]=new Map,this[Lo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((o=>t.has(o)))&&this.updateFromStores()}getUnnamedStore(){if(this[Zo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Zo].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Zo].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Ro(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[Zo].delete(o)}setupStore(t,o){this[Zo].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Zo].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[ko].has(t.store):this[ko].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[ko].set(t,o.subscribe((()=>this.updateFromStores()))),Ro(o)&&o.eventBus&&(null===(e=this.reduxConstructor.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Ko].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ko].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Ko].forEach((t=>t())),this[Ko]=[]}unsubscribeFromStore(t){this[ko].has(t)&&this[ko].get(t)(),this[ko].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}var Fo,Mo;Io=ko,Wo=Zo,Lo=Ko,Ao.reduxProperties=new Map,Ao.reduxReactiveProperties=new Set,Ao.reduxEventListeners=new Map,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Mo=null===(Fo=window.safari)||void 0===Fo?void 0:Fo.pushNotification)||void 0===Mo||Mo.toString());const $o=dt`
108
- `;var Bo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Bo||(Bo={}));var zo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Do extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Po=Symbol("registerInterval");class _o extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Po]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Po]):this.dispatchEvent(new Do)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Po,zo([U()],e.prototype,"stateManager",void 0),e}(Ao)){}var Ho,To=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Go extends _o{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return Jt`
108
+ `;var Bo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Bo||(Bo={}));var zo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Do extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Po=Symbol("registerInterval");class _o extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Po]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Po]):this.dispatchEvent(new Do)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Po,zo([U()],e.prototype,"stateManager",void 0),e}(Ao)){}var Ho,Go=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class To extends _o{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return Jt`
109
109
  <article id=${this.tocId}>
110
110
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
111
111
  </article>
112
- `}registerComponent(t){t.stopPropagation();const o=t.composedPath()[0];this.register(o)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}update(t){super.update(t),["mapId","tocId","stateManager"].some((o=>t.has(o)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}Go.styles=$o,To([(t=>{const o=null!=t?t:{};return(t,e)=>{var r;const i={hasChanged:(t,o)=>!E(t,o),attribute:!1,...o};C(i)(t,e);const a=t.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(e,{selector:null!==(r=o.selector)&&void 0!==r?r:t=>t[e],store:o.store})}})({selector:t=>{var o;return null===(o=t.map)||void 0===o?void 0:o.id}})],Go.prototype,"mapId",void 0),To([C()],Go.prototype,"tocId",void 0),To([C({type:Boolean})],Go.prototype,"disableContextInteractions",void 0),To([U()],Go.prototype,"tocNode",void 0),(Ho="ft-reader-topic-context",t=>{window.customElements.get(Ho)||window.customElements.define(Ho,t)})(Go),t.FtReaderTopicContext=Go,t.FtReaderTopicContextCssVariables={},t.styles=$o}({});
112
+ `}registerComponent(t){t.stopPropagation();const o=t.composedPath()[0];this.register(o)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}update(t){super.update(t),["mapId","tocId","stateManager"].some((o=>t.has(o)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}To.styles=$o,Go([(t=>{const o=null!=t?t:{};return(t,e)=>{var r;const i={hasChanged:(t,o)=>!E(t,o),attribute:!1,...o};C(i)(t,e);const a=t.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(e,{selector:null!==(r=o.selector)&&void 0!==r?r:t=>t[e],store:o.store})}})({selector:t=>{var o;return null===(o=t.map)||void 0===o?void 0:o.id}})],To.prototype,"mapId",void 0),Go([C()],To.prototype,"tocId",void 0),Go([C({type:Boolean})],To.prototype,"disableContextInteractions",void 0),Go([U()],To.prototype,"tocNode",void 0),(Ho="ft-reader-topic-context",t=>{window.customElements.get(Ho)||window.customElements.define(Ho,t)})(To),t.FtReaderTopicContext=To,t.FtReaderTopicContextCssVariables={},t.styles=$o}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-topic-context",
3
- "version": "1.1.36",
3
+ "version": "1.1.38",
4
4
  "description": "Context block for integrated reader topic components.",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "1.1.36",
22
+ "@fluid-topics/ft-wc-utils": "1.1.38",
23
23
  "lit": "3.1.0"
24
24
  },
25
- "gitHead": "18df3483145165af9ce51db3f11be8aeb918ea40"
25
+ "gitHead": "d4b337b18935ad7a7d9f20e856f84e92225a9192"
26
26
  }