@fluid-topics/ft-reader-metadata 2.1.24 → 2.2.1

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.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var ru=Object.create;var _o=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var De=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var au=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&_o(e,i,{get:()=>t[i],enumerable:!(n=nu(t,i))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?ru(ou(e)):{},au(t||!e||!e.__esModule?_o(r,"default",{value:e,enumerable:!0}):r,e));var E=De(($d,Lo)=>{Lo.exports=ftGlobals.wcUtils});var L=De((Bd,Po)=>{Po.exports=ftGlobals.lit});var W=De((Hd,Io)=>{Io.exports=ftGlobals.litDecorators});var lr=De((Fv,Gl)=>{Gl.exports=ftGlobals.litClassMap});var lc=De((ey,ac)=>{ac.exports=ftGlobals.litUnsafeHTML});var Wc=De((nx,Kc)=>{Kc.exports=ftGlobals.litRepeat});var eu=m(E());var mt=m(L()),Ut=m(W()),At=m(E());var Mo=m(L());var No=Mo.css`
1
+ "use strict";(()=>{var gu=Object.create;var Do=Object.defineProperty;var yu=Object.getOwnPropertyDescriptor;var vu=Object.getOwnPropertyNames;var bu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var Pt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Eu=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vu(e))!xu.call(t,n)&&n!==r&&Do(t,n,{get:()=>e[n],enumerable:!(i=yu(e,n))||i.enumerable});return t};var f=(t,e,r)=>(r=t!=null?gu(bu(t)):{},Eu(e||!t||!t.__esModule?Do(r,"default",{value:t,enumerable:!0}):r,t));var E=Pt((cp,ko)=>{ko.exports=ftGlobals.wcUtils});var L=Pt((up,Uo)=>{Uo.exports=ftGlobals.lit});var G=Pt((dp,$o)=>{$o.exports=ftGlobals.litDecorators});var er=Pt((Wy,oc)=>{oc.exports=ftGlobals.litClassMap});var xc=Pt((sv,bc)=>{bc.exports=ftGlobals.litUnsafeHTML});var nu=Pt((lx,iu)=>{iu.exports=ftGlobals.litRepeat});var fu=f(E());var ye=f(L()),Ue=f(G()),Se=f(E());var Bo=f(L());var Ho=Bo.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -18,92 +18,65 @@
18
18
  all: unset;
19
19
  position: relative;
20
20
  }
21
- `;var Yr=m(E()),Do=m(W());var ee;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(ee||(ee={}));var Kt;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Kt||(Kt={}));var lu=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},mi=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},hi=Symbol("registerInterval"),cu=(0,Yr.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[hi]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[hi]):this.dispatchEvent(new mi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=hi,lu([(0,Do.state)()],r.prototype,"stateManager",void 0),r}),qr=class extends cu(Yr.FtLitElementRedux){};var zl=m(L()),Lt=m(W()),_t=m(E());var Ei=globalThis,ko=e=>e,Xr=Ei.trustedTypes,Uo=Xr?Xr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Vo="$lit$",re=`lit$${Math.random().toFixed(9).slice(2)}$`,zo="?"+re,uu=`<${zo}>`,be=document,Qr=()=>be.createComment(""),mr=e=>e===null||typeof e!="object"&&typeof e!="function",Si=Array.isArray,du=e=>Si(e)||typeof e?.[Symbol.iterator]=="function",gi=`[
22
- \f\r]`,hr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$o=/-->/g,Bo=/>/g,ve=RegExp(`>|${gi}(?:([^\\s"'>=/]+)(${gi}*=${gi}*(?:[^
23
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ho=/'/g,Fo=/"/g,Ko=/^(?:script|style|textarea|title)$/i,Ti=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Wo=Ti(1),Go=Ti(2),qo=Ti(3),gr=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),jo=new WeakMap,ye=be.createTreeWalker(be,129);function Yo(e,t){if(!Si(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Uo!==void 0?Uo.createHTML(t):t}var pu=(e,t)=>{let r=e.length-1,n=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=hr;for(let a=0;a<r;a++){let l=e[a],c,u,p=-1,d=0;for(;d<l.length&&(s.lastIndex=d,u=s.exec(l),u!==null);)d=s.lastIndex,s===hr?u[1]==="!--"?s=$o:u[1]!==void 0?s=Bo:u[2]!==void 0?(Ko.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=ve):u[3]!==void 0&&(s=ve):s===ve?u[0]===">"?(s=i??hr,p=-1):u[1]===void 0?p=-2:(p=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ve:u[3]==='"'?Fo:Ho):s===Fo||s===Ho?s=ve:s===$o||s===Bo?s=hr:(s=ve,i=void 0);let f=s===ve&&e[a+1].startsWith("/>")?" ":"";o+=s===hr?l+uu:p>=0?(n.push(c),l.slice(0,p)+Vo+l.slice(p)+re+f):l+re+(p===-2?a:f)}return[Yo(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},vr=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,u]=pu(t,r);if(this.el=e.createElement(c,n),ye.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=ye.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(Vo)){let d=u[s++],f=i.getAttribute(p).split(re),h=/([.?@])?(.*)/.exec(d);l.push({type:1,index:o,name:h[2],strings:f,ctor:h[1]==="."?yi:h[1]==="?"?bi:h[1]==="@"?xi:Ue}),i.removeAttribute(p)}else p.startsWith(re)&&(l.push({type:6,index:o}),i.removeAttribute(p));if(Ko.test(i.tagName)){let p=i.textContent.split(re),d=p.length-1;if(d>0){i.textContent=Xr?Xr.emptyScript:"";for(let f=0;f<d;f++)i.append(p[f],Qr()),ye.nextNode(),l.push({type:2,index:++o});i.append(p[d],Qr())}}}else if(i.nodeType===8)if(i.data===zo)l.push({type:2,index:o});else{let p=-1;for(;(p=i.data.indexOf(re,p+1))!==-1;)l.push({type:7,index:o}),p+=re.length-1}o++}}static createElement(t,r){let n=be.createElement("template");return n.innerHTML=t,n}};function ke(e,t,r=e,n){if(t===gr)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,o=mr(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(t=ke(e,i._$AS(e,t.values),i,n)),t}var vi=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??be).importNode(r,!0);ye.currentNode=i;let o=ye.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Jr(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new Ai(o,this,t)),this._$AV.push(c),l=n[++a]}s!==l?.index&&(o=ye.nextNode(),s++)}return ye.currentNode=be,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},Jr=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=ke(this,t,r),mr(t)?t===V||t==null||t===""?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==gr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):du(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==V&&mr(this._$AH)?this._$AA.nextSibling.data=t:this.T(be.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=vr.createElement(Yo(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let o=new vi(i,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=jo.get(t.strings);return r===void 0&&jo.set(t.strings,r=new vr(t)),r}k(t){Si(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let o of t)i===r.length?r.push(n=new e(this.O(Qr()),this.O(Qr()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=ko(t).nextSibling;ko(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ue=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,o){this.type=1,this._$AH=V,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=V}_$AI(t,r=this,n,i){let o=this.strings,s=!1;if(o===void 0)t=ke(this,t,r,0),s=!mr(t)||t!==this._$AH&&t!==gr,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=ke(this,a[n+l],r,l),c===gr&&(c=this._$AH[l]),s||=!mr(c)||c!==this._$AH[l],c===V?t=V:t!==V&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!i&&this.j(t)}j(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},yi=class extends Ue{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===V?void 0:t}},bi=class extends Ue{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==V)}},xi=class extends Ue{constructor(t,r,n,i,o){super(t,r,n,i,o),this.type=5}_$AI(t,r=this){if((t=ke(this,t,r,0)??V)===gr)return;let n=this._$AH,i=t===V&&n!==V||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==V&&(n===V||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Ai=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){ke(this,t)}};var fu=Ei.litHtmlPolyfillSupport;fu?.(vr,Jr),(Ei.litHtmlVersions??=[]).push("3.3.3");var Qo=Symbol.for(""),hu=e=>{if(e?.r===Qo)return e?._$litStatic$},Ci=e=>({_$litStatic$:e,r:Qo});var Xo=new Map,wi=e=>(t,...r)=>{let n=r.length,i,o,s=[],a=[],l,c=0,u=!1;for(;c<n;){for(l=t[c];c<n&&(o=r[c],(i=hu(o))!==void 0);)l+=i+t[++c],u=!0;c!==n&&a.push(o),s.push(l),c++}if(c===n&&s.push(t[n]),u){let p=s.join("$$lit$$");(t=Xo.get(p))===void 0&&(s.raw=s,Xo.set(p,t=s)),r=a}return e(t,...r)},Oi=wi(Wo),Gd=wi(Go),qd=wi(qo);var Ri=m(W()),ds=m(E());var St;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(St||(St={}));var Ct=m(L()),y=m(E()),Jo=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),Wt=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),T={fontFamily:Wt,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},$e={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Jo),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",T.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",T.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",T.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",T.textTransform,"inherit")},Be={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Jo),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",T.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",T.textTransform,"inherit")},He={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",T.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",T.textTransform,"inherit")},Fe={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",T.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",T.textTransform,"inherit")},je={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",T.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",T.textTransform,"inherit")},Tt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",T.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",T.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",T.textTransform,"inherit")},Ve={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",T.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",T.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",T.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",T.textTransform,"inherit")},ze={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",T.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",T.textTransform,"inherit")},Ke={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",T.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",T.textTransform,"uppercase")},$t={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Wt),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",T.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",T.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",T.textTransform,"uppercase")},Zo=Ct.css`
21
+ `;var Kr=f(E()),Fo=f(G());var et;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(et||(et={}));var Ke;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Ke||(Ke={}));var Su=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Tn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},_n=Symbol("registerInterval"),Au=(0,Kr.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[_n]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[_n]):this.dispatchEvent(new Tn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=_n,Su([(0,Fo.state)()],r.prototype,"stateManager",void 0),r}),zr=class extends Au(Kr.FtLitElementRedux){};var rc=f(L()),Pe=f(G()),Oe=f(E());var Mn=globalThis,Vo=t=>t,Wr=Mn.trustedTypes,jo=Wr?Wr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Yo="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Xo="?"+tt,_u=`<${Xo}>`,mt=document,Gr=()=>mt.createComment(""),lr=t=>t===null||typeof t!="object"&&typeof t!="function",In=Array.isArray,Tu=t=>In(t)||typeof t?.[Symbol.iterator]=="function",Cn=`[
22
+ \f\r]`,ar=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zo=/-->/g,Ko=/>/g,ft=RegExp(`>|${Cn}(?:([^\\s"'>=/]+)(${Cn}*=${Cn}*(?:[^
23
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Wo=/'/g,Go=/"/g,Qo=/^(?:script|style|textarea|title)$/i,Nn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Zo=Nn(1),Jo=Nn(2),es=Nn(3),cr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),qo=new WeakMap,ht=mt.createTreeWalker(mt,129);function ts(t,e){if(!In(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return jo!==void 0?jo.createHTML(e):e}var Cu=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ar;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ar?u[1]==="!--"?s=zo:u[1]!==void 0?s=Ko:u[2]!==void 0?(Qo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ar,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ft:u[3]==='"'?Go:Wo):s===Go||s===Wo?s=ft:s===zo||s===Ko?s=ar:(s=ft,n=void 0);let h=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ar?l+_u:d>=0?(i.push(c),l.slice(0,d)+Yo+l.slice(d)+tt+h):l+tt+(d===-2?a:h)}return[ts(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ur=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=Cu(e,r);if(this.el=t.createElement(c,i),ht.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=ht.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Yo)){let p=u[s++],h=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:h,ctor:v[1]==="."?Rn:v[1]==="?"?On:v[1]==="@"?Pn:Mt}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Qo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=Wr?Wr.emptyScript:"";for(let h=0;h<p;h++)n.append(d[h],Gr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Gr())}}}else if(n.nodeType===8)if(n.data===Xo)l.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(tt,d+1))!==-1;)l.push({type:7,index:o}),d+=tt.length-1}o++}}static createElement(e,r){let i=mt.createElement("template");return i.innerHTML=e,i}};function Lt(t,e,r=t,i){if(e===cr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=lr(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Lt(t,n._$AS(t,e.values),n,i)),e}var wn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??mt).importNode(r,!0);ht.currentNode=n;let o=ht.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new qr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new Ln(o,this,e)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=ht.nextNode(),s++)}return ht.currentNode=mt,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},qr=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Lt(this,e,r),lr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==cr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Tu(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!==K&&lr(this._$AH)?this._$AA.nextSibling.data=e:this.T(mt.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ur.createElement(ts(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new wn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=qo.get(e.strings);return r===void 0&&qo.set(e.strings,r=new ur(e)),r}k(e){In(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of e)n===r.length?r.push(i=new t(this.O(Gr()),this.O(Gr()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=Vo(e).nextSibling;Vo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Mt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(e,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)e=Lt(this,e,r,0),s=!lr(e)||e!==this._$AH&&e!==cr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Lt(this,a[i+l],r,l),c===cr&&(c=this._$AH[l]),s||=!lr(c)||c!==this._$AH[l],c===K?e=K:e!==K&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Rn=class extends Mt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},On=class extends Mt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends Mt{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Lt(this,e,r,0)??K)===cr)return;let i=this._$AH,n=e===K&&i!==K||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==K&&(i===K||n);n&&this.element.removeEventListener(this.name,this,i),o&&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)}},Ln=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Lt(this,e)}};var wu=Mn.litHtmlPolyfillSupport;wu?.(ur,qr),(Mn.litHtmlVersions??=[]).push("3.3.3");var is=Symbol.for(""),Ru=t=>{if(t?.r===is)return t?._$litStatic$},Dn=t=>({_$litStatic$:t,r:is});var rs=new Map,kn=t=>(e,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(o=r[c],(n=Ru(o))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(e[i]),u){let d=s.join("$$lit$$");(e=rs.get(d))===void 0&&(s.raw=s,rs.set(d,e=s)),r=a}return t(e,...r)},Un=kn(Zo),vp=kn(Jo),bp=kn(es);var $n=f(G()),ys=f(E());var _e;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(_e||(_e={}));var Ce=f(L()),g=f(E()),ns=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),We=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),S={fontFamily:We,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},It={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ns),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Nt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ns),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},Dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},kt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},Ut={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Te={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},$t={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},Bt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},Ht={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},$e={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},os=Ce.css`
24
24
  .ft-typography--title {
25
- font-family: ${$e.fontFamily};
26
- font-size: ${$e.fontSize};
27
- font-weight: ${$e.fontWeight};
28
- letter-spacing: ${$e.letterSpacing};
29
- line-height: ${$e.lineHeight};
30
- text-transform: ${$e.textTransform};
31
- }
32
- `,ts=Ct.css`
25
+ font-family: ${It.fontFamily};
26
+ font-size: ${It.fontSize};
27
+ font-weight: ${It.fontWeight};
28
+ letter-spacing: ${It.letterSpacing};
29
+ line-height: ${It.lineHeight};
30
+ text-transform: ${It.textTransform};
31
+ }
32
+ `,ss=Ce.css`
33
33
  .ft-typography--title-dense {
34
- font-family: ${Be.fontFamily};
35
- font-size: ${Be.fontSize};
36
- font-weight: ${Be.fontWeight};
37
- letter-spacing: ${Be.letterSpacing};
38
- line-height: ${Be.lineHeight};
39
- text-transform: ${Be.textTransform};
40
- }
41
- `,es=Ct.css`
34
+ font-family: ${Nt.fontFamily};
35
+ font-size: ${Nt.fontSize};
36
+ font-weight: ${Nt.fontWeight};
37
+ letter-spacing: ${Nt.letterSpacing};
38
+ line-height: ${Nt.lineHeight};
39
+ text-transform: ${Nt.textTransform};
40
+ }
41
+ `,as=Ce.css`
42
42
  .ft-typography--subtitle1 {
43
- font-family: ${He.fontFamily};
44
- font-size: ${He.fontSize};
45
- font-weight: ${He.fontWeight};
46
- letter-spacing: ${He.letterSpacing};
47
- line-height: ${He.lineHeight};
48
- text-transform: ${He.textTransform};
49
- }
50
- `,rs=Ct.css`
43
+ font-family: ${Dt.fontFamily};
44
+ font-size: ${Dt.fontSize};
45
+ font-weight: ${Dt.fontWeight};
46
+ letter-spacing: ${Dt.letterSpacing};
47
+ line-height: ${Dt.lineHeight};
48
+ text-transform: ${Dt.textTransform};
49
+ }
50
+ `,ls=Ce.css`
51
51
  .ft-typography--subtitle2 {
52
- font-family: ${Fe.fontFamily};
53
- font-size: ${Fe.fontSize};
54
- font-weight: ${Fe.fontWeight};
55
- letter-spacing: ${Fe.letterSpacing};
56
- line-height: ${Fe.lineHeight};
57
- text-transform: ${Fe.textTransform};
52
+ font-family: ${kt.fontFamily};
53
+ font-size: ${kt.fontSize};
54
+ font-weight: ${kt.fontWeight};
55
+ letter-spacing: ${kt.letterSpacing};
56
+ line-height: ${kt.lineHeight};
57
+ text-transform: ${kt.textTransform};
58
58
  }
59
59
 
60
- `,ns=Ct.css`
60
+ `,cs=Ce.css`
61
61
  .ft-typography--body1 {
62
- font-family: ${je.fontFamily};
63
- font-size: ${je.fontSize};
64
- font-weight: ${je.fontWeight};
65
- letter-spacing: ${je.letterSpacing};
66
- line-height: ${je.lineHeight};
67
- text-transform: ${je.textTransform};
68
- }
69
- `,is=Ct.css`
62
+ font-family: ${Ut.fontFamily};
63
+ font-size: ${Ut.fontSize};
64
+ font-weight: ${Ut.fontWeight};
65
+ letter-spacing: ${Ut.letterSpacing};
66
+ line-height: ${Ut.lineHeight};
67
+ text-transform: ${Ut.textTransform};
68
+ }
69
+ `,us=Ce.css`
70
70
  .ft-typography--body2 {
71
- font-family: ${Tt.fontFamily};
72
- font-size: ${Tt.fontSize};
73
- font-weight: ${Tt.fontWeight};
74
- letter-spacing: ${Tt.letterSpacing};
75
- line-height: ${Tt.lineHeight};
76
- text-transform: ${Tt.textTransform};
77
- }
78
- `,os=Ct.css`
71
+ font-family: ${Te.fontFamily};
72
+ font-size: ${Te.fontSize};
73
+ font-weight: ${Te.fontWeight};
74
+ letter-spacing: ${Te.letterSpacing};
75
+ line-height: ${Te.lineHeight};
76
+ text-transform: ${Te.textTransform};
77
+ }
78
+ `,ds=Ce.css`
79
79
  .ft-typography--caption {
80
- font-family: ${Ve.fontFamily};
81
- font-size: ${Ve.fontSize};
82
- font-weight: ${Ve.fontWeight};
83
- letter-spacing: ${Ve.letterSpacing};
84
- line-height: ${Ve.lineHeight};
85
- text-transform: ${Ve.textTransform};
86
- }
87
- `,ss=Ct.css`
88
- .ft-typography--breadcrumb {
89
- font-family: ${ze.fontFamily};
90
- font-size: ${ze.fontSize};
91
- font-weight: ${ze.fontWeight};
92
- letter-spacing: ${ze.letterSpacing};
93
- line-height: ${ze.lineHeight};
94
- text-transform: ${ze.textTransform};
95
- }
96
- `,as=Ct.css`
97
- .ft-typography--overline {
98
- font-family: ${Ke.fontFamily};
99
- font-size: ${Ke.fontSize};
100
- font-weight: ${Ke.fontWeight};
101
- letter-spacing: ${Ke.letterSpacing};
102
- line-height: ${Ke.lineHeight};
103
- text-transform: ${Ke.textTransform};
104
- }
105
- `,ls=Ct.css`
106
- .ft-typography--button {
107
80
  font-family: ${$t.fontFamily};
108
81
  font-size: ${$t.fontSize};
109
82
  font-weight: ${$t.fontWeight};
@@ -111,19 +84,46 @@
111
84
  line-height: ${$t.lineHeight};
112
85
  text-transform: ${$t.textTransform};
113
86
  }
114
- `,cs=Ct.css`
87
+ `,ps=Ce.css`
88
+ .ft-typography--breadcrumb {
89
+ font-family: ${Bt.fontFamily};
90
+ font-size: ${Bt.fontSize};
91
+ font-weight: ${Bt.fontWeight};
92
+ letter-spacing: ${Bt.letterSpacing};
93
+ line-height: ${Bt.lineHeight};
94
+ text-transform: ${Bt.textTransform};
95
+ }
96
+ `,fs=Ce.css`
97
+ .ft-typography--overline {
98
+ font-family: ${Ht.fontFamily};
99
+ font-size: ${Ht.fontSize};
100
+ font-weight: ${Ht.fontWeight};
101
+ letter-spacing: ${Ht.letterSpacing};
102
+ line-height: ${Ht.lineHeight};
103
+ text-transform: ${Ht.textTransform};
104
+ }
105
+ `,hs=Ce.css`
106
+ .ft-typography--button {
107
+ font-family: ${$e.fontFamily};
108
+ font-size: ${$e.fontSize};
109
+ font-weight: ${$e.fontWeight};
110
+ letter-spacing: ${$e.letterSpacing};
111
+ line-height: ${$e.lineHeight};
112
+ text-transform: ${$e.textTransform};
113
+ }
114
+ `,ms=Ce.css`
115
115
  .ft-typography {
116
116
  vertical-align: inherit;
117
117
  }
118
- `;var us=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},X=class extends ds.FtLitElement{constructor(){super(...arguments),this.variant=St.body1}render(){return this.element?Oi`
119
- <${Ci(this.element)}
118
+ `;var gs=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Q=class extends ys.FtLitElement{constructor(){super(...arguments),this.variant=_e.body1}render(){return this.element?Un`
119
+ <${Dn(this.element)}
120
120
  part="text"
121
121
  class="ft-typography ft-typography--${this.variant}">
122
122
  <slot></slot>
123
- </${Ci(this.element)}>
124
- `:Oi`
123
+ </${Dn(this.element)}>
124
+ `:Un`
125
125
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
126
- `}};X.styles=[Zo,ts,es,rs,ns,is,os,ss,as,ls,cs];us([(0,Ri.property)()],X.prototype,"element",void 0);us([(0,Ri.property)()],X.prototype,"variant",void 0);var fs=m(E());var ps={"ft-typography":X};(0,fs.customElements)(ps);var hs=m(L()),ne=m(E()),yr={distance:ne.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:ne.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ne.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:ne.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",ne.designSystemVariables.borderRadiusS),maxWidth:ne.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},ms=hs.css`
126
+ `}};Q.styles=[os,ss,as,ls,cs,us,ds,ps,fs,hs,ms];gs([(0,$n.property)()],Q.prototype,"element",void 0);gs([(0,$n.property)()],Q.prototype,"variant",void 0);var bs=f(E());var vs={"ft-typography":Q};(0,bs.customElements)(vs);var xs=f(L()),rt=f(E()),dr={distance:rt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:rt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:rt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:rt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",rt.designSystemVariables.borderRadiusS),maxWidth:rt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Es=xs.css`
127
127
  .ft-tooltip--container {
128
128
  display: block;
129
129
  }
@@ -141,28 +141,28 @@
141
141
  box-sizing: border-box;
142
142
  overflow: hidden;
143
143
  width: max-content;
144
- max-width: ${yr.maxWidth};
144
+ max-width: ${dr.maxWidth};
145
145
  text-align: center;
146
- padding: ${yr.distance};
146
+ padding: ${dr.distance};
147
147
  }
148
148
 
149
149
  .ft-tooltip--content {
150
150
  padding: 4px 8px;
151
- border-radius: ${yr.borderRadiusS};
152
- background-color: ${yr.backgroundColor};
153
- color: ${yr.color};
151
+ border-radius: ${dr.borderRadiusS};
152
+ background-color: ${dr.backgroundColor};
153
+ color: ${dr.color};
154
154
  position: relative;
155
155
  word-break: break-word;
156
156
  }
157
- `;var vs=["top","right","bottom","left"],gs=["start","end"],Li=vs.reduce((e,t)=>e.concat(t,t+"-"+gs[0],t+"-"+gs[1]),[]),br=Math.min,ie=Math.max,xr=Math.round;var Bt=e=>({x:e,y:e}),mu={left:"right",right:"left",bottom:"top",top:"bottom"};function ys(e,t,r){return ie(e,br(t,r))}function Zr(e,t){return typeof e=="function"?e(t):e}function Ar(e){return e.split("-")[0]}function oe(e){return e.split("-")[1]}function Pi(e){return e==="x"?"y":"x"}function Ii(e){return e==="y"?"height":"width"}function tn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Mi(e){return Pi(tn(e))}function bs(e,t,r){r===void 0&&(r=!1);let n=oe(e),i=Mi(e),o=Ii(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=_i(s)),[s,_i(s)]}function xs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function _i(e){let t=Ar(e);return mu[t]+e.slice(t.length)}function gu(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function As(e){return typeof e!="number"?gu(e):{top:e,right:e,bottom:e,left:e}}function xe(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Es(e,t,r){let{reference:n,floating:i}=e,o=tn(t),s=Mi(t),a=Ii(s),l=Ar(t),c=o==="y",u=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2,f;switch(l){case"top":f={x:u,y:n.y-i.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-i.width,y:p};break;default:f={x:n.x,y:n.y}}let h=oe(t);return h&&(f[s]+=d*(h==="end"?1:-1)*(r&&c?-1:1)),f}async function Ss(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:f=0}=Zr(t,e),h=As(f),b=a[d?p==="floating"?"reference":"floating":p],x=xe(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),S=p==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},K=xe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:C,strategy:l}):S);return{top:(x.top-K.top+h.top)/O.y,bottom:(K.bottom-x.bottom+h.bottom)/O.y,left:(x.left-K.left+h.left)/O.x,right:(K.right-x.right+h.right)/O.x}}var vu=50,Ts=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ss},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:p}=Es(c,n,l),d=n,f=0,h={};for(let g=0;g<o.length;g++){let b=o[g];if(!b)continue;let{name:x,fn:S}=b,{x:C,y:O,data:K,reset:j}=await S({x:u,y:p,initialPlacement:n,placement:d,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=C??u,p=O??p,h[x]={...h[x],...K},j&&f<vu&&(f++,typeof j=="object"&&(j.placement&&(d=j.placement),j.rects&&(c=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:u,y:p}=Es(c,d,l)),g=-1)}return{x:u,y:p,placement:d,strategy:i,middlewareData:h}};function yu(e,t,r){return(e?[...r.filter(i=>oe(i)===e),...r.filter(i=>oe(i)!==e)]:r.filter(i=>Ar(i)===i)).filter(i=>e?oe(i)===e||(t?xs(i)!==i:!1):!0)}var Cs=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:p,allowedPlacements:d=Li,autoAlignment:f=!0,...h}=Zr(e,t),g=p!==void 0||d===Li?yu(p||null,f,d):d,b=((r=s.autoPlacement)==null?void 0:r.index)||0,x=g[b];if(x==null)return{};if(a!==x)return{reset:{placement:g[0]}};let S=await l.detectOverflow(t,h),C=bs(x,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[S[Ar(x)],S[C[0]],S[C[1]]],K=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:x,overflows:O}],j=g[b+1];if(j)return{data:{index:b+1,overflows:K},reset:{placement:j}};let Zt=K.map(gt=>{let Et=oe(gt.placement);return[gt.placement,Et&&u?gt.overflows.slice(0,2).reduce((vt,ge)=>vt+ge,0):gt.overflows[0],gt.overflows]}).sort((gt,Et)=>gt[1]-Et[1]),te=((i=Zt.filter(gt=>gt[2].slice(0,oe(gt[0])?2:3).every(Et=>Et<=0))[0])==null?void 0:i[0])||Zt[0][0];return te!==a?{data:{index:b+1,overflows:K},reset:{placement:te}}:{}}}};var ws=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:S=>{let{x:C,y:O}=S;return{x:C,y:O}}},...c}=Zr(e,t),u={x:r,y:n},p=await o.detectOverflow(t,c),d=tn(i),f=Pi(d),h=u[f],g=u[d],b=(S,C)=>ys(C+p[S==="y"?"top":"left"],C,C-p[S==="y"?"bottom":"right"]);s&&(h=b(f,h)),a&&(g=b(d,g));let x=l.fn({...t,[f]:h,[d]:g});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[f]:s,[d]:a}}}}}};function rn(){return typeof window<"u"}function Ee(e){return Rs(e)?(e.nodeName||"").toLowerCase():"#document"}function ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gt(e){var t;return(t=(Rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rs(e){return rn()?e instanceof Node||e instanceof ct(e).Node:!1}function Pt(e){return rn()?e instanceof Element||e instanceof ct(e).Element:!1}function qt(e){return rn()?e instanceof HTMLElement||e instanceof ct(e).HTMLElement:!1}function Os(e){return!rn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ct(e).ShadowRoot}function Er(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=It(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function _s(e){return/^(table|td|th)$/.test(Ee(e))}function Sr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var bu=/transform|translate|scale|rotate|perspective|filter/,xu=/paint|layout|strict|content/,Ae=e=>!!e&&e!=="none",Ni;function We(e){let t=Pt(e)?It(e):e;return Ae(t.transform)||Ae(t.translate)||Ae(t.scale)||Ae(t.rotate)||Ae(t.perspective)||!nn()&&(Ae(t.backdropFilter)||Ae(t.filter))||bu.test(t.willChange||"")||xu.test(t.contain||"")}function Ls(e){let t=se(e);for(;qt(t)&&!Ge(t);){if(We(t))return t;if(Sr(t))return null;t=se(t)}return null}function nn(){return Ni==null&&(Ni=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ni}function Ge(e){return/^(html|body|#document)$/.test(Ee(e))}function It(e){return ct(e).getComputedStyle(e)}function Tr(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function se(e){if(Ee(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Os(e)&&e.host||Gt(e);return Os(t)?t.host:t}function Ps(e){let t=se(e);return Ge(t)?(e.ownerDocument||e).body:qt(t)&&Er(t)?t:Ps(t)}function en(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ps(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=ct(i);if(o){let a=on(s);return t.concat(s,s.visualViewport||[],Er(i)?i:[],a&&r?en(a):[])}else return t.concat(i,en(i,[],r))}function on(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ns(e){let t=It(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qt(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=xr(r)!==o||xr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function Ds(e){return Pt(e)?e:e.contextElement}function qe(e){let t=Ds(e);if(!qt(t))return Bt(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Ns(t),s=(o?xr(r.width):r.width)/n,a=(o?xr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Au=Bt(0);function ks(e){let t=ct(e);return!nn()||!t.visualViewport?Au:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eu(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===ct(e)}function Cr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Ds(e),s=Bt(1);t&&(n?Pt(n)&&(s=qe(n)):s=qe(e));let a=Eu(o,r,n)?ks(o):Bt(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,p=i.height/s.y;if(o&&n){let d=ct(o),f=Pt(n)?ct(n):n,h=d,g=on(h);for(;g&&f!==h;){let b=qe(g),x=g.getBoundingClientRect(),S=It(g),C=x.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,O=x.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=C,c+=O,h=ct(g),g=on(h)}}return xe({width:u,height:p,x:l,y:c})}function sn(e,t){let r=Tr(e).scrollLeft;return t?t.left+r:Cr(Gt(e)).left+r}function Us(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-sn(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Su(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=Gt(n),a=t?Sr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Bt(1),u=Bt(0),p=qt(n);if((p||!o)&&((Ee(n)!=="body"||Er(s))&&(l=Tr(n)),p)){let f=Cr(n);c=qe(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}let d=s&&!p&&!o?Us(s,l):Bt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-l.scrollTop*c.y+u.y+d.y}}function Tu(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cu(e){let t=Tr(e),r=e.ownerDocument.body,n=ie(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=ie(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+sn(e),s=-t.scrollTop;return It(r).direction==="rtl"&&(o+=ie(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var wu=25;function Ou(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=ct(e),o=Gt(e),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let d=!nn()||t==="fixed";n?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(sn(o)<=0){let d=o.ownerDocument,f=d.body,h=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(o.clientWidth-f.clientWidth-g),x=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;x<=wu&&(a-=x)}return{width:a,height:l,x:c,y:u}}function Ru(e,t){let r=Cr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function Is(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Ou(e,r,t);else if(t==="document")n=Cu(Gt(e));else if(Pt(t))n=Ru(t,r);else{let i=ks(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return xe(n)}function _u(e,t){let r=t.get(e);if(r)return r;let n=en(e,[],!1).filter(a=>Pt(a)&&Ee(a)!=="body"),i=null,o=It(e).position==="fixed",s=o?se(e):e;for(;Pt(s)&&!Ge(s);){let a=It(s),l=We(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(p=>p!==s):i=a,s=se(s)}return t.set(e,n),n}function Lu(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?Sr(t)?[]:_u(t,this._c):[].concat(r),n],a=Is(t,s[0],i),l=a.top,c=a.right,u=a.bottom,p=a.left;for(let d=1;d<s.length;d++){let f=Is(t,s[d],i);l=ie(f.top,l),c=br(f.right,c),u=br(f.bottom,u),p=ie(f.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function Pu(e){let{width:t,height:r}=Ns(e);return{width:t,height:r}}function Iu(e,t,r){let n=qt(t),i=Gt(t),o=r==="fixed",s=Cr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Bt(0);if((n||!o)&&((Ee(t)!=="body"||Er(i))&&(a=Tr(t)),n)){let d=Cr(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!n&&i&&(l.x=sn(i));let c=i&&!n&&!o?Us(i,a):Bt(0),u=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Di(e){return It(e).position==="static"}function Ms(e,t){if(!qt(e)||It(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gt(e)===r&&(r=r.ownerDocument.body),r}function $s(e,t){let r=ct(e);if(Sr(e))return r;if(!qt(e)){let i=se(e);for(;i&&!Ge(i);){if(Pt(i)&&!Di(i))return i;i=se(i)}return r}let n=Ms(e,t);for(;n&&_s(n)&&Di(n);)n=Ms(n,t);return n&&Ge(n)&&Di(n)&&!We(n)?r:n||Ls(e)||r}var Mu=async function(e){let t=this.getOffsetParent||$s,r=this.getDimensions,n=await r(e.floating);return{reference:Iu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nu(e){return It(e).direction==="rtl"}var an={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:Gt,getClippingRect:Lu,getOffsetParent:$s,getElementRects:Mu,getClientRects:Tu,getDimensions:Pu,getScale:qe,isElement:Pt,isRTL:Nu};var Bs=Cs,Hs=ws;var Fs=(e,t,r)=>{let n=new Map,i=r??{},o={...an,...i.platform,_c:n};return Ts(e,t,{...i,platform:o})};function js(e){return Du(e)}function ki(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Du(e){for(let t=e;t;t=ki(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ki(e);t;t=ki(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||We(r)||t.tagName==="BODY"))return t}return null}async function ln(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Fs(e,t,{strategy:n.strategy,platform:{...an,getOffsetParent:i=>an.getOffsetParent(i,js)},middleware:[Hs({crossAxis:!0}),Bs({allowedPlacements:[n.placement]})]})}var ar=m(E());var lo=m(W());var Vs=m(W(),1);var Ui=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function zs(e,t){return(0,Vs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return wr(e);try{return JSON.parse(r)}catch{return wr(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Or,...t??{}})}function ku(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ye(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ye(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(e);if(r=o.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Ye(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ye(e,t){try{return ku(e,t)}catch{return!1}}function Or(e,t){return!Ye(e,t)}function wr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function cn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Ks=m(W(),1);var $i=e=>{let t=e??{};return(r,n)=>{var i;let o={hasChanged:Or,attribute:!1,...t};(0,Ks.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var un=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Se=m(W(),1);var dn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Gs=m(L(),1);var pn=globalThis,Uu=pn.ShadowRoot&&(pn.ShadyCSS===void 0||pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Ws=(e,t)=>{if(Uu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=pn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var fn=class extends Gs.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ws(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Ui(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function qs(e,t,...r){var n;let i=e.querySelector(t);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var Qe=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Js,Ys=Symbol("constructorPrototype"),Xs=Symbol("constructorName"),Zs=Symbol("exportpartsDebouncer"),Qs=Symbol("dynamicDependenciesLoaded"),Xe=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Xe.eventName="exportparts-updated";var Ht=class extends fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Js]=new dn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Zs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Xs]=this.constructor.name,this[Ys]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xs]&&Object.setPrototypeOf(this,this[Ys])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Qs]||(r[Qs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Xe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=qs(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,n,i,o,s,a;let l=d=>d!=null&&d.trim().length>0,c=t.filter(l).map(d=>d.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let d of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let f=(o=(i=d.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],h=(a=(s=d.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],g=[...f,...h].filter(l).map(b=>b.trim());for(let b of g)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(d=>c.map(f=>`${d}:${f}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};Js=Zs;Qe([(0,Se.property)()],Ht.prototype,"exportpartsPrefix",void 0);Qe([zs([])],Ht.prototype,"exportpartsPrefixes",void 0);Qe([(0,Se.property)({reflect:!0})],Ht.prototype,"exportparts",void 0);Qe([(0,Se.property)()],Ht.prototype,"customStylesheet",void 0);Qe([(0,Se.property)()],Ht.prototype,"elementToFocus",void 0);Qe([(0,Se.state)()],Ht.prototype,"useAdoptedStyleSheets",void 0);function hn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Rr=Symbol("internalReduxEventsUnsubscribers"),ae=Symbol("internalStoresUnsubscribers"),Te=Symbol("internalStores"),$u=cn(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Te].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Te].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Te].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Te].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Te].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[ae].has(s.store):this[ae].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[ae].set(s,a.subscribe(()=>this.updateFromStores())),this[Rr].set(s,[]),hn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let p=d=>this[u](d);a.addEventListener(c.eventName,p),this[Rr].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ae].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[ae].has(s)&&this[ae].get(s)(),this[ae].delete(s),(a=this[Rr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Rr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ae,r=Te,n=Rr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ta=class extends $u(Ht){};function wt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Yt(e){return!!e&&!!e[D]}function Mt(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Wu})(e)||Array.isArray(e)||!!e[aa]||!!(!((t=e.constructor)===null||t===void 0)&&t[aa])||Gi(e)||qi(e))}function Ce(e,t,r){r===void 0&&(r=!1),tr(e)===0?(r?Object.keys:Ze)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function tr(e){var t=e[D];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gi(e)?2:qi(e)?3:0}function Je(e,t){return tr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bu(e,t){return tr(e)===2?e.get(t):e[t]}function la(e,t,r){var n=tr(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ca(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gi(e){return zu&&e instanceof Map}function qi(e){return Ku&&e instanceof Set}function le(e){return e.o||e.t}function Yi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pa(e);delete t[D];for(var r=Ze(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Xi(e,t){return t===void 0&&(t=!1),Qi(e)||Yt(e)||!Mt(e)||(tr(e)>1&&(e.set=e.add=e.clear=e.delete=Hu),Object.freeze(e),t&&Ce(e,(function(r,n){return Xi(n,!0)}),!0)),e}function Hu(){wt(2)}function Qi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ft(e){var t=Wi[e];return t||wt(18,e),t}function Fu(e,t){Wi[e]||(Wi[e]=t)}function Vi(){return Lr}function Bi(e,t){t&&(Ft("Patches"),e.u=[],e.s=[],e.v=t)}function mn(e){zi(e),e.p.forEach(ju),e.p=null}function zi(e){e===Lr&&(Lr=e.l)}function ea(e){return Lr={p:[],l:Lr,h:e,m:!0,_:0}}function ju(e){var t=e[D];t.i===0||t.i===1?t.j():t.g=!0}function Hi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Ft("ES5").S(t,e,n),n?(r[D].P&&(mn(t),wt(4)),Mt(e)&&(e=gn(t,e),t.l||vn(t,e)),t.u&&Ft("Patches").M(r[D].t,e,t.u,t.s)):e=gn(t,r,[]),mn(t),t.u&&t.v(t.u,t.s),e!==da?e:void 0}function gn(e,t,r){if(Qi(t))return t;var n=t[D];if(!n)return Ce(t,(function(a,l){return ra(e,n,t,a,l,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return vn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Yi(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),Ce(o,(function(a,l){return ra(e,n,i,a,l,r,s)})),vn(e,i,!1),r&&e.u&&Ft("Patches").N(n,r,e.u,e.s)}return n.o}function ra(e,t,r,n,i,o,s){if(Yt(i)){var a=gn(e,i,o&&t&&t.i!==3&&!Je(t.R,n)?o.concat(n):void 0);if(la(r,n,a),!Yt(a))return;e.m=!1}else s&&r.add(i);if(Mt(i)&&!Qi(i)){if(!e.h.D&&e._<1)return;gn(e,i),t&&t.A.l||vn(e,i)}}function vn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Xi(t,r)}function Fi(e,t){var r=e[D];return(r?le(r):e)[t]}function na(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function ce(e){e.P||(e.P=!0,e.l&&ce(e.l))}function ji(e){e.o||(e.o=Yi(e.t))}function Ki(e,t,r){var n=Gi(t)?Ft("MapSet").F(t,r):qi(t)?Ft("MapSet").T(t,r):e.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Vi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Pr;s&&(l=[a],c=_r);var u=Proxy.revocable(l,c),p=u.revoke,d=u.proxy;return a.k=d,a.j=p,d})(t,r):Ft("ES5").J(t,r);return(r?r.A:Vi()).p.push(n),n}function Vu(e){return Yt(e)||wt(22,e),(function t(r){if(!Mt(r))return r;var n,i=r[D],o=tr(r);if(i){if(!i.P&&(i.i<4||!Ft("ES5").K(i)))return i.t;i.I=!0,n=ia(r,o),i.I=!1}else n=ia(r,o);return Ce(n,(function(s,a){i&&Bu(i.t,s)===a||la(n,s,t(a))})),o===3?new Set(n):n})(e)}function ia(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Yi(e)}function ua(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[D];return Pr.get(c,s)},set:function(c){var u=this[D];Pr.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][D];if(!l.P)switch(l.i){case 5:n(l)&&ce(l);break;case 4:r(l)&&ce(l)}}}function r(s){for(var a=s.t,l=s.k,c=Ze(l),u=c.length-1;u>=0;u--){var p=c[u];if(p!==D){var d=a[p];if(d===void 0&&!Je(a,p))return!0;var f=l[p],h=f&&f[D];if(h?h.t!==d:!ca(f,d))return!0}}var g=!!a[D];return c.length!==Ze(a).length+(g?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&wt(3,JSON.stringify(le(s)))}var o={};Fu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,d){if(p){for(var f=Array(d.length),h=0;h<d.length;h++)Object.defineProperty(f,""+h,e(h,!0));return f}var g=pa(d);delete g[D];for(var b=Ze(g),x=0;x<b.length;x++){var S=b[x];g[S]=e(S,p||!!g[S].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,s),u={i:l?5:4,A:a?a.A:Vi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,D,{value:u,writable:!0}),c},S:function(s,a,l){l?Yt(a)&&a[D].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var p=u[D];if(p){var d=p.t,f=p.k,h=p.R,g=p.i;if(g===4)Ce(f,(function(O){O!==D&&(d[O]!==void 0||Je(d,O)?h[O]||c(f[O]):(h[O]=!0,ce(p)))})),Ce(d,(function(O){f[O]!==void 0||Je(f,O)||(h[O]=!1,ce(p))}));else if(g===5){if(n(p)&&(ce(p),h.length=!0),f.length<d.length)for(var b=f.length;b<d.length;b++)h[b]=!1;else for(var x=d.length;x<f.length;x++)h[x]=!0;for(var S=Math.min(f.length,d.length),C=0;C<S;C++)f.hasOwnProperty(C)||(h[C]=!0),h[C]===void 0&&c(f[C])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var oa,Lr,Ji=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",zu=typeof Map<"u",Ku=typeof Set<"u",sa=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",da=Ji?Symbol.for("immer-nothing"):((oa={})["immer-nothing"]=!0,oa),aa=Ji?Symbol.for("immer-draftable"):"__$immer_draftable",D=Ji?Symbol.for("immer-state"):"__$immer_state";var Wu=""+Object.prototype.constructor,Ze=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pa=Object.getOwnPropertyDescriptors||function(e){var t={};return Ze(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Wi={},Pr={get:function(e,t){if(t===D)return e;var r=le(e);if(!Je(r,t))return(function(i,o,s){var a,l=na(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!Mt(n)?n:n===Fi(e.t,t)?(ji(e),e.o[t]=Ki(e.A.h,n,e)):n},has:function(e,t){return t in le(e)},ownKeys:function(e){return Reflect.ownKeys(le(e))},set:function(e,t,r){var n=na(le(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Fi(le(e),t),o=i?.[D];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ca(r,i)&&(r!==void 0||Je(e.t,t)))return!0;ji(e),ce(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Fi(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ji(e),ce(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=le(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){wt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){wt(12)}},_r={};Ce(Pr,(function(e,t){_r[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),_r.deleteProperty=function(e,t){return _r.set.call(this,e,t,void 0)},_r.set=function(e,t,r){return Pr.set.call(this,e[0],t,r,e[0])};var Gu=(function(){function e(r){var n=this;this.O=sa,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(g){var b=this;g===void 0&&(g=a);for(var x=arguments.length,S=Array(x>1?x-1:0),C=1;C<x;C++)S[C-1]=arguments[C];return l.produce(g,(function(O){var K;return(K=o).call.apply(K,[b,O].concat(S))}))}}var c;if(typeof o!="function"&&wt(6),s!==void 0&&typeof s!="function"&&wt(7),Mt(i)){var u=ea(n),p=Ki(n,i,void 0),d=!0;try{c=o(p),d=!1}finally{d?mn(u):zi(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Bi(u,s),Hi(g,u)}),(function(g){throw mn(u),g})):(Bi(u,s),Hi(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===da&&(c=void 0),n.D&&Xi(c,!0),s){var f=[],h=[];Ft("Patches").M(i,c,f,h),s(f,h)}return c}wt(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,p=Array(u>1?u-1:0),d=1;d<u;d++)p[d-1]=arguments[d];return n.produceWithPatches(c,(function(f){return i.apply(void 0,[f].concat(p))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Mt(r)||wt(8),Yt(r)&&(r=Vu(r));var n=ea(this),i=Ki(this,r,void 0);return i[D].C=!0,zi(n),i},t.finishDraft=function(r,n){var i=r&&r[D],o=i.A;return Bi(o,n),Hi(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!sa&&wt(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Ft("Patches").$;return Yt(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},e})(),yt=new Gu,qu=yt.produce,uf=yt.produceWithPatches.bind(yt),df=yt.setAutoFreeze.bind(yt),pf=yt.setUseProxies.bind(yt),ff=yt.applyPatches.bind(yt),hf=yt.createDraft.bind(yt),mf=yt.finishDraft.bind(yt),yn=qu;function we(e){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(e)}function fa(e,t){if(we(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(we(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ha(e){var t=fa(e,"string");return we(t)=="symbol"?t:t+""}function ma(e,t,r){return(t=ha(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ga(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ga(Object(r),!0).forEach(function(n){ma(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function et(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var va=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),to=function(){return Math.random().toString(36).substring(7).split("").join(".")},bn={INIT:"@@redux/INIT"+to(),REPLACE:"@@redux/REPLACE"+to(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+to()}};function Yu(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eo(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(et(1));return r(eo)(e,t)}if(typeof e!="function")throw new Error(et(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(et(3));return o}function p(g){if(typeof g!="function")throw new Error(et(4));if(l)throw new Error(et(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(et(6));b=!1,c();var S=a.indexOf(g);a.splice(S,1),s=null}}}function d(g){if(!Yu(g))throw new Error(et(7));if(typeof g.type>"u")throw new Error(et(8));if(l)throw new Error(et(9));try{l=!0,o=i(o,g)}finally{l=!1}for(var b=s=a,x=0;x<b.length;x++){var S=b[x];S()}return g}function f(g){if(typeof g!="function")throw new Error(et(10));i=g,d({type:bn.REPLACE})}function h(){var g,b=p;return g={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(et(11));function C(){S.next&&S.next(u())}C();var O=b(C);return{unsubscribe:O}}},g[va]=function(){return this},g}return d({type:bn.INIT}),n={dispatch:d,subscribe:p,getState:u,replaceReducer:f},n[va]=h,n}function Xu(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:bn.INIT});if(typeof n>"u")throw new Error(et(12));if(typeof r(void 0,{type:bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(et(13))})}function ya(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var o=Object.keys(r),s,a;try{Xu(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var d=!1,f={},h=0;h<o.length;h++){var g=o[h],b=r[g],x=c[g],S=b(x,u);if(typeof S>"u"){var C=u&&u.type;throw new Error(et(14))}f[g]=S,d=d||S!==x}return d=d||o.length!==Object.keys(c).length,d?f:c}}function er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ba(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(et(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=er.apply(void 0,a)(i.dispatch),Zi(Zi({},i),{},{dispatch:o})}}}function xa(e){var t=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,e):s(a)}}};return t}var Aa=xa();Aa.withExtraArgument=xa;var ro=Aa;var wa=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Qu=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},rr=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},Ju=Object.defineProperty,Zu=Object.defineProperties,td=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,rd=Object.prototype.propertyIsEnumerable,Sa=function(e,t,r){return t in e?Ju(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},ue=function(e,t){for(var r in t||(t={}))ed.call(t,r)&&Sa(e,r,t[r]);if(Ea)for(var n=0,i=Ea(t);n<i.length;n++){var r=i[n];rd.call(t,r)&&Sa(e,r,t[r])}return e},no=function(e,t){return Zu(e,td(t))},nd=function(e,t,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var id=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},Mf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function od(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function de(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return ue(ue({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var sd=(function(e){wa(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,rr([void 0],r[0].concat(this)))):new(t.bind.apply(t,rr([void 0],r.concat(this))))},t})(Array),ad=(function(e){wa(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,rr([void 0],r[0].concat(this)))):new(t.bind.apply(t,rr([void 0],r.concat(this))))},t})(Array);function so(e){return Mt(e)?yn(e,function(){}):e}function ld(e){return typeof e=="boolean"}function cd(){return function(t){return ud(t)}}function ud(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new sd;if(r&&(ld(r)?c.push(ro):c.push(ro.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var p;if(l)var d}return c}var io=!0;function Oa(e){var t=cd(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,p=r.enhancers,d=p===void 0?void 0:p,f;if(typeof i=="function")f=i;else if(od(i))f=ya(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var h=s;if(typeof h=="function"&&(h=h(t),!io&&!Array.isArray(h)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!io&&h.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=ba.apply(void 0,h),b=er;l&&(b=id(ue({trace:!io},typeof l=="object"&&l)));var x=new ad(g),S=x;Array.isArray(d)?S=rr([g],d):typeof d=="function"&&(S=d(x));var C=b.apply(void 0,S);return eo(f,u,C)}function Ra(e){var t={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return e(i),[t,r,n]}function dd(e){return typeof e=="function"}function pd(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Ra(t):[t,r,n],o=i[0],s=i[1],a=i[2],l;if(dd(e))l=function(){return so(e())};else{var c=so(e);l=function(){return c}}function u(p,d){p===void 0&&(p=l());var f=rr([o[d.type]],s.filter(function(h){var g=h.matcher;return g(d)}).map(function(h){var g=h.reducer;return g}));return f.filter(function(h){return!!h}).length===0&&(f=[a]),f.reduce(function(h,g){if(g)if(Yt(h)){var b=h,x=g(b,d);return x===void 0?h:x}else{if(Mt(h))return yn(h,function(S){return g(S,d)});var x=g(h,d);if(x===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}return h},p)}return u.getInitialState=l,u}function fd(e,t){return e+"/"+t}function _a(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:so(e.initialState),n=e.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var p=n[u],d=fd(t,u),f,h;"reducer"in p?(f=p.reducer,h=p.prepare):f=p,o[u]=f,s[d]=f,a[u]=h?de(d,h):de(d)});function l(){var u=typeof e.extraReducers=="function"?Ra(e.extraReducers):[e.extraReducers],p=u[0],d=p===void 0?{}:p,f=u[1],h=f===void 0?[]:f,g=u[2],b=g===void 0?void 0:g,x=ue(ue({},d),s);return pd(r,function(S){for(var C in x)S.addCase(C,x[C]);for(var O=0,K=h;O<K.length;O++){var j=K[O];S.addMatcher(j.matcher,j.reducer)}b&&S.addDefaultCase(b)})}var c;return{name:t,reducer:function(u,p){return c||(c=l()),c(u,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var hd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",md=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=hd[Math.random()*64|0];return t},gd=["name","message","stack","code"],oo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ta=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),vd=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=gd;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},Uf=(function(){function e(t,r,n){var i=de(t+"/fulfilled",function(u,p,d,f){return{payload:u,meta:no(ue({},f||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),o=de(t+"/pending",function(u,p,d){return{payload:void 0,meta:no(ue({},d||{}),{arg:p,requestId:u,requestStatus:"pending"})}}),s=de(t+"/rejected",function(u,p,d,f,h){return{payload:f,error:(n&&n.serializeError||vd)(u||"Rejected"),meta:no(ue({},h||{}),{arg:d,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(p,d,f){var h=n?.idGenerator?n.idGenerator(u):md(),g=new l,b,x=!1;function S(O){b=O,g.abort()}var C=(function(){return nd(this,null,function(){var O,K,j,Zt,fi,te,gt;return Qu(this,function(Et){switch(Et.label){case 0:return Et.trys.push([0,4,,5]),Zt=(O=n?.condition)==null?void 0:O.call(n,u,{getState:d,extra:f}),bd(Zt)?[4,Zt]:[3,2];case 1:Zt=Et.sent(),Et.label=2;case 2:if(Zt===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=!0,fi=new Promise(function(vt,ge){return g.signal.addEventListener("abort",function(){return ge({name:"AbortError",message:b||"Aborted"})})}),p(o(h,u,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:h,arg:u},{getState:d,extra:f}))),[4,Promise.race([fi,Promise.resolve(r(u,{dispatch:p,getState:d,extra:f,requestId:h,signal:g.signal,abort:S,rejectWithValue:function(vt,ge){return new oo(vt,ge)},fulfillWithValue:function(vt,ge){return new Ta(vt,ge)}})).then(function(vt){if(vt instanceof oo)throw vt;return vt instanceof Ta?i(vt.payload,h,u,vt.meta):i(vt,h,u)})])];case 3:return j=Et.sent(),[3,5];case 4:return te=Et.sent(),j=te instanceof oo?s(null,h,u,te.payload,te.meta):s(te,h,u),[3,5];case 5:return gt=n&&!n.dispatchConditionRejection&&s.match(j)&&j.meta.condition,gt||p(j),[2,j]}})})})();return Object.assign(C,{abort:S,requestId:h,arg:u,unwrap:function(){return C.then(yd)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function yd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function bd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var La="listener",Pa="completed",Ia="cancelled",$f="task-"+Ia,Bf="task-"+Pa,Hf=La+"-"+Ia,Ff=La+"-"+Pa;var ao="listenerMiddleware";var jf=de(ao+"/add"),Vf=de(ao+"/removeAll"),zf=de(ao+"/remove");var Ca,Kf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ca||(Ca=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},xd=function(e){return function(t){setTimeout(t,e)}},Wf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xd(10);ua();var Ad=cn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),xn=class extends Ad(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ma=class e extends xn{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,o=window.ftReduxStores[n];if(hn(o))return o;if(i==null)return;let s=_a({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=Oa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=wr(s.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new e(s,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new un;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let p=c(...u.map(i));return this.reduxStore.dispatch(p),p}:u=>{let p=l,d=this.getState()[p];Ye(d,u)||this.setState({[p]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var An=class{static format(t,r,n,i,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(t,r,n,i,!!o)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var En=m(E()),Ed="ft-app-info",Xt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Xt.eventName="authentication-change";var Ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ir.eventName="ui-locale-changed";var Sd={session:(e,t)=>{(0,En.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Xt(t.payload)),0))}},A=En.FtReduxStore.get({name:Ed,reducers:Sd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Na=m(E()),Sn=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Da=(0,Na.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>An.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sn([(0,lo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Sn([(0,lo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Sn([$i({store:A.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Sn([$i({store:A.name})],t.prototype,"uiLocale",void 0),t});var ka;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ka||(ka={}));var Ua;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Ua||(Ua={}));var $a;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})($a||($a={}));var Ba;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Ba||(Ba={}));var Ha;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ha||(Ha={}));var Fa;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Fa||(Fa={}));var Tn;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Tn||(Tn={}));var ja;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(ja||(ja={}));var Va;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Va||(Va={}));var za;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(za||(za={}));var Ka;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Ka||(Ka={}));var Wa;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Wa||(Wa={}));var Ga;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ga||(Ga={}));var qa;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(qa||(qa={}));var Ya;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ya||(Ya={}));var Xa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Xa||(Xa={}));var Qa;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Qa||(Qa={}));var Ja;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ja||(Ja={}));var Za;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Za||(Za={}));var tl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(tl||(tl={}));var el;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var Cn;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Cn||(Cn={}));var rl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(rl||(rl={}));var nl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(nl||(nl={}));var il;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(il||(il={}));var ol;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ol||(ol={}));var sl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(sl||(sl={}));var M;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(M||(M={}));var Ot;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ot||(Ot={}));var al;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(al||(al={}));var ll;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ll||(ll={}));var cl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(cl||(cl={}));var ul;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ul||(ul={}));var dl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(dl||(dl={}));var pl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(pl||(pl={}));var fl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(fl||(fl={}));var hl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(hl||(hl={}));var ml;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ml||(ml={}));var gl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(gl||(gl={}));var vl;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(vl||(vl={}));var yl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(yl||(yl={}));var Td={[M.PERSONAL_BOOK_SHARE_USER]:[M.PERSONAL_BOOK_USER],[M.HTML_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.PDF_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.KHUB_ADMIN]:[M.CONTENT_PUBLISHER],[M.ADMIN]:[M.KHUB_ADMIN,M.USERS_ADMIN,M.PORTAL_ADMIN,M.BEHAVIOR_DATA_USER],[M.GENERATIVE_AI_EXPORT_USER]:[M.GENERATIVE_AI_USER]};function bl(e,t){return e===t||(Td[e]??[]).some(r=>bl(r,t))}function Qt(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>bl(n,t))}var Ln=m(E());var co=m(E());var Oe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=A.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=A.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var nr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Oe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Oe.await()}};var rt=class extends nr{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new co.CacheRegistry,this.cache=t?i.commonCache:new co.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var wn=class extends rt{async listMySearches(){let{session:t}=A.getState();return Qt(t,M.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var On=class extends rt{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Rn=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var _n=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Cd="ft-user-assets",wd={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Ot).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;po(e,r,[...uo(e,r),i]),xl(e,r,1,n),Al(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;po(e,r,uo(e,r).map(i=>i.id===n.id?n:i)),Al(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;po(e,r,uo(e,r).filter(o=>o.id!==i)),xl(e,r,-1,n)}},El={[Ot.SEARCHES]:"savedSearches",[Ot.BOOKMARKS]:"bookmarks",[Ot.BOOKS]:void 0,[Ot.COLLECTIONS]:void 0},uo=(e,t)=>{var r;let n=El[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},po=(e,t,r)=>{let n=El[t];n&&(e[n]=r)},xl=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===Ot.BOOKMARKS&&n)){let o=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Al=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},st=Ln.FtReduxStore.get({name:Cd,reducers:wd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ot).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),fo=class{constructor(t=new Rn,r=new _n){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new On,this.savedSearchesService=new wn,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,Ln.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),st.actions.clearAssetCount(),st.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),st.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),st.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();st.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();st.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&st.getState().assetCounts.allAsset[t]!==r.count&&st.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&st.getState().assetCounts.bookmarkByMap[t]!==r.count&&st.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(st.getState().assetCounts.bookmarkByMap).length!==0;t===Ot.BOOKMARKS&&r&&st.actions.clearBookmarkCountByMap(),st.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;st.actions.bookmarks(r)}}},ho=new fo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ho);var mo=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new mo;var Rt=m(E());var Sl,ir=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Od=Symbol("clearAfterUnitTest"),Pn=class extends(0,Rt.withEventBus)(rt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Sl]=()=>{this.defaultMessages={},this.cache=new Rt.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Rt.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let o=t.toLowerCase(),s=this.resolveContext(o);return new Rt.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof Rt.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new ir({loadedContexts:t})),this.dispatchEvent(new ir({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new ir({loadedContexts:[t]})),this.dispatchEvent(new ir({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Rt.delay)(0).then(()=>n()).catch(()=>null)))}};Sl=Od;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var or=window.FluidTopicsI18nService,In=window.FluidTopicsCustomI18nService;var Tl=m(E()),go=class{highlightHtml(t,r,n){(0,Tl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new go;var Cl=m(E());var vo=class{isDate(t){var r,n,i,o;return(o=(i=((n=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(t,r){var n,i,o,s;if(t==null)return"";try{return Cl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:A.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new vo;var wl=m(E());var Mr=class{static get(t,r){var n,i,o,s;let a=A.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new wl.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Mn=class extends rt{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).map(([n,i])=>Array.isArray(i)?[n,i.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof i=="object"&&i!==null?[n,this.sortEventArrays(i)]:[n,i]);return Object.fromEntries(r)}sendEvents(t,r){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>n).catch(i=>(console.info(r),console.debug(i),n)),1e3)}};var yo=class{urlToSearchRequest(t){return Mr.get().parse(t)}searchRequestToUrl(t){return Mr.get().serialize(t)}};window.FluidTopicsUrlService=new yo;var Jt=m(E());var Re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Re.eventName="change";var bo=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ol=new bo;var Nn=class e extends Jt.WithEventBus{static build(){return new e(window.history,Ol,()=>window.location,!1)}constructor(t,r,n,i){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Jt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Re(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Re.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Re.eventName,t)}currentItem(){return(0,Jt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Jt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Jt.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Jt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Nn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Rl=m(L());var _l=Rl.css`
158
- `;var Il=m(L()),ut=m(W()),Pe=m(E());var _e=m(E());function Ll(e,t){let{authenticationRequired:r,session:n}=A.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Dn=class extends nr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var xo=class e extends _e.FtStateManager{static build(t){return new e(A,t)}constructor(t,r){super(),this.store=t,this.cache=new _e.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Dn,this.cleanSessionDebouncer=new _e.Debouncer,this.reloadDebouncer=new _e.Debouncer(500),this.apiProvider=r??(()=>Oe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Xt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Ll(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ir(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Pl=xo.build();var Le=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Nr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Le(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Q=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},U=class extends Pe.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Pl,this.contextRoot=new Nr}render(){return Il.html`
157
+ `;var As=["top","right","bottom","left"],Ss=["start","end"],Hn=As.reduce((t,e)=>t.concat(e,e+"-"+Ss[0],e+"-"+Ss[1]),[]),pr=Math.min,it=Math.max,fr=Math.round;var Be=t=>({x:t,y:t}),Ou={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(t,e,r){return it(t,pr(e,r))}function Yr(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Fn(t){return t==="x"?"y":"x"}function Vn(t){return t==="y"?"height":"width"}function Xr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function jn(t){return Fn(Xr(t))}function Ts(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=jn(t),o=Vn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Bn(s)),[s,Bn(s)]}function Cs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Bn(t){let e=hr(t);return Ou[e]+t.slice(e.length)}function Pu(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function ws(t){return typeof t!="number"?Pu(t):{top:t,right:t,bottom:t,left:t}}function gt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function Rs(t,e,r){let{reference:i,floating:n}=t,o=Xr(e),s=jn(e),a=Vn(s),l=hr(e),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let v=nt(e);return v&&(h[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),h}async function Os(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Yr(e,t),v=ws(h),y=a[p?d==="floating"?"reference":"floating":d],_=gt(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),P=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(x))&&await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1},O=gt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:P,offsetParent:x,strategy:l}):P);return{top:(_.top-O.top+v.top)/C.y,bottom:(O.bottom-_.bottom+v.bottom)/C.y,left:(_.left-O.left+v.left)/C.x,right:(O.right-_.right+v.right)/C.x}}var Lu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Os},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Rs(c,i,l),p=i,h=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:P}=y,{x,y:C,data:O,reset:V}=await P({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=x??u,d=C??d,v[_]={...v[_],...O},V&&h<Lu&&(h++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):V.rects),{x:u,y:d}=Rs(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Mu(t,e,r){return(t?[...r.filter(n=>nt(n)===t),...r.filter(n=>nt(n)!==t)]:r.filter(n=>hr(n)===n)).filter(n=>t?nt(n)===t||(e?Cs(n)!==n:!1):!0)}var Ls=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Hn,autoAlignment:h=!0,...v}=Yr(t,e),A=d!==void 0||p===Hn?Mu(d||null,h,p):p,y=((r=s.autoPlacement)==null?void 0:r.index)||0,_=A[y];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let P=await l.detectOverflow(e,v),x=Ts(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[P[hr(_)],P[x[0]],P[x[1]]],O=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:C}],V=A[y+1];if(V)return{data:{index:y+1,overflows:O},reset:{placement:V}};let D=O.map(Ae=>{let pt=nt(Ae.placement);return[Ae.placement,pt&&u?Ae.overflows.slice(0,2).reduce((hu,mu)=>hu+mu,0):Ae.overflows[0],Ae.overflows]}).sort((Ae,pt)=>Ae[1]-pt[1]),sr=((n=D.filter(Ae=>Ae[2].slice(0,nt(Ae[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return sr!==a?{data:{index:y+1,overflows:O},reset:{placement:sr}}:{}}}};var Ms=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:P=>{let{x,y:C}=P;return{x,y:C}}},...c}=Yr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Xr(n),h=Fn(p),v=u[h],A=u[p],y=(P,x)=>_s(x+d[P==="y"?"top":"left"],x,x-d[P==="y"?"bottom":"right"]);s&&(v=y(h,v)),a&&(A=y(p,A));let _=l.fn({...e,[h]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[h]:s,[p]:a}}}}}};function Zr(){return typeof window<"u"}function vt(t){return Ns(t)?(t.nodeName||"").toLowerCase():"#document"}function de(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ge(t){var e;return(e=(Ns(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ns(t){return Zr()?t instanceof Node||t instanceof de(t).Node:!1}function Le(t){return Zr()?t instanceof Element||t instanceof de(t).Element:!1}function qe(t){return Zr()?t instanceof HTMLElement||t instanceof de(t).HTMLElement:!1}function Is(t){return!Zr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof de(t).ShadowRoot}function mr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Me(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function Ds(t){return/^(table|td|th)$/.test(vt(t))}function gr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Iu=/transform|translate|scale|rotate|perspective|filter/,Nu=/paint|layout|strict|content/,yt=t=>!!t&&t!=="none",zn;function Ft(t){let e=Le(t)?Me(t):t;return yt(e.transform)||yt(e.translate)||yt(e.scale)||yt(e.rotate)||yt(e.perspective)||!Jr()&&(yt(e.backdropFilter)||yt(e.filter))||Iu.test(e.willChange||"")||Nu.test(e.contain||"")}function ks(t){let e=ot(t);for(;qe(e)&&!Vt(e);){if(Ft(e))return e;if(gr(e))return null;e=ot(e)}return null}function Jr(){return zn==null&&(zn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zn}function Vt(t){return/^(html|body|#document)$/.test(vt(t))}function Me(t){return de(t).getComputedStyle(t)}function yr(t){return Le(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(vt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Is(t)&&t.host||Ge(t);return Is(e)?e.host:e}function Us(t){let e=ot(t);return Vt(e)?(t.ownerDocument||t).body:qe(e)&&mr(e)?e:Us(e)}function Qr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=Us(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=de(n);if(o){let a=ei(s);return e.concat(s,s.visualViewport||[],mr(n)?n:[],a&&r?Qr(a):[])}else return e.concat(n,Qr(n,[],r))}function ei(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Me(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=qe(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=fr(r)!==o||fr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Fs(t){return Le(t)?t:t.contextElement}function jt(t){let e=Fs(t);if(!qe(e))return Be(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?fr(r.width):r.width)/i,a=(o?fr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Du=Be(0);function Vs(t){let e=de(t);return!Jr()||!e.visualViewport?Du:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ku(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===de(t)}function vr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Fs(t),s=Be(1);e&&(i?Le(i)&&(s=jt(i)):s=jt(t));let a=ku(o,r,i)?Vs(o):Be(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o&&i){let p=de(o),h=Le(i)?de(i):i,v=p,A=ei(v);for(;A&&h!==v;){let y=jt(A),_=A.getBoundingClientRect(),P=Me(A),x=_.left+(A.clientLeft+parseFloat(P.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(P.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=C,v=de(A),A=ei(v)}}return gt({width:u,height:d,x:l,y:c})}function ti(t,e){let r=yr(t).scrollLeft;return e?e.left+r:vr(Ge(t)).left+r}function js(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ti(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Uu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Ge(i),a=e?gr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Be(1),u=Be(0),d=qe(i);if((d||!o)&&((vt(i)!=="body"||mr(s))&&(l=yr(i)),d)){let h=vr(i);c=jt(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?js(s,l):Be(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function $u(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Bu(t){let e=yr(t),r=t.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+ti(t),s=-e.scrollTop;return Me(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Hu=25;function Fu(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=de(t),o=Ge(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Jr()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ti(o)<=0){let p=o.ownerDocument,h=p.body,v=getComputedStyle(h),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-h.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Hu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function Vu(t,e){let r=vr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=jt(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function $s(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Fu(t,r,e);else if(e==="document")i=Bu(Ge(t));else if(Le(e))i=Vu(e,r);else{let n=Vs(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return gt(i)}function ju(t,e){let r=e.get(t);if(r)return r;let i=Qr(t,[],!1).filter(a=>Le(a)&&vt(a)!=="body"),n=null,o=Me(t).position==="fixed",s=o?ot(t):t;for(;Le(s)&&!Vt(s);){let a=Me(s),l=Ft(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==s):n=a,s=ot(s)}return e.set(t,i),i}function zu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?gr(e)?[]:ju(e,this._c):[].concat(r),i],a=$s(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=$s(e,s[p],n);l=it(h.top,l),c=pr(h.right,c),u=pr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ku(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function Wu(t,e,r){let i=qe(e),n=Ge(e),o=r==="fixed",s=vr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Be(0);if((i||!o)&&((vt(e)!=="body"||mr(n))&&(a=yr(e)),i)){let p=vr(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ti(n));let c=n&&!i&&!o?js(n,a):Be(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Kn(t){return Me(t).position==="static"}function Bs(t,e){if(!qe(t)||Me(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ge(t)===r&&(r=r.ownerDocument.body),r}function zs(t,e){let r=de(t);if(gr(t))return r;if(!qe(t)){let n=ot(t);for(;n&&!Vt(n);){if(Le(n)&&!Kn(n))return n;n=ot(n)}return r}let i=Bs(t,e);for(;i&&Ds(i)&&Kn(i);)i=Bs(i,e);return i&&Vt(i)&&Kn(i)&&!Ft(i)?r:i||ks(t)||r}var Gu=async function(t){let e=this.getOffsetParent||zs,r=this.getDimensions,i=await r(t.floating);return{reference:Wu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function qu(t){return Me(t).direction==="rtl"}var ri={convertOffsetParentRelativeRectToViewportRelativeRect:Uu,getDocumentElement:Ge,getClippingRect:zu,getOffsetParent:zs,getElementRects:Gu,getClientRects:$u,getDimensions:Ku,getScale:jt,isElement:Le,isRTL:qu};var Ks=Ls,Ws=Ms;var Gs=(t,e,r)=>{let i=new Map,n=r??{},o={...ri,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function qs(t){return Yu(t)}function Wn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Yu(t){for(let e=t;e;e=Wn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Wn(t);e;e=Wn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Ft(r)||e.tagName==="BODY"))return e}return null}async function ii(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},Gs(t,e,{strategy:i.strategy,platform:{...ri,getOffsetParent:n=>ri.getOffsetParent(n,qs)},middleware:[Ws({crossAxis:!0}),Ks({allowedPlacements:[i.placement]})]})}var Jt=f(E());var mo=f(G());var Ys=f(G(),1);var Gn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Xs(t,e){return(0,Ys.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return br(t);try{return JSON.parse(r)}catch{return br(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:xr,...e??{}})}function Xu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!zt(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!zt(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[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 n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!zt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function zt(t,e){try{return Xu(t,e)}catch{return!1}}function xr(t,e){return!zt(t,e)}function br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ni(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Qs=f(G(),1);var qn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:xr,attribute:!1,...e};(0,Qs.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var oi=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var bt=f(G(),1);var si=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Js=f(L(),1);var ai=globalThis,Qu=ai.ShadowRoot&&(ai.ShadyCSS===void 0||ai.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Zs=(t,e)=>{if(Qu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ai.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var li=class extends Js.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Zs(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Gn(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ea(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Wt=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},na,ta=Symbol("constructorPrototype"),ra=Symbol("constructorName"),oa=Symbol("exportpartsDebouncer"),ia=Symbol("dynamicDependenciesLoaded"),Kt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Kt.eventName="exportparts-updated";var He=class extends li{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[na]=new si(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[oa].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ra]=this.constructor.name,this[ta]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ra]&&Object.setPrototypeOf(this,this[ta])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[ia]||(r[ia]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Kt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Kt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Kt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ea(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&a!==void 0?a:[],A=[...h,...v].filter(l).map(y=>y.trim());for(let y of A)u.add(y)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};na=oa;Wt([(0,bt.property)()],He.prototype,"exportpartsPrefix",void 0);Wt([Xs([])],He.prototype,"exportpartsPrefixes",void 0);Wt([(0,bt.property)({reflect:!0})],He.prototype,"exportparts",void 0);Wt([(0,bt.property)()],He.prototype,"customStylesheet",void 0);Wt([(0,bt.property)()],He.prototype,"elementToFocus",void 0);Wt([(0,bt.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function ci(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Zu=ni(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[xt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[st].has(s.store):this[st].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[st].set(s,a.subscribe(()=>this.updateFromStores())),this[Er].set(s,[]),ci(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Er].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[st].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[st].has(s)&&this[st].get(s)(),this[st].delete(s),(a=this[Er].get(s))===null||a===void 0||a.forEach(l=>l()),this[Er].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=xt,i=Er,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),sa=class extends Zu(He){};function Z(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Ju=typeof Symbol=="function"&&Symbol.observable||"@@observable",aa=Ju,Yn=()=>Math.random().toString(36).substring(7).split("").join("."),ed={INIT:`@@redux/INIT${Yn()}`,REPLACE:`@@redux/REPLACE${Yn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yn()}`},ui=ed;function di(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Xn(t,e,r){if(typeof t!="function")throw new Error(Z(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Z(1));return r(Xn)(t,e)}let i=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((y,_)=>{s.set(_,y)}))}function u(){if(l)throw new Error(Z(3));return n}function d(y){if(typeof y!="function")throw new Error(Z(4));if(l)throw new Error(Z(5));let _=!0;c();let P=a++;return s.set(P,y),function(){if(_){if(l)throw new Error(Z(6));_=!1,c(),s.delete(P),o=null}}}function p(y){if(!di(y))throw new Error(Z(7));if(typeof y.type>"u")throw new Error(Z(8));if(typeof y.type!="string")throw new Error(Z(17));if(l)throw new Error(Z(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(P=>{P()}),y}function h(y){if(typeof y!="function")throw new Error(Z(10));i=y,p({type:ui.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Z(11));function P(){let C=_;C.next&&C.next(u())}return P(),{unsubscribe:y(P)}},[aa](){return this}}}return p({type:ui.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:h,[aa]:v}}function td(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:ui.INIT})>"u")throw new Error(Z(12));if(typeof r(void 0,{type:ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function la(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,o;try{td(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],h=r[p],v=a[p],A=h(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(Z(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Sr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ca(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(Z(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Sr(...a)(n.dispatch),{...n,dispatch:o}}}function ua(t){return di(t)&&"type"in t&&typeof t.type=="string"}var ba=Symbol.for("immer-nothing"),da=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function Ie(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,qt=ve.getPrototypeOf,mi="constructor",Ei="prototype",eo="configurable",gi="enumerable",fi="writable",Ar="value",Fe=t=>!!t&&!!t[ie];function be(t){return t?xa(t)||Ai(t)||!!t[da]||!!t[mi]?.[da]||_i(t)||Ti(t):!1}var rd=ve[Ei][mi].toString(),pa=new WeakMap;function xa(t){if(!t||!lo(t))return!1;let e=qt(t);if(e===null||e===ve[Ei])return!0;let r=ve.hasOwnProperty.call(e,mi)&&e[mi];if(r===Object)return!0;if(!Gt(r))return!1;let i=pa.get(r);return i===void 0&&(i=Function.toString.call(r),pa.set(r,i)),i===rd}function Si(t,e,r=!0){Cr(t)===0?(r?Reflect.ownKeys(t):ve.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Cr(t){let e=t[ie];return e?e.type_:Ai(t)?1:_i(t)?2:Ti(t)?3:0}var Qn=(t,e,r=Cr(t))=>r===2?t.has(e):ve[Ei].hasOwnProperty.call(t,e),to=(t,e,r=Cr(t))=>r===2?t.get(e):t[e],yi=(t,e,r,i=Cr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function id(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ai=Array.isArray,_i=t=>t instanceof Map,Ti=t=>t instanceof Set,lo=t=>typeof t=="object",Gt=t=>typeof t=="function",Zn=t=>typeof t=="boolean";function nd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Ye=t=>t.copy_||t.base_;var co=t=>t.modified_?t.copy_:t.base_;function ro(t,e){if(_i(t))return new Map(t);if(Ti(t))return new Set(t);if(Ai(t))return Array[Ei].slice.call(t);let r=xa(t);if(e===!0||e==="class_only"&&!r){let i=ve.getOwnPropertyDescriptors(t);delete i[ie];let n=Reflect.ownKeys(i);for(let o=0;o<n.length;o++){let s=n[o],a=i[s];a[fi]===!1&&(a[fi]=!0,a[eo]=!0),(a.get||a.set)&&(i[s]={[eo]:!0,[fi]:!0,[gi]:a[gi],[Ar]:t[s]})}return ve.create(qt(t),i)}else{let i=qt(t);if(i!==null&&r)return{...t};let n=ve.create(i);return ve.assign(n,t)}}function uo(t,e=!1){return Ci(t)||Fe(t)||!be(t)||(Cr(t)>1&&ve.defineProperties(t,{set:pi,add:pi,clear:pi,delete:pi}),ve.freeze(t),e&&Si(t,(r,i)=>{uo(i,!0)},!1)),t}function od(){Ie(2)}var pi={[Ar]:od};function Ci(t){return t===null||!lo(t)?!0:ve.isFrozen(t)}var vi="MapSet",io="Patches",fa="ArrayMethods",Ea={};function Et(t){let e=Ea[t];return e||Ie(0,t),e}var ha=t=>!!Ea[t];var _r,Sa=()=>_r,sd=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ha(vi)?Et(vi):void 0,arrayMethodsPlugin_:ha(fa)?Et(fa):void 0});function ma(t,e){e&&(t.patchPlugin_=Et(io),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function no(t){oo(t),t.drafts_.forEach(ad),t.drafts_=null}function oo(t){t===_r&&(_r=t.parent_)}var ga=t=>_r=sd(_r,t);function ad(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ya(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(no(e),Ie(4)),be(t)&&(t=va(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=va(e,r);return ld(e,t,!0),no(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ba?t:void 0}function va(t,e){if(Ci(e))return e;let r=e[ie];if(!r)return bi(e,t.handledSet_,t);if(!wi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Ta(r,t)}return r.copy_}function ld(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&uo(e,r)}function Aa(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var wi=(t,e)=>t.scope_===e,cd=[];function _a(t,e,r,i){let n=Ye(t),o=t.type_;if(i!==void 0&&to(n,i,o)===e){yi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Si(n,(l,c)=>{if(Fe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??cd;for(let a of s)yi(n,a,r,o)}function ud(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!wi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=co(o);_a(t,o.draft_??o,s,r),Ta(o,n)})}function Ta(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let n=i.getPath(t);n&&i.generatePatches_(t,n,e)}Aa(t)}}function dd(t,e,r){let{scope_:i}=t;if(Fe(r)){let n=r[ie];wi(n,i)&&n.callbacks_.push(function(){hi(t);let s=co(n);_a(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Ye(t);t.type_===3?o.has(r)&&bi(r,i.handledSet_,i):to(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&bi(to(t.copy_,e,t.type_),i.handledSet_,i)})}function bi(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Fe(t)||e.has(t)||!be(t)||Ci(t)||(e.add(t),Si(t,(i,n)=>{if(Fe(n)){let o=n[ie];if(wi(o,r)){let s=co(o);yi(t,i,s,t.type_),Aa(o)}}else be(n)&&bi(n,e,r)})),t}function pd(t,e){let r=Ai(t),i={type_:r?1:0,scope_:e?e.scope_:Sa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,o=xi;r&&(n=[i],o=Tr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var xi={get(t,e){if(e===ie)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let n=Ye(t);if(!Qn(n,e,t.type_))return hd(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&nd(e))return o;if(o===Jn(t.base_,e)||fd(t,e,o)){hi(t);let s=t.type_===1?+e:e,a=ao(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Ye(t)},ownKeys(t){return Reflect.ownKeys(Ye(t))},set(t,e,r){let i=Ca(Ye(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=Jn(Ye(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(id(r,n)&&(r!==void 0||Qn(t.base_,e,t.type_)))return!0;hi(t),so(t)}return t.copy_[e]===r&&(r!==void 0||Qn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),dd(t,e,r)),!0},deleteProperty(t,e){return hi(t),Jn(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),so(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Ye(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[fi]:!0,[eo]:t.type_!==1||e!=="length",[gi]:i[gi],[Ar]:r[e]}},defineProperty(){Ie(11)},getPrototypeOf(t){return qt(t.base_)},setPrototypeOf(){Ie(12)}},Tr={};for(let t in xi){let e=xi[t];Tr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Tr.deleteProperty=function(t,e){return Tr.set.call(this,t,e,void 0)};Tr.set=function(t,e,r){return xi.set.call(this,t[0],e,r,t[0])};function Jn(t,e){let r=t[ie];return(r?Ye(r):t)[e]}function fd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function hd(t,e,r){let i=Ca(e,r);return i?Ar in i?i[Ar]:i.get?.call(t.draft_):void 0}function Ca(t,e){if(!(e in t))return;let r=qt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=qt(r)}}function so(t){t.modified_||(t.modified_=!0,t.parent_&&so(t.parent_))}function hi(t){t.copy_||(t.assigned_=new Map,t.copy_=ro(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var md=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Gt(e)&&!Gt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}Gt(r)||Ie(6),i!==void 0&&!Gt(i)&&Ie(7);let n;if(be(e)){let o=ga(this),s=ao(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?no(o):oo(o)}return ma(o,i),ya(n,o)}else if(!e||!lo(e)){if(n=r(e),n===void 0&&(n=e),n===ba&&(n=void 0),this.autoFreeze_&&uo(n,!0),i){let o=[],s=[];Et(io).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else Ie(1,e)},this.produceWithPatches=(e,r)=>{if(Gt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,n;return[this.produce(e,r,(s,a)=>{i=s,n=a}),i,n]},Zn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Zn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Zn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||Ie(8),Fe(t)&&(t=wa(t));let e=ga(this),r=ao(e,t,void 0);return r[ie].isManual_=!0,oo(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&Ie(9);let{scope_:i}=r;return ma(i,e),ya(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));let i=Et(io).applyPatches_;return Fe(t)?i(t,e):this.produce(t,n=>i(n,e))}};function ao(t,e,r,i){let[n,o]=_i(e)?Et(vi).proxyMap_(e,r):Ti(e)?Et(vi).proxySet_(e,r):pd(e,r);return(r?.scope_??Sa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?ud(r,o,i):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function wa(t){return Fe(t)||Ie(10,t),Ra(t)}function Ra(t){if(!be(t)||Ci(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=ro(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=ro(t,!0);return Si(r,(n,o)=>{yi(r,n,Ra(o))},i),e&&(e.finalized_=!1),r}var gd=new md,po=gd.produce;function Oa(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=Oa(),La=Oa;var yd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Sr:Sr.apply(null,arguments)},Vf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},vd=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Xe(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>ua(i)&&i.type===t,r}var ka=class wr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,wr.prototype)}static get[Symbol.species](){return wr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new wr(...e[0].concat(this)):new wr(...e.concat(this))}};function Ma(t){return be(t)?po(t,()=>{}):t}function Ri(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function bd(t){return typeof t=="boolean"}var xd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new ka;return r&&(bd(r)?s.push(Pa):s.push(La(r.extraArgument))),s},Ed="RTK_autoBatch";var Ia=t=>e=>{setTimeout(e,t)},Sd=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},Ad=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Sd(window.requestAnimationFrame,100):Ia(10):t.type==="callback"?t.queueNotification:Ia(t.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Ed],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},_d=t=>function(r){let{autoBatch:i=!0}=r??{},n=new ka(t);return i&&n.push(Ad(typeof i=="object"?i:void 0)),n};function Ua(t){let e=xd(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(di(r))l=la(r);else throw new Error(Xe(1));let c;typeof i=="function"?c=i(e):c=e();let u=Sr;n&&(u=yd({trace:!1,...typeof n=="object"&&n}));let d=ca(...c),p=_d(d),h=typeof a=="function"?a(p):p(),v=u(...h);return Xn(l,s,v)}function $a(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Xe(28));if(a in e)throw new Error(Xe(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase(o){return i=o,n}};return t(n),[e,r,i]}function Td(t){return typeof t=="function"}function Cd(t,e){let[r,i,n]=$a(e),o;if(Td(t))o=()=>Ma(t());else{let a=Ma(t);o=()=>a}function s(a=o(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Fe(u)){let h=d(u,l);return h===void 0?u:h}else{if(be(u))return po(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var wd=(t,e)=>vd(t)?t.match(e):t(e);function Rd(...t){return e=>t.some(r=>wd(r,e))}var Od="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Pd=(t=21)=>{let e="",r=t;for(;r--;)e+=Od[Math.random()*64|0];return e},Ld=["name","message","stack","code"],fo=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Na=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Md=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Ld)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},Da="External signal was aborted",Id=(()=>{function t(e,r,i){let n=at(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=at(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=at(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Md)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let h=i?.idGenerator?i.idGenerator(l):Pd(),v=new AbortController,A,y;function _(x){y=x,v.abort()}c&&(c.aborted?_(Da):c.addEventListener("abort",()=>_(Da),{once:!0}));let P=(async function(){let x;try{let O=i?.condition?.(l,{getState:d,extra:p});if(Dd(O)&&(O=await O),O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((D,j)=>{A=()=>{j({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(h,l,i?.getPendingMeta?.({requestId:h,arg:l},{getState:d,extra:p}))),x=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:h,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new fo(D,j)),fulfillWithValue:((D,j)=>new Na(D,j))})).then(D=>{if(D instanceof fo)throw D;return D instanceof Na?n(D.payload,h,l,D.meta):n(D,h,l)})])}catch(O){x=O instanceof fo?s(null,h,l,O.payload,O.meta):s(O,h,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(x)&&x.meta.condition||u(x),x})();return Object.assign(P,{abort:_,requestId:h,arg:l,unwrap(){return P.then(Nd)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Rd(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Nd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Dd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ba=Symbol.for("rtk-slice-createasyncthunk"),zf={[Ba]:Id};function kd(t,e){return`${t}/${e}`}function Ud({creators:t}={}){let e=t?.asyncThunk?.[Ba];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Xe(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Bd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,C){let O=typeof x=="string"?x:x.type;if(!O)throw new Error(Xe(12));if(O in l.sliceCaseReducersByType)throw new Error(Xe(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(x,C){return l.sliceMatchers.push({matcher:x,reducer:C}),c},exposeAction(x,C){return l.actionCreators[x]=C,c},exposeCaseReducer(x,C){return l.sliceCaseReducersByName[x]=C,c}};a.forEach(x=>{let C=s[x],O={reducerName:x,type:kd(n,x),createNotation:typeof i.reducers=="function"};Fd(C)?jd(O,C,c,e):Hd(O,C,c)});function u(){let[x={},C=[],O=void 0]=typeof i.extraReducers=="function"?$a(i.extraReducers):[i.extraReducers],V={...x,...l.sliceCaseReducersByType};return Cd(i.initialState,D=>{for(let j in V)D.addCase(j,V[j]);for(let j of l.sliceMatchers)D.addMatcher(j.matcher,j.reducer);for(let j of C)D.addMatcher(j.matcher,j.reducer);O&&D.addDefaultCase(O)})}let d=x=>x,p=new Map,h=new WeakMap,v;function A(x,C){return v||(v=u()),v(x,C)}function y(){return v||(v=u()),v.getInitialState()}function _(x,C=!1){function O(D){let j=D[x];return typeof j>"u"&&C&&(j=Ri(h,O,y)),j}function V(D=d){let j=Ri(p,C,()=>new WeakMap);return Ri(j,D,()=>{let sr={};for(let[Ae,pt]of Object.entries(i.selectors??{}))sr[Ae]=$d(pt,D,()=>Ri(h,D,y),C);return sr})}return{reducerPath:x,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let P={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(x,{reducerPath:C,...O}={}){let V=C??o;return x.inject({reducerPath:V,reducer:A},O),{...P,..._(V,!0)}}};return P}}function $d(t,e,r,i){function n(o,...s){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return n.unwrapped=t,n}var Ha=Ud();function Bd(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function Hd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!Vd(i))throw new Error(Xe(17));o=i.reducer,s=i.prepare}else o=i;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?at(t,s):at(t))}function Fd(t){return t._reducerDefinitionType==="asyncThunk"}function Vd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function jd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Xe(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,o,u);i.exposeAction(e,d),s&&i.addCase(d.fulfilled,s),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:s||Oi,pending:a||Oi,rejected:l||Oi,settled:c||Oi})}function Oi(){}var Fa="listener",Va="completed",ja="cancelled",Kf=`task-${ja}`,Wf=`task-${Va}`,Gf=`${Fa}-${ja}`,qf=`${Fa}-${Va}`;var{assign:za}=Object;var ho="listenerMiddleware";var zd=za(at(`${ho}/add`),{withTypes:()=>zd}),Yf=at(`${ho}/removeAll`),Kd=za(at(`${ho}/remove`),{withTypes:()=>Kd});function Xe(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Wd=ni(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Pi=class extends Wd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ka=class t extends Pi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(ci(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Ua({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new oi,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];zt(p,u)||this.setState({[d]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Li=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Mi=f(E()),Gd="ft-app-info",Qe=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Qe.eventName="authentication-change";var Rr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Rr.eventName="ui-locale-changed";var qd={session:(t,e)=>{(0,Mi.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Qe(e.payload)),0))}},b=Mi.FtReduxStore.get({name:Gd,reducers:qd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Wa=f(E()),Ii=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ga=(0,Wa.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(b)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Li.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ii([(0,mo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ii([(0,mo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ii([qn({store:b.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Ii([qn({store:b.name})],e.prototype,"uiLocale",void 0),e});var qa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(qa||(qa={}));var Ya;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ya||(Ya={}));var Xa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Xa||(Xa={}));var Qa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Qa||(Qa={}));var Za;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Za||(Za={}));var Ja;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ja||(Ja={}));var Ni;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ni||(Ni={}));var el;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(el||(el={}));var tl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(tl||(tl={}));var rl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(rl||(rl={}));var il;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(il||(il={}));var nl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(nl||(nl={}));var ol;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(ol||(ol={}));var sl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(sl||(sl={}));var al;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(al||(al={}));var ll;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(ll||(ll={}));var cl;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(cl||(cl={}));var ul;(function(t){t.ASC="ASC",t.DESC="DESC"})(ul||(ul={}));var dl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(dl||(dl={}));var pl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(pl||(pl={}));var fl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(fl||(fl={}));var Di;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Di||(Di={}));var hl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var ml;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ml||(ml={}));var gl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(gl||(gl={}));var yl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(yl||(yl={}));var vl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(vl||(vl={}));var N;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(N||(N={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var bl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(bl||(bl={}));var xl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(xl||(xl={}));var El;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(El||(El={}));var Sl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Sl||(Sl={}));var Al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Al||(Al={}));var _l;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Cl||(Cl={}));var wl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(wl||(wl={}));var Rl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Rl||(Rl={}));var Ol;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Ol||(Ol={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Yd={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function Ll(t,e){return t===e||(Yd[t]??[]).some(r=>Ll(r,e))}function Ze(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Ll(i,e))}var Hi=f(E());var go=f(E());var St=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=b.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=b.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Yt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var ne=class extends Yt{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new go.CacheRegistry,this.cache=e?n.commonCache:new go.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ki=class extends ne{async listMySearches(){let{session:e}=b.getState();return Ze(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Ui=class extends ne{async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var $i=class extends ne{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=b.getState().session;return!!e?.sessionAuthenticated}};var Bi=class extends ne{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=b.getState().session;return!!e?.sessionAuthenticated}};var Xd="ft-user-assets",Qd={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(we).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;vo(t,r,[...yo(t,r),n]),Ml(t,r,1,i),Il(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;vo(t,r,yo(t,r).map(n=>n.id===i.id?i:n)),Il(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;vo(t,r,yo(t,r).filter(o=>o.id!==n)),Ml(t,r,-1,i)}},Nl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},yo=(t,e)=>{var r;let i=Nl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},vo=(t,e,r)=>{let i=Nl[e];i&&(t[i]=r)},Ml=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===we.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Il=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},le=Hi.FtReduxStore.get({name:Xd,reducers:Qd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),bo=class{constructor(e=new $i,r=new Bi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ui,this.savedSearchesService=new ki,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Hi.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),le.actions.clearAssetCount(),le.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),le.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),le.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();le.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();le.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&le.getState().assetCounts.allAsset[e]!==r.count&&le.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&le.getState().assetCounts.bookmarkByMap[e]!==r.count&&le.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(le.getState().assetCounts.bookmarkByMap).length!==0;e===we.BOOKMARKS&&r&&le.actions.clearBookmarkCountByMap(),le.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;le.actions.bookmarks(r)}}},xo=new bo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xo);var Eo=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Eo;var Re=f(E());var Dl,Xt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Zd=Symbol("clearAfterUnitTest"),Fi=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Dl]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Re.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Re.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Xt({loadedContexts:e})),this.dispatchEvent(new Xt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Xt({loadedContexts:[e]})),this.dispatchEvent(new Xt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};Dl=Zd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Qt=window.FluidTopicsI18nService,Vi=window.FluidTopicsCustomI18nService;var kl=f(E()),So=class{highlightHtml(e,r,i){(0,kl.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new So;var Ul=f(E());var Ao=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return Ul.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:b.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Ao;var $l=f(E());var Or=class{static get(e,r){var i,n,o,s;let a=b.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var ji=class extends ne{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var _o=class{urlToSearchRequest(e){return Or.get().parse(e)}searchRequestToUrl(e){return Or.get().serialize(e)}};window.FluidTopicsUrlService=new _o;var Je=f(E());var At=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};At.eventName="change";var To=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Bl=new To;var zi=class t extends Je.WithEventBus{static build(){return new t(window.history,Bl,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Je.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(At.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(At.eventName,e)}currentItem(){return(0,Je.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Je.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Je.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Je.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Hl=f(L());var Fl=Hl.css`
158
+ `;var zl=f(L()),pe=f(G()),Ct=f(E());var _t=f(E());function Vl(t,e){let{authenticationRequired:r,session:i}=b.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Ki=class extends Yt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Co=class t extends _t.FtStateManager{static build(e){return new t(b,e)}constructor(e,r){super(),this.store=e,this.cache=new _t.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Ki,this.cleanSessionDebouncer=new _t.Debouncer,this.reloadDebouncer=new _t.Debouncer(500),this.apiProvider=r??(()=>St.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Qe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>Vl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Rr(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},jl=Co.build();var Tt=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Pr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Tt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var J=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},$=class extends Ct.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=jl,this.contextRoot=new Pr}render(){return zl.html`
159
159
  <slot></slot>
160
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>or.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=_l;Q([(0,ut.property)()],U.prototype,"baseUrl",void 0);Q([(0,ut.property)()],U.prototype,"tenantId",void 0);Q([(0,ut.property)()],U.prototype,"apiIntegrationIdentifier",void 0);Q([(0,ut.property)()],U.prototype,"apiIntegrationAppVersion",void 0);Q([(0,ut.property)()],U.prototype,"uiLocale",void 0);Q([(0,Pe.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);Q([(0,Pe.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"editorMode",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"noCustom",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,ut.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],U.prototype,"noCustomComponent",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"withManualResources",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);Q([(0,ut.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);Q([(0,Pe.jsonProperty)([])],U.prototype,"messageContexts",void 0);Q([(0,Pe.jsonProperty)(void 0)],U.prototype,"session",void 0);var Nl=m(E());var Ml={"ft-app-context":U};(0,Nl.customElements)(Ml);var Dl=m(W());var Ao=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},sr=new Ao;var Ld=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},kr=Symbol("i18nAttributes"),kl=Symbol("i18nListAttributes"),Ur=Symbol("i18nProperties"),kn=Symbol("i18nContexts"),Dr=Symbol("i18nUnsubs"),Bn=(0,ar.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?In:or}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let d=u??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...d)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(sr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,p,d)=>d?.context&&d.key&&o(u,p,d)?{...d,message:this.i18n({context:d.context,key:d.key,custom:d.custom,...u})}:d;(s=this[kr])===null||s===void 0||s.forEach((u,p)=>l[p]=c(u,p,l[p])),(a=this[kl])===null||a===void 0||a.forEach((u,p)=>{var d;return l[p]=(d=l[p])===null||d===void 0?void 0:d.map(f=>c(u,p,f))})}updateI18nProperties(o){var s;(s=this[Ur])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[kn].set(l,{isCustomContext:a}),this[Dr].has(l)||this[Dr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[kn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[kn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Dr].forEach(o=>o()),this[Dr].clear()}}return t=kn,r=Dr,Ld([(0,Dl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Un=class extends Bn(ar.FtLitElement){},$n=class extends Bn(ar.FtLitElementRedux){};var Ul=m(E());var Eo=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?sr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Pd=new Eo;var $l=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:Ul.hasChanged,converter:sr,...t}),r[kr]=(i=r[kr])!==null&&i!==void 0?i:new Map,r[kr].set(n,e??{})};var Hn=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?In:or}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let o=i;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...o)=>this.service.resolveMessage(this.name,i,...o)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var Bl=(e,t)=>(r,n)=>{var i,o;r.constructor.createProperty(n,t??{attribute:!1,type:String});let s={...e,key:(i=e.key)!==null&&i!==void 0?i:n};r[Ur]=(o=r[Ur])!==null&&o!==void 0?o:new Map,r[Ur].set(n,s)};var Hl=m(L());var Fl=Hl.css`
161
- `;var Fn=m(L()),jn=m(W()),Vn=m(E());var $r=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Nt=class extends $n{constructor(){super(),this.editorMode=!1,this.addStore(A)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Fn.nothing:Fn.html`
160
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Qt.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};$.elementDefinitions={};$.styles=Fl;J([(0,pe.property)()],$.prototype,"baseUrl",void 0);J([(0,pe.property)()],$.prototype,"tenantId",void 0);J([(0,pe.property)()],$.prototype,"apiIntegrationIdentifier",void 0);J([(0,pe.property)()],$.prototype,"apiIntegrationAppVersion",void 0);J([(0,pe.property)()],$.prototype,"uiLocale",void 0);J([(0,Ct.jsonProperty)(null)],$.prototype,"availableUiLocales",void 0);J([(0,Ct.jsonProperty)(null)],$.prototype,"metadataConfiguration",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"editorMode",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"noCustom",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"openExternalDocumentInNewTab",void 0);J([(0,pe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],$.prototype,"noCustomComponent",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"withManualResources",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"navigatorOnline",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"forcedOffline",void 0);J([(0,pe.property)({type:Boolean})],$.prototype,"authenticationRequired",void 0);J([(0,Ct.jsonProperty)([])],$.prototype,"messageContexts",void 0);J([(0,Ct.jsonProperty)(void 0)],$.prototype,"session",void 0);var Wl=f(E());var Kl={"ft-app-context":$};(0,Wl.customElements)(Kl);var Gl=f(G());var wo=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Zt=new wo;var tp=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Mr=Symbol("i18nAttributes"),ql=Symbol("i18nListAttributes"),Ir=Symbol("i18nProperties"),Wi=Symbol("i18nContexts"),Lr=Symbol("i18nUnsubs"),Yi=(0,Jt.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Vi:Qt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Zt.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Mr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[ql])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Ir])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Wi].set(l,{isCustomContext:a}),this[Lr].has(l)||this[Lr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Wi].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wi].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Lr].forEach(o=>o()),this[Lr].clear()}}return e=Wi,r=Lr,tp([(0,Gl.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Gi=class extends Yi(Jt.FtLitElement){},qi=class extends Yi(Jt.FtLitElementRedux){};var Yl=f(E());var Ro=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Zt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},rp=new Ro;var Xl=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Yl.hasChanged,converter:Zt,...e}),r[Mr]=(n=r[Mr])!==null&&n!==void 0?n:new Map,r[Mr].set(i,t??{})};var Xi=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Vi:Qt}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Ql=(t,e)=>(r,i)=>{var n,o;r.constructor.createProperty(i,e??{attribute:!1,type:String});let s={...t,key:(n=t.key)!==null&&n!==void 0?n:i};r[Ir]=(o=r[Ir])!==null&&o!==void 0?o:new Map,r[Ir].set(i,s)};var Zl=f(L());var Jl=Zl.css`
161
+ `;var Qi=f(L()),Zi=f(G()),Ji=f(E());var Nr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ne=class extends qi{constructor(){super(),this.editorMode=!1,this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Qi.nothing:Qi.html`
162
162
  <span class="ft-i18n">
163
163
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
164
164
  </span>
165
- `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Nt.elementDefinitions={};Nt.styles=Fl;$r([(0,Vn.redux)()],Nt.prototype,"editorMode",void 0);$r([(0,jn.property)()],Nt.prototype,"context",void 0);$r([(0,jn.property)()],Nt.prototype,"key",void 0);$r([(0,Vn.jsonProperty)([])],Nt.prototype,"args",void 0);$r([(0,jn.property)()],Nt.prototype,"defaultMessage",void 0);var Vl=m(E());var jl={"ft-i18n":Nt};(0,Vl.customElements)(jl);var Dt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},F=class extends Un{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new _t.Debouncer,this.revealDebouncer=new _t.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return zl.html`
165
+ `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Ne.elementDefinitions={};Ne.styles=Jl;Nr([(0,Ji.redux)()],Ne.prototype,"editorMode",void 0);Nr([(0,Zi.property)()],Ne.prototype,"context",void 0);Nr([(0,Zi.property)()],Ne.prototype,"key",void 0);Nr([(0,Ji.jsonProperty)([])],Ne.prototype,"args",void 0);Nr([(0,Zi.property)()],Ne.prototype,"defaultMessage",void 0);var tc=f(E());var ec={"ft-i18n":Ne};(0,tc.customElements)(ec);var De=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},z=class extends Gi{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Oe.Debouncer,this.revealDebouncer=new Oe.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return rc.html`
166
166
  <div part="container"
167
167
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
168
168
  <slot part="slot"></slot>
@@ -171,13 +171,13 @@
171
171
  popover="manual">
172
172
  <div part="tooltip-content" class="ft-tooltip--content">
173
173
  <slot name="text"></slot>
174
- <ft-typography variant="${St.caption}" ?hidden=${!(!((t=this.text)===null||t===void 0)&&t.message)}>
174
+ <ft-typography variant="${_e.caption}" ?hidden=${!(!((e=this.text)===null||e===void 0)&&e.message)}>
175
175
  ${(r=this.text)===null||r===void 0?void 0:r.message}
176
176
  </ft-typography>
177
177
  </div>
178
178
  </div>
179
179
  </div>
180
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:t},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&ln(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${_t.designSystemVariables.transitionDuration}, left ${_t.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,_t.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};F.elementDefinitions={"ft-typography":X};F.styles=ms;Dt([$l()],F.prototype,"text",void 0);Dt([(0,Lt.property)({type:Boolean})],F.prototype,"manual",void 0);Dt([(0,Lt.property)({type:Boolean})],F.prototype,"inline",void 0);Dt([(0,_t.numberProperty)()],F.prototype,"delay",void 0);Dt([(0,Lt.property)()],F.prototype,"position",void 0);Dt([(0,_t.jsonProperty)([])],F.prototype,"ignoreMatchingElements",void 0);Dt([(0,Lt.queryAssignedNodes)()],F.prototype,"slotNodes",void 0);Dt([(0,Lt.query)(".ft-tooltip--container")],F.prototype,"container",void 0);Dt([(0,Lt.query)(".ft-tooltip")],F.prototype,"tooltip",void 0);Dt([(0,Lt.query)(".ft-tooltip--content")],F.prototype,"tooltipContent",void 0);Dt([(0,Lt.state)()],F.prototype,"visible",void 0);var Wl=m(E());var Kl={"ft-tooltip":F};(0,Wl.customElements)(Kl);var Wn=m(L()),tt=m(W()),_c=m(lr()),ur=m(E());var ec=m(L()),J=m(W()),rc=m(lr()),Br=m(E());var Zl=m(L()),z=m(E()),ql=z.FtCssVariableFactory.extend("--ft-ripple-color","",z.designSystemVariables.colorContent),at={color:ql,backgroundColor:z.FtCssVariableFactory.extend("--ft-ripple-background-color","",ql),opacityContentOnSurfacePressed:z.FtCssVariableFactory.external(z.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:z.FtCssVariableFactory.external(z.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:z.FtCssVariableFactory.external(z.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:z.FtCssVariableFactory.external(z.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:z.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Yl=z.FtCssVariableFactory.extend("--ft-ripple-color","",z.designSystemVariables.colorPrimary),Xl={color:Yl,backgroundColor:z.FtCssVariableFactory.extend("--ft-ripple-background-color","",Yl)},Ql=z.FtCssVariableFactory.extend("--ft-ripple-color","",z.designSystemVariables.colorSecondary),Jl={color:Ql,backgroundColor:z.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ql)},tc=Zl.css`
180
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&ii(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Oe.designSystemVariables.transitionDuration}, left ${Oe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Oe.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};z.elementDefinitions={"ft-typography":Q};z.styles=Es;De([Xl()],z.prototype,"text",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"manual",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"inline",void 0);De([(0,Oe.numberProperty)()],z.prototype,"delay",void 0);De([(0,Pe.property)()],z.prototype,"position",void 0);De([(0,Oe.jsonProperty)([])],z.prototype,"ignoreMatchingElements",void 0);De([(0,Pe.queryAssignedNodes)()],z.prototype,"slotNodes",void 0);De([(0,Pe.query)(".ft-tooltip--container")],z.prototype,"container",void 0);De([(0,Pe.query)(".ft-tooltip")],z.prototype,"tooltip",void 0);De([(0,Pe.query)(".ft-tooltip--content")],z.prototype,"tooltipContent",void 0);De([(0,Pe.state)()],z.prototype,"visible",void 0);var nc=f(E());var ic={"ft-tooltip":z};(0,nc.customElements)(ic);var rn=f(L()),re=f(G()),Fc=f(er()),rr=f(E());var fc=f(L()),ee=f(G()),hc=f(er()),Dr=f(E());var dc=f(L()),W=f(E()),sc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorContent),ce={color:sc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",sc),opacityContentOnSurfacePressed:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:W.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},ac=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorPrimary),lc={color:ac,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",ac)},cc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorSecondary),uc={color:cc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",cc)},pc=dc.css`
181
181
  :host {
182
182
  display: contents;
183
183
  }
@@ -190,7 +190,7 @@
190
190
 
191
191
  .ft-ripple:not(.ft-ripple--unbounded) {
192
192
  overflow: hidden;
193
- border-radius: ${at.borderRadius};
193
+ border-radius: ${ce.borderRadius};
194
194
  }
195
195
 
196
196
  .ft-ripple .ft-ripple--background,
@@ -224,27 +224,27 @@
224
224
  }
225
225
 
226
226
  .ft-ripple .ft-ripple--background {
227
- background-color: ${at.backgroundColor};
227
+ background-color: ${ce.backgroundColor};
228
228
  }
229
229
 
230
230
  .ft-ripple .ft-ripple--effect {
231
- background-color: ${at.color};
231
+ background-color: ${ce.color};
232
232
  }
233
233
 
234
234
  .ft-ripple.ft-ripple--secondary .ft-ripple--background {
235
- background-color: ${Jl.backgroundColor};
235
+ background-color: ${uc.backgroundColor};
236
236
  }
237
237
 
238
238
  .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
239
- background-color: ${Jl.color};
239
+ background-color: ${uc.color};
240
240
  }
241
241
 
242
242
  .ft-ripple.ft-ripple--primary .ft-ripple--background {
243
- background-color: ${Xl.backgroundColor};
243
+ background-color: ${lc.backgroundColor};
244
244
  }
245
245
 
246
246
  .ft-ripple.ft-ripple--primary .ft-ripple--effect {
247
- background-color: ${Xl.color};
247
+ background-color: ${lc.color};
248
248
  }
249
249
 
250
250
  .ft-ripple .ft-ripple--background {
@@ -274,33 +274,33 @@
274
274
  }
275
275
 
276
276
  .ft-ripple.ft-ripple--hovered .ft-ripple--background {
277
- opacity: ${at.opacityContentOnSurfaceHover};
277
+ opacity: ${ce.opacityContentOnSurfaceHover};
278
278
  }
279
279
 
280
280
  .ft-ripple.ft-ripple--selected .ft-ripple--background {
281
- opacity: ${at.opacityContentOnSurfaceSelected};
281
+ opacity: ${ce.opacityContentOnSurfaceSelected};
282
282
  }
283
283
 
284
284
  .ft-ripple.ft-ripple--focused .ft-ripple--background {
285
- opacity: ${at.opacityContentOnSurfaceFocused};
285
+ opacity: ${ce.opacityContentOnSurfaceFocused};
286
286
  }
287
287
 
288
288
  .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
289
- opacity: ${at.opacityContentOnSurfacePressed};
289
+ opacity: ${ce.opacityContentOnSurfacePressed};
290
290
  transform: translate(-50%, -50%) scale(1);
291
291
  }
292
- `;var dt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},P=class extends Br.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Br.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Br.Debouncer(10),this.moveRipple=t=>{var r,n;let{x:i,y:o}=this.getCoordinates(t),s=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return ec.html`
292
+ `;var fe=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},M=class extends Dr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Dr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Dr.Debouncer(10),this.moveRipple=e=>{var r,i;let{x:n,y:o}=this.getCoordinates(e),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return fc.html`
293
293
  <style>
294
294
  .ft-ripple .ft-ripple--effect {
295
295
  left: ${this.originX}px;
296
296
  top: ${this.originY}px;
297
297
  }
298
298
  </style>
299
- <div class="${(0,rc.classMap)(t)}">
299
+ <div class="${(0,hc.classMap)(e)}">
300
300
  <div class="ft-ripple--background"></div>
301
301
  <div class="ft-ripple--effect"></div>
302
302
  </div>
303
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",n,s),t.addEventListener("touchstart",i,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",n,s),t.removeEventListener("touchstart",i,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,i,o;return r.x!=null?{x:i,y:o}=r:n.touches!=null&&(i=n.touches[0].clientX,o=n.touches[0].clientY),{x:i,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};P.elementDefinitions={};P.styles=tc;dt([(0,J.property)({type:Boolean})],P.prototype,"primary",void 0);dt([(0,J.property)({type:Boolean})],P.prototype,"secondary",void 0);dt([(0,J.property)({type:Boolean})],P.prototype,"unbounded",void 0);dt([(0,J.property)({type:Boolean})],P.prototype,"activated",void 0);dt([(0,J.property)({type:Boolean})],P.prototype,"selected",void 0);dt([(0,J.property)({type:Boolean})],P.prototype,"disabled",void 0);dt([(0,J.state)()],P.prototype,"hovered",void 0);dt([(0,J.state)()],P.prototype,"focused",void 0);dt([(0,J.state)()],P.prototype,"pressed",void 0);dt([(0,J.state)()],P.prototype,"rippling",void 0);dt([(0,J.state)()],P.prototype,"originX",void 0);dt([(0,J.state)()],P.prototype,"originY",void 0);dt([(0,J.query)(".ft-ripple")],P.prototype,"ripple",void 0);dt([(0,J.query)(".ft-ripple--effect")],P.prototype,"rippleEffect",void 0);var ic=m(E());var nc={"ft-ripple":P};(0,ic.customElements)(nc);var oc=m(L()),kt=m(E()),bt={size:kt.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:kt.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",kt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:kt.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",kt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:kt.FtCssVariableFactory.extend("--ft-icon-material-font-family","",kt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:kt.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},sc=[oc.css`
303
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,i;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let i=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",i,s),e.addEventListener("touchstart",n,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",o,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",i,s),e.removeEventListener("touchstart",n,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",o,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,i=e,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};M.elementDefinitions={};M.styles=pc;fe([(0,ee.property)({type:Boolean})],M.prototype,"primary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"secondary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"unbounded",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"activated",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"selected",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"disabled",void 0);fe([(0,ee.state)()],M.prototype,"hovered",void 0);fe([(0,ee.state)()],M.prototype,"focused",void 0);fe([(0,ee.state)()],M.prototype,"pressed",void 0);fe([(0,ee.state)()],M.prototype,"rippling",void 0);fe([(0,ee.state)()],M.prototype,"originX",void 0);fe([(0,ee.state)()],M.prototype,"originY",void 0);fe([(0,ee.query)(".ft-ripple")],M.prototype,"ripple",void 0);fe([(0,ee.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var gc=f(E());var mc={"ft-ripple":M};(0,gc.customElements)(mc);var yc=f(L()),ke=f(E()),xe={size:ke.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-material-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:ke.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},vc=[yc.css`
304
304
  :host, i.ft-icon {
305
305
  display: inline-flex;
306
306
  align-items: center;
@@ -309,14 +309,14 @@
309
309
  }
310
310
 
311
311
  :host {
312
- width: ${bt.size};
313
- height: ${bt.size};
312
+ width: ${xe.size};
313
+ height: ${xe.size};
314
314
  }
315
315
 
316
316
  i.ft-icon {
317
317
  width: 100%;
318
318
  height: 100%;
319
- font-size: ${bt.size};
319
+ font-size: ${xe.size};
320
320
  line-height: 1;
321
321
  font-weight: normal;
322
322
  text-transform: none;
@@ -327,33 +327,33 @@
327
327
  text-rendering: auto;
328
328
  -webkit-font-smoothing: antialiased;
329
329
  -moz-osx-font-smoothing: grayscale;
330
- vertical-align: ${bt.verticalAlign};
330
+ vertical-align: ${xe.verticalAlign};
331
331
  }
332
332
 
333
333
  i.ft-icon.ft-icon--fluid-topics {
334
- font-family: ${bt.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
334
+ font-family: ${xe.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
335
335
 
336
336
  /* Ugly fix because font is broken */
337
- font-size: calc(0.75 * ${bt.size});
338
- line-height: ${bt.size};
337
+ font-size: calc(0.75 * ${xe.size});
338
+ line-height: ${xe.size};
339
339
  position: relative;
340
340
  top: -4%;
341
341
  justify-content: center;
342
342
  }
343
343
 
344
344
  .ft-icon--file-format {
345
- font-family: ${bt.fileFormatFontFamily}, ft-mime, sans-serif;
345
+ font-family: ${xe.fileFormatFontFamily}, ft-mime, sans-serif;
346
346
  }
347
347
 
348
348
  .ft-icon--material {
349
- font-family: ${bt.materialFontFamily}, "Material Icons", sans-serif;
349
+ font-family: ${xe.materialFontFamily}, "Material Icons", sans-serif;
350
350
  }
351
- `,kt.noTextSelect];var jt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(jt||(jt={}));var Hr=m(L()),pe=m(W()),cc=m(E()),uc=m(lc());var zn;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(zn||(zn={}));var v;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(v||(v={}));var ry=new Map([...["abw"].map(e=>[e,v.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,v.AUDIO]),...["avi"].map(e=>[e,v.AVI]),...["chm","xhs"].map(e=>[e,v.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,v.CODE]),...["csv"].map(e=>[e,v.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,v.DITA]),...["epub"].map(e=>[e,v.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,v.EXCEL]),...["flac"].map(e=>[e,v.FLAC]),...["gif"].map(e=>[e,v.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,v.GZIP]),...["html","htm","xhtml"].map(e=>[e,v.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,v.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,v.JPEG]),...["json"].map(e=>[e,v.JSON]),...["m4a","m4p"].map(e=>[e,v.M4A]),...["mov","qt"].map(e=>[e,v.MOV]),...["mp3"].map(e=>[e,v.MP3]),...["mp4","m4v"].map(e=>[e,v.MP4]),...["ogg","oga"].map(e=>[e,v.OGG]),...["pdf","ps"].map(e=>[e,v.PDF]),...["png"].map(e=>[e,v.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,v.POWERPOINT]),...["rar"].map(e=>[e,v.RAR]),...["stp"].map(e=>[e,v.STP]),...["txt","rtf","md","mdown"].map(e=>[e,v.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,v.VIDEO]),...["wav"].map(e=>[e,v.WAV]),...["wma"].map(e=>[e,v.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,v.WORD]),...["xml","xsl","rdf"].map(e=>[e,v.XML]),...["yaml","yml","x-yaml"].map(e=>[e,v.YAML]),...["zip"].map(e=>[e,v.ZIP])]);var ny={[v.ABW]:"#91ABC6",[v.AUDIO]:"#1795E3",[v.AVI]:"#E63324",[v.CHM]:"#71C3EB",[v.CODE]:"#71C3EB",[v.CSV]:"#1F7345",[v.DITA]:"#71C3EB",[v.EPUB]:"#85B926",[v.EXCEL]:"#1F7345",[v.FLAC]:"#1795E3",[v.GIF]:"#59B031",[v.GZIP]:"#F8AB36",[v.HTML]:"#71C3EB",[v.IMAGE]:"#59B031",[v.JPEG]:"#59B031",[v.JSON]:"#71C3EB",[v.M4A]:"#1795E3",[v.MOV]:"#E63324",[v.MP3]:"#1795E3",[v.MP4]:"#E63324",[v.OGG]:"#1795E3",[v.PDF]:"#E44948",[v.PNG]:"#59B031",[v.POWERPOINT]:"#B54A2B",[v.RAR]:"#F8AB36",[v.STP]:"#3764B1",[v.TEXT]:"#3162AB",[v.UNKNOWN]:"#999999",[v.VIDEO]:"#E63324",[v.WAV]:"#1795E3",[v.WMA]:"#1795E3",[v.WORD]:"#3162AB",[v.XML]:"#71C3EB",[v.YAML]:"#71C3EB",[v.ZIP]:"#F8AB36"};var Fr=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Z=class extends cc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Hr.nothing}render(){let t=this.variant&&Object.values(jt).includes(this.variant)?this.variant:jt.fluid_topics,r=t!==jt.material||!!this.value;return Hr.html`
352
- <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
353
- ${(0,uc.unsafeHTML)(this.resolvedIcon)}
351
+ `,ke.noTextSelect];var Ve;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ve||(Ve={}));var kr=f(L()),lt=f(G()),Ec=f(E()),Sc=f(xc());var en;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(en||(en={}));var m;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(m||(m={}));var av=new Map([...["abw"].map(t=>[t,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,m.AUDIO]),...["avi"].map(t=>[t,m.AVI]),...["chm","xhs"].map(t=>[t,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,m.CODE]),...["csv"].map(t=>[t,m.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,m.DITA]),...["epub"].map(t=>[t,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,m.EXCEL]),...["flac"].map(t=>[t,m.FLAC]),...["gif"].map(t=>[t,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,m.GZIP]),...["html","htm","xhtml"].map(t=>[t,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,m.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,m.JPEG]),...["json"].map(t=>[t,m.JSON]),...["m4a","m4p"].map(t=>[t,m.M4A]),...["mov","qt"].map(t=>[t,m.MOV]),...["mp3"].map(t=>[t,m.MP3]),...["mp4","m4v"].map(t=>[t,m.MP4]),...["ogg","oga"].map(t=>[t,m.OGG]),...["pdf","ps"].map(t=>[t,m.PDF]),...["png"].map(t=>[t,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,m.POWERPOINT]),...["rar"].map(t=>[t,m.RAR]),...["stp"].map(t=>[t,m.STP]),...["txt","rtf","md","mdown"].map(t=>[t,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,m.VIDEO]),...["wav"].map(t=>[t,m.WAV]),...["wma"].map(t=>[t,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,m.WORD]),...["xml","xsl","rdf"].map(t=>[t,m.XML]),...["yaml","yml","x-yaml"].map(t=>[t,m.YAML]),...["zip"].map(t=>[t,m.ZIP])]);var lv={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var Ur=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},te=class extends Ec.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=kr.nothing}render(){let e=this.variant&&Object.values(Ve).includes(this.variant)?this.variant:Ve.fluid_topics,r=e!==Ve.material||!!this.value;return kr.html`
352
+ <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
353
+ ${(0,Sc.unsafeHTML)(this.resolvedIcon)}
354
354
  <slot ?hidden=${r}></slot>
355
355
  </i>
356
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case jt.file_format:this.resolvedIcon=(t=v[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case jt.material:this.resolvedIcon=this.value||Hr.nothing;break;default:this.resolvedIcon=(r=zn[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};Z.elementDefinitions={};Z.styles=sc;Fr([(0,pe.property)()],Z.prototype,"variant",void 0);Fr([(0,pe.property)()],Z.prototype,"value",void 0);Fr([(0,pe.property)({reflect:!0,attribute:"aria-hidden"})],Z.prototype,"ariaHidden",void 0);Fr([(0,pe.state)()],Z.prototype,"resolvedIcon",void 0);Fr([(0,pe.query)("slot")],Z.prototype,"slottedContent",void 0);var pc=m(E());var dc={"ft-icon":Z};(0,pc.customElements)(dc);var Vr=m(L()),R=m(E());var zt=m(E());var fc=m(L()),jr=m(E()),Ie={color:jr.FtCssVariableFactory.extend("--ft-loader-color","",jr.designSystemVariables.colorPrimary),size:jr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},hc=fc.css`
356
+ `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let i=this.value||this.getTextContent();switch(this.variant){case Ve.file_format:this.resolvedIcon=(e=m[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case Ve.material:this.resolvedIcon=this.value||kr.nothing;break;default:this.resolvedIcon=(r=en[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};te.elementDefinitions={};te.styles=vc;Ur([(0,lt.property)()],te.prototype,"variant",void 0);Ur([(0,lt.property)()],te.prototype,"value",void 0);Ur([(0,lt.property)({reflect:!0,attribute:"aria-hidden"})],te.prototype,"ariaHidden",void 0);Ur([(0,lt.state)()],te.prototype,"resolvedIcon",void 0);Ur([(0,lt.query)("slot")],te.prototype,"slottedContent",void 0);var _c=f(E());var Ac={"ft-icon":te};(0,_c.customElements)(Ac);var Br=f(L()),w=f(E());var ze=f(E());var Tc=f(L()),$r=f(E()),wt={color:$r.FtCssVariableFactory.extend("--ft-loader-color","",$r.designSystemVariables.colorPrimary),size:$r.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Cc=Tc.css`
357
357
  :host {
358
358
  line-height: 0;
359
359
  }
@@ -362,8 +362,8 @@
362
362
  display: inline-block;
363
363
  position: relative;
364
364
 
365
- width: ${Ie.size};
366
- height: ${Ie.size};
365
+ width: ${wt.size};
366
+ height: ${wt.size};
367
367
  }
368
368
 
369
369
  .ft-loader div {
@@ -372,7 +372,7 @@
372
372
  width: 25%;
373
373
  height: 25%;
374
374
  border-radius: 50%;
375
- background: ${Ie.color};
375
+ background: ${wt.color};
376
376
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
377
377
  }
378
378
 
@@ -419,17 +419,17 @@
419
419
  transform: translate(0, 0);
420
420
  }
421
421
  100% {
422
- transform: translate(calc(0.35 * ${Ie.size}), 0);
422
+ transform: translate(calc(0.35 * ${wt.size}), 0);
423
423
  }
424
424
  }
425
- `;var mc=m(L()),gc=m(E());var Me=class extends gc.FtLitElement{render(){return mc.html`
425
+ `;var wc=f(L()),Rc=f(E());var Rt=class extends Rc.FtLitElement{render(){return wc.html`
426
426
  <div class="ft-loader">
427
427
  <div></div>
428
428
  <div></div>
429
429
  <div></div>
430
430
  <div></div>
431
431
  </div>
432
- `}};Me.styles=hc;var yc=m(E());var vc={"ft-loader":Me};(0,yc.customElements)(vc);var fe=m(L()),Kn=m(lr()),I=m(W());var cr=e=>e??V;var Ac=m(L()),w=m(E());var bc=w.FtCssVariableFactory.extend("--ft-button-color","",w.designSystemVariables.colorPrimary),$={backgroundColor:w.FtCssVariableFactory.extend("--ft-button-background-color","",w.designSystemVariables.colorSurface),borderRadius:w.FtCssVariableFactory.extend("--ft-button-border-radius","",w.designSystemVariables.borderRadiusL),color:bc,fontSize:w.FtCssVariableFactory.extend("--ft-button-font-size","",$t.fontSize),iconSize:w.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:w.FtCssVariableFactory.extend("--ft-button-ripple-color","",bc),verticalPadding:w.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:w.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:w.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:w.FtCssVariableFactory.external(w.designSystemVariables.colorOpacityDisabled,"Design system")},xc=w.FtCssVariableFactory.extend("--ft-button-primary-color","",w.FtCssVariableFactory.extend("--ft-button-color","",w.designSystemVariables.colorOnPrimary)),So={backgroundColor:w.FtCssVariableFactory.extend("--ft-button-primary-background-color","",w.FtCssVariableFactory.extend("--ft-button-background-color","",w.designSystemVariables.colorPrimary)),color:xc,rippleColor:w.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",xc)},Vt={borderRadius:w.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",w.FtCssVariableFactory.extend("--ft-button-border-radius","",w.designSystemVariables.borderRadiusM)),verticalPadding:w.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:w.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:w.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Ec=Ac.css`
432
+ `}};Rt.styles=Cc;var Pc=f(E());var Oc={"ft-loader":Rt};(0,Pc.customElements)(Oc);var ct=f(L()),tn=f(er()),I=f(G());var tr=t=>t??K;var Ic=f(L()),T=f(E());var Lc=T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorPrimary),B={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorSurface),borderRadius:T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusL),color:Lc,fontSize:T.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:T.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:T.FtCssVariableFactory.extend("--ft-button-ripple-color","",Lc),verticalPadding:T.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:T.FtCssVariableFactory.external(T.designSystemVariables.colorOpacityDisabled,"Design system")},Mc=T.FtCssVariableFactory.extend("--ft-button-primary-color","",T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorOnPrimary)),Oo={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-primary-background-color","",T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorPrimary)),color:Mc,rippleColor:T.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Mc)},je={borderRadius:T.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusM)),verticalPadding:T.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Nc=Ic.css`
433
433
  :host {
434
434
  display: inline-block;
435
435
  max-width: 100%;
@@ -440,7 +440,7 @@
440
440
  box-shadow: 0px 0px 0px transparent;
441
441
  border: 0px solid transparent;
442
442
  text-shadow: 0px 0px 0px transparent;
443
- font-size: ${$.fontSize};
443
+ font-size: ${B.fontSize};
444
444
  text-decoration: none;
445
445
  }
446
446
 
@@ -460,7 +460,7 @@
460
460
  }
461
461
 
462
462
  .ft-button:focus-visible {
463
- outline: 2px solid ${w.designSystemVariables.colorPrimary};
463
+ outline: 2px solid ${T.designSystemVariables.colorPrimary};
464
464
  outline-offset: 2px;
465
465
  }
466
466
 
@@ -474,31 +474,31 @@
474
474
  border: none;
475
475
  pointer-events: auto;
476
476
 
477
- --button-internal-line-height: max(calc(${$.fontSize} + 2px), ${$.iconSize});
478
- --button-internal-color: ${$.color};
479
- ${(0,w.setVariable)(bt.size,$.iconSize)};
480
- ${(0,w.setVariable)(at.color,$.rippleColor)};
481
- ${(0,w.setVariable)(at.borderRadius,$.borderRadius)};
477
+ --button-internal-line-height: max(calc(${B.fontSize} + 2px), ${B.iconSize});
478
+ --button-internal-color: ${B.color};
479
+ ${(0,T.setVariable)(xe.size,B.iconSize)};
480
+ ${(0,T.setVariable)(ce.color,B.rippleColor)};
481
+ ${(0,T.setVariable)(ce.borderRadius,B.borderRadius)};
482
482
 
483
- border-radius: ${$.borderRadius};
484
- padding: ${$.verticalPadding} ${$.horizontalPadding};
485
- background-color: ${$.backgroundColor};
483
+ border-radius: ${B.borderRadius};
484
+ padding: ${B.verticalPadding} ${B.horizontalPadding};
485
+ background-color: ${B.backgroundColor};
486
486
  color: var(--button-internal-color);
487
487
  }
488
488
 
489
489
  .ft-button.ft-button--outlined {
490
490
  border: 1px solid var(--button-internal-color);
491
- padding: calc(${$.verticalPadding} - 1px) calc(${$.horizontalPadding} - 1px);
491
+ padding: calc(${B.verticalPadding} - 1px) calc(${B.horizontalPadding} - 1px);
492
492
  }
493
493
 
494
494
  .ft-button.ft-button--dense {
495
- padding: ${Vt.verticalPadding} ${Vt.horizontalPadding};
496
- border-radius: ${Vt.borderRadius};
497
- ${(0,w.setVariable)(at.borderRadius,Vt.borderRadius)};
495
+ padding: ${je.verticalPadding} ${je.horizontalPadding};
496
+ border-radius: ${je.borderRadius};
497
+ ${(0,T.setVariable)(ce.borderRadius,je.borderRadius)};
498
498
  }
499
499
 
500
500
  .ft-button.ft-button--dense.ft-button--outlined {
501
- padding: calc(${Vt.verticalPadding} - 1px) calc(${Vt.horizontalPadding} - 1px);
501
+ padding: calc(${je.verticalPadding} - 1px) calc(${je.horizontalPadding} - 1px);
502
502
  }
503
503
 
504
504
  .ft-button:not([disabled]):hover {
@@ -506,22 +506,22 @@
506
506
  }
507
507
 
508
508
  .ft-button--round {
509
- border-radius: calc(var(--button-internal-line-height) / 2 + ${$.verticalPadding});
509
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${B.verticalPadding});
510
510
  }
511
511
 
512
512
  .ft-button--round.ft-button--dense {
513
- border-radius: calc(var(--button-internal-line-height) / 2 + ${Vt.verticalPadding});
513
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${je.verticalPadding});
514
514
  }
515
515
 
516
516
  .ft-button[disabled] {
517
517
  filter: grayscale(1);
518
- opacity: ${$.opacityDisabled};
518
+ opacity: ${B.opacityDisabled};
519
519
  }
520
520
 
521
521
  .ft-button.ft-button--primary {
522
- background-color: ${So.backgroundColor};
523
- --button-internal-color: ${So.color};
524
- ${(0,w.setVariable)(at.color,So.rippleColor)};
522
+ background-color: ${Oo.backgroundColor};
523
+ --button-internal-color: ${Oo.color};
524
+ ${(0,T.setVariable)(ce.color,Oo.rippleColor)};
525
525
  }
526
526
 
527
527
  .ft-button--label {
@@ -530,13 +530,13 @@
530
530
  white-space: nowrap;
531
531
  text-overflow: ellipsis;
532
532
  display: block;
533
- margin: 0 ${$.iconPadding};
534
- ${(0,w.setVariable)($t.fontSize,"1em")};
535
- ${(0,w.setVariable)($t.lineHeight,"var(--button-internal-line-height)")};
533
+ margin: 0 ${B.iconPadding};
534
+ ${(0,T.setVariable)($e.fontSize,"1em")};
535
+ ${(0,T.setVariable)($e.lineHeight,"var(--button-internal-line-height)")};
536
536
  }
537
537
 
538
538
  .ft-button--dense .ft-button--label {
539
- margin: 0 ${Vt.iconPadding};
539
+ margin: 0 ${je.iconPadding};
540
540
  }
541
541
 
542
542
  .ft-button--label.ft-button--label-no-text {
@@ -549,13 +549,13 @@
549
549
  }
550
550
 
551
551
  .ft-button--label[hidden] + [part="icon"] {
552
- margin: 0 calc(${$.horizontalPadding} * -1);
553
- padding: 0 ${$.verticalPadding};
552
+ margin: 0 calc(${B.horizontalPadding} * -1);
553
+ padding: 0 ${B.verticalPadding};
554
554
  }
555
555
 
556
556
  .ft-button--dense .ft-button--label[hidden] + [part="icon"] {
557
- margin: 0 calc(${Vt.horizontalPadding} * -1);
558
- padding: 0 ${Vt.verticalPadding};
557
+ margin: 0 calc(${je.horizontalPadding} * -1);
558
+ padding: 0 ${je.verticalPadding};
559
559
  }
560
560
 
561
561
  .ft-button:not(.ft-button--trailing-icon) [part="label"] {
@@ -563,51 +563,51 @@
563
563
  }
564
564
 
565
565
  ft-loader {
566
- ${(0,w.setVariable)(Ie.size,$.iconSize)};
567
- ${(0,w.setVariable)(Ie.color,"var(--button-internal-color)")};
566
+ ${(0,T.setVariable)(wt.size,B.iconSize)};
567
+ ${(0,T.setVariable)(wt.color,"var(--button-internal-color)")};
568
568
  }
569
- `;var N=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},_=class e extends(0,zt.toFtFormComponent)(zt.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",t=>{var r;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var t,r,n;let i={"ft-button--label":!0,"ft-safari-ellipsis-fix":zt.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=fe.html`
569
+ `;var k=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},R=class t extends(0,ze.toFtFormComponent)(ze.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var r;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var e,r,i;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":ze.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=ct.html`
570
570
  <ft-ripple part="ripple"
571
571
  ?disabled=${this.isDisabled()}
572
572
  ?activated=${this.activated}
573
573
  ></ft-ripple>
574
574
  <ft-typography part="label"
575
- variant="${St.button}"
575
+ variant="${_e.button}"
576
576
  element="span"
577
- class="${(0,Kn.classMap)(i)}">
577
+ class="${(0,tn.classMap)(n)}">
578
578
  <slot></slot>
579
579
  </ft-typography>
580
580
  ${this.resolveIcon()}
581
- `,s=this.href!=null&&this.href.trim().length>0?this.href:void 0;return this.addTooltipIfNeeded(s?fe.html`
581
+ `,s=this.href!=null&&this.href.trim().length>0?this.href:void 0;return this.addTooltipIfNeeded(s?ct.html`
582
582
  <a href="${s}"
583
- target="${(t=this.target)!==null&&t!==void 0?t:"_self"}"
583
+ target="${(e=this.target)!==null&&e!==void 0?e:"_self"}"
584
584
  part="button"
585
- class="${(0,Kn.classMap)(this.buttonClasses)}"
586
- aria-label="${cr((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
585
+ class="${(0,tn.classMap)(this.buttonClasses)}"
586
+ aria-label="${tr((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
587
587
  ?disabled=${this.isDisabled()}>
588
588
  ${o}
589
589
  </a>
590
- `:fe.html`
590
+ `:ct.html`
591
591
  <button part="button"
592
- class="${(0,Kn.classMap)(this.buttonClasses)}"
593
- aria-label="${cr((n=this.ariaLabel)!==null&&n!==void 0?n:this.label)}"
594
- aria-haspopup="${cr(this.ariaHasPopup)}"
595
- aria-pressed="${cr(this.ariaPressed)}"
592
+ class="${(0,tn.classMap)(this.buttonClasses)}"
593
+ aria-label="${tr((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
594
+ aria-haspopup="${tr(this.ariaHasPopup)}"
595
+ aria-pressed="${tr(this.ariaPressed)}"
596
596
  ?disabled=${this.isDisabled()}>
597
597
  ${o}
598
598
  </button>
599
- `)}addTooltipIfNeeded(t){return this.label&&this.label.trim().length>0&&(this.forceTooltip||!this.hasTextContent&&!this.hideTooltip)?fe.html`
599
+ `)}addTooltipIfNeeded(e){return this.label&&this.label.trim().length>0&&(this.forceTooltip||!this.hasTextContent&&!this.hideTooltip)?ct.html`
600
600
  <ft-tooltip part="tooltip"
601
601
  text="${this.label}"
602
602
  position="${this.tooltipPosition}">
603
- ${t}
603
+ ${e}
604
604
  </ft-tooltip>
605
- `:t}resolveIcon(){return this.loading?fe.html`
606
- <ft-loader part="loader icon"></ft-loader> `:this.icon?fe.html`
605
+ `:e}resolveIcon(){return this.loading?ct.html`
606
+ <ft-loader part="loader icon"></ft-loader> `:this.icon?ct.html`
607
607
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
608
- `:fe.html`
608
+ `:ct.html`
609
609
  <slot part="icon" name="icon"></slot>
610
- `}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var n;return(n=this.tooltip)===null||n===void 0?void 0:n.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(t){super.contentAvailableCallback(t),this.labelContainer&&e.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&e.labelsObserver.unobserve(this.labelContainer)}};_.elementDefinitions={"ft-ripple":P,"ft-tooltip":F,"ft-icon":Z,"ft-loader":Me,"ft-typography":X};_.styles=[zt.safariEllipsisFix,Ec,zt.noTextSelect];_.labelsObserver=new IntersectionObserver(e=>{for(let t of e){let r=t.target.getRootNode();r.host?r.host.hasTextContent=t.boundingClientRect.width>0:_.labelsObserver.unobserve(t.target)}});N([(0,I.property)({type:Boolean})],_.prototype,"primary",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"outlined",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"dense",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"round",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"disabled",void 0);N([(0,I.property)()],_.prototype,"icon",void 0);N([(0,I.property)()],_.prototype,"iconVariant",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"trailingIcon",void 0);N([(0,I.property)()],_.prototype,"label",void 0);N([(0,I.property)()],_.prototype,"type",void 0);N([(0,I.property)()],_.prototype,"href",void 0);N([(0,I.property)()],_.prototype,"target",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"loading",void 0);N([(0,I.property)({attribute:"aria-label"})],_.prototype,"ariaLabel",void 0);N([(0,I.property)()],_.prototype,"ariaHasPopup",void 0);N([(0,I.property)({attribute:"aria-pressed"})],_.prototype,"ariaPressed",void 0);N([(0,I.property)()],_.prototype,"tooltipPosition",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"hideTooltip",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"forceTooltip",void 0);N([(0,I.property)({type:Boolean})],_.prototype,"activated",void 0);N([(0,I.query)(".ft-button")],_.prototype,"button",void 0);N([(0,I.query)(".ft-button--label")],_.prototype,"labelContainer",void 0);N([(0,I.state)()],_.prototype,"hasTextContent",void 0);N([(0,I.query)(".ft-button--label slot")],_.prototype,"slottedContent",void 0);N([(0,I.query)("[part=tooltip]")],_.prototype,"tooltip",void 0);var Tc=m(E());var Sc={"ft-button":_};(0,Tc.customElements)(Sc);var Cc=R.FtCssVariableFactory.extend("--ft-chip-color","",R.designSystemVariables.colorOnSurface),pt={backgroundColor:R.FtCssVariableFactory.extend("--ft-chip-background-color","",R.designSystemVariables.colorSurface),color:Cc,fontSize:R.FtCssVariableFactory.extend("--ft-chip-font-size","",Tt.fontSize),fontWeight:R.FtCssVariableFactory.extend("--ft-chip-font-weight","",Tt.fontWeight),iconSize:R.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:R.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:R.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Cc),horizontalPadding:R.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:R.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:R.FtCssVariableFactory.extend("--ft-chip-border-color","",R.designSystemVariables.colorOutline),opacityDisabled:R.FtCssVariableFactory.external(R.designSystemVariables.colorOpacityDisabled,"Design system")},wc=R.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",R.FtCssVariableFactory.extend("--ft-chip-color","",R.designSystemVariables.colorOnPrimary)),To={backgroundColor:R.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",R.FtCssVariableFactory.extend("--ft-chip-background-color","",R.designSystemVariables.colorPrimary)),color:wc,rippleColor:R.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",wc)},Oc={horizontalPadding:R.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:R.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Rc=[R.noTextSelect,Vr.css`
610
+ `}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(e,r)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":M,"ft-tooltip":z,"ft-icon":te,"ft-loader":Rt,"ft-typography":Q};R.styles=[ze.safariEllipsisFix,Nc,ze.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let r=e.target.getRootNode();r.host?r.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});k([(0,I.property)({type:Boolean})],R.prototype,"primary",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"outlined",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"dense",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"round",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"disabled",void 0);k([(0,I.property)()],R.prototype,"icon",void 0);k([(0,I.property)()],R.prototype,"iconVariant",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);k([(0,I.property)()],R.prototype,"label",void 0);k([(0,I.property)()],R.prototype,"type",void 0);k([(0,I.property)()],R.prototype,"href",void 0);k([(0,I.property)()],R.prototype,"target",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"loading",void 0);k([(0,I.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);k([(0,I.property)()],R.prototype,"ariaHasPopup",void 0);k([(0,I.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);k([(0,I.property)()],R.prototype,"tooltipPosition",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"activated",void 0);k([(0,I.query)(".ft-button")],R.prototype,"button",void 0);k([(0,I.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);k([(0,I.state)()],R.prototype,"hasTextContent",void 0);k([(0,I.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);k([(0,I.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var kc=f(E());var Dc={"ft-button":R};(0,kc.customElements)(Dc);var Uc=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),he={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:Uc,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",Te.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",Te.fontWeight),iconSize:w.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:w.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:w.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Uc),horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:w.FtCssVariableFactory.extend("--ft-chip-border-color","",w.designSystemVariables.colorOutline),opacityDisabled:w.FtCssVariableFactory.external(w.designSystemVariables.colorOpacityDisabled,"Design system")},$c=w.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnPrimary)),Po={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorPrimary)),color:$c,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",$c)},Bc={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Hc=[w.noTextSelect,Br.css`
611
611
  :host {
612
612
  display: inline-block;
613
613
  max-width: 100%;
@@ -623,21 +623,21 @@
623
623
  box-sizing: border-box;
624
624
  pointer-events: auto;
625
625
 
626
- --chip-internal-font-size: ${pt.fontSize};
627
- --chip-internal-font-weight: ${pt.fontWeight};
626
+ --chip-internal-font-size: ${he.fontSize};
627
+ --chip-internal-font-weight: ${he.fontWeight};
628
628
  --chip-internal-line-height: max(20px, calc(var(--chip-internal-font-size) + 2px));
629
- ${(0,R.setVariable)(bt.size,pt.iconSize)};
630
- --chip-internal-vertical-padding: ${pt.verticalPadding};
631
- --chip-internal-horizontal-padding: ${pt.horizontalPadding};
629
+ ${(0,w.setVariable)(xe.size,he.iconSize)};
630
+ --chip-internal-vertical-padding: ${he.verticalPadding};
631
+ --chip-internal-horizontal-padding: ${he.horizontalPadding};
632
632
  --chip-internal-icon-padding: 3px;
633
- --chip-internal-content-height: max(var(--chip-internal-line-height), ${pt.iconSize});
633
+ --chip-internal-content-height: max(var(--chip-internal-line-height), ${he.iconSize});
634
634
 
635
- border: 1px solid ${pt.borderColor};
636
- color: ${pt.color};
637
- ${(0,R.setVariable)(at.color,pt.rippleColor)};
638
- border-radius: var(${(0,Vr.unsafeCSS)(pt.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
635
+ border: 1px solid ${he.borderColor};
636
+ color: ${he.color};
637
+ ${(0,w.setVariable)(ce.color,he.rippleColor)};
638
+ border-radius: var(${(0,Br.unsafeCSS)(he.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
639
639
  padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
640
- background-color: ${pt.backgroundColor};
640
+ background-color: ${he.backgroundColor};
641
641
  line-height: var(--chip-internal-content-height);
642
642
  }
643
643
 
@@ -647,28 +647,28 @@
647
647
 
648
648
  .ft-chip--dense {
649
649
  --chip-internal-icon-padding: 3px;
650
- --chip-internal-vertical-padding: ${Oc.verticalPadding};
651
- --chip-internal-horizontal-padding: ${Oc.horizontalPadding};
650
+ --chip-internal-vertical-padding: ${Bc.verticalPadding};
651
+ --chip-internal-horizontal-padding: ${Bc.horizontalPadding};
652
652
  --chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
653
653
  }
654
654
 
655
655
  .ft-chip--no-content {
656
- --chip-internal-horizontal-padding: ${pt.horizontalPadding.get(Vr.css`var(--chip-internal-vertical-padding)`)};
656
+ --chip-internal-horizontal-padding: ${he.horizontalPadding.get(Br.css`var(--chip-internal-vertical-padding)`)};
657
657
  }
658
658
 
659
659
  .ft-chip--disabled {
660
660
  cursor: default;
661
661
  pointer-events: none;
662
662
  filter: grayscale(1);
663
- opacity: ${pt.opacityDisabled};
663
+ opacity: ${he.opacityDisabled};
664
664
  }
665
665
 
666
666
  .ft-chip--highlighted {
667
667
  border: none;
668
668
  padding: var(--chip-internal-vertical-padding) var(--chip-internal-horizontal-padding);
669
- background-color: ${To.backgroundColor};
670
- ${(0,R.setVariable)(at.color,To.rippleColor)};
671
- color: ${To.color};
669
+ background-color: ${Po.backgroundColor};
670
+ ${(0,w.setVariable)(ce.color,Po.rippleColor)};
671
+ color: ${Po.color};
672
672
  }
673
673
 
674
674
  .ft-chip--clickable {
@@ -677,7 +677,7 @@
677
677
  }
678
678
 
679
679
  .ft-chip:focus {
680
- outline: 2px solid ${R.designSystemVariables.colorPrimary};
680
+ outline: 2px solid ${w.designSystemVariables.colorPrimary};
681
681
  outline-offset: 2px;
682
682
  }
683
683
 
@@ -699,9 +699,9 @@
699
699
  }
700
700
 
701
701
  .ft-chip--icon-button {
702
- ${(0,R.setVariable)($.iconSize,pt.iconSize)};
703
- ${(0,R.setVariable)($.horizontalPadding,"var(--chip-internal-icon-padding)")};
704
- ${(0,R.setVariable)($.verticalPadding,"var(--chip-internal-icon-padding)")};
702
+ ${(0,w.setVariable)(B.iconSize,he.iconSize)};
703
+ ${(0,w.setVariable)(B.horizontalPadding,"var(--chip-internal-icon-padding)")};
704
+ ${(0,w.setVariable)(B.verticalPadding,"var(--chip-internal-icon-padding)")};
705
705
  margin: calc((-1) * var(--chip-internal-icon-padding));
706
706
  }
707
707
 
@@ -709,9 +709,9 @@
709
709
  vertical-align: bottom;
710
710
  display: block;
711
711
  margin: 0 var(--chip-internal-horizontal-padding);
712
- ${(0,R.setVariable)(Tt.fontSize,"var(--chip-internal-font-size)")};
713
- ${(0,R.setVariable)(Tt.fontWeight,"var(--chip-internal-font-weight)")};
714
- ${(0,R.setVariable)(Tt.lineHeight,"var(--chip-internal-content-height)")};
712
+ ${(0,w.setVariable)(Te.fontSize,"var(--chip-internal-font-size)")};
713
+ ${(0,w.setVariable)(Te.fontWeight,"var(--chip-internal-font-weight)")};
714
+ ${(0,w.setVariable)(Te.lineHeight,"var(--chip-internal-content-height)")};
715
715
  }
716
716
 
717
717
  .ft-chip--safari-fix .ft-chip--label {
@@ -747,19 +747,19 @@
747
747
  .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
748
748
  order: -1;
749
749
  }
750
- `];var lt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Gn=class extends CustomEvent{constructor(){super("icon-click")}},B=class extends ur.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var t;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":ur.isSafari};return Wn.html`
751
- <div class="${(0,_c.classMap)(r)}"
750
+ `];var ue=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},nn=class extends CustomEvent{constructor(){super("icon-click")}},H=class extends rr.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":rr.isSafari};return rn.html`
751
+ <div class="${(0,Fc.classMap)(r)}"
752
752
  aria-label="${this.getLabel()}"
753
753
  tabindex="${this.interactionsOnChip?0:-1}"
754
754
  @keyup=${this.onKeyUp}
755
755
  part="chip">
756
756
  <ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
757
- <ft-typography variant="${(t=this.typographyVariant)!==null&&t!==void 0?t:"body2"}" element="span" class="ft-chip--label" part="label">
757
+ <ft-typography variant="${(e=this.typographyVariant)!==null&&e!==void 0?e:"body2"}" element="span" class="ft-chip--label" part="label">
758
758
  <slot @slotchange=${this.onSlotchange}></slot>
759
759
  </ft-typography>
760
760
  ${this.internalIcon?this.renderIcon():null}
761
761
  </div>
762
- `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?Wn.html`
762
+ `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?rn.html`
763
763
  <ft-button round
764
764
  class="ft-chip--icon-button"
765
765
  @click=${this.onIconClick}
@@ -770,11 +770,11 @@
770
770
  part="icon-button"
771
771
  ?hideTooltip=${this.hideIconTooltip}
772
772
  ></ft-button>
773
- `:Wn.html`
773
+ `:rn.html`
774
774
  <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
775
775
  <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
776
776
  </div>
777
- `}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Gn))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Gn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,ur.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};B.elementDefinitions={"ft-ripple":P,"ft-typography":X,"ft-icon":Z,"ft-button":_};B.styles=Rc;lt([(0,tt.property)({type:Boolean})],B.prototype,"highlighted",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"removable",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"disabled",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"clickable",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"iconClickable",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"dense",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"multiLine",void 0);lt([(0,tt.property)()],B.prototype,"label",void 0);lt([(0,tt.property)()],B.prototype,"iconLabel",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"hideIconTooltip",void 0);lt([(0,tt.property)()],B.prototype,"icon",void 0);lt([(0,tt.property)()],B.prototype,"iconVariant",void 0);lt([(0,tt.property)({type:Boolean})],B.prototype,"trailingIcon",void 0);lt([(0,tt.property)()],B.prototype,"typographyVariant",void 0);lt([(0,tt.query)("ft-typography slot")],B.prototype,"slottedContent",void 0);var Pc=m(E());var Lc={"ft-chip":B};(0,Pc.customElements)(Lc);var Uc=m(L()),G=m(W()),fr=m(E());var $c=m(lr());var zr=m(L()),pr=m(W()),Xn=m(E());var Ic=m(L()),qn=m(E()),Id={iconColor:qn.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",qn.designSystemVariables.colorOnSurfaceMedium)},Mc=Ic.css`
777
+ `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new nn))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new nn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,rr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};H.elementDefinitions={"ft-ripple":M,"ft-typography":Q,"ft-icon":te,"ft-button":R};H.styles=Hc;ue([(0,re.property)({type:Boolean})],H.prototype,"highlighted",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"removable",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"disabled",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"clickable",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"iconClickable",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"dense",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"multiLine",void 0);ue([(0,re.property)()],H.prototype,"label",void 0);ue([(0,re.property)()],H.prototype,"iconLabel",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"hideIconTooltip",void 0);ue([(0,re.property)()],H.prototype,"icon",void 0);ue([(0,re.property)()],H.prototype,"iconVariant",void 0);ue([(0,re.property)({type:Boolean})],H.prototype,"trailingIcon",void 0);ue([(0,re.property)()],H.prototype,"typographyVariant",void 0);ue([(0,re.query)("ft-typography slot")],H.prototype,"slottedContent",void 0);var jc=f(E());var Vc={"ft-chip":H};(0,jc.customElements)(Vc);var Yc=f(L()),q=f(G()),or=f(E());var Xc=f(er());var Hr=f(L()),nr=f(G()),an=f(E());var zc=f(L()),on=f(E()),ip={iconColor:on.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",on.designSystemVariables.colorOnSurfaceMedium)},Kc=zc.css`
778
778
  .ft-floating-menu-item {
779
779
  cursor: pointer;
780
780
  display: flex;
@@ -794,7 +794,7 @@
794
794
  }
795
795
 
796
796
  .ft-floating-menu-item ft-icon {
797
- color: ${Id.iconColor};
797
+ color: ${ip.iconColor};
798
798
  margin-left: 0;
799
799
  flex-shrink: 0;
800
800
  flex-grow: 0;
@@ -809,25 +809,25 @@
809
809
  word-break: break-word;
810
810
  hyphens: auto;
811
811
  }
812
- `;var Nc=m(lr()),dr=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Yn=class extends CustomEvent{constructor(t){super("ft-floating-menu-item-select",{detail:t,bubbles:!0,composed:!0})}},nt=class extends Xn.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return zr.html`
813
- <div class="${(0,Nc.classMap)(this.floatingClasses)}"
812
+ `;var Wc=f(er()),ir=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},sn=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},oe=class extends an.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return Hr.html`
813
+ <div class="${(0,Wc.classMap)(this.floatingClasses)}"
814
814
  tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
815
815
  aria-disabled="${this.disabled}"
816
- @keydown=${t=>this.onKeyDown(t)}
816
+ @keydown=${e=>this.onKeyDown(e)}
817
817
  @click=${this.onClick}>
818
818
  <ft-ripple
819
819
  ?disabled=${this.disabled}
820
820
  ></ft-ripple>
821
- ${this.icon?zr.html`
821
+ ${this.icon?Hr.html`
822
822
  <ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
823
- `:zr.nothing}
824
- <ft-typography variant="${St.body2}">
823
+ `:Hr.nothing}
824
+ <ft-typography variant="${_e.body2}">
825
825
  <slot></slot>
826
826
  </ft-typography>
827
827
  </div>
828
- `}onClick(t){this.disabled?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.dispatchEvent(new Yn(this.value))}onKeyDown(t){(t.key=="Enter"||t.key==" ")&&(t.preventDefault(),this.dispatchEvent(new Yn(this.value)))}};nt.elementDefinitions={"ft-icon":Z,"ft-ripple":P,"ft-typography":X};nt.styles=Mc;dr([(0,pr.property)()],nt.prototype,"iconVariant",void 0);dr([(0,pr.property)()],nt.prototype,"icon",void 0);dr([(0,pr.property)()],nt.prototype,"value",void 0);dr([(0,pr.property)({type:Boolean})],nt.prototype,"notFocusable",void 0);dr([(0,pr.property)({type:Boolean})],nt.prototype,"disabled",void 0);dr([(0,Xn.ignoreComposingEvents)()],nt.prototype,"onKeyDown",null);var Dc=m(L()),xt=m(E()),he={zIndex:xt.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:xt.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:xt.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:xt.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",xt.designSystemVariables.colorOnSurfaceHigh),colorSurface:xt.FtCssVariableFactory.external(xt.designSystemVariables.colorSurface,"Design system"),menuElevation:xt.FtCssVariableFactory.external(xt.designSystemVariables.elevation02,"Design system"),borderRadiusS:xt.FtCssVariableFactory.external(xt.designSystemVariables.borderRadiusS,"Design system")},kc=Dc.css`
828
+ `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new sn(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new sn(this.value)))}};oe.elementDefinitions={"ft-icon":te,"ft-ripple":M,"ft-typography":Q};oe.styles=Kc;ir([(0,nr.property)()],oe.prototype,"iconVariant",void 0);ir([(0,nr.property)()],oe.prototype,"icon",void 0);ir([(0,nr.property)()],oe.prototype,"value",void 0);ir([(0,nr.property)({type:Boolean})],oe.prototype,"notFocusable",void 0);ir([(0,nr.property)({type:Boolean})],oe.prototype,"disabled",void 0);ir([(0,an.ignoreComposingEvents)()],oe.prototype,"onKeyDown",null);var Gc=f(L()),Ee=f(E()),ut={zIndex:Ee.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Ee.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Ee.designSystemVariables.colorOnSurfaceHigh),colorSurface:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.colorSurface,"Design system"),menuElevation:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.elevation02,"Design system"),borderRadiusS:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.borderRadiusS,"Design system")},qc=Gc.css`
829
829
  .ft-floating-menu {
830
- color: ${he.textColor};
830
+ color: ${ut.textColor};
831
831
  display: contents;
832
832
  }
833
833
 
@@ -844,20 +844,20 @@
844
844
  display: none;
845
845
  position: relative;
846
846
  overflow: auto;
847
- max-width: ${he.maxWidth};
848
- max-height: ${he.maxHeight};
849
- box-shadow: ${he.menuElevation};
850
- background-color: ${he.colorSurface};
851
- border-radius: ${he.borderRadiusS};
852
- color: ${he.textColor};
853
- z-index: ${he.zIndex};
847
+ max-width: ${ut.maxWidth};
848
+ max-height: ${ut.maxHeight};
849
+ box-shadow: ${ut.menuElevation};
850
+ background-color: ${ut.colorSurface};
851
+ border-radius: ${ut.borderRadiusS};
852
+ color: ${ut.textColor};
853
+ z-index: ${ut.zIndex};
854
854
  }
855
855
 
856
856
  .ft-floating-menu--open .ft-floating-menu--options {
857
857
  display: block;
858
858
  }
859
- `;var it=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Qn=class extends CustomEvent{constructor(t){super("change",{detail:{open:t}})}};var Jn=class extends CustomEvent{constructor(t){super("select",{detail:t})}},k=class extends fr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=jt.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=t=>{this.menuOpen=this.menuOpen&&t.composedPath().includes(this.container)}}updated(t){super.updated(t),t.has("menuOpen")&&this.dispatchEvent(new Qn(this.menuOpen))}render(){let t={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Uc.html`
860
- <div part="container" class="${(0,$c.classMap)(t)}" @keydown=${this.onKeyDown}>
859
+ `;var se=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},ln=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var cn=class extends CustomEvent{constructor(e){super("select",{detail:e})}},U=class extends or.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Ve.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new ln(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Yc.html`
860
+ <div part="container" class="${(0,Xc.classMap)(e)}" @keydown=${this.onKeyDown}>
861
861
  <slot name="toggle"
862
862
  part="toggle"
863
863
  @click=${this.toggleMenu}
@@ -887,7 +887,7 @@
887
887
  </div>
888
888
  </div>
889
889
  </div>
890
- `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onItemSelect(t){t.stopPropagation(),this.dispatchEvent(new Jn(t.detail)),this.closeMenu()}onContentClick(t){(0,fr.eventPathContainsMatchingElement)(t,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let t=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:n}=await ln(t,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${n}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(t){t.key=="Escape"&&(this.closeMenu(),t.stopPropagation())}};k.elementDefinitions={"ft-floating-menu-item":nt,"ft-button":_};k.styles=kc;it([(0,G.property)()],k.prototype,"horizontalAlignment",void 0);it([(0,G.property)()],k.prototype,"verticalAlignment",void 0);it([(0,fr.jsonProperty)([])],k.prototype,"closeMenuMatchers",void 0);it([(0,G.property)({type:Boolean})],k.prototype,"primary",void 0);it([(0,G.property)()],k.prototype,"label",void 0);it([(0,G.property)()],k.prototype,"tooltipPosition",void 0);it([(0,G.property)()],k.prototype,"icon",void 0);it([(0,G.property)()],k.prototype,"iconVariant",void 0);it([(0,G.property)()],k.prototype,"text",void 0);it([(0,G.property)({type:Boolean})],k.prototype,"disabled",void 0);it([(0,G.state)()],k.prototype,"menuOpen",void 0);it([(0,G.state)()],k.prototype,"forceMenuOpen",void 0);it([(0,G.query)(".ft-floating-menu")],k.prototype,"container",void 0);it([(0,G.query)(".ft-floating-menu--wrapper")],k.prototype,"menuWrapper",void 0);it([(0,G.query)("#actions-button")],k.prototype,"actionButton",void 0);it([(0,G.queryAssignedElements)({slot:"toggle"})],k.prototype,"customToggle",void 0);var Bc=m(L()),Zn=m(E()),Md={color:Zn.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",Zn.designSystemVariables.colorOnSurfaceMedium)},Hc=Bc.css`
890
+ `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new cn(e.detail)),this.closeMenu()}onContentClick(e){(0,or.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await ii(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};U.elementDefinitions={"ft-floating-menu-item":oe,"ft-button":R};U.styles=qc;se([(0,q.property)()],U.prototype,"horizontalAlignment",void 0);se([(0,q.property)()],U.prototype,"verticalAlignment",void 0);se([(0,or.jsonProperty)([])],U.prototype,"closeMenuMatchers",void 0);se([(0,q.property)({type:Boolean})],U.prototype,"primary",void 0);se([(0,q.property)()],U.prototype,"label",void 0);se([(0,q.property)()],U.prototype,"tooltipPosition",void 0);se([(0,q.property)()],U.prototype,"icon",void 0);se([(0,q.property)()],U.prototype,"iconVariant",void 0);se([(0,q.property)()],U.prototype,"text",void 0);se([(0,q.property)({type:Boolean})],U.prototype,"disabled",void 0);se([(0,q.state)()],U.prototype,"menuOpen",void 0);se([(0,q.state)()],U.prototype,"forceMenuOpen",void 0);se([(0,q.query)(".ft-floating-menu")],U.prototype,"container",void 0);se([(0,q.query)(".ft-floating-menu--wrapper")],U.prototype,"menuWrapper",void 0);se([(0,q.query)("#actions-button")],U.prototype,"actionButton",void 0);se([(0,q.queryAssignedElements)({slot:"toggle"})],U.prototype,"customToggle",void 0);var Qc=f(L()),un=f(E()),np={color:un.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",un.designSystemVariables.colorOnSurfaceMedium)},Zc=Qc.css`
891
891
  .ft-floating-menu-label {
892
892
  padding: 4px 8px;
893
893
  }
@@ -898,72 +898,72 @@
898
898
  width: max-content;
899
899
  text-overflow: ellipsis;
900
900
  overflow: hidden;
901
- color: ${Md.color}
901
+ color: ${np.color}
902
902
  }
903
- `;var Fc=m(L()),jc=m(E());var me=class extends jc.FtLitElement{render(){return Fc.html`
903
+ `;var Jc=f(L()),eu=f(E());var dt=class extends eu.FtLitElement{render(){return Jc.html`
904
904
  <div class="ft-floating-menu-label">
905
- <ft-typography variant="${St.caption}">
905
+ <ft-typography variant="${_e.caption}">
906
906
  <slot></slot>
907
907
  </ft-typography>
908
908
  </div>
909
- `}};me.elementDefinitions={"ft-typography":X};me.styles=Hc;var zc=m(E());var Vc={"ft-floating-menu":k,"ft-floating-menu-item":nt,"ft-floating-menu-label":me};(0,zc.customElements)(Vc);var Kr=m(E());function Nd(e){var t;return((t=(0,Kr.accessResult)(e))===null||t===void 0?void 0:t.openMode)===Cn.EXTERNAL}function Co(e){return Nd(e)?(0,Kr.accessResult)(e).originUrl:(0,Kr.accessResultUrl)(e)}var Zc=m(Wc());var wo=Hn.build("designedReaderMapMetadata");var Gc=m(L());var qc=Gc.css`
910
- `;var Wr=m(L()),Ne=m(W()),Y=m(E());var ft=m(E());var Yc=m(E()),Dd={setTranslationDestinationLanguage:(e,t)=>{e.translation.destinationLanguage=t.payload},setTranslationSourceLanguage:(e,t)=>{e.translation.sourceLanguage=t.payload},setTranslationProfileId:(e,t)=>{e.translation.profileId=t.payload},setTranslationLoading:(e,t)=>{e.translation.isLoading=t.payload},setTranslationError:(e,t)=>{e.translation.isError=t.payload},setTopicsRating:(e,t)=>{for(let r in t.payload)e.topicsRating[r]=t.payload[r]}},Xc=e=>Yc.FtReduxStore.get({name:"ft-reader-"+e,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:Dd});var Oo=class{constructor(t,r){this.mapId=t,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(t,r,n){return t.flatMap(i=>{var o;return i.pageConfiguration&&this.registerPage(this.buildPage(i,n)),i.tocId==null?this.extractPagesToc(i.children,r,n):[{tocId:i.tocId,title:(o=i.title)!==null&&o!==void 0?o:"",untranslatedTitle:i.untranslatedTitle,depth:r,children:this.extractPagesToc(i.children,r+1,i.tocId)}]})}convertNodes(t,r,n){return t.flatMap(i=>{var o,s,a;if(i.tocId==null)return[...this.convertSectionNodes((o=i.pageToc)!==null&&o!==void 0?o:[],r,i.tocId),...this.convertNodes(i.children,r,i.tocId)];let l=(s=i.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:i.tocId,contentId:i.contentId,title:i.title,untranslatedTitle:i.untranslatedTitle,hasRating:i.hasRating,origin:i.origin,prettyUrl:l,depth:r,parentTocId:n,children:[]};this.register(c);let u=this.convertSectionNodes((a=i.pageToc)!==null&&a!==void 0?a:[],r+1,i.tocId),p=this.convertNodes(i.children,r+1,c.tocId);return c.children=[...u,...p],[c]})}convertSectionNodes(t,r,n){return t.flatMap(i=>{var o;let s=(o=i.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...i,prettyUrl:s,depth:r,parentTocId:n,children:[]};return this.register(a),a.children=this.convertSectionNodes(i.children,r+1,i.tocId),[a]})}buildPage(t,r){var n,i,o,s,a,l,c,u;let p=(n=t.tocId)!==null&&n!==void 0?n:(o=(i=t.pageToc)===null||i===void 0?void 0:i[0])===null||o===void 0?void 0:o.tocId,d={number:this.pages.length+1,title:(s=t.title)!==null&&s!==void 0?s:"",untranslatedTitle:t.untranslatedTitle,rootTocId:p??"root",toc:((a=t.pageToc)!==null&&a!==void 0?a:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],rootDepth:p?this.nodeByTocId[p].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},f=(b,x)=>(x?d.topics:d.hiddenTopics).push(b),h=(c=(l=t.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];d.breadcrumb.forEach((b,x)=>{f(b,h[x])}),t.tocId&&f(t.tocId,t.pageConfiguration.isVisible),d.topics.push(...this.tocIds((u=t.pageToc)!==null&&u!==void 0?u:[]));let g=this.resolveOverridenRootTocIdByParentForcedByPagination(d.breadcrumb,h);return d.rootTocId=g??d.rootTocId,d.rootDepth=g?this.nodeByTocId[g].depth:d.rootDepth,d}resolveOverridenRootTocIdByParentForcedByPagination(t,r){for(let n=0;n<t.length;n++)if(r[n])return t[n]}registerPage(t){for(let r of[...t.topics,...t.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=t);this.pages.push(t)}tocIds(t){return t.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(t){let r=[t.tocId];for(;t?.parentTocId;)r.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return r}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},ti=class{convertPaginatedToc(t,r){return new Oo(t,r).build()}};var ei=class extends rt{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,r,n){super(!1,r),this.converter=t,this._mapId=n,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(r=>this.converter.convertPaginatedToc(t,r)))),this.cache.register("ratingSummary",()=>{var t,r;return Qt((r=(t=A.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(i=>this.fetchMapRating(i)):Promise.resolve()})}clear(){this.cache.clearMatching(t=>t!=="configuration")}makeCacheKey(t,r){return t+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(t){return this.cache.get(this.makeCacheKey("map",t),()=>this.fetchMap(this.mapId,t))}getMapNow(t){return this.cache.getNow(this.makeCacheKey("map",t))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(t){return this.cache.get(this.makeCacheKey("enrichedToc",t),()=>this.fetchPages(this.mapId,t).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(t){return this.cache.getNow(this.makeCacheKey("enrichedToc",t))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(t){return(await this.getEnrichedToc(t)).toc}async getPagesToc(t){return(await this.getEnrichedToc(t)).pagesToc}async getTranslationError(t){return(await this.getEnrichedToc(t)).translationError}async getTocNode(t,r){return(await this.getEnrichedToc(r)).nodeByTocId[t]}getTocNodeNow(t,r){var n;return(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByTocId[t]}getTocNodeNowByUrl(t,r){var n,i;let o=this.getMapNow(r);return o?.prettyUrl==t||`${o?.id}/root`===t?(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.toc[0]:(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByUrl[t]}async getPage(t,r){let n=await this.getEnrichedToc(r);return n.pages[t-1]||n.pages[0]}async getPageByTocId(t,r){let n=await this.getEnrichedToc(r);return n.pageByTocId[t]||n.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getTranslatedTopicContent(t,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+t.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(t,r))}async getTopicMetadataValue(t,r){let n=this.getTocNodeNow(t);if(!n)return;let i=await this.getTopicInfo(n);return i?.metadata.find(o=>o.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}getRelativesForTopicInMap(t,r,n){return this.cache.get("topic-relatives-"+[t,r,...n].join("-"),()=>this.fetchRelativesForTopicInMap(t,r,n))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true&locationValue=reader`)}getLink(t,r,n){let i=this.getNavigationData(t,r,n),o=this.getReaderLinkPrefix()+(i.prettyUrl?i.prettyUrl:`${i.mapId}/${i.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return i.page!=null&&s.searchParams.set("page",`${i.page}`),i.prettyUrlDuplicated&&s.searchParams.set("tocId",i.tocId),i.section!=null&&s.searchParams.set("section",i.section),s.href}getNavigationData(t,r,n,i){var o,s;t=t||"root";let a=this.getEnrichedTocNow(i),l=a?.pageByTocId[t],c=a?.nodeByTocId[t],u=c?.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:n}}async getAccurateNavigationData(t,r,n,i){return await this.getEnrichedToc(i),this.getNavigationData(t,r,n,i)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){return this.getRatingSummary().then(r=>{var n;return r?{type:r.topics.type,rating:(n=r.topics)===null||n===void 0?void 0:n.ratings.find(i=>i.tocId===t)}:void 0})}rateMap(t,r){return this.makeRateMapRequest(t,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,r){return this.makeMapFeedbackRequest(t,r)}rateTopic(t,r,n){return this.makeRateTopicRequest(t,r,n).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=A.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,r,n){return this.makeTopicFeedbackRequest(t,r,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t,r){let n=this.getTocNodeNow(t,r),i=[{tocId:n.tocId,title:n.title,untranslatedTitle:n.untranslatedTitle}],o=this.getTocNodeNow(n.parentTocId,r);for(;o;)i.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return i}isFeatureAccessible(t,{session:r}){var n;if(!this.isFeatureAvailable(t))return!1;switch(t){case Kt.FEEDBACK:return Qt(r??[],M.FEEDBACK_USER);case Kt.RATING:return Qt(r??[],M.RATING_USER);case Kt.PRINT:return Qt(r??[],M.PRINT_USER);case Kt.BOOKMARK:return!!r?.sessionAuthenticated;case Kt.COLLECTIONS:return Qt(r??[],M.COLLECTION_USER);case Kt.PERSONAL_BOOKS:return Qt(r??[],M.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var ri=class e extends ei{static async build(t){return new e(new ti,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t,r){let n=await this.api.getMap(t,r);return this.fingerprint=n.fingerprint,n}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t,r){return await this.getMap(r),this.api.getPages(t,this.fingerprint,r)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(t,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,r){let n={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(n)}fetchRelativesForTopicInMap(t,r,n){let i={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:n}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[t]}}],sort:[],facets:[]};return this.api.search(i)}makeMapFeedbackRequest(t,r){return this.api.sendMapFeedback(this.mapId,t,r)}makeRateMapRequest(t,r){return this.api.rateMap(this.mapId,t,r)}makeRateTopicRequest(t,r,n){return this.api.rateTopic(this.mapId,t,r,n)}makeTopicFeedbackRequest(t,r,n){return this.api.sendTopicFeedback(this.mapId,t,r,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var kd="topicPivot";function ni(e,t){let r=new URL(e);return t?.values.forEach(n=>{r.searchParams.append(kd,n)}),r.href}var ii=class e{static build(t,r){return new e(Xc(t.trim()||"context"),r??ri.build)}loaded(){return(0,ft.waitUntil)(()=>this._loaded)}constructor(t,r,n,i){this.store=t,this.clusteringHelperProvider=n,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ft.Debouncer(10),this.analyticsEventsService=i??new Mn,this.initService(r)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setRenderedTopics(t){this.store.actions.renderedTopics(t)}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,ft.waitFor)(()=>this.service)}async navigateToTopic(t,r,n){await this.loaded();let i=await this.awaitService(),o=await(n!=null?i.getPage(n,this.getTranslationSettings()):i.getPageByTocId(t??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(t,o);this.store.actions.scrollTarget({tocId:s,section:r})}resolveValidNonRootTocId(t,r){var n,i,o;let s=(n=t==="root"?void 0:t)!==null&&n!==void 0?n:r.rootTocId;return r.topics.includes(s)?s:(t!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(ee.requestedTopicNotFound,{detail:{tocId:s}})),(o=(i=r.topics[0])!==null&&i!==void 0?i:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}async navigateToPage(t){await this.loaded();let n=await(await this.awaitService()).getPage(t,this.getTranslationSettings());this.store.actions.currentPage(n)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var t;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(t){var r,n,i,o,s;try{t&&this.setTranslationLoading(!0);let a=l=>{throw t&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(t).then(l=>this.store.actions.map(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getToc(t).then(l=>this.store.actions.toc(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getPagesToc(t).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(t).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,t&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof ft.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var t;return(t=this.service)===null||t===void 0||t.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var t,r;let n=(t=this.store.getState().map)===null||t===void 0?void 0:t.metadata.filter(i=>{var o;return i.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(i=>i.values);if(n!==void 0&&n.length>0){let i=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,n)),o=i?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(ee.clusteringHelperCreated))}createClusteringHelper(){var t,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let n=this.store.getState().relatives;if(n){let i=n.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(t=A.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new ft.ClusteringHelper(n,i,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(t){var r,n,i;await this.loaded();let o=await(0,ft.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[t]);if(!((i=(n=(r=l?.results)===null||r===void 0?void 0:r[0])===null||n===void 0?void 0:n.entries)===null||i===void 0)&&i[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}async setTranslationDestinationLanguage(t){this.store.actions.setTranslationDestinationLanguage(t),t&&this.sendDocumentOnDemandTranslateEvent(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(t){this.store.actions.setTranslationSourceLanguage(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(t){this.store.actions.setTranslationProfileId(t)}async setTranslationLoading(t){this.store.actions.setTranslationLoading(t)}async setTranslationError(t){this.store.actions.setTranslationError(t)}getTranslationSettings(){var t;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(t=r.map)===null||t===void 0?void 0:t.lang}:void 0}setLinkPreviewDialogId(t){this.store.actions.linkPreviewDialogId(t)}async fetchMapRating(){var t;this.store.actions.mapRating(await((t=this.service)===null||t===void 0?void 0:t.getMapRating()))}async fetchTopicRating(t){var r;let n=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(t));n&&this.store.actions.setTopicsRating({[t]:n})}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}getAccurateNavigationData(t,r,n){return this.service.getAccurateNavigationData(t,r?.number,n?.section,this.getTranslationSettings())}buildBreadcrumb(t){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(t,this.getTranslationSettings())}fetchTopicContent(t){var r,n;let i=this.getTranslationSettings();return i?(this.sendTopicAiTranslateEvent(i.destinationLanguage,t),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(t,i).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(n=this.service)===null||n===void 0?void 0:n.getTopicContent(t)}getTocNode(t){return this.service.getTocNode(t,this.getTranslationSettings())}getPage(t){return this.service.getPage(t,this.getTranslationSettings())}onMapAttachmentsUpdate(){var t;(t=this.service)===null||t===void 0||t.clearMapAttachments(),this.store.dispatchEvent(new Event(ee.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(t){var r,n,i;this.store.getState().relatives==null&&await this.fetchRelatives();let o=ft.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t),s=(0,ft.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(n=this.store.getState().configuration)===null||n===void 0?void 0:n.relativeTopicPivotMetadata;if(l&&a){let c=await((i=this.service)===null||i===void 0?void 0:i.getTopicMetadataValue(a,l));s=ni(s,c)}}return s}sendDocumentOnDemandTranslateEvent(t){var r;let{editorMode:n,apiIntegrationIdentifier:i,apiIntegrationAppVersion:o}=A.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(n||!a||!i||!o||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:i,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(t.code),profileId:l,document:u,translationOrigin:Tn.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(t,r){var n;let{editorMode:i,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=A.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(i||!l||!o||!s||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let d={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(n=l.untranslatedTitle)!==null&&n!==void 0?n:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(t),breadcrumb:u.map(f=>{var h;return{tocId:f.tocId,title:(h=f.untranslatedTitle)!==null&&h!==void 0?h:f.title}}),document:d,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(t){if(!t)return;let r=t.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var oi=class extends CustomEvent{constructor(t,r){super("ft-reader-map-loaded",{detail:{map:t,toc:r}})}},si=class extends CustomEvent{constructor(t,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},ai=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},li=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},ci=class extends Event{constructor(){super("ft-reader-map-not-found")}},ui=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},di=class extends Event{constructor(){super("ft-reader-map-forbidden")}},pi=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var ht=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ro=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}},q=class extends Y.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Y.Debouncer(5),this.navigationDebouncer=new Y.Debouncer(10),this.mapLoadedEventDebouncer=new Y.Debouncer(50),this.addStore(A)}render(){return Wr.html`
909
+ `}};dt.elementDefinitions={"ft-typography":Q};dt.styles=Zc;var ru=f(E());var tu={"ft-floating-menu":U,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt};(0,ru.customElements)(tu);var Fr=f(E());function op(t){var e;return((e=(0,Fr.accessResult)(t))===null||e===void 0?void 0:e.openMode)===Di.EXTERNAL}function Lo(t){return op(t)?(0,Fr.accessResult)(t).originUrl:(0,Fr.accessResultUrl)(t)}var du=f(nu());var Mo=Xi.build("designedReaderMapMetadata");var ou=f(L());var su=ou.css`
910
+ `;var Vr=f(L()),Ot=f(G()),X=f(E());var me=f(E());var au=f(E()),sp={setTranslationDestinationLanguage:(t,e)=>{t.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(t,e)=>{t.translation.sourceLanguage=e.payload},setTranslationProfileId:(t,e)=>{t.translation.profileId=e.payload},setTranslationLoading:(t,e)=>{t.translation.isLoading=e.payload},setTranslationError:(t,e)=>{t.translation.isError=e.payload},setTopicsRating:(t,e)=>{for(let r in e.payload)t.topicsRating[r]=e.payload[r]}},lu=t=>au.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:sp});var Io=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,r,i){return e.flatMap(n=>{var o;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(o=n.title)!==null&&o!==void 0?o:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(e,r,i){return e.flatMap(n=>{var o,s,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(e,r,i){return e.flatMap(n=>{var o;let s=(o=n.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...n,prettyUrl:s,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(e,r){var i,n,o,s,a,l,c,u;let d=(i=e.tocId)!==null&&i!==void 0?i:(o=(n=e.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,p={number:this.pages.length+1,title:(s=e.title)!==null&&s!==void 0?s:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((a=e.pageToc)!==null&&a!==void 0?a:[]).map(y=>this.nodeByTocId[y.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},h=(y,_)=>(_?p.topics:p.hiddenTopics).push(y),v=(c=(l=e.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((y,_)=>{h(y,v[_])}),e.tocId&&h(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=e.pageToc)!==null&&u!==void 0?u:[]));let A=this.resolveOverridenRootTocIdByParentForcedByPagination(p.breadcrumb,v);return p.rootTocId=A??p.rootTocId,p.rootDepth=A?this.nodeByTocId[A].depth:p.rootDepth,p}resolveOverridenRootTocIdByParentForcedByPagination(e,r){for(let i=0;i<e.length;i++)if(r[i])return e[i]}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},dn=class{convertPaginatedToc(e,r){return new Io(e,r).build()}};var pn=class extends ne{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i){super(!1,r),this.converter=e,this._mapId=i,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return Ze((r=(e=b.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==e||`${o?.id}/root`===e?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[e]}async getPage(e,r){let i=await this.getEnrichedToc(r);return i.pages[e-1]||i.pages[0]}async getPageByTocId(e,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[e]||i.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let i=this.getTocNodeNow(e);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(o=>o.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,i){return this.cache.get("topic-relatives-"+[e,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,i))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,i){let n=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(e,r,i,n){var o,s;e=e||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[e],c=a?.nodeByTocId[e],u=c?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:i}}async getAccurateNavigationData(e,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(e,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,i){return this.makeRateTopicRequest(e,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=b.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i){return this.makeTopicFeedbackRequest(e,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let i=this.getTocNodeNow(e,r),n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],o=this.getTocNodeNow(i.parentTocId,r);for(;o;)n.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case Ke.FEEDBACK:return Ze(r??[],N.FEEDBACK_USER);case Ke.RATING:return Ze(r??[],N.RATING_USER);case Ke.PRINT:return Ze(r??[],N.PRINT_USER);case Ke.BOOKMARK:return!!r?.sessionAuthenticated;case Ke.COLLECTIONS:return Ze(r??[],N.COLLECTION_USER);case Ke.PERSONAL_BOOKS:return Ze(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var fn=class t extends pn{static async build(e){return new t(new dn,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let i=await this.api.getMap(e,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(e,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,i){return this.api.rateTopic(this.mapId,e,r,i)}makeTopicFeedbackRequest(e,r,i){return this.api.sendTopicFeedback(this.mapId,e,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var ap="topicPivot";function hn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(ap,i)}),r.href}var mn=class t{static build(e,r){return new t(lu(e.trim()||"context"),r??fn.build)}loaded(){return(0,me.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new me.Debouncer(10),this.analyticsEventsService=n??new ji,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,me.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(e,o);this.store.actions.scrollTarget({tocId:s,section:r})}resolveValidNonRootTocId(e,r){var i,n,o;let s=(i=e==="root"?void 0:e)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(e!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound,{detail:{tocId:s}})),(o=(n=r.topics[0])!==null&&n!==void 0?n:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}async navigateToPage(e){await this.loaded();let i=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,i,n,o,s;try{e&&this.setTranslationLoading(!0);let a=l=>{throw e&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(e).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(e).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof me.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let i=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(e=b.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new me.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let o=await(0,me.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[e]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));i&&this.store.actions.setTopicsRating({[e]:i})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,r,i){return this.service.getAccurateNavigationData(e,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=me.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),s=(0,me.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativeTopicPivotMetadata;if(l&&a){let c=await((n=this.service)===null||n===void 0?void 0:n.getTopicMetadataValue(a,l));s=hn(s,c)}}return s}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=b.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(i||!a||!n||!o||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:Ni.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=b.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!o||!s||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(h=>{var v;return{tocId:h.tocId,title:(v=h.untranslatedTitle)!==null&&v!==void 0?v:h.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var gn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},yn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},vn=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},bn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},xn=class extends Event{constructor(){super("ft-reader-map-not-found")}},En=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Sn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},An=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var ge=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},No=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends X.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new X.Debouncer(5),this.navigationDebouncer=new X.Debouncer(10),this.mapLoadedEventDebouncer=new X.Debouncer(50),this.addStore(b)}render(){return Vr.html`
911
911
  ${this.importStyleIfNeeded()}
912
912
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
913
- `}importStyleIfNeeded(){var t,r;let n=(t=this.stateManager.service)===null||t===void 0?void 0:t.themeStylesheet();return!n||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?Wr.nothing:Wr.html`
913
+ `}importStyleIfNeeded(){var e,r;let i=(e=this.stateManager.service)===null||e===void 0?void 0:e.themeStylesheet();return!i||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?Vr.nothing:Vr.html`
914
914
  <style>
915
- @import "${n}"
915
+ @import "${i}"
916
916
  </style>
917
- `}get stateManager(){return this._stateManager==null&&(this._stateManager=ii.build(this.id||(0,Y.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(t=>{let r=t.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",r),document.head.append(n)}window.FluidTopicsReaderService=new Ro(this.stateManager)}),A.addEventListener(Xt.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),A.addEventListener(Xt.eventName,this.updateConfiguration)}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>t.has(r))&&this.mapId&&this.navigateToTarget(),t.has("session")&&this.reload()}contentAvailableCallback(t){var r,n;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let i=t.get("scrollTarget");i?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(i.tocId,this.currentPage,i).then(o=>this.dispatchEvent(new ai(o))))}(t.has("visibleTopics")||t.has("scrollTarget"))&&((n=this.scrollTarget)===null||n===void 0?void 0:n.tocId)==null&&Promise.all(this.visibleTopics.map(i=>this.stateManager.getAccurateNavigationData(i,this.currentPage))).then(i=>{let o=i.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new si(this.map,o))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new pi),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(t){t.stopPropagation();let r=t.composedPath()[0];this.register(r)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){let r=t;r.status===401?this.dispatchEvent(new ui):r.status===403?this.dispatchEvent(new di):r.status===404?this.dispatchEvent(new ci):this.dispatchEvent(new li(t))}reloadBookmarks(){ho.reloadBookmarks()}async reloadRating(){var t,r;await((t=this.stateManager.service)===null||t===void 0?void 0:t.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new oi(this.map,this.toc))})}};q.styles=qc;ht([(0,Y.redux)({store:A.name})],q.prototype,"baseUrl",void 0);ht([(0,Y.redux)({store:A.name})],q.prototype,"session",void 0);ht([(0,Ne.property)()],q.prototype,"mapId",void 0);ht([(0,Ne.property)()],q.prototype,"tocId",void 0);ht([(0,Ne.property)()],q.prototype,"section",void 0);ht([(0,Ne.property)()],q.prototype,"topicPivot",void 0);ht([(0,Ne.property)()],q.prototype,"searchInDocumentQuery",void 0);ht([(0,Y.numberProperty)({min:1})],q.prototype,"page",void 0);ht([(0,Y.redux)({store:"reader"})],q.prototype,"map",void 0);ht([(0,Y.redux)({store:"reader"})],q.prototype,"toc",void 0);ht([(0,Y.redux)({store:"reader"})],q.prototype,"visibleTopics",void 0);ht([(0,Y.redux)({store:"reader"})],q.prototype,"currentPage",void 0);ht([(0,Y.redux)({store:"reader"})],q.prototype,"scrollTarget",void 0);ht([(0,Ne.property)({attribute:!1})],q.prototype,"readerServiceProvider",void 0);var Jc=m(E());var Qc={"ft-reader-context":q};(0,Jc.customElements)(Qc);var Gr=class{constructor(t){this.contentLocales=t}localize(t){var r,n;return t?.key!=="ft:locale"?t:{...t,displayValue:(r=this.findLocaleValue(t))!==null&&r!==void 0?r:t.displayValue,displayTooltipValue:(n=this.findLocaleValue(t))!==null&&n!==void 0?n:t.displayTooltipValue}}findLocaleValue(t){var r;return(r=this.contentLocales.find(n=>n.lang===t.value))===null||r===void 0?void 0:r.label}};var ot=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},H=class extends Da(Bn(qr)){constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(wo)}setReaderStateManager(t){super.setReaderStateManager(t),this.key&&this.useForSwitchingToRelatives&&t.registerMetadataForSwitchToRelatives(this.key)}updateRelatives(){var t,r,n,i;this.useForSwitchingToRelatives&&this.key?this.relatives=(i=(r=(t=this.stateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((n=this.map)===null||n===void 0?void 0:n.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&i!==void 0?i:[]:this.relatives=[]}render(){return mt.html`
917
+ `}get stateManager(){return this._stateManager==null&&(this._stateManager=mn.build(this.id||(0,X.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=e=>this.handleLoadError(e),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(e=>{let r=e.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),document.head.append(i)}window.FluidTopicsReaderService=new No(this.stateManager)}),b.addEventListener(Qe.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),b.addEventListener(Qe.eventName,this.updateConfiguration)}update(e){super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),e.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),e.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>e.has(r))&&this.mapId&&this.navigateToTarget(),e.has("session")&&this.reload()}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),(e.has("map")||e.has("toc"))&&this.sendLoadedEventIfLoaded(),e.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=e.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(o=>this.dispatchEvent(new vn(o))))}(e.has("visibleTopics")||e.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>this.stateManager.getAccurateNavigationData(n,this.currentPage))).then(n=>{let o=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new yn(this.map,o))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new An),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setReaderStateManager(this.stateManager)}handleLoadError(e){let r=e;r.status===401?this.dispatchEvent(new En):r.status===403?this.dispatchEvent(new Sn):r.status===404?this.dispatchEvent(new xn):this.dispatchEvent(new bn(e))}reloadBookmarks(){xo.reloadBookmarks()}async reloadRating(){var e,r;await((e=this.stateManager.service)===null||e===void 0?void 0:e.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new gn(this.map,this.toc))})}};Y.styles=su;ge([(0,X.redux)({store:b.name})],Y.prototype,"baseUrl",void 0);ge([(0,X.redux)({store:b.name})],Y.prototype,"session",void 0);ge([(0,Ot.property)()],Y.prototype,"mapId",void 0);ge([(0,Ot.property)()],Y.prototype,"tocId",void 0);ge([(0,Ot.property)()],Y.prototype,"section",void 0);ge([(0,Ot.property)()],Y.prototype,"topicPivot",void 0);ge([(0,Ot.property)()],Y.prototype,"searchInDocumentQuery",void 0);ge([(0,X.numberProperty)({min:1})],Y.prototype,"page",void 0);ge([(0,X.redux)({store:"reader"})],Y.prototype,"map",void 0);ge([(0,X.redux)({store:"reader"})],Y.prototype,"toc",void 0);ge([(0,X.redux)({store:"reader"})],Y.prototype,"visibleTopics",void 0);ge([(0,X.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);ge([(0,X.redux)({store:"reader"})],Y.prototype,"scrollTarget",void 0);ge([(0,Ot.property)({attribute:!1})],Y.prototype,"readerServiceProvider",void 0);var uu=f(E());var cu={"ft-reader-context":Y};(0,uu.customElements)(cu);var jr=class{constructor(e){this.contentLocales=e}localize(e){var r,i;return e?.key!=="ft:locale"?e:{...e,displayValue:(r=this.findLocaleValue(e))!==null&&r!==void 0?r:e.displayValue,displayTooltipValue:(i=this.findLocaleValue(e))!==null&&i!==void 0?i:e.displayTooltipValue}}findLocaleValue(e){var r;return(r=this.contentLocales.find(i=>i.lang===e.value))===null||r===void 0?void 0:r.label}};var ae=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},F=class extends Ga(Yi(zr)){constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(Mo)}setReaderStateManager(e){super.setReaderStateManager(e),this.key&&this.useForSwitchingToRelatives&&e.registerMetadataForSwitchToRelatives(this.key)}updateRelatives(){var e,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.map)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return ye.html`
918
918
  ${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
919
919
  ${this.hideIfEmpty()}
920
- `}renderSwitchToRelatives(){return mt.html`
920
+ `}renderSwitchToRelatives(){return ye.html`
921
921
  <div part="floating-menu-container" class="ft-reader-metadata--container">
922
922
  <ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
923
923
  ${this.renderChip(!0)}
924
924
  <ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
925
- ${(0,Zc.repeat)(this.relatives,t=>t.metadata.value,t=>this.renderRelativeItem(t.result,t.metadata))}
925
+ ${(0,du.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
926
926
  </ft-floating-menu>
927
927
  </div>
928
- `}renderChip(t=!1){var r,n,i,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((n=this.flatMetadata)===null||n===void 0?void 0:n.displayValue),c=`${this.metadataLabel}: ${(o=(i=this.flatMetadata)===null||i===void 0?void 0:i.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,u=mt.html`
928
+ `}renderChip(e=!1){var r,i,n,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,u=ye.html`
929
929
  <ft-chip part="chip"
930
930
  exportpartsPrefix="chip"
931
931
  label="${c}"
932
- slot="${l&&t?"toggle":""}"
933
- trailingIcon icon="${t?"thin_arrow":""}"
934
- ?clickable=${t}
932
+ slot="${l&&e?"toggle":""}"
933
+ trailingIcon icon="${e?"thin_arrow":""}"
934
+ ?clickable=${e}
935
935
  ?multiLine=${this.multiLine}>
936
- ${this.displayLabel?mt.html`
936
+ ${this.displayLabel?ye.html`
937
937
  <span part="label">${(a=(s=this.metadata)===null||s===void 0?void 0:s.label)!==null&&a!==void 0?a:this.key}: </span>
938
- `:mt.nothing}
939
- ${this.metadataValue.length===0?mt.nothing:mt.html`
938
+ `:ye.nothing}
939
+ ${this.metadataValue.length===0?ye.nothing:ye.html`
940
940
  <span part="values">${this.metadataValue}</span>
941
941
  `}
942
- </ft-chip>`;return l?u:mt.html`
942
+ </ft-chip>`;return l?u:ye.html`
943
943
  <ft-tooltip part="tooltip"
944
- slot="${t?"toggle":""}"
944
+ slot="${e?"toggle":""}"
945
945
  class="${this.multiLine?"ft-reader-metadata-multi-line":""}"
946
946
  text="${c}">
947
947
  ${u}
948
948
  </ft-tooltip>
949
- `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(t,r){var n,i;let o=this.translateValues&&(i=new Gr((n=this.availableContentLocales)!==null&&n!==void 0?n:[]).localize(r))!==null&&i!==void 0?i:r;return mt.html`
949
+ `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(e,r){var i,n;let o=this.translateValues&&(n=new jr((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r;return ye.html`
950
950
  <a part="relative-item-link"
951
- href="${Co(t)}"
952
- @click=${s=>this.addTopicPivotParam(s,t)}>
951
+ href="${Lo(e)}"
952
+ @click=${s=>this.addTopicPivotParam(s,e)}>
953
953
  <ft-ripple part="relative-item-ripple"></ft-ripple>
954
954
  <ft-floating-menu-item part="relative-item" value="${o.value}" notFocusable>
955
- ${o.value==null||o.value===o.displayValue?o.displayValue:mt.html`
955
+ ${o.value==null||o.value===o.displayValue?o.displayValue:ye.html`
956
956
  <ft-tooltip part="relative-item-tooltip" text="${o.value}">${o.displayValue}</ft-tooltip>
957
957
  `}
958
958
  </ft-floating-menu-item>
959
959
  </a>
960
- `}hideIfEmpty(){let t=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&t?mt.html`
960
+ `}hideIfEmpty(){let e=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&e?ye.html`
961
961
  <style>
962
962
  :host {
963
963
  display: none !important;
964
964
  }
965
965
  </style>
966
- `:mt.nothing}addTopicPivotParam(t,r){let n=this.stateManager.store.getState().visibleTopics[0];n&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(t.stopPropagation(),t.preventDefault(),this.service.getTopicMetadataValue(n,this.relativeTopicPivotMetadata).then(i=>{var o;let s=ni((o=Co(r))!==null&&o!==void 0?o:"",i),a=document.createElement("a");a.href=s,(t.ctrlKey||t.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(t){var r,n,i,o,s;super.willUpdate(t),t.has("key")&&this.useForSwitchingToRelatives&&(t.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(t.get("key"))),this.key&&((n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key))),t.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key):(o=this.stateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(t.has("translateValues")||t.has("metadata")||t.has("hierarchicalValueTruncatingLevel")||t.has("availableContentLocales")||this.dateFormatOptionsChanged(t))&&(this.flatMetadata=this.metadata?At.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new Gr((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}get metadataLabel(){var t,r,n,i,o,s;return this.metadata?this.metadata.label:(s=(i=(n=(r=(t=this.stateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||n===void 0?void 0:n.label)!==null&&i!==void 0?i:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}};H.elementDefinitions={"ft-chip":B,"ft-floating-menu":k,"ft-floating-menu-item":nt,"ft-floating-menu-label":me,"ft-ripple":P,"ft-tooltip":F};H.styles=No;ot([(0,Ut.property)(),(0,At.reduxReactive)()],H.prototype,"key",void 0);ot([(0,Ut.property)({type:Boolean})],H.prototype,"multiLine",void 0);ot([(0,Ut.property)({type:Boolean})],H.prototype,"useForSwitchingToRelatives",void 0);ot([(0,Ut.property)({type:Boolean})],H.prototype,"displayLabel",void 0);ot([(0,At.numberProperty)()],H.prototype,"hierarchicalValueTruncatingLevel",void 0);ot([(0,Ut.property)({type:Boolean})],H.prototype,"forceTooltip",void 0);ot([(0,Ut.property)({attribute:!1})],H.prototype,"editorMode",void 0);ot([(0,Ut.property)({type:Boolean})],H.prototype,"translateValues",void 0);ot([(0,At.redux)({store:"reader",selector:(e,t)=>{var r,n;return(n=(r=e.map)===null||r===void 0?void 0:r.metadata)===null||n===void 0?void 0:n.find(i=>i.key===t.key)}})],H.prototype,"metadata",void 0);ot([(0,Ut.state)()],H.prototype,"flatMetadata",void 0);ot([(0,At.redux)({store:"reader"})],H.prototype,"map",void 0);ot([(0,At.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.relativeTopicPivotMetadata}})],H.prototype,"relativeTopicPivotMetadata",void 0);ot([(0,Ut.state)()],H.prototype,"relatives",void 0);ot([(0,At.redux)({store:A.name})],H.prototype,"availableContentLocales",void 0);ot([Bl(wo.properties.itemWithNoValueForSwitchToRelatives())],H.prototype,"noValueMessage",void 0);ot([(0,At.reduxEventListener)({eventName:ee.clusteringHelperCreated})],H.prototype,"updateRelatives",null);var tu={"ft-reader-metadata":H};(0,eu.customElements)(tu);})();
966
+ `:ye.nothing}addTopicPivotParam(e,r){let i=this.stateManager.store.getState().visibleTopics[0];i&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(e.stopPropagation(),e.preventDefault(),this.service.getTopicMetadataValue(i,this.relativeTopicPivotMetadata).then(n=>{var o;let s=hn((o=Lo(r))!==null&&o!==void 0?o:"",n),a=document.createElement("a");a.href=s,(e.ctrlKey||e.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(e){var r,i,n,o,s;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.stateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?Se.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new jr((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}get metadataLabel(){var e,r,i,n,o,s;return this.metadata?this.metadata.label:(s=(n=(i=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}};F.elementDefinitions={"ft-chip":H,"ft-floating-menu":U,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt,"ft-ripple":M,"ft-tooltip":z};F.styles=Ho;ae([(0,Ue.property)(),(0,Se.reduxReactive)()],F.prototype,"key",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"multiLine",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"useForSwitchingToRelatives",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"displayLabel",void 0);ae([(0,Se.numberProperty)()],F.prototype,"hierarchicalValueTruncatingLevel",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"forceTooltip",void 0);ae([(0,Ue.property)({attribute:!1})],F.prototype,"editorMode",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"translateValues",void 0);ae([(0,Se.redux)({store:"reader",selector:(t,e)=>{var r,i;return(i=(r=t.map)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===e.key)}})],F.prototype,"metadata",void 0);ae([(0,Ue.state)()],F.prototype,"flatMetadata",void 0);ae([(0,Se.redux)({store:"reader"})],F.prototype,"map",void 0);ae([(0,Se.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],F.prototype,"relativeTopicPivotMetadata",void 0);ae([(0,Ue.state)()],F.prototype,"relatives",void 0);ae([(0,Se.redux)({store:b.name})],F.prototype,"availableContentLocales",void 0);ae([Ql(Mo.properties.itemWithNoValueForSwitchToRelatives())],F.prototype,"noValueMessage",void 0);ae([(0,Se.reduxEventListener)({eventName:et.clusteringHelperCreated})],F.prototype,"updateRelatives",null);var pu={"ft-reader-metadata":F};(0,fu.customElements)(pu);})();
967
967
  /*! Bundled license information:
968
968
 
969
969
  lit-html/lit-html.js: